Development

March 19, 2021 ยท View on GitHub

This integration uses theth PagerDuty API, on their documentation there is a sample API key to test PagerDuty's API.

Prerequisites

Aside from what is documented in the README, no special tooling is required to run and test this integration.

Provider account setup

To setup a PagerDuty account for development, please take the following steps:

  1. Visit the PagerDuty site.
  2. Fill out the Trial sign up form then click Get Started.
  3. Go through PagerDuty's getting started steps until you reach the dashboard.

Authentication

Once you've created your account, you'll need to generate an API Key to access the PagerDuty API.

Visit https://support.pagerduty.com/docs/generating-api-keys and follow the instructions to create a REST API Key. When creating the API Key be sure to check Read Only Access

Once you have your API Key requests against PagerDuty's API looks like the following:

curl --location --request GET 'https://api.pagerduty.com/{resource}' \
--header 'Authorization: Token token={apiKey}'

Resource is the PagerDuty resource that you are requesting such as users, teams, or services and apiKey is the PagerDuty api token previously generated.

For more examples the PagerDuty API can be found here.

Testing

The PagerDuty API calls can return sensitive information such as names, emails, and phone numbers. As a result, be sure to scrub the responses of your PagerDuty API calls within your tests of sensitive information. The current tests have already had their Polly HAR files cleaned of sensitive information.