Integrations / PagerDuty
PagerDuty
Incident response: see incidents, services and who is on call.
6 actions
OAuth 2
6 read0 write
Calls api.pagerduty.com
Connect
const conn = await setu.connections.initiate({ userId: "user_1", toolkit: "pagerduty" });
console.log(conn.connectUrl); // show this to your user
await conn.waitUntilActive();Permissions requested
| Scope | Why it is requested |
|---|---|
users.read | Identify the connected PagerDuty user |
incidents.read | Read incidents and their notes |
services.read | Read services |
oncalls.read | See who is on call |
Actions
Get incidentreadpagerduty.get_incidentGet one incident by id: title, status, urgency, service and link.
Needs scope: incidents.read
| Input | Type | Description | |
|---|---|---|---|
id | string | Required | Incident id, e.g. PT4KHLK |
await setu.execute({
userId: "user_1",
action: "pagerduty.get_incident",
input: {
"id": "<id>"
},
});Get servicereadpagerduty.get_serviceGet one service by id: name, description, status and link.
Needs scope: services.read
| Input | Type | Description | |
|---|---|---|---|
id | string | Required | Service id, e.g. PIJ90N7 |
await setu.execute({
userId: "user_1",
action: "pagerduty.get_service",
input: {
"id": "<id>"
},
});List incident notesreadpagerduty.list_incident_notesList the notes added to an incident, with the text and time of each.
Needs scope: incidents.read
| Input | Type | Description | |
|---|---|---|---|
id | string | Required | Incident id |
await setu.execute({
userId: "user_1",
action: "pagerduty.list_incident_notes",
input: {
"id": "<id>"
},
});List incidentsreadpagerduty.list_incidentsList incidents, newest first, optionally filtered by status, service and time range (default last month, max 6 months). Returns ids, titles, statuses and services.
Needs scope: incidents.read
| Input | Type | Description | |
|---|---|---|---|
status | string | Optional | Only incidents with this status |
service_id | string | Optional | Only incidents of this service id |
since | string | Optional | Start of the time range, ISO 8601 |
until | string | Optional | End of the time range, ISO 8601 |
limit | integer | Optional | Results per page, up to 100 |
await setu.execute({
userId: "user_1",
action: "pagerduty.list_incidents",
input: {},
});List on-callsreadpagerduty.list_oncallsList who is on call now (or in a time range), with the escalation policy, level and schedule. Optionally filter by escalation policy or schedule id.
Needs scope: oncalls.read
| Input | Type | Description | |
|---|---|---|---|
escalation_policy_id | string | Optional | Only on-calls for this escalation policy id |
schedule_id | string | Optional | Only on-calls for this schedule id |
since | string | Optional | Start of the range, ISO 8601; defaults to now |
until | string | Optional | End of the range, ISO 8601 |
await setu.execute({
userId: "user_1",
action: "pagerduty.list_oncalls",
input: {},
});List servicesreadpagerduty.list_servicesList services in the PagerDuty account, optionally filtered by name. Returns ids, names and statuses.
Needs scope: services.read
| Input | Type | Description | |
|---|---|---|---|
query | string | Optional | Only services whose name matches this text |
limit | integer | Optional | Results per page, up to 100 |
await setu.execute({
userId: "user_1",
action: "pagerduty.list_services",
input: {},
});