PagerDuty integration
In short
Read and open incidents, add notes, see who is on call. Connect it on the Integrations page; your app then calls PagerDuty through Sapilon without ever holding a PagerDuty credential.
Lets your app list, open, acknowledge and resolve PagerDuty incidents, add notes to them, and read services, schedules and who is on call.
Connecting
On the Integrations page choose Connect on PagerDuty and fill in:
- User API token — PagerDuty → your avatar → My Profile → User Settings → Create API User Token.
Sapilon checks the key with the provider before it saves it, and stores it encrypted; it is never shown again.
- Incidents are opened and changed as the user whose token you use.
What your app can do
Only these requests are available; anything else is refused.
GET /users/meGET|POST /incidentsGET|PUT /incidents/*GET|POST /incidents/*/notesGET /servicesGET /oncallsGET /schedules
How the agent uses it
Use integrations.request('pagerduty', …); paths are relative to https://api.pagerduty.com.
GET /incidents—query: { 'statuses[]': 'triggered', limit: '25' }.POST /incidents— needsheaders: { From: '<the user's email>' }. Example:{ method: 'POST', path: '/incidents', headers: { From: 'ops@acme.com' }, body: { incident: { type: 'incident', title: 'Checkout failing', service: { id: 'PSVC12', type: 'service_reference' }, urgency: 'high' } } }.GET|PUT /incidents/{id}— acknowledge or resolve:body: { incident: { type: 'incident', status: 'resolved' } }(withFrom).GET|POST /incidents/{id}/notes—body: { note: { content: 'Rolled back' } }(withFrom).GET /services,GET /schedules,GET /oncalls(query: { 'schedule_ids[]': 'PSCH1' }),GET /users/me.
Deleting is not allowed.
More from PagerDuty: https://developer.pagerduty.com/api-reference/