How to hit the PagerDuty API

PagerDuty's REST API lives at https://api.pagerduty.com. It uses its own auth scheme, Token token=.

Authentication

Create a REST API key under Integrations → API Access Keys and send it as Authorization: Token token=<key>. In the examples it's written {{PAGERDUTY_API_KEY}}.

Full reference: https://developer.pagerduty.com/api-reference/

List open incidents

curl "https://api.pagerduty.com/incidents?statuses%5B%5D=triggered&statuses%5B%5D=acknowledged" \
  -H "Authorization: Token token={{PAGERDUTY_API_KEY}}" \
  -H "Accept: application/json"
Run in PostTaco

Who's on call

curl https://api.pagerduty.com/oncalls \
  -H "Authorization: Token token={{PAGERDUTY_API_KEY}}" \
  -H "Accept: application/json"
Run in PostTaco

List services

curl https://api.pagerduty.com/services \
  -H "Authorization: Token token={{PAGERDUTY_API_KEY}}" \
  -H "Accept: application/json"
Run in PostTaco