The PagerDuty API offers a powerful interface to automate your digital operations management. By leveraging its capabilities on Pipedream, you can create workflows that respond to incidents, automate alerts, and synchronize incident data across various platforms. PagerDuty's API enables you to manage services, teams, and incidents, ensuring that your systems remain operational and that the right people are notified at the right time.
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
pagerduty: {
type: "app",
app: "pagerduty",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://api.pagerduty.com/users/me`,
headers: {
Authorization: `Bearer ${this.pagerduty.$auth.oauth_access_token}`,
"Accept": `application/vnd.pagerduty+json;version=2`,
},
})
},
})
Incident Response Coordination: Trigger a workflow on Pipedream when a new incident is reported in PagerDuty. Automatically notify team members via Slack, create a Zoom meeting for immediate response, and log the incident details in a Google Sheet for record keeping.
Scheduled On-Call Reminders: Use Pipedream to schedule and send on-call reminders to team members. The workflow could check the PagerDuty on-call schedule and send an SMS via Twilio to the on-call engineer the day before their shift starts, ensuring they are aware and prepared.
Automated Incident Escalation: Create a Pipedream workflow that listens for incidents that haven't been acknowledged within a set time frame. Automatically escalate the issue by creating a Jira ticket, posting a message to a specific Microsoft Teams channel, and calling the secondary on-call person via Twilio.
Find the user on call for a specific schedule. See the docs here
PagerDuty uses OAuth authentication. When you connect your PagerDuty account, Pipedream will open a popup window where you can sign into PagerDuty and grant Pipedream permission to connect to your account. Pipedream securely stores and automatically refreshes the OAuth tokens so you can easily authenticate any PagerDuty API.
Pipedream requests the following authorization scopes when you connect your account:
GET
https://identity.pagerduty.com/oauth/authorize
?
client_id={{oauth.client_id}}
&
redirect_uri={{oauth.redirect_uri}}
&
state={{oauth.state}}
&
response_type=code
&
scope={{oauth.space_separated_scopes}}
POST
https://identity.pagerduty.com/oauth/token
content-type: application/x-www-form-urlencoded
accept: application/json
client_id={{oauth.client_id}}
&
client_secret={{oauth.client_secret}}
&
redirect_uri={{oauth.redirect_uri}}
&
grant_type=authorization_code
&
code={{oauth.code}}
POST
https://identity.pagerduty.com/oauth/token
content-type: application/x-www-form-urlencoded
accept: application/json
client_id={{oauth.client_id}}
&
client_secret={{oauth.client_secret}}
&
grant_type=refresh_token
&
refresh_token={{oauth.refresh_token}}