{ "openapi": "3.0.2", "info": { "description": "This document describes the PagerDuty REST APIs.\n\nFor guides and examples please visit our [Documentation.](https://developer.pagerduty.com/docs/get-started/getting-started/)\n\nOur REST APIs are defined in OpenAPI v3.x. You can view the schema at [github.com/PagerDuty/api-schema](https://github.com/PagerDuty/api-schema).\n\nNote that properties in some schemas have fields not shown by default such as `readOnly`, `format`, and `default`. Hover your cursor over the right column that looks like `optional+1` to see the full list of fields.\n", "contact": { "name": "PagerDuty Support", "url": "http://www.pagerduty.com/support", "email": "support@pagerduty.com" }, "title": "PagerDuty API", "version": "2.0.0" }, "security": [ { "api_key": [] } ], "tags": [ { "name": "Abilities", "description": "This describes your account's abilities by feature name. For example `\"teams\"`.\nAn ability may be available to your account based on things like your pricing plan or account state.\n" }, { "name": "Add-ons", "description": "Developers can write their own functionality to insert into PagerDuty's UI.\n" }, { "name": "Alert Grouping Settings", "description": "Alert Grouping Settings allow you to configure how alerts in services are grouped together into incidents.\n" }, { "name": "Analytics", "description": "Provides enriched incident data.\n" }, { "name": "Apps", "description": "" }, { "name": "Audit", "description": "Provides audit record data.\n" }, { "name": "Automation Actions", "description": "Automation Actions invoke jobs that are staged in Runbook Automation or Process Automation.\n" }, { "name": "Paused Incident Reports", "description": "Provides paused Incident reporting data on services and accounts that have paused Alerts.\n" }, { "name": "Business Services", "description": "Business services model capabilities that span multiple technical services and that may be owned by several different teams.\n" }, { "name": "Custom Fields", "description": "Custom fields allow you to enrich PagerDuty incidents with critical and helpful metadata throughout the incident lifecycle.\n" }, { "name": "Change Events", "description": "Change Events enable you to send informational events about recent changes such as code deploys and system config changes from any system that can make an outbound HTTP connection. These events do not create incidents and do not send notifications; they are shown in context with incidents on the same PagerDuty service.\n" }, { "name": "Escalation Policies", "description": "Escalation policies define which user should be alerted at which time.\n" }, { "name": "Event Orchestrations", "description": "Event Orchestrations allow you to route events to an endpoint and create collections of Event Orchestrations, which define sets of actions to take based on event content.\n" }, { "name": "Extension Schemas", "description": "A PagerDuty extension vendor represents a specific type of outbound extension such as Generic Webhook, Slack, ServiceNow.\n" }, { "name": "Extensions", "description": "Extensions are representations of Extension Schema objects that are attached to Services.\n" }, { "name": "Incidents", "description": "An incident represents a problem or an issue that needs to be addressed and resolved. Incidents trigger on a service, which prompts notifications to go out to on-call responders per the service's escalation policy.\n" }, { "name": "Incident Workflows", "description": "An Incident Workflow is a sequence of configurable Steps and associated Triggers that can execute automated Actions for a given Incident.\n" }, { "name": "Licenses", "description": "Licenses are allocated to Users to allow for per-User access to PagerDuty functionality within an Account.\n" }, { "name": "Log Entries", "description": "A log of all the events that happen to an Incident, and these are exposed as Log Entries.\n" }, { "name": "Maintenance Windows", "description": "A Maintenance Window is used to temporarily disable one or more Services for a set period of time.\n" }, { "name": "Notifications", "description": "A Notification is created when an Incident is triggered or escalated.\n" }, { "name": "On-Calls", "description": "An on-call represents a contiguous unit of time for which a User will be on call for a given Escalation Policy and Escalation Rules\n" }, { "name": "Priorities", "description": "A priority is a label representing the importance and impact of an incident. This feature is only available on Standard and Enterprise plans.\n" }, { "name": "Response Plays", "description": "Response Plays are a package of Incident Actions that can be applied during an Incident's life cycle.\n" }, { "name": "Rulesets", "description": "Rulesets allow you to route events to an endpoint and create collections of Event Rules, which define sets of actions to take based on event content.\n" }, { "name": "Schedules", "description": "A Schedule determines the time periods that users are On-Call.\n" }, { "name": "Service Dependencies", "description": "Services are categorized into technical and business services. Dependencies can be created via any combination of these services.\n" }, { "name": "Services", "description": "A Service may represent an application, component, or team you wish to open incidents against.\n" }, { "name": "Webhooks", "description": "A webhook is a way to receive events that occur on the PagerDuty platform via an HTTP POST request.\nV3 webhooks are set up by creating a webhook subscription.\n" }, { "name": "Standards", "description": "Standards help provide a clear understanding of what a good service configuration looks like, allowing to share and enforce organization guidelines across services to ensure adherence to best practices.\n" }, { "name": "Status Dashboards", "description": "Status Dashboards represent user-defined views for the Status Dashboard product that are limited to specific Business Services rather than the whole set of top-level Business Services (those with no dependent Services).\n" }, { "name": "Status Pages", "description": "Status Pages can be public or private read-only pages, that display the status of some predefined set of services, to be shared with customers or internal stakeholders.\n" }, { "name": "Tags", "description": "A Tag is applied to Escalation Policies, Teams or Users and can be used to filter them.\n" }, { "name": "Teams", "description": "A team is a collection of Users and Escalation Policies that represent a group of people within an organization.\n" }, { "name": "Templates", "description": "Templates is a new feature which will allow customers to create message templates to be leveraged by (but not limited to) status updates. The API will be secured to customers with the status updates entitlements.\n" }, { "name": "Users", "description": "Users are members of a PagerDuty account that have the ability to interact with Incidents and other data on the account.\n" }, { "name": "Vendors", "description": "A PagerDuty Vendor represents a specific type of integration. AWS Cloudwatch, Splunk, Datadog are all examples of vendors\n" } ], "servers": [ { "url": "https://api.pagerduty.com", "description": "PagerDuty V2 API." } ], "components": { "examples": { "AuditRecordResponse": { "summary": "Response Example", "value": { "records": [ { "id": "PDRECORDID1_TEAM_CREATED", "execution_time": "2020-06-04T15:30:16.272Z", "execution_context": { "request_id": "111lDEOIH-534-4ljhLHJjh111", "remote_address": "201.19.20.19" }, "actors": [ { "id": "PDUSER", "summary": "John Snow", "type": "user_reference" } ], "method": { "type": "api_token", "truncated_token": "3usr" }, "root_resource": { "id": "PXASDFE", "type": "team_reference", "summary": "my DevOps team" }, "action": "create", "details": { "resource": { "id": "PXASDFE", "type": "team_reference", "summary": "my DevOps team" }, "fields": [ { "name": "teamName", "value": "DevOps team" } ] } }, { "id": "PDRECORDID2_USER_REMOVED_FROM_TEAM", "execution_time": "2020-06-04T15:30:16.272Z", "execution_context": { "request_id": "222lDEOIH-534-4ljhLHJjh222", "remote_address": "201.19.20.19" }, "method": { "type": "api_token", "truncated_token": "2adm" }, "root_resource": { "id": "PRY9M8B", "type": "team_reference", "summary": "DevOps" }, "action": "update", "details": { "resource": { "id": "PRY9M8B", "type": "team_reference", "summary": "DevOps" }, "references": [ { "name": "members", "removed": [ { "id": "PRY9M8B", "type": "user_reference", "summary": "John Doe" } ] } ] } }, { "id": "PDRECORDID5_USERS_TEAM_ROLE_UPDATED", "execution_time": "2020-06-04T15:30:16.272Z", "execution_context": { "request_id": "222lDEOIH-534-4ljhLHJjh222", "remote_address": "201.19.20.19" }, "method": { "type": "api_token", "truncated_token": "2adm" }, "root_resource": { "id": "PRY9M8B", "type": "team_reference", "summary": "DevOps" }, "action": "update", "details": { "resource": { "id": "PDUSER", "type": "user_reference", "summary": "John Snow" }, "fields": [ { "name": "team_role", "before_value": "observer", "value": "manager" } ] } }, { "id": "PDRECORDID3_USERS_NAME_AND_EMAIL_UPDATED", "execution_time": "2020-06-04T15:30:16.272Z", "execution_context": { "request_id": "222lDEOIH-534-4ljhLHJjh222", "remote_address": "201.19.20.19" }, "actors": [ { "id": "PDUSER", "summary": "John Snow", "type": "user_reference" } ], "method": { "type": "identity_provider" }, "root_resource": { "id": "PDUSER", "type": "user_reference", "summary": "John Snow" }, "action": "update", "details": { "resource": { "id": "PDUSER", "type": "user_reference", "summary": "John Snow" }, "fields": [ { "name": "name", "before_value": "Bob Doe", "value": "Jon Snow" }, { "name": "email", "before_value": "bob.doe@domain.com", "value": "john.snow@domain.com" } ] } }, { "id": "PDRECORDID4_UPDATED_USERS_NOTIFICATION_RULE", "execution_time": "2020-06-04T15:30:16.272Z", "execution_context": { "request_id": "222lDEOIH-534-4ljhLHJjh222", "remote_address": "201.19.20.19" }, "actors": [ { "id": "PDUSER", "summary": "John Snow", "type": "user_reference" } ], "method": { "type": "api_token", "truncated_token": "2adm" }, "root_resource": { "id": "PDUSER", "type": "user_reference", "summary": "John Snow" }, "action": "update", "details": { "resource": { "id": "PXOGWUS", "type": "assignment_notification_rule_reference", "summary": "0 minutes: channel P1IAAPZ" }, "fields": [ { "name": "start_delay_in_minutes", "before_value": "0", "value": "2" } ], "references": [ { "name": "contact_method", "removed": [ { "id": "POE6L88", "type": "push_notification_contact_method_reference", "summary": "Pixel 3" } ], "added": [ { "id": "P4GTUMK", "type": "sms_contact_method_reference", "summary": "Mobile" } ] } ] } } ], "next_cursor": null, "limit": 10 } }, "AuditRecordEscalationPolicyResponse": { "summary": "Response Example", "value": { "records": [ { "id": "PD_ASSIGN_TEAM_TO_ESCALATION_POLICY", "action": "update", "actors": [ { "id": "PDUSER", "summary": "John Snow", "type": "user_reference", "self": "https://api.pagerduty.com/users/PD_USER123", "html_url": "https://mydomain.pagerduty.com/users/PD_USER123" } ], "details": { "references": [ { "added": [ { "id": "PD_TEAM123", "summary": "Devops", "type": "team_reference", "self": "https://api.pagerduty.com/teams/PD_TEAM123", "html_url": "https://mydomain.pagerduty.com/teams/PD_TEAM123" } ], "name": "teams" } ], "resource": { "id": "PD_ESCALATION_ID", "summary": "DevOps Escalation", "type": "escalation_policy_reference", "self": "https://api.pagerduty.com/escalation_policies/PD_ESCALATION_ID", "html_url": "https://mydomain.pagerduty.com/escalation_policies/PD_ESCALATION_ID" } }, "execution_context": { "request_id": "0cc413fb-8e7d-4414-b4bc-b7578bf3ba77" }, "execution_time": "2021-01-05T16:33:52.026Z", "method": { "type": "browser" }, "root_resource": { "id": "PD_ESCALATION_ID", "summary": "DevOps Escalation", "type": "escalation_policy_reference", "self": "https://api.pagerduty.com/escalation_policies/PD_ESCALATION_ID", "html_url": "https://mydomain.pagerduty.com/escalation_policies/PD_ESCALATION_ID" } }, { "id": "PD_CREATE_ESCALATION_POLICY", "action": "create", "actors": [ { "id": "PDUSER", "summary": "John Snow", "type": "user_reference", "self": "https://api.pagerduty.com/users/PD_USER123", "html_url": "https://mydomain.pagerduty.com/users/PD_USER123" } ], "details": { "fields": [ { "name": "name", "value": "DevOps Escalation" }, { "name": "description", "value": "Escalation Policy for devops" }, { "name": "num_loops", "value": "1" } ], "resource": { "id": "PD_ESCALATION_ID", "summary": "DevOps Escalation", "type": "escalation_policy_reference", "self": "https://api.pagerduty.com/escalation_policies/PD_ESCALATION_ID", "html_url": "https://mydomain.pagerduty.com/escalation_policies/PD_ESCALATION_ID" } }, "execution_context": { "request_id": "0cc413fb-8e7d-4414-b4bc-b7578bf3ba77" }, "execution_time": "2021-01-05T16:33:51.951Z", "method": { "type": "browser" }, "root_resource": { "id": "PD_ESCALATION_ID", "summary": "DevOps Escalation", "type": "escalation_policy_reference", "self": "https://api.pagerduty.com/escalation_policies/PD_ESCALATION_ID", "html_url": "https://mydomain.pagerduty.com/escalation_policies/PD_ESCALATION_ID" } } ], "limit": 10, "next_cursor": null } }, "AuditRecordScheduleResponse": { "summary": "Response Example", "value": { "records": [ { "id": "PD_ASSIGN_TEAM_TO_SCHEDULE", "action": "update", "actors": [ { "id": "PDUSER", "summary": "John Snow", "type": "user_reference", "self": "https://api.pagerduty.com/users/PD_USER123", "html_url": "https://mydomain.pagerduty.com/users/PD_USER123" } ], "details": { "references": [ { "added": [ { "id": "PD_TEAM123", "summary": "Devops", "type": "team_reference", "self": "https://api.pagerduty.com/teams/PD_TEAM123", "html_url": "https://mydomain.pagerduty.com/teams/PD_TEAM123" } ], "name": "teams" } ], "resource": { "id": "PD_SCHEDULE_ID", "summary": "DevOps Schedule", "type": "schedule_reference", "self": "https://api.pagerduty.com/schedules/PD_SCHEDULE_ID", "html_url": "https://mydomain.pagerduty.com/schedules/PD_SCHEDULE_ID" } }, "execution_context": { "request_id": "13a1c0c3-545c-4ebb-4115-662fff9d8ad" }, "execution_time": "2021-01-05T16:25:41.324Z", "method": { "type": "browser" }, "root_resource": { "id": "PD_SCHEDULE_ID", "summary": "DevOps Schedule", "type": "schedule_reference", "self": "https://api.pagerduty.com/schedules/PD_SCHEDULE_ID", "html_url": "https://mydomain.pagerduty.com/schedules/PD_SCHEDULE_ID" } }, { "id": "PD_CREATE_SCHEDULE", "action": "create", "actors": [ { "id": "PDUSER", "summary": "John Snow", "type": "user_reference", "self": "https://api.pagerduty.com/users/PD_USER123", "html_url": "https://mydomain.pagerduty.com/users/PD_USER123" } ], "details": { "fields": [ { "name": "name", "value": "DevOps Schedule" }, { "name": "description", "value": "Our DevOps Team Schedule" }, { "name": "time_zone", "value": "America/New_York" } ], "resource": { "id": "PD_SCHEDULE_ID", "summary": "DevOps Schedule", "type": "schedule_reference", "self": "https://api.pagerduty.com/schedules/PD_SCHEDULE_ID", "html_url": "https://mydomain.pagerduty.com/schedules/PD_SCHEDULE_ID" } }, "execution_context": { "request_id": "13a1c0c3-545c-4ebb-4115-662fff9d8ad" }, "execution_time": "2021-01-05T16:25:41.315Z", "method": { "type": "browser" }, "root_resource": { "id": "PD_SCHEDULE_ID", "summary": "DevOps Schedule", "type": "schedule_reference", "self": "https://api.pagerduty.com/schedules/PD_SCHEDULE_ID", "html_url": "https://mydomain.pagerduty.com/schedules/PD_SCHEDULE_ID" } } ], "limit": 10, "next_cursor": null } }, "AuditRecordServiceResponse": { "summary": "Response Example", "value": { "records": [ { "id": "PDRECORDID1_SERVICE_CREATED", "execution_time": "2020-06-04T15:30:16.272Z", "execution_context": { "request_id": "111lDEOIH-534-4ljhLHJjh111", "remote_address": "201.19.20.19" }, "actors": [ { "id": "PDUSER", "summary": "John Snow", "type": "user_reference" } ], "method": { "type": "api_token", "truncated_token": "3usr" }, "root_resource": { "id": "PN2YA40", "type": "service_reference", "summary": "Documentation Hub" }, "action": "create", "details": { "resource": { "id": "PD_SERVICE_ID", "type": "service_reference", "summary": "Documentation Hub" }, "fields": [ { "name": "name", "value": "Documentation Hub" }, { "name": "description", "value": "Centralized documentation" }, { "name": "incident_severity", "value": "always_high" }, { "name": "alert_creation", "value": "create_alerts_and_incidents" }, { "name": "auto_resolve_timeout", "value": "" }, { "name": "acknowledgement_timeout", "value": "" }, { "name": "alert_grouping", "value": null }, { "name": "alert_grouping_timeout", "value": "" } ], "references": [ { "name": "escalation_policy", "added": [ { "id": "PD_SERVICE_ID", "summary": "Default", "type": "escalation_policy_reference" } ] } ] } } ], "next_cursor": null, "limit": 10 } }, "AuditRecordTeamResponse": { "summary": "Response Example", "value": { "records": [ { "id": "PDRECORD_USER_ROLE_ON_TEAM", "execution_time": "2020-06-04T15:30:16.272Z", "execution_context": { "request_id": "111lDEOIH-534-4ljhLHJjh111", "remote_address": "201.19.20.19" }, "actors": [ { "id": "PDUSER", "summary": "John Snow", "type": "user_reference", "self": "https://api.pagerduty.com/users/PD_USER123", "html_url": "https://mydomain.pagerduty.com/users/PD_USER123" } ], "method": { "type": "browser" }, "root_resource": { "id": "PD_TEAM123", "type": "team_reference", "summary": "my DevOps team", "self": "https://api.pagerduty.com/teams/PD_TEAM123", "html_url": "https://mydomain.pagerduty.com/teams/PD_TEAM123" }, "action": "update", "details": { "resource": { "id": "PD_ADMIN_USER123", "type": "user_reference", "summary": "AA Admin User", "self": "https://api.pagerduty.com/users/PD_ADMIN_USER123", "html_url": "https://mydomain.pagerduty.com/users/PD_ADMIN_USER123" }, "fields": [ { "name": "members.role", "value": "manager" } ] } }, { "id": "PDRECORD_USER_ADDED_TO_TEAM", "execution_time": "2020-06-04T15:30:16.272Z", "execution_context": { "request_id": "111lDEOIH-534-4ljhLHJjh111", "remote_address": "201.19.20.19" }, "actors": [ { "id": "PDUSER", "summary": "John Snow", "type": "user_reference", "self": "https://api.pagerduty.com/users/PD_USER123", "html_url": "https://mydomain.pagerduty.com/users/PD_USER123" } ], "method": { "type": "browser" }, "root_resource": { "id": "PD_TEAM123", "type": "team_reference", "summary": "DevOps" }, "action": "update", "details": { "resource": { "id": "PD_TEAM123", "type": "team_reference", "summary": "DevOps" }, "references": [ { "name": "members", "added": [ { "id": "PD_ADMIN_USER123", "type": "user_reference", "summary": "AA Admin User", "self": "https://api.pagerduty.com/users/PD_ADMIN_USER123", "html_url": "https://mydomain.pagerduty.com/users/PD_ADMIN_USER123" } ] } ] } }, { "id": "PDRECORD_TEAM_CREATED", "execution_time": "2020-06-04T15:25:04.113Z", "execution_context": { "request_id": "222lDEOIH-534-4ljhLHJjh222", "remote_address": "201.19.20.19" }, "actors": [ { "id": "PDUSER", "summary": "John Snow", "type": "user_reference", "self": "https://api.pagerduty.com/users/PD_USER123", "html_url": "https://mydomain.pagerduty.com/users/PD_USER123" } ], "method": { "type": "browser" }, "root_resource": { "id": "PD_TEAM123", "type": "team_reference", "summary": "DevOps", "self": "https://api.pagerduty.com/teams/PD_TEAM123", "html_url": "https://mydomain.pagerduty.com/teams/PD_TEAM123" }, "action": "create", "details": { "resource": { "id": "PD_TEAM123", "type": "team_reference", "summary": "DevOps", "self": "https://api.pagerduty.com/teams/PD_TEAM123", "html_url": "https://mydomain.pagerduty.com/teams/PD_TEAM123" }, "fields": [ { "name": "name", "value": "DevOps" }, { "name": "description", "value": "MyDevOps Team" }, { "name": "default_role", "value": "manager" } ] } } ], "next_cursor": null, "limit": 10 } }, "AuditRecordUserResponse": { "summary": "Response Example", "value": { "records": [ { "id": "PD_ADD_HIGH_URGENCY_NOTIFICATION", "action": "update", "actors": [ { "id": "PDUSER", "summary": "John Snow", "type": "user_reference", "self": "https://api.pagerduty.com/users/PD_USER123", "html_url": "https://mydomain.pagerduty.com/users/PD_USER123" } ], "details": { "references": [ { "added": [ { "id": "PD_NOTIFICATION_RULE_HIGH", "summary": "High Urgency (Email: Default)", "type": "assignment_notification_rule_reference" } ], "name": "notification_rules" } ], "resource": { "id": "PD_USER_999", "summary": "Test User", "type": "user_reference", "self": "https://api.pagerduty.com/users/PD_USER_999", "html_url": "https://mydomain.pagerduty.com/users/PD_USER_999" } }, "execution_context": { "request_id": "a68929b2-d0f4-4def-b1d2-6bb744c44e3d" }, "execution_time": "2021-01-05T15:17:32.343Z", "method": { "type": "browser" }, "root_resource": { "id": "PD_USER_999", "summary": "Test User", "type": "user_reference", "self": "https://api.pagerduty.com/users/PD_USER_999", "html_url": "https://mydomain.pagerduty.com/users/PD_USER_999" } }, { "id": "PD_ADD_HIGH_URGENCY_EMAIL_CONTACT", "action": "update", "actors": [ { "id": "PDUSER", "summary": "John Snow", "type": "user_reference", "self": "https://api.pagerduty.com/users/PD_USER123", "html_url": "https://mydomain.pagerduty.com/users/PD_USER123" } ], "details": { "fields": [ { "name": "start_delay_in_minutes", "value": "0" }, { "name": "urgency", "value": "high" } ], "references": [ { "added": [ { "id": "PD_CONTACT_METHOD", "summary": "Default", "type": "email_contact_method_reference" } ], "name": "contact_method" } ], "resource": { "id": "PD_NOTIFICATION_RULE_HIGH", "summary": "High Urgency (Email: Default)", "type": "assignment_notification_rule_reference" } }, "execution_context": { "request_id": "a68929b2-d0f4-4def-b1d2-6bb744c44e3d" }, "execution_time": "2021-01-05T15:17:32.343Z", "method": { "type": "browser" }, "root_resource": { "id": "PD_USER_999", "summary": "Test User", "type": "user_reference", "self": "https://api.pagerduty.com/users/PD_USER_999", "html_url": "https://mydomain.pagerduty.com/users/PD_USER_999" } }, { "id": "PD_ADD_LOW_URGENCY_EMAIL_RULE", "action": "update", "actors": [ { "id": "PDUSER", "summary": "John Snow", "type": "user_reference", "self": "https://api.pagerduty.com/users/PD_USER123", "html_url": "https://mydomain.pagerduty.com/users/PD_USER123" } ], "details": { "fields": [ { "name": "start_delay_in_minutes", "value": "0" }, { "name": "urgency", "value": "low" } ], "references": [ { "added": [ { "id": "PD_CONTACT_METHOD", "summary": "Default", "type": "email_contact_method_reference" } ], "name": "contact_method" } ], "resource": { "id": "PD_NOTIFICATION_RULE_LOW", "summary": "Low Urgency (Email: Default)", "type": "assignment_notification_rule_reference" } }, "execution_context": { "request_id": "a68929b2-d0f4-4def-b1d2-6bb744c44e3d" }, "execution_time": "2021-01-05T15:17:32.335Z", "method": { "type": "browser" }, "root_resource": { "id": "PD_USER_999", "summary": "Test User", "type": "user_reference", "self": "https://api.pagerduty.com/users/PD_USER_999", "html_url": "https://mydomain.pagerduty.com/users/PD_USER_999" } }, { "id": "PD_ADD_LOW_URGENCY_EMAIL_CONTACT", "action": "update", "actors": [ { "id": "PDUSER", "summary": "John Snow", "type": "user_reference", "self": "https://api.pagerduty.com/users/PD_USER123", "html_url": "https://mydomain.pagerduty.com/users/PD_USER123" } ], "details": { "references": [ { "added": [ { "id": "PD_NOTIFICATION_RULE_LOW", "summary": "Low Urgency (Email: Default)", "type": "assignment_notification_rule_reference" } ], "name": "notification_rules" } ], "resource": { "id": "PD_USER_999", "summary": "Test User", "type": "user_reference", "self": "https://api.pagerduty.com/users/PD_USER_999", "html_url": "https://mydomain.pagerduty.com/users/PD_USER_999" } }, "execution_context": { "request_id": "a68929b2-d0f4-4def-b1d2-6bb744c44e3d" }, "execution_time": "2021-01-05T15:17:32.335Z", "method": { "type": "browser" }, "root_resource": { "id": "PD_USER_999", "summary": "Test User", "type": "user_reference", "self": "https://api.pagerduty.com/users/PD_USER_999", "html_url": "https://mydomain.pagerduty.com/users/PD_USER_999" } }, { "id": "PD_EMAIL_CONTACT_FOR_USER", "action": "update", "actors": [ { "id": "PDUSER", "summary": "John Snow", "type": "user_reference", "self": "https://api.pagerduty.com/users/PD_USER123", "html_url": "https://mydomain.pagerduty.com/users/PD_USER123" } ], "details": { "fields": [ { "name": "label", "value": "Default" }, { "name": "type", "value": "email_contact_method" }, { "name": "address", "value": "testuser@testabc123.com" } ], "resource": { "id": "PD_CONTACT_METHOD", "summary": "Default", "type": "email_contact_method_reference" } }, "execution_context": { "request_id": "a68929b2-d0f4-4def-b1d2-6bb744c44e3d" }, "execution_time": "2021-01-05T15:17:32.327Z", "method": { "type": "browser" }, "root_resource": { "id": "PD_USER_999", "summary": "Test User", "type": "user_reference", "self": "https://api.pagerduty.com/users/PD_USER_999", "html_url": "https://mydomain.pagerduty.com/users/PD_USER_999" } }, { "id": "PD_ADD_EMAIL_CONTACT_TO_USER", "action": "update", "actors": [ { "id": "PDUSER", "summary": "John Snow", "type": "user_reference", "self": "https://api.pagerduty.com/users/PD_USER123", "html_url": "https://mydomain.pagerduty.com/users/PD_USER123" } ], "details": { "references": [ { "added": [ { "id": "PD_CONTACT_METHOD", "summary": "Default", "type": "email_contact_method_reference" } ], "name": "contact_methods" } ], "resource": { "id": "PD_USER_999", "summary": "Test User", "type": "user_reference", "self": "https://api.pagerduty.com/users/PD_USER_999", "html_url": "https://mydomain.pagerduty.com/users/PD_USER_999" } }, "execution_context": { "request_id": "a68929b2-d0f4-4def-b1d2-6bb744c44e3d" }, "execution_time": "2021-01-05T15:17:32.327Z", "method": { "type": "browser" }, "root_resource": { "id": "PD_USER_999", "summary": "Test User", "type": "user_reference", "self": "https://api.pagerduty.com/users/PD_USER_999", "html_url": "https://mydomain.pagerduty.com/users/PD_USER_999" } }, { "id": "PD_CREATE_USER", "action": "create", "actors": [ { "id": "PDUSER", "summary": "John Snow", "type": "user_reference", "self": "https://api.pagerduty.com/users/PD_USER123", "html_url": "https://mydomain.pagerduty.com/users/PD_USER123" } ], "details": { "fields": [ { "name": "name", "value": "Test User" }, { "name": "role", "value": "user" }, { "name": "email", "value": "testuser@testabc123.com" }, { "name": "time_zone", "value": "America/New_York" }, { "name": "description", "value": null }, { "name": "job_title", "value": null }, { "name": "color", "value": "brown" } ], "resource": { "id": "PD_USER_999", "summary": "Test User", "type": "user_reference", "self": "https://api.pagerduty.com/users/PD_USER_999", "html_url": "https://mydomain.pagerduty.com/users/PD_USER_999" } }, "execution_context": { "request_id": "a68929b2-d0f4-4def-b1d2-6bb744c44e3d" }, "execution_time": "2021-01-05T15:17:31.708Z", "method": { "type": "browser" }, "root_resource": { "id": "PD_USER_999", "summary": "Test User", "type": "user_reference", "self": "https://api.pagerduty.com/users/PD_USER_999", "html_url": "https://mydomain.pagerduty.com/users/PD_USER_999" } } ], "limit": 10, "next_cursor": null } }, "OrchestrationPathGlobalTypeResponse": { "summary": "Example Response", "value": { "orchestration_path": { "type": "global", "parent": { "id": "b02e973d-9620-4e0a-9edc-00fedf7d4694", "self": "https://api.pagerduty.com/event_orchestrations/b02e973d-9620-4e0a-9edc-00fedf7d4694", "type": "event_orchestration_reference" }, "self": "https://api.pagerduty.com/event_orchestrations/b02e973d-9620-4e0a-9edc-00fedf7d4694/global", "sets": [ { "id": "start", "rules": [ { "label": "Always apply some consistent event transformations to all events", "id": "c91f72f3", "conditions": [], "actions": { "variables": [ { "name": "hostname", "path": "event.component", "value": "hostname: (.*)", "type": "regex" } ], "extractions": [ { "template": "{{variables.hostname}}", "target": "event.custom_details.hostname" }, { "source": "event.source", "regex": "www (.*) service", "target": "event.source" } ], "incident_custom_field_updates": [ { "id": "PEXCK89", "value": "#my-team-channel" }, { "id": "PN1C4A2", "value": "{{event.timestamp}}" } ], "route_to": "step-two" } } ] }, { "id": "step-two", "rules": [ { "label": "All critical alerts should be treated as P1 incidents", "id": "7c54529d", "conditions": [ { "expression": "event.severity matches 'critical'" } ], "actions": { "priority": "P0IN2KQ", "suppress": false, "incident_custom_field_updates": [ { "id": "PEXCK89", "value": "#p1-incident-response" } ] } }, { "label": "Drop all events from the very-noisy monitoring tool", "id": "1f6d9a33", "conditions": [ { "expression": "event.source matches part 'very-noisy'" } ], "actions": { "drop_event": true } }, { "label": "Never bother the on-call for info-level events outside of work hours", "id": "cd770384", "conditions": [ { "expression": "event.severity matches 'info' and not (now in Mon,Tue,Wed,Thu,Fri 09:00:00 to 17:00:00 America/Los_Angeles)" } ], "actions": { "suppress": true } } ] } ], "catch_all": { "actions": { "suppress": true, "incident_custom_field_updates": [ { "id": "PEXCK89", "value": "#general-incident-notifications" } ] } }, "created_at": "2021-11-18T16:42:01Z", "created_by": { "id": "P8B9WR8", "self": "https://api.pagerduty.com/users/P8B9WR8", "type": "user_reference" }, "updated_at": "2021-11-18T16:42:01Z", "updated_by": { "id": "P8B9WR8", "self": "https://api.pagerduty.com/users/P8B9WR8", "type": "user_reference" }, "version": "rn1Mja13T1HBdmPChqFilSQXUW2fWXM_" } } }, "CreateSubscriptionExample": { "summary": "Example", "value": { "webhook_subscription": { "delivery_method": { "type": "http_delivery_method", "url": "https://example.com/receive_a_pagerduty_webhook", "custom_headers": [ { "name": "header-name", "value": "header-value" } ] }, "description": "Sends PagerDuty v3 webhook events somewhere interesting.", "events": [ "incident.acknowledged", "incident.annotated", "incident.delegated", "incident.escalated", "incident.priority_updated", "incident.reassigned", "incident.reopened", "incident.resolved", "incident.responder.added", "incident.responder.replied", "incident.triggered", "incident.unacknowledged" ], "filter": { "id": "P393ZNQ", "type": "service_reference" }, "type": "webhook_subscription" } } }, "GetSubscriptionExample": { "summary": "Example", "value": { "webhook_subscription": { "delivery_method": { "id": "PF9KMXH", "secret": null, "temporarily_disabled": false, "type": "http_delivery_method", "url": "https://example.com/receive_a_pagerduty_webhook", "custom_headers": [ { "name": "your-header-name", "value": "-- redacted --" } ] }, "description": "Sends PagerDuty v3 webhook events somewhere interesting.", "events": [ "incident.acknowledged", "incident.annotated", "incident.delegated", "incident.escalated", "incident.priority_updated", "incident.reassigned", "incident.reopened", "incident.resolved", "incident.responder.added", "incident.responder.replied", "incident.triggered", "incident.unacknowledged" ], "filter": { "id": "P393ZNQ", "type": "service_reference" }, "id": "PY1OL64", "type": "webhook_subscription", "active": true } } }, "ListSubscriptionExample": { "summary": "Example", "value": { "webhook_subscriptions": [ { "delivery_method": { "id": "PF9KMXH", "secret": null, "type": "http_delivery_method", "url": "https://example.com/receive_a_pagerduty_webhook", "custom_headers": [ { "name": "your-header-name", "value": "-- redacted --" } ] }, "description": "Sends PagerDuty v3 webhook events somewhere interesting.", "events": [ "incident.acknowledged", "incident.annotated", "incident.delegated", "incident.escalated", "incident.priority_updated", "incident.reassigned", "incident.resolved", "incident.responder.added", "incident.responder.replied", "incident.triggered", "incident.unacknowledged" ], "filter": { "id": "P393ZNQ", "type": "service_reference" }, "id": "PY1OL64", "type": "webhook_subscription", "active": true } ], "limit": 25, "offset": 0, "total": null, "more": false } }, "PutSubscriptionExample": { "summary": "Update Subscribed Events", "value": { "webhook_subscription": { "events": [ "incident.acknowledged", "incident.annotated", "incident.delegated", "incident.escalated", "incident.priority_updated", "incident.reassigned", "incident.reopened", "incident.resolved", "incident.responder.added", "incident.responder.replied", "incident.triggered", "incident.unacknowledged" ] } } } }, "parameters": { "header_Accept": { "name": "Accept", "description": "The `Accept` header is used as a versioning header.", "in": "header", "required": true, "schema": { "type": "string", "default": "application/vnd.pagerduty+json;version=2" } }, "header_Content-Type": { "name": "Content-Type", "in": "header", "required": true, "schema": { "type": "string", "default": "application/json", "enum": [ "application/json" ] } }, "audit_since": { "name": "since", "in": "query", "description": "The start of the date range over which you want to search. If not specified, defaults to `now() - 24 hours` (past 24 hours)", "schema": { "type": "string", "format": "date-time" } }, "audit_until": { "name": "until", "in": "query", "description": "The end of the date range over which you want to search. If not specified, defaults to `now()`. May not be more than 31 days after `since`.", "schema": { "type": "string", "format": "date-time" } }, "audit_root_resource_types": { "name": "root_resource_types[]", "in": "query", "description": "Resource type filter for the root_resource.", "schema": { "type": "string", "enum": [ "users", "teams", "schedules", "escalation_policies", "services" ], "example": "users" } }, "audit_actor_type": { "name": "actor_type", "in": "query", "description": "Actor type filter.", "schema": { "type": "string", "enum": [ "user_reference", "api_key_reference", "app_reference" ], "example": "user_reference" } }, "audit_actor_id": { "name": "actor_id", "in": "query", "description": "Actor Id filter. Must be qualified by providing the `actor_type` param.", "schema": { "type": "string", "example": "P123456" } }, "audit_method_type": { "name": "method_type", "in": "query", "description": "Method type filter.", "schema": { "type": "string", "description": "Describes the method used to perform the action:\n\n`browser` -- authenticated user session. Session value is not returned in the `truncated_token` field.\n\n`oauth` -- access token obtained via the OAuth flow. Truncated token value is returned in the `truncated_token` field.\n\n`api_token` -- Pagerduty API token. Truncated token value is returned in the `truncated_token` field.\n\n`identity_provider` -- action performed by an Identity provider on behalf of a user. No value is returned in the `truncated_token` field.\n\n`other` -- Method that does not fall in the predefined categories. Truncated token value MAY be returned in the `truncated_token` field.\n", "enum": [ "browser", "oauth", "api_token", "identity_provider", "other" ] } }, "audit_method_truncated_token": { "name": "method_truncated_token", "in": "query", "description": "Method truncated_token filter. Must be qualified by providing the `method_type` param.", "schema": { "type": "string", "example": "3xyz" } }, "audit_actions": { "name": "actions[]", "in": "query", "description": "Action filter", "schema": { "type": "string", "description": "The action executed on the aggregate\n", "enum": [ "create", "update", "delete" ] } }, "offset_limit": { "name": "limit", "in": "query", "required": false, "description": "The number of results per page.", "schema": { "type": "integer" } }, "offset_offset": { "name": "offset", "in": "query", "required": false, "description": "Offset to start pagination search results.", "schema": { "type": "integer" } }, "offset_total": { "name": "total", "in": "query", "required": false, "description": "By default the `total` field in pagination responses is set to `null` to provide the fastest possible response times. Set `total` to `true` for this field to be populated.\n\nSee our [Pagination Docs](https://developer.pagerduty.com/docs/rest-api-v2/pagination/) for more information.\n", "schema": { "default": false, "type": "boolean" } }, "automation_actions_name": { "name": "name", "description": "Filters results to include the ones matching the name (case insensitive substring matching)", "in": "query", "required": false, "schema": { "type": "string", "nullable": false } }, "automation_actions_runners_include": { "name": "include[]", "in": "query", "required": false, "description": "Includes additional data elements into the response", "explode": true, "schema": { "type": "array", "items": { "type": "string", "enum": [ "associated_actions" ], "example": "associated_actions" }, "uniqueItems": true } }, "automation_actions_runner_id": { "name": "runner_id", "description": "Filters results to include the ones linked to the specified runner.\nSpecifying the value `any` filters results to include the ones linked to runners only,\nthus omitting the results not linked to runners.\n", "in": "query", "required": false, "schema": { "type": "string", "nullable": false } }, "automation_actions_classification": { "name": "classification", "description": "Filters results to include the ones matching the specified classification (aka category)", "in": "query", "required": false, "schema": { "$ref": "#/components/schemas/AutomationActionsActionClassificationEnum" } }, "automation_actions_action_type": { "name": "action_type", "description": "Filters results to include the ones matching the specified action type", "in": "query", "required": false, "schema": { "type": "string", "enum": [ "script", "process_automation" ], "example": "process_automation" } }, "automation_actions_team_id": { "name": "team_id", "description": "Filters results to include the ones associated with the specified team.", "in": "query", "required": false, "schema": { "type": "string", "nullable": false } }, "automation_actions_service_id": { "name": "service_id", "description": "Filters results to include the ones associated with the specified service", "in": "query", "required": false, "schema": { "type": "string", "nullable": false } }, "automation_actions_invocation_state": { "name": "invocation_state", "description": "Invocation state", "in": "query", "schema": { "type": "string", "description": "prepared -- the invocation exists and can be referenced, but is NOT available to a Runner
created -- the invocation exists and is waiting for a Runner
sent -- invocation sent to a Runner
queued -- invocation queued by a Runner
running -- invocation is being ran by a Runner
aborted -- invocation was aborted on a Runner
completed -- invocation completed on a Runner
error -- invocation encountered an error on a Runner", "enum": [ "prepared", "created", "sent", "queued", "running", "aborted", "completed", "error" ], "example": "sent" } }, "automation_actions_not_invocation_state": { "name": "not_invocation_state", "description": "Invocation state inverse filter (matches invocations NOT in the specified state)", "in": "query", "schema": { "$ref": "#/components/parameters/automation_actions_invocation_state/schema" } }, "automation_actions_incident_id": { "name": "incident_id", "description": "Incident ID", "in": "query", "required": false, "schema": { "type": "string", "example": "Q2LAR4ADCXC8IB" } }, "automation_actions_action_id": { "name": "action_id", "description": "Action ID", "in": "query", "required": false, "schema": { "type": "string", "example": "01DAW70HK24JZORNE0P9C2V1L9" } }, "incident_list_limit": { "name": "limit", "in": "query", "required": false, "description": "The number of results per page. Maximum of 10000.", "schema": { "type": "integer" } }, "past_incidents_limit": { "name": "limit", "in": "query", "required": false, "description": "The number of results to be returned in the response.", "schema": { "type": "integer", "default": 5, "minimum": 1, "maximum": 999 } }, "past_incidents_total": { "name": "total", "in": "query", "required": false, "description": "By default the `total` field in the response body is set to `null` to provide the fastest possible response times. Set `total` to `true` for this field to be populated with the total number of Past Incidents.\n", "schema": { "type": "boolean", "default": false } }, "cursor_limit": { "name": "limit", "in": "query", "required": false, "description": "The minimum of the `limit` parameter used in the request or the maximum request size of the API.", "schema": { "type": "integer" } }, "cursor_cursor": { "name": "cursor", "in": "query", "required": false, "description": "Optional parameter used to request the \"next\" set of results from an API. The value provided here is most commonly obtained from the `next_cursor` field of the previous request. When no value is provided, the request starts at the beginning of the result set.\n", "schema": { "type": "string" } }, "early_access_analytics": { "schema": { "type": "string", "default": "analytics-v2", "enum": [ "analytics-v2" ] }, "in": "header", "description": "This header indicates that this API endpoint is __UNDER CONSTRUCTION__ and may change at any time. You __MUST__ pass in this header and the above value. Do not use this endpoint in production, as it may change!\n", "name": "X-EARLY-ACCESS", "required": true }, "early_access_status-update-notification-rules": { "name": "X-EARLY-ACCESS", "in": "header", "description": "This header indicates that this API endpoint is __UNDER CONSTRUCTION__ and may change at any time. You __MUST__ pass in this header and the above value. Do not use this endpoint in production, as it may change!\n", "required": true, "schema": { "type": "string", "default": "status-update-notification-rules", "enum": [ "status-update-notification-rules" ] } }, "early_access_bis": { "schema": { "type": "string", "default": "business-impact-early-access" }, "in": "header", "name": "X-EARLY-ACCESS", "description": "This header indicates that this API endpoint is __UNDER CONSTRUCTION__ and may change at any time. You __MUST__ pass in this header with the value `business-impact-early-access`. Do not use this endpoint in production, as it may change!", "required": true }, "early_access_status_dashboards": { "schema": { "type": "string", "default": "status-dashboards" }, "in": "header", "name": "X-EARLY-ACCESS", "description": "This header indicates that this API endpoint is __UNDER CONSTRUCTION__ and may change at any time. You __MUST__ pass in this header with the value `status-dashboards`. Do not use this endpoint in production, as it may change!", "required": true }, "webhooks_filter_type": { "name": "filter_type", "in": "query", "required": false, "description": "The type of resource to filter upon.", "schema": { "enum": [ "service", "team" ], "type": "string" } }, "webhooks_filter_id": { "name": "filter_id", "in": "query", "required": false, "description": "The id of the resource to filter upon.", "schema": { "type": "string" } }, "id": { "name": "id", "description": "The ID of the resource.", "in": "path", "required": true, "schema": { "type": "string" } }, "ids": { "name": "ids[]", "description": "The IDs of the resources.", "in": "query", "explode": true, "schema": { "type": "string" } }, "responder_id": { "name": "responder_id", "description": "The ID of the responder.", "in": "path", "required": true, "schema": { "type": "string" } }, "entity_type": { "name": "entity_type", "in": "path", "description": "Type of entity related with the tag", "required": true, "schema": { "type": "string", "enum": [ "users", "teams", "escalation_policies" ] } }, "business_service_id": { "name": "business_service_id", "in": "path", "description": "The business service ID.", "required": true, "schema": { "type": "string" } }, "team_id": { "name": "team_id", "in": "path", "description": "The team ID", "required": true, "schema": { "type": "string" } }, "team_user_id": { "name": "user_id", "in": "path", "description": "The user ID on the team.", "required": true, "schema": { "type": "string" } }, "team_escalation_policy_id": { "name": "escalation_policy_id", "in": "path", "description": "The escalation policy ID on the team.", "required": true, "schema": { "type": "string" } }, "escalation_policy_escalation_rule_id": { "name": "escalation_rule_id", "in": "path", "description": "The escalation rule ID on the escalation policy.", "required": true, "schema": { "type": "string" } }, "impacts_additional_fields": { "name": "additional_fields[]", "in": "query", "description": "Provides access to additional fields such as highest priority per business service and total impacted count", "explode": true, "schema": { "type": "string", "enum": [ "services.highest_impacting_priority", "total_impacted_count" ] } }, "include_addon": { "name": "include[]", "in": "query", "description": "Array of additional Models to include in response.", "explode": true, "schema": { "type": "string", "enum": [ "services" ], "uniqueItems": true } }, "include_escalation_policy": { "name": "include[]", "in": "query", "description": "Array of additional Models to include in response.", "explode": true, "schema": { "type": "string", "enum": [ "services", "teams", "targets" ], "uniqueItems": true } }, "include_log_entry": { "name": "include[]", "in": "query", "description": "Array of additional Models to include in response.", "explode": true, "schema": { "type": "string", "enum": [ "incidents", "services", "channels", "teams" ], "uniqueItems": true } }, "include_user": { "name": "include[]", "in": "query", "description": "Array of additional Models to include in response.", "explode": true, "schema": { "type": "string", "enum": [ "contact_methods", "notification_rules", "teams", "subdomains" ], "uniqueItems": true } }, "include_maintenance_window": { "name": "include[]", "in": "query", "description": "Array of additional Models to include in response.", "explode": true, "schema": { "type": "string", "enum": [ "teams", "services", "users" ], "uniqueItems": true } }, "include_teams": { "name": "include[]", "in": "query", "description": "Array of additional Models to include in response.", "explode": true, "schema": { "type": "string", "enum": [ "privileges" ], "uniqueItems": true } }, "include_teams_members": { "name": "include[]", "in": "query", "description": "Array of additional Models to include in response.", "explode": true, "schema": { "type": "string", "enum": [ "users" ], "uniqueItems": true } }, "include_triggers": { "name": "include[]", "in": "query", "description": "Array of additional Models to include in response.", "explode": true, "schema": { "type": "string", "enum": [ "triggers" ], "uniqueItems": true } }, "sort_by_escalation_policy": { "name": "sort_by", "in": "query", "description": "Used to specify the field you wish to sort the results on.", "schema": { "type": "string", "enum": [ "name", "name:asc", "name:desc" ], "default": "name" } }, "sort_by_service": { "name": "sort_by", "in": "query", "description": "Used to specify the field you wish to sort the results on.", "schema": { "type": "string", "enum": [ "name", "name:asc", "name:desc" ], "default": "name" } }, "schedule_overflow": { "name": "overflow", "in": "query", "description": "Any on-call schedule entries that pass the date range bounds will be truncated at the bounds, unless the parameter `overflow=true` is passed. This parameter defaults to false.\nFor instance, if your schedule is a rotation that changes daily at midnight UTC, and your date range is from `2011-06-01T10:00:00Z` to `2011-06-01T14:00:00Z`:\n\n\n- If you don't pass the `overflow=true` parameter, you will get one schedule entry returned with a start of `2011-06-01T10:00:00Z` and end of `2011-06-01T14:00:00Z`.\n- If you do pass the `overflow=true` parameter, you will get one schedule entry returned with a start of `2011-06-01T00:00:00Z` and end of `2011-06-02T00:00:00Z`.\n", "schema": { "type": "boolean", "default": false } }, "schedule_override_id": { "name": "override_id", "in": "path", "description": "The override ID on the schedule.", "required": true, "schema": { "type": "string" } }, "team_ids": { "name": "team_ids[]", "in": "query", "description": "An array of team IDs. Only results related to these teams will be returned. Account must have the `teams` ability to use this parameter.", "explode": true, "schema": { "type": "array", "items": { "type": "string" }, "uniqueItems": true } }, "time_zone": { "name": "time_zone", "in": "query", "description": "Time zone in which results will be rendered. This will default to the account time zone.", "schema": { "type": "string", "format": "tzinfo" } }, "schedule_time_zone": { "name": "time_zone", "in": "query", "description": "Time zone in which results will be rendered. This will default to the schedule's time zone.", "schema": { "type": "string", "format": "tzinfo" } }, "schedule_list_time_zone": { "name": "time_zone", "in": "query", "description": "Time zone in which results will be rendered. This will default to the current user's time zone and then the account's time zone.", "schema": { "type": "string", "format": "tzinfo" } }, "service_id": { "name": "service_id", "in": "path", "description": "The service ID", "required": true, "schema": { "type": "string" } }, "services": { "name": "service_ids[]", "in": "query", "description": "An array of service IDs. Only results related to these services will be returned.", "explode": true, "schema": { "type": "array", "items": { "type": "string" } } }, "integration_id": { "name": "integration_id", "in": "path", "description": "The integration ID on the service.", "required": true, "schema": { "type": "string" } }, "integration_ids": { "name": "integration_ids[]", "in": "query", "description": "An array of integration IDs. Only results related to these integrations will be returned.", "explode": true, "schema": { "type": "array", "items": { "type": "string" }, "uniqueItems": true } }, "log_entry_is_overview": { "name": "is_overview", "in": "query", "description": "If `true`, will return a subset of log entries that show only the most important changes to the incident.", "required": false, "schema": { "type": "boolean", "default": false } }, "since": { "name": "since", "in": "query", "description": "The start of the date range over which you want to search.", "schema": { "type": "string", "format": "date-time" } }, "until": { "name": "until", "in": "query", "description": "The end of the date range over which you want to search.", "schema": { "type": "string", "format": "date-time" } }, "url_slug": { "name": "url_slug", "in": "path", "description": "The `url_slug` for a status dashboard", "required": true, "schema": { "type": "string" } }, "date_range": { "name": "date_range", "in": "query", "description": "When set to all, the since and until parameters and defaults are ignored.", "schema": { "type": "string", "enum": [ "all" ] } }, "incident_key": { "name": "incident_key", "in": "query", "description": "Incident de-duplication key. Incidents with child alerts do not have an incident key; querying by incident key will return incidents whose alerts have alert_key matching the given incident key.", "schema": { "type": "string" } }, "incident_services": { "name": "service_ids[]", "in": "query", "description": "Returns only the incidents associated with the passed service(s). This expects one or more service IDs.", "explode": true, "schema": { "type": "array", "items": { "type": "string" }, "uniqueItems": true } }, "incident_assigned_to_user": { "name": "user_ids[]", "in": "query", "description": "Returns only the incidents currently assigned to the passed user(s). This expects one or more user IDs. Note: When using the assigned_to_user filter, you will only receive incidents with statuses of triggered or acknowledged. This is because resolved incidents are not assigned to any user.", "explode": true, "schema": { "type": "array", "items": { "type": "string" }, "uniqueItems": true } }, "incident_urgencies": { "name": "urgencies[]", "in": "query", "description": "Array of the urgencies of the incidents to be returned. Defaults to all urgencies. Account must have the `urgencies` ability to do this.", "explode": true, "schema": { "type": "string", "enum": [ "high", "low" ], "uniqueItems": true } }, "from_header": { "name": "From", "in": "header", "description": "The email address of a valid user associated with the account making the request.", "required": true, "schema": { "type": "string", "format": "email" } }, "optional_from_header": { "name": "From", "in": "header", "description": "The email address of a valid user associated with the account making the request. This is optional, and is only used for change tracking.", "required": false, "schema": { "type": "string", "format": "email" } }, "user_contact_method_id": { "name": "contact_method_id", "in": "path", "description": "The contact method ID on the user.", "required": true, "schema": { "type": "string" } }, "user_notification_rule_id": { "name": "notification_rule_id", "in": "path", "description": "The notification rule ID on the user.", "required": true, "schema": { "type": "string" } }, "user_status_update_notification_rule_id": { "name": "status_update_notification_rule_id", "in": "path", "description": "The status update notification rule ID on the user.", "required": true, "schema": { "type": "string" } }, "oncall_handoff_notification_rule_id": { "name": "oncall_handoff_notification_rule_id", "in": "path", "description": "The oncall handoff notification rule ID on the user.", "required": true, "schema": { "type": "string" } }, "session_id": { "name": "session_id", "in": "path", "description": "The session ID for the user.", "required": true, "schema": { "type": "string" } }, "type": { "name": "type", "in": "path", "description": "The session type for the user session ID.", "required": true, "schema": { "type": "string" } }, "alert_key": { "name": "alert_key", "in": "query", "description": "Alert de-duplication key.", "schema": { "type": "string" } }, "response_play_id": { "name": "response_play_id", "in": "path", "description": "The response play ID of the response play associated with the request.", "required": true, "schema": { "type": "string" } }, "query": { "name": "query", "in": "query", "description": "Filters the result, showing only the records whose name matches the query.", "required": false, "schema": { "type": "string" } }, "tag_query": { "name": "query", "in": "query", "description": "Filters the result, showing only the tags whose label matches the query.", "required": false, "schema": { "type": "string" } }, "addon_services": { "name": "service_ids[]", "in": "query", "description": "Filters the results, showing only Add-ons for the given services", "explode": true, "schema": { "type": "array", "items": { "type": "string" }, "uniqueItems": true } }, "addon_filter": { "name": "filter", "in": "query", "description": "Filters the results, showing only Add-ons of the given type", "schema": { "type": "string", "enum": [ "full_page_addon", "incident_show_addon" ] } }, "change_since": { "name": "since", "in": "query", "description": "The start of the date range over which you want to search, as a UTC ISO 8601 datetime string. Will return an HTTP 400 for non-UTC datetimes.", "schema": { "type": "string", "format": "date-time", "pattern": "YYYY-MM-DDThh:mm:ssZ" } }, "change_until": { "name": "until", "in": "query", "description": "The end of the date range over which you want to search, as a UTC ISO 8601 datetime string. Will return an HTTP 400 for non-UTC datetimes.", "schema": { "type": "string", "format": "date-time", "pattern": "YYYY-MM-DDThh:mm:ssZ" } }, "user_ids_escalation_policies": { "name": "user_ids[]", "in": "query", "description": "Filters the results, showing only escalation policies on which any of the users is a target.", "explode": true, "schema": { "type": "array", "items": { "type": "string" }, "uniqueItems": true } }, "extension_object_id": { "name": "extension_object_id", "description": "The id of the extension object you want to filter by.", "in": "query", "schema": { "type": "string" } }, "extension_schema_id": { "name": "extension_schema_id", "in": "query", "description": "Filter the extensions by extension vendor id.", "schema": { "type": "string" } }, "include_extensions": { "name": "include[]", "in": "query", "description": "Array of additional details to include.", "explode": true, "schema": { "type": "string", "enum": [ "extension_objects", "extension_schemas" ], "uniqueItems": true } }, "include_extensions_id": { "name": "include[]", "in": "query", "description": "Array of additional details to include.", "explode": true, "schema": { "type": "string", "enum": [ "extension_schemas", "extension_objects", "temporarily_disabled" ], "uniqueItems": true } }, "include_incident_workflow_children": { "name": "include[]", "in": "query", "description": "Array of additional details to include.", "explode": true, "schema": { "type": "string", "enum": [ "steps", "team" ], "uniqueItems": true } }, "statuses_incidents": { "name": "statuses[]", "in": "query", "description": "Return only incidents with the given statuses. To query multiple statuses, pass `statuses[]` more than once, for example: `https://api.pagerduty.com/incidents?statuses[]=triggered&statuses[]=acknowledged`. (More status codes may be introduced in the future.)", "explode": true, "schema": { "type": "string", "enum": [ "triggered", "acknowledged", "resolved" ], "uniqueItems": true } }, "sort_by_incidents": { "name": "sort_by", "in": "query", "description": "Used to specify both the field you wish to sort the results on (incident_number/created_at/resolved_at/urgency), as well as the direction (asc/desc) of the results. The sort_by field and direction should be separated by a colon. A maximum of two fields can be included, separated by a comma. Sort direction defaults to ascending. The account must have the `urgencies` ability to sort by the urgency.", "style": "form", "explode": false, "schema": { "type": "array", "items": { "type": "string" }, "maxItems": 2, "uniqueItems": true } }, "include_incidents": { "name": "include[]", "description": "Array of additional details to include.", "explode": true, "in": "query", "schema": { "type": "string", "enum": [ "acknowledgers", "agents", "assignees", "conference_bridge", "escalation_policies", "first_trigger_log_entries", "priorities", "services", "teams", "users" ], "uniqueItems": true } }, "include_incident": { "name": "include[]", "in": "query", "description": "Array of additional details to include.", "explode": true, "schema": { "type": "string", "enum": [ "acknowledgers", "agents", "assignees", "conference_bridge", "custom_fields", "escalation_policies", "first_trigger_log_entries", "priorities", "services", "teams", "users" ], "uniqueItems": true } }, "since_incidents": { "schema": { "type": "string" }, "in": "query", "name": "since", "description": "The start of the date range over which you want to search. Maximum range is 6 months and default is 1 month." }, "until_incidents": { "schema": { "type": "string" }, "in": "query", "name": "until", "description": "The end of the date range over which you want to search. Maximum range is 6 months and default is 1 month." }, "statuses_incident_alerts": { "name": "statuses[]", "in": "query", "description": "Return only alerts with the given statuses. (More status codes may be introduced in the future.)", "explode": true, "schema": { "type": "string", "enum": [ "triggered", "resolved" ], "uniqueItems": true } }, "sort_by_incident_alerts": { "name": "sort_by", "in": "query", "description": "Used to specify both the field you wish to sort the results on (created_at/resolved_at), as well as the direction (asc/desc) of the results. The sort_by field and direction should be separated by a colon. A maximum of two fields can be included, separated by a comma. Sort direction defaults to ascending.", "style": "form", "explode": false, "schema": { "type": "string", "enum": [ "created_at", "resolved_at", "created_at:asc", "created_at:desc", "resolved_at:asc", "resolved_at:desc" ], "maxItems": 2, "uniqueItems": true } }, "include_incident_alerts": { "name": "include[]", "in": "query", "description": "Array of additional details to include.", "explode": true, "schema": { "type": "string", "enum": [ "services", "first_trigger_log_entries", "incidents" ], "uniqueItems": true } }, "alert_id": { "name": "alert_id", "in": "path", "description": "The id of the alert to retrieve.", "required": true, "schema": { "type": "string" } }, "statuses_incident_count": { "name": "statuses[]", "in": "query", "description": "Count only incidents with the requested statuses. `all` returns all statuses. If `any` is specified, there will be an additional `any` boolean field in the response that is true if there are any incidents matching the criteria in the request. If no statuses are provided, then only the total count of incidents is returned regardless of status. More status codes may be introduced in the future.", "explode": true, "schema": { "type": "string", "enum": [ "triggered", "acknowledged", "resolved", "any", "all" ], "uniqueItems": true } }, "filter_maintenance_windows": { "name": "filter", "in": "query", "description": "Only return maintenance windows in a given state.", "schema": { "type": "string", "enum": [ "past", "future", "ongoing", "open", "all" ] } }, "since_notifications": { "name": "since", "in": "query", "description": "The start of the date range over which you want to search. The time element is optional.", "required": true, "schema": { "type": "string", "format": "date-time" } }, "until_notifications": { "name": "until", "in": "query", "description": "The end of the date range over which you want to search. This should be in the same format as since. The size of the date range must be less than 3 months.", "required": true, "schema": { "type": "string", "format": "date-time" } }, "filter_notifications": { "name": "filter", "in": "query", "description": "Return notification of this type only.", "schema": { "type": "string", "enum": [ "sms_notification", "email_notification", "phone_notification", "push_notification" ] } }, "include_notifications": { "name": "include[]", "in": "query", "description": "Array of additional details to include.", "explode": true, "schema": { "type": "string", "enum": [ "users" ], "uniqueItems": true } }, "include_oncalls": { "name": "include[]", "in": "query", "description": "Array of additional details to include.", "explode": true, "schema": { "type": "string", "enum": [ "escalation_policies", "users", "schedules" ], "uniqueItems": true } }, "user_ids_oncalls": { "name": "user_ids[]", "in": "query", "description": "Filters the results, showing only on-calls for the specified user IDs.", "explode": true, "schema": { "type": "array", "items": { "type": "string" }, "uniqueItems": true } }, "escalation_policy_ids_oncalls": { "name": "escalation_policy_ids[]", "in": "query", "description": "Filters the results, showing only on-calls for the specified escalation policy IDs.", "explode": true, "schema": { "type": "array", "items": { "type": "string" }, "uniqueItems": true } }, "schedule_ids_oncalls": { "name": "schedule_ids[]", "in": "query", "description": "Filters the results, showing only on-calls for the specified schedule IDs. If `null` is provided in the array, it includes permanent on-calls due to direct user escalation targets.", "explode": true, "schema": { "type": "array", "items": { "type": "string" }, "uniqueItems": true } }, "since_oncalls": { "name": "since", "in": "query", "description": "The start of the time range over which you want to search. If an on-call period overlaps with the range, it will be included in the result. Defaults to current time. On-call shifts are limited to 90 days in the future.", "schema": { "type": "string", "format": "date-time" } }, "until_oncalls": { "name": "until", "in": "query", "description": "The end of the time range over which you want to search. If an on-call period overlaps with the range, it will be included in the result. Defaults to current time. On-call shifts are limited to 90 days in the future, and the `until` time cannot be before the `since` time.", "schema": { "type": "string", "format": "date-time" } }, "earliest_oncalls": { "name": "earliest", "in": "query", "description": "This will filter on-calls such that only the earliest on-call for each combination of escalation policy, escalation level, and user is returned. This is useful for determining when the \"next\" on-calls are for a given set of filters.", "schema": { "type": "boolean" } }, "filter_for_manual_run": { "name": "filter_for_manual_run", "in": "query", "description": "When this parameter is present, only those Response Plays that can be run manually will be returned.", "schema": { "type": "boolean" } }, "rule_id": { "name": "rule_id", "in": "path", "description": "The id of the Event Rule to retrieve.", "required": true, "schema": { "type": "string" } }, "since_schedules": { "name": "since", "in": "query", "description": "The start of the date range over which you want to search.", "required": true, "schema": { "type": "string", "format": "date-time" } }, "until_schedules": { "name": "until", "in": "query", "description": "The end of the date range over which you want to search.", "required": true, "schema": { "type": "string", "format": "date-time" } }, "editable_schedules": { "name": "editable", "in": "query", "description": "When this parameter is present, only editable overrides will be returned. The result will only include the id of the override if this parameter is present. Only future overrides are editable.", "schema": { "type": "boolean" } }, "overflow_schedules": { "name": "overflow", "in": "query", "description": "Any on-call schedule entries that pass the date range bounds will be truncated at the bounds, unless the parameter overflow=true is passed. This parameter defaults to false.", "schema": { "type": "boolean" } }, "include_services": { "name": "include[]", "in": "query", "description": "Array of additional details to include.", "explode": true, "schema": { "type": "string", "enum": [ "escalation_policies", "teams", "integrations", "auto_pause_notifications_parameters" ], "uniqueItems": true } }, "include_services_id": { "name": "include[]", "in": "query", "description": "Array of additional details to include.", "explode": true, "schema": { "type": "string", "enum": [ "escalation_policies", "teams", "auto_pause_notifications_parameters", "integrations" ], "uniqueItems": true } }, "include_services_integrations": { "name": "include[]", "in": "query", "description": "Array of additional details to include.", "explode": true, "schema": { "type": "string", "enum": [ "services", "vendors" ], "uniqueItems": true } }, "reassignment_team": { "name": "reassignment_team", "in": "query", "description": "Team to reassign unresolved incident to.\nIf an unresolved incident exists on both the reassignment team and\nthe team being deleted, a duplicate will not be made. If not supplied,\nunresolved incidents will be made account-level.\n", "required": false, "schema": { "type": "string" } }, "include_notification_rules": { "name": "include[]", "in": "query", "description": "Array of additional details to include.", "explode": true, "schema": { "type": "string", "enum": [ "contact_methods" ], "uniqueItems": true } }, "additional_details": { "name": "additional_details[]", "in": "query", "description": "Array of additional attributes to any of the returned incidents for related incidents.", "explode": true, "schema": { "type": "string", "enum": [ "incident" ], "uniqueItems": true } }, "include_schedules": { "name": "include[]", "in": "query", "description": "Array of additional details to include.", "explode": true, "schema": { "type": "string", "enum": [ "schedule_layers" ], "uniqueItems": true } }, "sort_by_event_orchestration": { "name": "sort_by", "in": "query", "description": "Used to specify the field you wish to sort the results on.", "schema": { "type": "string", "enum": [ "name:asc", "name:desc", "routes:asc", "routes:desc", "created_at:asc", "created_at:desc" ], "default": "name:asc" } }, "event_orchestration_id": { "name": "id", "description": "The ID of an Event Orchestration.", "in": "path", "required": true, "schema": { "type": "string" } }, "event_orchestration_integration_id": { "name": "integration_id", "description": "The ID of an Integration.", "in": "path", "required": true, "schema": { "type": "string" } }, "event_orchestration_cache_variable_id": { "name": "cache_variable_id", "description": "The ID of a Cache Variable.", "in": "path", "required": true, "schema": { "type": "string" } }, "urgency": { "name": "urgency", "in": "query", "description": "The incident urgency for which the notification rules are applied. If not specified, defaults to `high`.", "explode": true, "schema": { "type": "string", "enum": [ "high", "low", "all" ], "uniqueItems": true } }, "template_query": { "name": "query", "description": "Template name or description to search", "in": "query", "schema": { "type": "string" } }, "template_type": { "name": "template_type", "description": "Filters templates by type.", "in": "query", "schema": { "type": "string", "default": "status_update" } }, "sort_by_template": { "name": "sort_by", "in": "query", "description": "Used to specify both the field you wish to sort the results on (name/created_at), as well as the direction (asc/desc) of the results. The sort_by field and direction should be separated by a colon. Sort direction defaults to ascending.", "style": "form", "explode": false, "schema": { "type": "string", "enum": [ "name", "name:asc", "name:desc", "created_at", "created_at:asc", "created_at:desc" ], "default": "created_at:asc" } }, "schedule_since": { "name": "since", "in": "query", "description": "The start of the date range over which you want to show schedule entries. Defaults to 2 weeks before until if an until is given.", "schema": { "type": "string", "format": "date-time" } }, "schedule_until": { "name": "until", "in": "query", "description": "The end of the date range over which you want to show schedule entries. Defaults to 2 weeks after since if a since is given.", "schema": { "type": "string", "format": "date-time" } }, "paused_incident_reports_service_id": { "name": "service_id", "in": "query", "description": "Specifies a filter to limit the scope of reporting to a particular service", "schema": { "type": "string", "example": "P123456" } }, "paused_incident_reports_suspended_by": { "name": "suspended_by", "in": "query", "description": "Specifies a filter to scope the response to either alerts suspended by Auto Pause or Event Rules.", "schema": { "enum": [ "auto_pause", "rules" ] } }, "triggers_filter_workflow_id": { "name": "workflow_id", "description": "If provided, only show triggers configured to start the given workflow. Useful for listing all services associated with the given workflow", "in": "query", "schema": { "type": "string", "example": "P4RG7YW" } }, "triggers_filter_workflow_name_contains": { "name": "workflow_name_contains", "description": "If provided, only show triggers configured to start workflows whose name contain the provided value.", "in": "query", "schema": { "type": "string", "example": "High Priority" } }, "triggers_filter_incident_id": { "name": "incident_id", "description": "If provided, only show triggers configured on the service of the given incident. Useful for finding manual triggers that are configured on the service for a specific incident. Cannot be specified if `service_id` is provided.", "in": "query", "schema": { "type": "string", "example": "Q2LAR4ADCXC8IB" } }, "triggers_filter_service_id": { "name": "service_id", "description": "If provided, only show triggers configured for incidents in the given service. Useful for listing all workflows associated with the given service. Cannot be specified if `incident_id` is provided.", "in": "query", "schema": { "type": "string", "example": "P4RG7YW" } }, "triggers_filter_trigger_type": { "name": "trigger_type", "description": "If provided, only show triggers of the given type. For example “manual” to search for manual triggers", "in": "query", "schema": { "type": "string", "enum": [ "manual", "conditional" ] } }, "triggers_path_trigger_id": { "name": "trigger_id", "description": "Identifier for the Trigger", "required": true, "in": "path", "schema": { "type": "string" } }, "triggers_path_service_id": { "name": "service_id", "description": "Identifier for the Service", "required": true, "in": "path", "schema": { "type": "string" } }, "triggers_path_trigger_type": { "name": "trigger_type", "description": "The type of trigger the request is targeting", "required": true, "in": "path", "schema": { "type": "string", "enum": [ "manual", "conditional" ] } }, "triggers_sort_by": { "name": "sort_by", "description": "If provided, returns triggers sorted by the specified property.", "in": "query", "schema": { "type": "string", "enum": [ "workflow_id", "workflow_id asc", "workflow_id desc", "workflow_name", "workflow_name asc", "workflow_name desc" ] } }, "actions_filter_keyword": { "name": "keyword", "description": "If provided, only show actions tagged with the specified keyword", "in": "query", "schema": { "type": "string", "example": "slack" } }, "include_customfields_field": { "name": "include[]", "description": "Array of additional details to include.", "in": "query", "explode": true, "schema": { "type": "string", "enum": [ "field_options" ], "uniqueItems": true } }, "include_customfields_field_configuration": { "name": "include[]", "description": "Array of additional details to include.", "in": "query", "explode": true, "schema": { "type": "string", "enum": [ "fields" ], "uniqueItems": true } }, "field_id": { "name": "field_id", "description": "The ID of the field.", "in": "path", "required": true, "schema": { "type": "string" } }, "field_option_id": { "name": "field_option_id", "description": "The ID of the field option.", "in": "path", "required": true, "schema": { "type": "string" } }, "field_configuration_id": { "name": "field_configuration_id", "description": "The ID of the field configuration.", "in": "path", "required": true, "schema": { "type": "string" } }, "include_ruleset_migrated_metadata": { "name": "include[]", "in": "query", "description": "Array of additional Models to include in response.", "explode": true, "schema": { "type": "string", "enum": [ "migrated_metadata" ], "uniqueItems": true } }, "active_standard": { "in": "query", "name": "active", "required": false, "schema": { "type": "boolean" } }, "resource_id_standard": { "in": "path", "name": "id", "required": true, "description": "Id of the resource to apply the standards.", "schema": { "type": "string" } }, "resource_type_standard": { "in": "path", "name": "resource_type", "required": true, "schema": { "type": "string", "enum": [ "technical_services" ] } }, "resource_ids_standard": { "in": "query", "name": "ids", "required": true, "description": "Ids of resources to apply the standards. Maximum of 100 items", "schema": { "type": "array", "items": { "type": "string" } } }, "id_standard": { "in": "path", "name": "id", "required": true, "description": "Id of the standard", "schema": { "type": "string" } }, "query_resource_type_standard": { "in": "query", "name": "resource_type", "schema": { "type": "string", "enum": [ "technical_service" ] } }, "offset_after": { "name": "after", "in": "query", "required": false, "description": "Cursor to retrieve next page; only present if next page exists.", "schema": { "type": "string" } }, "offset_before": { "name": "before", "in": "query", "required": false, "description": "Cursor to retrieve previous page; only present if not on first page.", "schema": { "type": "string" } }, "status_page_id": { "name": "status_page_id", "description": "The ID of the Status Page.", "in": "path", "required": true, "schema": { "type": "string" } }, "status_page_type": { "name": "status_page_type", "description": "The type of the Status Page.", "in": "query", "required": false, "schema": { "enum": [ "public", "private" ], "nullable": false, "type": "string" } }, "status_page_impact_id": { "name": "impact_id", "description": "The ID of the Status Page Impact.", "in": "path", "required": true, "schema": { "type": "string" } }, "status_page_impact_post_type": { "name": "post_type", "description": "Filter by Post type.", "in": "query", "required": false, "schema": { "enum": [ "incident", "maintenance" ], "nullable": false, "type": "string" } }, "status_page_post_update_id": { "name": "post_update_id", "description": "The ID of the Status Page Post Update.", "in": "path", "required": true, "schema": { "type": "string" } }, "status_page_post_update_reviewed_status": { "name": "reviewed_status", "description": "Filter by the reviewed status of the Post Update to retrieve.", "in": "query", "required": false, "schema": { "enum": [ "approved", "not_reviewed" ], "nullable": false, "type": "string" } }, "status_page_post_id": { "name": "post_id", "description": "The ID of the Status Page Post.", "in": "path", "required": true, "schema": { "type": "string" } }, "status_page_post_type": { "name": "post_type", "description": "Filter by Post type.", "in": "query", "required": false, "schema": { "enum": [ "incident", "maintenance" ], "nullable": false, "type": "string" } }, "status_page_post_reviewed_status": { "name": "reviewed_status", "description": "Filter by the reviewed status of the Post to retrieve.", "in": "query", "required": false, "schema": { "enum": [ "approved", "not_reviewed" ], "nullable": false, "type": "string" } }, "status_page_post_status": { "name": "status[]", "description": "Filter by an array of Status identifiers.", "in": "query", "required": false, "schema": { "type": "array", "items": { "type": "string" }, "uniqueItems": true } }, "status_page_post_include": { "name": "include[]", "description": "Array of additional Models to include in response.", "in": "query", "required": false, "schema": { "items": { "enum": [ "status_page_post_update" ], "nullable": false, "type": "string" }, "nullable": false, "type": "array" } }, "status_page_service_id": { "name": "service_id", "description": "The ID of the Status Page service.", "in": "path", "required": true, "schema": { "type": "string" } }, "status_page_severity_id": { "name": "severity_id", "description": "The ID of the Status Page severity.", "in": "path", "required": true, "schema": { "type": "string" } }, "status_page_severity_post_type": { "name": "post_type", "description": "Filter by Post type.", "in": "query", "required": false, "schema": { "enum": [ "incident", "maintenance" ], "nullable": false, "type": "string" } }, "status_page_status_id": { "name": "status_id", "description": "The ID of the Status Page status.", "in": "path", "required": true, "schema": { "type": "string" } }, "status_page_status_post_type": { "name": "post_type", "description": "Filter by Post type.", "in": "query", "required": false, "schema": { "enum": [ "incident", "maintenance" ], "nullable": false, "type": "string" } }, "status_page_subscription_id": { "name": "subscription_id", "description": "The ID of the Status Page subscription.", "in": "path", "required": true, "schema": { "type": "string" } }, "status_page_subscription_status": { "name": "status", "description": "Filter by Subscription status.", "in": "query", "required": false, "schema": { "enum": [ "active", "pending" ], "nullable": false, "type": "string" } }, "status_page_subscription_channel": { "name": "channel", "description": "Filter by Subscription channel.", "in": "query", "required": false, "schema": { "enum": [ "webhook", "email", "slack" ], "nullable": false, "type": "string" } } }, "requestBodies": { "OrchestrationCacheVariablePostRequest": { "content": { "application/json": { "schema": { "type": "object", "properties": { "cache_variable": { "$ref": "#/components/schemas/OrchestrationCacheVariable" } }, "required": [ "cache_variable" ] }, "examples": { "recent_value": { "summary": "Request Example: Recent value cache variable", "value": { "cache_variable": { "name": "example_1", "conditions": [ { "expression": "not event.custom_details.errors exists" } ], "configuration": { "type": "recent_value", "source": "event.summary", "regex": ".*" } } } }, "trigger_event_count": { "summary": "Request Example: Trigger event count cache variable", "value": { "cache_variable": { "name": "example_2", "configuration": { "type": "trigger_event_count", "ttl_seconds": 30 } } } } } } } }, "OrchestrationCacheVariablePutRequest": { "content": { "application/json": { "schema": { "type": "object", "properties": { "cache_variable": { "$ref": "#/components/schemas/OrchestrationCacheVariable" } }, "required": [ "cache_variable" ] }, "examples": { "update_conditions": { "summary": "Request Example: Update conditions", "value": { "cache_variable": { "name": "example_1", "conditions": [ { "expression": "event.summary matches 'exception'" }, { "expression": "event.summary matches 'error'" } ] } } }, "update_configuration": { "summary": "Request Example: Update configuration", "value": { "cache_variable": { "name": "example_1", "configuration": { "type": "trigger_event_count", "ttl_seconds": 2 } } } }, "update_disabled": { "summary": "Request Example: Update disabled state", "value": { "cache_variable": { "name": "example_1", "disabled": true } } } } } } } }, "responses": { "ArgumentError": { "description": "Caller provided invalid arguments. Please review the response for error details. Retrying with the same arguments will *not* work.", "content": { "application/json": { "schema": { "$ref": "#/components/responses/Conflict/content/application~1json/schema" } } } }, "Conflict": { "description": "The request conflicts with the current state of the server.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "code": { "type": "integer", "readOnly": true }, "message": { "type": "string", "readOnly": true, "description": "Error message string" }, "errors": { "type": "array", "readOnly": true, "items": { "type": "string", "readOnly": true, "description": "Human-readable error details" } } }, "example": { "message": "Not Found", "code": 2100 } } } } } } }, "Forbidden": { "description": "Caller is not authorized to view the requested resource.\nWhile your authentication is valid, the authenticated user or token does not have permission to perform this action.\n", "content": { "application/json": { "schema": { "$ref": "#/components/responses/Conflict/content/application~1json/schema" } } } }, "InternalServerError": { "description": "Internal Server Error the PagerDuty server experienced an error.", "content": { "application/json": { "schema": { "$ref": "#/components/responses/Conflict/content/application~1json/schema" } } } }, "NotAllowed": { "description": "The request was received and recognized by the server, but its HTTP method was rejected for the requested resource.", "content": { "application/json": { "schema": { "$ref": "#/components/responses/Conflict/content/application~1json/schema" } } } }, "NotFound": { "description": "The requested resource was not found.", "content": { "application/json": { "schema": { "$ref": "#/components/responses/Conflict/content/application~1json/schema" } } } }, "TooManyRequests": { "description": "Too many requests have been made, the rate limit has been reached.", "content": { "application/json": { "schema": { "$ref": "#/components/responses/Conflict/content/application~1json/schema" } } } }, "PaymentRequired": { "description": "Account does not have the abilities to perform the action. Please review the response for the required abilities.\nYou can also use the [Abilities API](#resource_Abilities) to determine what features are available to your account.\n", "content": { "application/json": { "schema": { "$ref": "#/components/responses/Conflict/content/application~1json/schema" } } } }, "Unauthorized": { "description": "Caller did not supply credentials or did not provide the correct credentials.\nIf you are using an API key, it may be invalid or your Authorization header may be malformed.\n", "content": { "application/json": { "schema": { "$ref": "#/components/responses/Conflict/content/application~1json/schema" } } } }, "UnprocessableEntity": { "description": "Unprocessable Entity. Some arguments failed validation checks.", "content": { "application/json": { "schema": { "$ref": "#/components/responses/Conflict/content/application~1json/schema" } } } }, "RequestEntityTooLarge": { "description": "Caller provided a request that is too large to process.", "content": { "application/json": { "schema": { "$ref": "#/components/responses/Conflict/content/application~1json/schema" } } } }, "OrchestrationCacheVariableListResponse": { "description": "The Cache Variables for this Event Orchestration.", "content": { "application/json": { "schema": { "type": "object", "properties": { "cache_variables": { "type": "array", "items": { "$ref": "#/components/schemas/OrchestrationCacheVariable" } } } }, "examples": { "response": { "summary": "Response Example", "value": { "cache_variables": [ { "id": "294c3ee9-ae83-4da7-828d-107c71dc9316", "name": "cache_var_1", "conditions": [ { "expression": "event.source exists" }, { "expression": "event.severity matches 'critical'" } ], "configuration": { "type": "recent_value", "source": "event.source", "regex": "www (.*) service" }, "created_at": "2021-11-18T16:42:01Z", "created_by": { "id": "P8B9WR8", "self": "https://api.pagerduty.com/users/P8B9WR8", "type": "user_reference" }, "updated_at": "2021-11-18T16:42:01Z", "updated_by": { "id": "P8B9WR8", "self": "https://api.pagerduty.com/users/P8B9WR8", "type": "user_reference" } }, { "id": "2a6d02d5-6365-4326-aaf1-6a719e990245", "name": "cache_var_2", "conditions": [], "configuration": { "type": "trigger_event_count", "ttl_seconds": 60 }, "disabled": true, "created_at": "2021-11-18T16:42:01Z", "created_by": { "id": "P8B9WR8", "self": "https://api.pagerduty.com/users/P8B9WR8", "type": "user_reference" }, "updated_at": "2021-11-18T16:42:01Z", "updated_by": { "id": "P8B9WR8", "self": "https://api.pagerduty.com/users/P8B9WR8", "type": "user_reference" } } ], "total": 2 } } } } } }, "OrchestrationCacheVariableGetResponse": { "description": "The fetched Cache Variable for this Event Orchestration.", "content": { "application/json": { "schema": { "type": "object", "properties": { "cache_variable": { "$ref": "#/components/schemas/OrchestrationCacheVariable" } } }, "examples": { "response": { "summary": "Response Example", "value": { "cache_variable": [ { "id": "64122e97-de81-4554-9d7c-c219cef351cd", "name": "cache_var_1", "conditions": [ { "expression": "raw_event.class exists and event.summary matches part 'unstable'" } ], "configuration": { "type": "recent_value", "source": "event.custom_details.work_id", "regex": ".*" }, "created_at": "2021-11-18T16:42:01Z", "created_by": { "id": "P8B9WR8", "self": "https://api.pagerduty.com/users/P8B9WR8", "type": "user_reference" }, "updated_at": "2021-11-18T16:42:01Z", "updated_by": { "id": "P8B9WR8", "self": "https://api.pagerduty.com/users/P8B9WR8", "type": "user_reference" } } ] } } } } } }, "OrchestrationCacheVariablePostResponse": { "description": "The created Cache Variable for this Event Orchestration.", "content": { "application/json": { "schema": { "type": "object", "properties": { "cache_variable": { "$ref": "#/components/schemas/OrchestrationCacheVariable" } } }, "examples": { "recent_value": { "summary": "Response Example: Recent value cache variable", "value": { "cache_variable": [ { "id": "66bb56c3-2a17-44f3-9193-06b166d759ad", "name": "example_1", "conditions": [ { "expression": "not event.custom_details.errors exists" } ], "configuration": { "type": "recent_value", "source": "event.summary", "regex": ".*" }, "created_at": "2021-11-18T16:42:01Z", "created_by": { "id": "P8B9WR8", "self": "https://api.pagerduty.com/users/P8B9WR8", "type": "user_reference" }, "updated_at": "2021-11-18T16:42:01Z", "updated_by": { "id": "P8B9WR8", "self": "https://api.pagerduty.com/users/P8B9WR8", "type": "user_reference" } } ] } }, "trigger_event_count": { "summary": "Response Example: Trigger event count cache variable", "value": { "cache_variable": [ { "id": "f08cdd8d-10a5-4c70-b508-82ab5c365a43", "name": "example_2", "conditions": [], "configuration": { "type": "trigger_event_count", "ttl_seconds": 30 }, "created_at": "2021-11-18T16:42:01Z", "created_by": { "id": "P8B9WR8", "self": "https://api.pagerduty.com/users/P8B9WR8", "type": "user_reference" }, "updated_at": "2021-11-18T16:42:01Z", "updated_by": { "id": "P8B9WR8", "self": "https://api.pagerduty.com/users/P8B9WR8", "type": "user_reference" } } ] } } } } } }, "OrchestrationCacheVariablePutResponse": { "description": "The updated Cache Variable for this Event Orchestration.", "content": { "application/json": { "schema": { "type": "object", "properties": { "cache_variable": { "$ref": "#/components/schemas/OrchestrationCacheVariable" } } }, "examples": { "update_conditions": { "summary": "Response Example: Recent value cache variable", "value": { "cache_variable": [ { "id": "66bb56c3-2a17-44f3-9193-06b166d759ad", "name": "example_1", "conditions": [ { "expression": "event.summary matches 'exception'" }, { "expression": "event.summary matches 'error'" } ], "configuration": { "type": "recent_value", "source": "event.summary", "regex": ".*" }, "created_at": "2021-11-18T16:42:01Z", "created_by": { "id": "P8B9WR8", "self": "https://api.pagerduty.com/users/P8B9WR8", "type": "user_reference" }, "updated_at": "2021-11-18T16:42:01Z", "updated_by": { "id": "P8B9WR8", "self": "https://api.pagerduty.com/users/P8B9WR8", "type": "user_reference" } } ] } }, "update_configuration": { "summary": "Response Example: Trigger event count cache variable", "value": { "cache_variable": [ { "id": "66bb56c3-2a17-44f3-9193-06b166d759ad", "name": "example_1", "conditions": [ { "expression": "not event.custom_details.errors exists" } ], "configuration": { "type": "trigger_event_count", "ttl_seconds": 2 }, "created_at": "2021-11-18T16:42:01Z", "created_by": { "id": "P8B9WR8", "self": "https://api.pagerduty.com/users/P8B9WR8", "type": "user_reference" }, "updated_at": "2021-11-18T16:42:01Z", "updated_by": { "id": "P8B9WR8", "self": "https://api.pagerduty.com/users/P8B9WR8", "type": "user_reference" } } ] } }, "update_disabled": { "summary": "Response Example: Disabled cache variable", "value": { "cache_variable": [ { "id": "66bb56c3-2a17-44f3-9193-06b166d759ad", "name": "example_1", "conditions": [ { "expression": "not event.custom_details.errors exists" } ], "configuration": { "type": "recent_value", "source": "event.summary", "regex": ".*" }, "disabled": true, "created_at": "2021-11-18T16:42:01Z", "created_by": { "id": "P8B9WR8", "self": "https://api.pagerduty.com/users/P8B9WR8", "type": "user_reference" }, "updated_at": "2021-11-18T16:42:01Z", "updated_by": { "id": "P8B9WR8", "self": "https://api.pagerduty.com/users/P8B9WR8", "type": "user_reference" } } ] } } } } } }, "OrchestrationPathRouterTypeResponse": { "description": "The Orchestration Router object.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OrchestrationRouter" }, "examples": { "response": { "summary": "Example Response", "value": { "orchestration_path": { "type": "router", "parent": { "id": "b02e973d-9620-4e0a-9edc-00fedf7d4694", "self": "https://api.pagerduty.com/event_orchestrations/b02e973d-9620-4e0a-9edc-00fedf7d4694", "type": "event_orchestration_reference" }, "self": "https://api.pagerduty.com/event_orchestrations/b02e973d-9620-4e0a-9edc-00fedf7d4694/router", "sets": [ { "id": "start", "rules": [ { "label": "Events relating to our relational database", "id": "1c26698b", "conditions": [ { "expression": "event.summary matches part 'database'" }, { "expression": "event.source matches regex 'db[0-9]+-server'" } ], "actions": { "route_to": "PB31XBA" } }, { "label": "Events relating to our www app server", "id": "d9801904", "conditions": [ { "expression": "event.summary matches part 'www'" } ], "actions": { "route_to": "PC2D9ML" } } ] } ], "catch_all": { "actions": { "route_to": "unrouted" } }, "created_at": "2021-11-18T16:42:01Z", "created_by": { "id": "P8B9WR8", "self": "https://api.pagerduty.com/users/P8B9WR8", "type": "user_reference" }, "updated_at": "2021-11-18T16:42:01Z", "updated_by": { "id": "P8B9WR8", "self": "https://api.pagerduty.com/users/P8B9WR8", "type": "user_reference" }, "version": "9co0z4b152oICsoV91_PW2.ww8ip_xap" } } } } } } }, "OrchestrationPathServiceTypeResponse": { "description": "The Service Orchestration object.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ServiceOrchestration" }, "examples": { "response": { "summary": "Example Response", "value": { "orchestration_path": { "type": "service", "parent": { "id": "PC2D9ML", "self": "https://api.pagerduty.com/service/PC2D9ML", "type": "service_reference" }, "self": "https://api.pagerduty.com/event_orchestrations/service/PC2D9ML", "sets": [ { "id": "start", "rules": [ { "label": "Always apply some consistent event transformations to every event sent to this Service", "id": "c91f72f3", "conditions": [], "actions": { "variables": [ { "name": "hostname", "path": "event.component", "value": "hostname: (.*)", "type": "regex" } ], "extractions": [ { "template": "{{variables.hostname}}", "target": "event.custom_details.hostname" }, { "source": "event.source", "regex": "www (.*) service", "target": "event.source" } ], "pagerduty_automation_actions": [ { "action_id": "01CSB5SMOKCKVRI5GN0LJG7SMB" } ], "route_to": "step-two", "incident_custom_field_updates": [ { "id": "PEXCK89", "value": "#my-team-channel" }, { "id": "PN1C4A2", "value": "{{event.timestamp}}" } ] } } ] }, { "id": "step-two", "rules": [ { "label": "All critical alerts should be treated as P1 incidents", "id": "7c54529d", "conditions": [ { "expression": "event.severity matches 'critical'" } ], "actions": { "annotate": "Please use our P1 runbook: https://docs.test/p1-runbook", "priority": "P0IN2KQ", "suppress": false, "incident_custom_field_updates": [ { "id": "PEXCK89", "value": "#p1-incident-response" } ] } }, { "label": "If there's something wrong on the canary let the team know about it in our deployments Slack channel", "id": "1f6d9a33", "conditions": [ { "expression": "event.custom_details.hostname matches part 'canary'" } ], "actions": { "automation_actions": [ { "name": "Canary Slack Notification", "url": "https://our-slack-listerner.test/send-notification", "auto_send": true, "headers": [ { "key": "X-Notification-Source", "value": "PagerDuty Incident Webhook" } ], "parameters": [ { "key": "channel", "value": "#my-team-channel" }, { "key": "message", "value": "Something is wrong with the canary deployment" } ] } ], "incident_custom_field_updates": [ { "id": "PEXCK89", "value": "#my-team-channel" } ] } }, { "label": "Never bother the on-call for info-level events outside of work hours", "id": "cd770384", "conditions": [ { "expression": "event.severity matches 'info' and not (now in Mon,Tue,Wed,Thu,Fri 09:00:00 to 17:00:00 America/Los_Angeles)" } ], "actions": { "suppress": true } } ] } ], "catch_all": { "actions": { "suppress": true, "incident_custom_field_updates": [ { "id": "PEXCK89", "value": "#general-incident-notifications" } ] } }, "created_at": "2021-11-18T16:42:01Z", "created_by": { "id": "P8B9WR8", "self": "https://api.pagerduty.com/users/P8B9WR8", "type": "user_reference" }, "updated_at": "2021-11-18T16:42:01Z", "updated_by": { "id": "P8B9WR8", "self": "https://api.pagerduty.com/users/P8B9WR8", "type": "user_reference" }, "migrated_at": "2023-06-14T13:51:31Z", "migrated_by": { "id": "P8B9WR8", "self": "https://api.pagerduty.com/users/P8B9WR8", "type": "user_reference" }, "migrated_from": { "id": "PC2D9ML", "self": "https://api.pagerduty.com/services/PC2D9ML/rules", "type": "service_event_rules_reference" }, "migrated_status": "completed", "migrated_via": "UI", "version": "rn1Mja13T1HBdmPChqFilSQXUW2fWXM_" } } } } } } }, "OrchestrationPathServiceActiveResponse": { "description": "An object with the active status.", "content": { "application/json": { "schema": { "type": "object", "properties": { "active": { "type": "boolean", "description": "The status of the service orchestration." } } }, "examples": { "response": { "summary": "Example Response", "value": { "active": false } } } } } }, "OrchestrationPathUnroutedTypeResponse": { "description": "The Unrouted Orchestration object.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OrchestrationUnrouted" }, "examples": { "response": { "summary": "Example Response", "value": { "orchestration_path": { "type": "unrouted", "parent": { "id": "b02e973d-9620-4e0a-9edc-00fedf7d4694", "self": "https://api.pagerduty.com/event_orchestrations/b02e973d-9620-4e0a-9edc-00fedf7d4694", "type": "event_orchestration_reference" }, "self": "https://api.pagerduty.com/event_orchestrations/b02e973d-9620-4e0a-9edc-00fedf7d4694/router", "sets": [ { "id": "start", "rules": [ { "label": "Update the summary of un-matched Critical alerts so they're easier to spot", "id": "38880ffb", "conditions": [ { "expression": "event.severity matches 'critical'" } ], "actions": { "extractions": [ { "target": "event.summary", "template": "[Critical Unrouted] {{event.summary}}" } ] } }, { "label": "Reduce the severity of all other unrouted events", "id": "3896801e", "conditions": [], "actions": { "severity": "info" } } ] } ], "catch_all": { "actions": { "suppress": true } }, "created_at": "2021-11-18T16:42:01Z", "created_by": { "id": "P8B9WR8", "self": "https://api.pagerduty.com/users/P8B9WR8", "type": "user_reference" }, "updated_at": "2021-11-18T16:42:01Z", "updated_by": { "id": "P8B9WR8", "self": "https://api.pagerduty.com/users/P8B9WR8", "type": "user_reference" }, "version": "aZO.EEf9zWb9Vg0NYq.Uqad1hOC2Maod" } } } } } } }, "WebhookBadRequest": { "description": "Caller provided invalid arguments. Please review the response for error\ndetails. Retrying with the same arguments will *not* work.\n" }, "WebhookUnauthorized": { "description": "Caller did not supply credentials or did not provide the correct\ncredentials.\n\nIf you are using an API key, it may be invalid or your Authorization header may be malformed.\n" }, "WebhookForbidden": { "description": "Caller is not authorized to view the requested resource.\n\nWhile your authentication is valid, the authenticated user or token does not have permission to perform this action.\n" }, "WebhookNotFound": { "description": "The requested resource was not found." } }, "securitySchemes": { "api_key": { "type": "apiKey", "name": "Authorization", "in": "header", "description": "The API Key with format `Token token=`" } }, "schemas": { "StatusUpdateNotificationRule": { "type": "object", "description": "A rule for contacting the user for Incident Status Updates.", "properties": { "contact_method": { "$ref": "#/components/schemas/ContactMethodReference" } }, "required": [ "contact_method" ], "example": { "contact_method": { "id": "PXPGF42", "type": "email_contact_method_reference" } } }, "AnalyticsModel": { "type": "object", "properties": { "filters": { "type": "object", "description": "Accepts a set of filters to apply to the Incidents before aggregating. Any incidents that do not match the included filters will be omitted from the results", "properties": { "created_at_start": { "type": "string", "description": "Accepts an ISO8601 DateTime string. Any incidents with a created_at less than this value will be omitted from the results. The maximum supported time range in conjunction with created_at_end is one year.", "example": "2024-01-01T00:00:00+05:00" }, "created_at_end": { "type": "string", "description": "Accepts an ISO8601 DateTime string. Any incidents with a created_at greater than or equal to this value will be omitted from the results. The maximum supported time range in conjunction with created_at_start is one year.", "example": "2024-02-01T00:00:00Z" }, "urgency": { "type": "string", "description": "Any incidents whose urgency does not match the provided string will be omitted from the results.", "example": "high", "enum": [ "high", "low" ] }, "major": { "type": "boolean", "description": "A boolean flag including whether results should contain *only* [major incidents](https://support.pagerduty.com/docs/operational-reviews#major-incidents), or exclude major incidents. If no value is provided all incidents will be included.", "example": true }, "min_ackowledgements": { "type": "integer", "description": "An integer that sets the requirement for the minimum number of acknowledgements to occur on an incident. For example, setting this to 1 will return only incidents that have at least 1 acknowledgement. If no value is provided, all incidents will be included.", "example": 1 }, "min_timeout_escalations": { "type": "integer", "description": "An integer that sets the requirement for the minimum number of timeout escalations to occur on an incident. For example, setting this to 1 will return only incidents that have at least 1 timeout escalation. If no value is provided, all incidents will be included.", "example": 1 }, "min_manual_escalations": { "type": "integer", "description": "An integer that sets the requirement for the minimum number of manual escalations to occur on an incident. For example, setting this to 1 will return only incidents that have at least 1 manual escalation. If no value is provided, all incidents will be included.", "example": 1 }, "team_ids": { "type": "array", "description": "An array of team IDs. Only incidents related to these teams will be included in the results. If omitted, all teams the requestor has access to will be included in the results.", "items": { "type": "string" }, "example": [ "P373JQQ", "PAECHJV", "P7SYGW6" ] }, "service_ids": { "type": "array", "description": "An array of service IDs. Only incidents related to these services will be included in the results. If omitted, all services the requestor has access to will be included in the results.", "items": { "type": "string" }, "example": [ "PSEJLIN", "PSLWBL8", "PT4KHLX" ] }, "escalation_policy_ids": { "type": "array", "description": "An array of escalation policy IDs. Only incidents related to these escalation policies will be included in the results. If omitted, all escalation policies the requestor has access to will be included in the results.", "items": { "type": "string" }, "example": [ "PDJXDF3", "PG4EHNS" ] }, "priority_ids": { "type": "array", "description": "An array of priority IDs. Only incidents with these priorities will be included in the results. If omitted, all priorities will be included in the results.", "items": { "type": "string" }, "example": [ "PC8O0L3", "PX01HJD", "P5FK83M" ] }, "priority_names": { "type": "array", "description": "An array of user-defined priority names. Only incidents with these priorities will be included in the results. If omitted, all priorities will be included in the results.", "items": { "type": "string" }, "example": [ "P1", "P2", "P3" ] } } }, "time_zone": { "type": "string", "description": "The time zone to use for the results and grouping. Must be in tzdata format. See list of accepted values [here](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).", "example": "Etc/UTC" }, "order": { "type": "string", "description": "The order in which the results were sorted; asc for ascending, desc for descending.", "enum": [ "asc", "desc" ] }, "order_by": { "type": "string", "description": "The column that was used for ordering the results.", "example": "created_at" }, "aggregate_unit": { "type": "string", "description": "The time unit to aggregate metrics by. If no value is provided, the metrics will be aggregated for the entire period.", "nullable": true, "example": "day", "enum": [ "day", "week", "month" ] } } }, "AnalyticsIncidentMetrics": { "title": "Analytics Incident Metrics", "type": "object", "properties": { "mean_assignment_count": { "type": "integer", "description": "Mean count of instances where responders were assigned an incident (including through reassignment or escalation) or accepted a responder request." }, "mean_engaged_seconds": { "type": "integer", "description": "Mean engaged time across all responders.\nEngaged time is measured from the time a user engages with an incident (by\nacknowledging or accepting a responder request) until the incident is resolved.\nThis may include periods in which the incidents were snoozed." }, "mean_engaged_user_count": { "type": "integer", "description": "Mean number of users who engaged with an incident. *Engaged* is defined as\nacknowledging an incident or accepting a responder request in it." }, "mean_seconds_to_engage": { "type": "integer", "description": "A measure of *people response time*. This metric measures the time from\nthe first user engagement (acknowledge or responder accept) to the last.\nThis metric is only used for incidents with **multiple responders**;\nfor incidents with one or no engaged users, this value is null." }, "mean_seconds_to_first_ack": { "type": "integer", "description": "Mean time between the start of an incident, and the first responder to acknowledge." }, "mean_seconds_to_mobilize": { "type": "integer", "description": "Mean time between the start of an incident, and the last additional responder\nto acknowledge. For incidents with one or no engaged users, this value is null." }, "mean_seconds_to_resolve": { "type": "integer", "description": "Mean time from when an incident was triggered until it was resolved." }, "mean_user_defined_engaged_seconds": { "type": "integer", "description": "Mean engaged time across all responders. Engaged time is measured from the time \na user engages with an incident (by acknowledging or accepting a responder request) \nuntil the incident is resolved. This may include periods in which the incidents were snoozed.\nThis metric uses the incident response effort values that \n[users have defined](https://support.pagerduty.com/docs/edit-incidents#edit-incident-duration),\nif they exist." }, "range_start": { "type": "string", "description": "Start of the date range for which the metrics were calculated. Only included when an aggregate unit is specified in the request." }, "service_id": { "type": "string", "description": "ID of the service. Only included when aggregating by service. Not included when aggregating by all." }, "service_name": { "type": "string", "description": "Name of the service. Only included when aggregating by service. Not included when aggregating by all." }, "team_id": { "type": "string", "description": "ID of the team to which the incident was assigned. Not included when aggregating by all." }, "team_name": { "type": "string", "description": "Name of the team to which the incident was assigned. Not included when aggregating by all." }, "total_business_hour_interruptions": { "type": "integer", "description": "Total number of unique interruptions during business hours; 8am-6pm Mon-Fri, based on the user’s time zone." }, "total_engaged_seconds": { "type": "integer", "description": "Total engaged time across all responders. Engaged time is measured from\nthe time a user engages with an incident (by acknowledging or accepting a responder request)\nuntil the incident is resolved. This may include periods in which the incidents were snoozed." }, "total_escalation_count": { "type": "integer", "description": "Total count of instances where an incident is escalated between responders\nassigned to an escalation policy." }, "total_incident_count": { "type": "integer", "description": "The total number of incidents that were created." }, "total_incidents_acknowledged": { "type": "integer", "description": "The total count of assigned incidents acknowledged. \nOnly explicit incident acknowledgment counts; reassign, resolve, and escalation actions do not imply acknowledgement." }, "total_incidents_auto_resolved": { "description": "The total count of incidents that were resolved automatically. \nThis count includes incidents resolved via an integration and those that were [auto-resolved in PagerDuty](https://support.pagerduty.com/docs/configurable-service-settings#auto-resolution)." }, "total_incidents_manual_escalated": { "type": "integer", "description": "The total count of incidents that were manually escalated." }, "total_incidents_reassigned": { "type": "integer", "description": "The total count of incidents that were reassigned." }, "total_incidents_timeout_escalated": { "type": "integer", "description": "The total count of incidents that were escalated due to timeouts." }, "total_interruptions": { "type": "integer", "description": "Total number of unique interruptions." }, "total_notifications": { "type": "integer", "description": "The total count of incident notifications sent via email, SMS, phone call and push." }, "total_off_hour_interruptions": { "type": "integer", "description": "Total number of unique interruptions during off hours; 6pm-10pm Mon-Fri and all day Sat-Sun, based on the user’s time zone." }, "total_sleep_hour_interruptions": { "type": "integer", "description": "Total number of unique interruptions during sleep hours.\nSleep hours: 10pm-8am every day, based on the user’s time zone." }, "total_snoozed_seconds": { "type": "integer", "description": "Total number of seconds incidents were snoozed." }, "total_user_defined_engaged_seconds": { "type": "integer", "description": "Total engaged time across all responders. Engaged time is measured from\nthe time a user engages with an incident (by acknowledging or accepting a responder request)\nuntil the incident is resolved. This may include periods in which the incidents were snoozed.\nThis metric uses the edited incident response effort values that \n[users have defined](https://support.pagerduty.com/docs/edit-incidents#edit-incident-duration),\nif they exist." }, "up_time_pct": { "type": "number", "description": "The percentage of time in the defined date range that the service was not interrupted\nby a [major incident](https://support.pagerduty.com/docs/operational-reviews#major-incidents).\nOnly included when aggregating by team, escalation policy, service, or all services." } } }, "AnalyticsIncidentMetricsEscalationPolicy": { "title": "Analytics Incident Metrics Escalation Policy", "type": "object", "properties": { "distinct_responder_count": { "type": "integer", "description": "Distinct count of responders who engaged in incidents on the escalation policy" }, "escalation_policy_id": { "type": "string", "description": "ID of the escalation policy the incident was last assigned to. Not included when aggregating by all." }, "escalation_policy_name": { "type": "string", "description": "Name of the escalation policy the incident was last assigned to. Not included when aggregating by all." }, "mean_assignment_count": { "type": "integer", "description": "Mean count of instances where responders were assigned an incident (including through reassignment or escalation) or accepted a responder request." }, "mean_engaged_seconds": { "type": "integer", "description": "Mean engaged time across all responders.\nEngaged time is measured from the time a user engages with an incident (by\nacknowledging or accepting a responder request) until the incident is resolved.\nThis may include periods in which the incidents were snoozed." }, "mean_engaged_user_count": { "type": "integer", "description": "Mean number of users who engaged with an incident. *Engaged* is defined as\nacknowledging an incident or accepting a responder request in it." }, "mean_seconds_to_engage": { "type": "integer", "description": "A measure of *people response time*. This metric measures the time from\nthe first user engagement (acknowledge or responder accept) to the last.\nThis metric is only used for incidents with **multiple responders**;\nfor incidents with one or no engaged users, this value is null." }, "mean_seconds_to_first_ack": { "type": "integer", "description": "Mean time between the start of an incident, and the first responder to acknowledge." }, "mean_seconds_to_mobilize": { "type": "integer", "description": "Mean time between the start of an incident, and the last additional responder\nto acknowledge. For incidents with one or no engaged users, this value is null." }, "mean_seconds_to_resolve": { "type": "integer", "description": "Mean time from when an incident was triggered until it was resolved." }, "mean_user_defined_engaged_seconds": { "type": "integer", "description": "Mean engaged time across all responders. Engaged time is measured from the time \na user engages with an incident (by acknowledging or accepting a responder request) \nuntil the incident is resolved. This may include periods in which the incidents were snoozed.\nThis metric uses the incident response effort values that \n[users have defined](https://support.pagerduty.com/docs/edit-incidents#edit-incident-duration),\nif they exist." }, "range_start": { "type": "string", "description": "Start of the date range that the metrics were calculated for. Only included when an aggregate unit is specified in the request." }, "team_id": { "type": "string", "description": "ID of the team the incident was assigned to. Not included when aggregating by all." }, "team_name": { "type": "string", "description": "Name of the team the incident was assigned to. Not included when aggregating by all." }, "total_business_hour_interruptions": { "type": "integer", "description": "Total number of unique interruptions during business hours; 8am-6pm Mon-Fri, based on the user’s time zone." }, "total_engaged_seconds": { "type": "integer", "description": "Total engaged time across all responders. Engaged time is measured from\nthe time a user engages with an incident (by acknowledging or accepting a responder request)\nuntil the incident is resolved. This may include periods in which the incidents were snoozed." }, "total_escalation_count": { "type": "integer", "description": "Total count of instances where an incident is escalated between responders\nassigned to an escalation policy." }, "total_incident_count": { "type": "integer", "description": "The total number of incidents that were created." }, "total_incidents_acknowledged": { "type": "integer", "description": "The total count of assigned incidents acknowledged. \nOnly explicit incident acknowledgment counts; reassign, resolve, and escalation actions do not imply acknowledgement." }, "total_incidents_auto_resolved": { "description": "The total count of incidents that were resolved automatically. \nThis count includes incidents resolved via an integration and those that were [auto-resolved in PagerDuty](https://support.pagerduty.com/docs/configurable-service-settings#auto-resolution)." }, "total_incidents_manual_escalated": { "type": "integer", "description": "The total count of incidents that were manually escalated." }, "total_incidents_reassigned": { "type": "integer", "description": "The total count of incidents that were reassigned." }, "total_incidents_timeout_escalated": { "type": "integer", "description": "The total count of incidents that were escalated due to timeouts." }, "total_interruptions": { "type": "integer", "description": "Total number of unique interruptions." }, "total_notifications": { "type": "integer", "description": "The total count of incident notifications sent via email, SMS, phone call and push." }, "total_off_hour_interruptions": { "type": "integer", "description": "Total number of unique interruptions during off hours; 6pm-10pm Mon-Fri and all day Sat-Sun, based on the user’s time zone." }, "total_sleep_hour_interruptions": { "type": "integer", "description": "Total number of unique interruptions during sleep hours; 10pm-8am every day, based on the user’s time zone." }, "total_snoozed_seconds": { "type": "integer", "description": "Total number of seconds incidents were snoozed." }, "total_user_defined_engaged_seconds": { "type": "integer", "description": "Total engaged time across all responders. Engaged time is measured from\nthe time a user engages with an incident (by acknowledging or accepting a responder request)\nuntil the incident is resolved. This may include periods in which the incidents were snoozed.\nThis metric uses the edited incident response effort values that \n[users have defined](https://support.pagerduty.com/docs/edit-incidents#edit-incident-duration),\nif they exist." }, "up_time_pct": { "type": "number", "description": "The percentage of time in the defined date range that the service was not interrupted\nby a [major incident](https://support.pagerduty.com/docs/operational-reviews#major-incidents). Not included when aggregating by all." } } }, "AnalyticsResponderFilter": { "type": "object", "properties": { "filters": { "type": "object", "description": "Accepts a set of filters to apply to the Incidents before aggregating. Any incidents that do not match the included filters will be omitted from the results", "properties": { "date_range_start": { "type": "string", "description": "Accepts an ISO8601 DateTime string. Any incidents with a created_at less than this value will be omitted from the results. The maximum supported time range in conjunction with date_range_end is one year.", "example": "2023-10-01T00:00:00+05:00" }, "date_range_end": { "type": "string", "description": "Accepts an ISO8601 DateTime string. Any incidents with a created_at greater than or equal to this value will be omitted from the results. The maximum supported time range in conjunction with date_range_start is one year.", "example": "2023-10-01T00:00:00Z" }, "urgency": { "type": "string", "description": "Any incidents whose urgency does not match the provided string will be omitted from the results.", "example": "high", "enum": [ "high", "low" ] }, "team_ids": { "type": "array", "description": "An array of team IDs. Only incidents related to these teams will be included in the results. If omitted, all teams the requestor has access to will be included in the results.", "items": { "type": "string" }, "example": [ "P373JQQ", "PAECHJV", "P7SYGW6" ] }, "responder_ids": { "type": "array", "description": "An array of responder IDs. Only incidents related to these responders will be included in the results. If omitted, all responders the requestor has access to will be included in the results.", "items": { "type": "string" }, "example": [ "PDJXDF3", "PG4EHNS" ] }, "priority_ids": { "type": "array", "description": "An array of priority IDs. Only incidents with these priorities will be included in the results. If omitted, all priorities will be included in the results.", "items": { "type": "string" }, "example": [ "PC8O0L3", "PX01HJD", "P5FK83M" ] }, "priority_names": { "type": "array", "description": "An array of user-defined priority names. Only incidents with these priorities will be included in the results. If omitted, all priorities will be included in the results.", "items": { "type": "string" }, "example": [ "P1", "P2", "P3" ] } } }, "time_zone": { "type": "string", "description": "The time zone to use for the results and grouping.", "example": "Etc/UTC" }, "order": { "type": "string", "description": "The order in which the results were sorted; asc for ascending, desc for descending.", "enum": [ "asc", "desc" ] }, "order_by": { "type": "string", "description": "The column that was used for ordering the results.", "example": "user_id" } } }, "AnalyticsResponderMetrics": { "title": "Analytics Responder Metrics", "type": "object", "properties": { "mean_engaged_seconds": { "type": "integer", "description": "Mean engaged time across all responders for incidents that match the given filters.\nEngaged time is measured from the time a user engages with an incident (by\nacknowledging or accepting a responder request) until the incident is resolved.\nThis may include periods in which the incidents were snoozed." }, "mean_time_to_acknowledge_seconds": { "type": "integer", "description": "The average time between when an incident is first assigned to a user and when the incident is first acknowledged by that user.\nReassign, resolve, and escalation actions do not imply acknowledgement." }, "responder_id": { "type": "integer", "description": "ID of the responder (user). Not included when aggregating by all responders." }, "responder_name": { "type": "string", "description": "Name of the responder (user). Not included when aggregating by all responders." }, "team_id": { "type": "string", "description": "ID of the team associated with the responder. Not included when aggregating by all responders." }, "team_name": { "type": "string", "description": "Name of the team associated with the responder. Not included when aggregating by all responders." }, "total_business_hour_interruptions": { "type": "integer", "description": "Total number of unique interruptions during business hours; 8am-6pm Mon-Fri, based on the user’s time zone." }, "total_engaged_seconds": { "type": "integer", "description": "Total engaged time across all responders for incidents. Engaged time is measured from\nthe time a user engages with an incident (by acknowledging or accepting a responder request)\nuntil the incident is resolved. This may include periods in which the incidents were snoozed." }, "total_incident_count": { "type": "integer", "description": "The total number of incidents that were created." }, "total_incidents_acknowledged": { "type": "integer", "description": "The total count of assigned incidents acknowledged by the user. \nOnly explicit incident acknowledgment counts; reassign, resolve, and escalation actions do not imply acknowledgement." }, "total_incidents_manual_escalated_from": { "type": "integer", "description": "The total count of the user’s assigned incidents that were manually escalated away from a user without acknowledgement." }, "total_incidents_manual_escalated_to": { "type": "integer", "description": "The total count of incidents the user was manually escalated to." }, "total_incidents_reassigned_from": { "type": "integer", "description": "The total count of a user's assigned incidents that were reassigned away from the user to another user or escalation policy." }, "total_incidents_reassigned_to": { "type": "integer", "description": "The total count of incidents the user was reassigned to." }, "total_incidents_timeout_escalated_from": { "type": "integer", "description": "The total count of the user’s assigned incidents that were escalated due to timeouts." }, "total_incidents_timeout_escalated_to": { "type": "integer", "description": "The total count of incidents the user was escalated to due to timeouts." }, "total_interruptions": { "type": "integer", "description": "Total number of unique interruptions." }, "total_notifications": { "type": "integer", "description": "The total count of incident notifications sent via email, SMS, phone call and push." }, "total_off_hour_interruptions": { "type": "integer", "description": "Total number of unique interruptions during off hours; 6pm-10pm Mon-Fri and all day Sat-Sun, based on the user’s time zone." }, "total_seconds_on_call": { "type": "integer", "description": "Total seconds the responder was on call." }, "total_seconds_on_call_level_1": { "type": "integer", "description": "Total seconds the responder was on call at level 1 of their escalation policy." }, "total_seconds_on_call_level_2_plus": { "type": "integer", "description": "Total seconds the responder was on call at level 2 or higher of their escalation policy." }, "total_sleep_hour_interruptions": { "type": "integer", "description": "Total number of unique interruptions during sleep hours; 10pm-8am every day, based on the user’s time zone." } } }, "AnalyticsRawIncident": { "title": "Analytics Raw Incident", "type": "object", "properties": { "acknowledged_user_ids": { "type": "array", "items": { "type": "string" }, "description": "The IDs of the users who acknowledged the incident." }, "acknowledged_user_names": { "type": "array", "items": { "type": "string" }, "description": "The names of the users who acknowledged the incident." }, "acknowledgement_count": { "type": "integer", "description": "Total count of acknowledgements in the incident." }, "active_user_count": { "type": "integer", "description": "Total number of responders who either acknowledged the incident or accepted a responder request." }, "assigned_user_ids": { "type": "array", "items": { "type": "string" }, "description": "The IDs of the users who were assigned the incident." }, "assigned_user_names": { "type": "array", "items": { "type": "string" }, "description": "The names of the users who were assigned the incident." }, "assignment_count": { "type": "integer", "description": "Total count of instances where responders were assigned an incident (including through reassignment or escalation)." }, "auto_resolved": { "type": "boolean", "description": "Whether or not the incident resolved automatically, either via an integration \nor [auto-resolved in PagerDuty](https://support.pagerduty.com/docs/configurable-service-settings#auto-resolution)." }, "business_hour_interruptions": { "type": "integer", "description": "Total number of unique interruptions during business hours; 8am-6pm Mon-Fri, based on the user’s time zone." }, "created_at": { "type": "string", "description": "Timestamp of when the incident was created." }, "description": { "type": "string", "description": "The incident description" }, "engaged_seconds": { "type": "integer", "description": "Total engaged time across all responders for this incident. Engaged time is measured from the time a user engages with an incident (by acknowledging or accepting a responder request) until the incident is resolved. This may include periods in which the incidents were snoozed." }, "engaged_user_count": { "type": "integer", "description": "Total number of users who engaged (acknowledged, accepted responder request) in the incident." }, "escalation_count": { "type": "integer", "description": "Total count of instances where an incident is escalated between responders assigned to an escalation policy." }, "escalation_policy_id": { "type": "string", "description": "ID of the escalation policy the incident was assigned to." }, "escalation_policy_name": { "type": "string", "description": "Name of the escalation policy the incident was assigned to." }, "id": { "type": "string", "description": "Incident ID" }, "incident_number": { "type": "integer", "description": "The PagerDuty incident number." }, "joined_user_ids": { "type": "array", "items": { "type": "string" }, "description": "The IDs of the users who either acknowledged the incident or accepted a responder request." }, "joined_user_names": { "type": "array", "items": { "type": "string" }, "description": "The names of the users who either acknowledged the incident or accepted a responder request." }, "major": { "type": "boolean", "description": "An incident is classified as a [major incident](https://support.pagerduty.com/docs/operational-reviews#major-incidents) if it has one of the two highest priorities, or if multiple responders are added and acknowledge the incident." }, "manual_escalation_count": { "type": "integer", "description": "Total count of manual escalations in the incident." }, "off_hour_interruptions": { "type": "integer", "description": "Total number of unique interruptions during off hours; 6pm-10pm Mon-Fri and all day Sat-Sun, based on the user’s time zone." }, "priority_id": { "type": "string", "nullable": true, "description": "ID of the incident's priority level." }, "priority_name": { "type": "string", "nullable": true, "description": "The user-provided short name of the priority." }, "priority_order": { "type": "integer", "nullable": true, "description": "The numerical value used to sort priorities. Higher values are higher priority." }, "reassignment_count": { "type": "integer", "description": "Total count of reassignments in the incident." }, "resolved_at": { "type": "string", "description": "Timestamp of when the incident was resolved." }, "resolved_by_user_id": { "type": "string", "description": "ID of the user who resolved the incident." }, "resolved_by_user_name": { "type": "string", "description": "Name of the user who resolved the incident." }, "seconds_to_engage": { "type": "integer", "description": "A measure of *people response time*. This metric measures the time from\nthe first user engagement (acknowledge or responder accept) to the last.\nThis metric is only used for incidents with **multiple responders**;\nfor incidents with one or no engaged users, this value is null." }, "seconds_to_first_ack": { "type": "integer", "description": "Time between the start of an incident, and the first responder to acknowledge." }, "seconds_to_mobilize": { "type": "integer", "description": "Time between the start of an incident, and the last additional responder to acknowledge. If an incident has one or no responders, the value will be null." }, "seconds_to_resolve": { "type": "integer", "description": "Time from when an incident was triggered until it was resolved." }, "service_id": { "type": "string", "description": "ID of the service that the incident triggered on." }, "service_name": { "type": "string", "description": "Name of the service that the incident triggered on." }, "sleep_hour_interruptions": { "type": "integer", "description": "Total number of unique interruptions during sleep hours; 10pm-8am every day, based on the user’s time zone." }, "snoozed_seconds": { "type": "integer", "description": "Total seconds the incident has been snoozed for." }, "status": { "type": "string", "description": "The incident status. Can be one of `triggered`, `acknowledged`, or `resolved`." }, "team_id": { "type": "string", "nullable": true, "description": "ID of the team the incident was assigned to." }, "team_name": { "type": "string", "nullable": true, "description": "Name of the team the incident was assigned to." }, "timeout_escalation_count": { "type": "integer", "description": "Total count of timeout escalations in the incident." }, "total_interruptions": { "type": "integer", "description": "Total number of unique interruptions in the incident." }, "total_notifications": { "type": "integer", "description": "Total number of notifications sent for the incident." }, "urgency": { "type": "string", "description": "Notification level" }, "user_defined_effort_seconds": { "type": "integer", "description": "The total response effort in seconds,\n[as defined by the user](https://support.pagerduty.com/docs/editing-incidents#edit-incident-duration).", "nullable": true } } }, "AnalyticsRawIncidentResponses": { "title": "Analytics Raw Incident Responses", "type": "object", "properties": { "responder_name": { "type": "string", "description": "Name of the user associated with the Incident Response." }, "responder_id": { "type": "string", "description": "ID of the user associated with the Incident Response." }, "response_status": { "type": "string", "description": "Status of the user's interaction with the Incident notification.", "enum": [ "joined", "pending", "declined" ] }, "responder_type": { "type": "string", "description": "Type of responder, where `assigned` means the user was added to the Incident via Assignment at Incident creation,\n`reassigned` means the user was added to the Incident via Reassignment, `escalated` means the user was added via Escalation,\nand `added_responder` means the user was added via Responder Reqeuest.", "enum": [ "assigned", "reassigned", "escalated", "added_responder" ] }, "requested_at": { "type": "string", "description": "Timestamp of when the user was requested." }, "responded_at": { "type": "string", "description": "Timestamp of when the user responded to the request." }, "time_to_respond_seconds": { "type": "integer", "description": "Measures the time it took for the user to respond to the Incident request. In other words, `responded_at - requested_at`." } } }, "AnalyticsRawResponderIncidents": { "title": "Analytics Raw Responder Incidents", "type": "object", "properties": { "incident_created_at": { "type": "string", "description": "Timestamp of when the incident was created." }, "incident_description": { "type": "string", "description": "The incident description." }, "incident_id": { "type": "string", "description": "Incident ID" }, "incident_number": { "type": "integer", "description": "The PagerDuty incident number." }, "incident_priority_id": { "type": "string", "nullable": true, "description": "ID of the incident's priority level." }, "incident_priority_name": { "type": "string", "nullable": true, "description": "The user-provided short name of the priority." }, "incident_priority_order": { "type": "integer", "nullable": true, "description": "The numerical value used to sort priorities. Higher values are higher priority." }, "incident_urgency": { "type": "string", "description": "Notification level" }, "mean_time_to_acknowledge_seconds": { "type": "integer", "description": "Mean time from this user being assigned to an incident until this user acknowledges the incident." }, "responder_id": { "type": "string", "description": "ID of the responder." }, "responder_name": { "type": "string", "description": "Name of the responder." }, "service_id": { "type": "string", "description": "ID of the service that the incident triggered on." }, "service_name": { "type": "string", "description": "Name of the service that the incident triggered on." }, "service_team_id": { "type": "string", "nullable": true, "description": "ID of the team that owns the related service." }, "service_team_name": { "type": "string", "nullable": true, "description": "Name of the team that owns the related service." }, "total_acknowledgements": { "type": "integer", "description": "Total acknowledgements from the responder on the incident." }, "total_business_hour_interruptions": { "type": "integer", "description": "Total number of unique interruptions during business hours; 8am-6pm Mon-Fri, based on the user’s time zone." }, "total_engaged_seconds": { "type": "integer", "description": "Total engaged time across all responders for incidents. Engaged time is measured from\nthe time a user engages with an incident (by acknowledging or accepting a responder request)\nuntil the incident is resolved. This may include periods in which the incidents were snoozed." }, "total_interruptions": { "type": "integer", "description": "Total number of unique interruptions for the responder during the incident." }, "total_manual_escalations_from": { "type": "integer", "description": "Total times the responder was manually escalated away from the incident." }, "total_manual_escalations_to": { "type": "integer", "description": "Total times the responder was manually escalated to the incident." }, "total_off_hour_interruptions": { "type": "string", "description": "Total number of unique interruptions during off hours; 6pm-10pm Mon-Fri and all day Sat-Sun, based on the user’s time zone." }, "total_reassignments_from": { "type": "integer", "description": "Total times the responder was reassigned away from the incident." }, "total_reassignments_to": { "type": "integer", "description": "Total times the responder was reassigned to the incident." }, "total_sleep_hour_interruptions": { "type": "integer", "description": "Total number of unique interruptions during sleep hours; 10pm-8am every day, based on the user’s time zone." }, "total_timeout_escalations_from": { "type": "integer", "description": "Total times the responder was escalated away from the incident due to timeout." }, "total_timeout_escalations_to": { "type": "integer", "description": "Total times the responder was escalated to the incident due to timeout." } } }, "AuditRecord": { "type": "object", "readOnly": true, "description": "An Audit Trail record", "properties": { "id": { "type": "string" }, "self": { "type": "string", "nullable": true, "description": "Record URL." }, "execution_time": { "type": "string", "format": "date-time", "description": "The date/time the action executed, in ISO8601 format and millisecond precision." }, "execution_context": { "type": "object", "description": "Action execution context", "properties": { "request_id": { "type": "string", "nullable": true, "description": "Request Id" }, "remote_address": { "type": "string", "nullable": true, "description": "remote address" } }, "nullable": true }, "actors": { "type": "array", "nullable": true, "items": { "$ref": "#/components/schemas/Reference" } }, "method": { "type": "object", "description": "The method information", "properties": { "description": { "type": "string", "nullable": true }, "truncated_token": { "description": "Truncated token containing the last 4 chars of the token's actual value.", "type": "string", "nullable": true, "example": "3xyz" }, "type": { "$ref": "#/components/parameters/audit_method_type/schema" } }, "required": [ "type" ] }, "root_resource": { "$ref": "#/components/schemas/Reference" }, "action": { "type": "string", "example": "create" }, "details": { "type": "object", "nullable": true, "description": "Additional details to provide further information about the action or\nthe resource that has been audited.\n", "properties": { "resource": { "$ref": "#/components/schemas/Reference" }, "fields": { "description": "A set of fields that have been affected.\nThe fields that have not been affected MAY be returned.\n", "type": "array", "nullable": true, "items": { "type": "object", "description": "Information about the affected field.\nWhen available, field's before and after values are returned:\n \n#### Resource creation\n- `value` MAY be returned\n\n#### Resource update\n- `value` MAY be returned\n- `before_value` MAY be returned\n\n#### Resource deletion\n- `before_value` MAY be returned\n", "properties": { "name": { "type": "string", "description": "Name of the resource field", "example": "name" }, "description": { "type": "string", "nullable": true, "description": "Human readable description of the resource field", "example": "First and Last name" }, "value": { "type": "string", "nullable": true, "description": "new or updated value of the field", "example": "Jonathan" }, "before_value": { "type": "string", "nullable": true, "description": "previous or deleted value of the field", "example": "John" } }, "required": [ "name" ] } }, "references": { "description": "A set of references that have been affected.", "type": "array", "nullable": true, "items": { "type": "object", "properties": { "name": { "type": "string", "description": "Name of the reference field", "example": "team_members" }, "description": { "type": "string", "nullable": true, "description": "Human readable description of the references field", "example": "First and Last name" }, "added": { "type": "array", "nullable": true, "items": { "$ref": "#/components/schemas/Reference" } }, "removed": { "type": "array", "nullable": true, "items": { "$ref": "#/components/schemas/Reference" } } }, "required": [ "name" ] } } }, "required": [ "resource" ] } }, "required": [ "id", "execution_time", "method", "root_resource", "action" ] }, "AuditRecordResponseSchema": { "allOf": [ { "type": "object", "properties": { "records": { "type": "array", "items": { "$ref": "#/components/schemas/AuditRecord" } }, "response_metadata": { "nullable": true, "anyOf": [ { "$ref": "#/components/schemas/AuditMetadata" } ] } }, "required": [ "records" ] }, { "$ref": "#/components/schemas/CursorPagination" } ] }, "AuditMetadata": { "type": "object", "properties": { "messages": { "type": "array", "nullable": true, "items": { "type": "string", "example": "Message about the result" } } } }, "AutoPauseNotificationsParameters": { "title": "AutoPauseNotificationsParameters", "type": "object", "description": "Defines how alerts on this service are automatically suspended for a period of time before triggering, when identified as likely being transient. Note that automatically pausing notifications is only available on certain plans.", "properties": { "enabled": { "type": "boolean", "default": false, "description": "Indicates whether alerts should be automatically suspended when identified as transient" }, "timeout": { "type": "integer", "enum": [ 120, 180, 300, 600, 900 ], "description": "Indicates in seconds how long alerts should be suspended before triggering" } }, "example": { "enabled": true, "timeout": 300 } }, "AutomationActionsRunnerTypeEnum": { "description": "sidecar -- The runner is backed by an external sidecar that polls for invocations.\nrunbook -- The runner communicates directly with a runbook instance.\n", "type": "string", "enum": [ "sidecar", "runbook" ], "example": "runbook" }, "AutomationActionsRunbookBaseURI": { "type": "string", "description": "The base URI of the Runbook server to connect to. May only contain alphanumeric characters, periods, underscores and dashes. Specified as the subdomain portion of an RBA host, as in .runbook.pagerduty.cloud", "maxLength": 255, "example": "subdomain" }, "AutomationActionsRunner": { "allOf": [ { "$ref": "#/components/schemas/Tag/allOf/0" }, { "type": "object", "description": "A remote entity capable of executing work specified by an action. At maximum, an account can have 1000 runners. If runner maximum is exceeded, a 400 response is returned with error message.", "properties": { "runner_type": { "$ref": "#/components/schemas/AutomationActionsRunnerTypeEnum" }, "name": { "type": "string", "example": "us-west-2 prod runner" }, "description": { "type": "string", "example": "us-west-2 runner provisioned in the production environment by the SRE team" }, "last_seen": { "type": "string", "format": "date-time" }, "status": { "$ref": "#/components/schemas/AutomationActionsRunnerStatusEnum" }, "creation_time": { "type": "string", "format": "date-time" }, "runbook_base_uri": { "$ref": "#/components/schemas/AutomationActionsRunbookBaseURI" }, "teams": { "type": "array", "readOnly": true, "description": "The list of teams associated with the Runner", "items": { "$ref": "#/components/schemas/TeamReference" } }, "privileges": { "$ref": "#/components/schemas/AutomationActionsUserPermissions" }, "associated_actions": { "description": "References to at most 3 actions associated with the Runner. Use appropriate endpoints to retrieve the full list of associated actions.", "allOf": [ { "type": "object", "properties": { "actions": { "nullable": false, "type": "array", "items": { "allOf": [ { "$ref": "#/components/schemas/Reference" }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "action_reference" ] } } } ] } } }, "required": [ "actions" ] }, { "type": "object", "required": [ "more" ], "properties": { "more": { "type": "boolean", "description": "Indicates whether more actions exist for the Runner." } } } ] }, "metadata": { "type": "object", "description": "Additional metadata" } }, "required": [ "id", "type", "name", "runner_type", "status", "creation_time" ] } ] }, "AutomationActionsRunnerRunbookBody": { "type": "object", "title": "RunnerRunbookBody", "properties": { "name": { "type": "string", "maxLength": 255, "example": "us-west-2 prod runner" }, "description": { "type": "string", "maxLength": 1024, "example": "us-west-2 runner provisioned in the production environment by the SRE team" }, "runbook_base_uri": { "$ref": "#/components/schemas/AutomationActionsRunbookBaseURI" }, "runbook_api_key": { "type": "string", "maxLength": 64, "description": "The API key to connect to the Runbook server with. If omitted, the previously stored value will remain unchanged" } } }, "AutomationActionsRunnerRunbookPostBody": { "type": "object", "title": "RunnerRunbookPostBody", "properties": { "runner_type": { "$ref": "#/components/schemas/AutomationActionsRunnerTypeEnum" }, "name": { "type": "string", "maxLength": 255, "example": "us-west-2 prod runner" }, "description": { "type": "string", "maxLength": 1024, "example": "us-west-2 runner provisioned in the production environment by the SRE team" }, "runbook_base_uri": { "$ref": "#/components/schemas/AutomationActionsRunbookBaseURI" }, "runbook_api_key": { "type": "string", "maxLength": 64, "description": "The API key to connect to the Runbook server with. If omitted, the previously stored value will remain unchanged" }, "teams": { "type": "array", "description": "The list of teams associated with the Runner", "items": { "$ref": "#/components/schemas/TeamReference" } } }, "required": [ "runner_type", "name", "description", "runbook_base_uri", "runbook_api_key" ] }, "AutomationActionsRunnerSidecarBody": { "type": "object", "title": "RunnerSidecarBody", "properties": { "name": { "type": "string", "maxLength": 255, "example": "us-west-2 prod runner" }, "description": { "type": "string", "maxLength": 1024, "example": "us-west-2 runner provisioned in the production environment by the SRE team" } } }, "AutomationActionsRunnerSidecarPostBody": { "type": "object", "title": "RunnerSidecarPostBody", "properties": { "runner_type": { "$ref": "#/components/schemas/AutomationActionsRunnerTypeEnum" }, "name": { "type": "string", "maxLength": 255, "example": "us-west-2 prod runner" }, "description": { "type": "string", "maxLength": 1024, "example": "us-west-2 runner provisioned in the production environment by the SRE team" }, "teams": { "type": "array", "description": "The list of teams associated with the Runner", "items": { "$ref": "#/components/schemas/TeamReference" } } }, "required": [ "runner_type", "name", "description" ] }, "AutomationActionsRunnerStatusEnum": { "description": "Configured -- Runner has connected to the backend at least once \nNotConfigured -- Runner has never connected to backend\n", "type": "string", "enum": [ "Configured", "NotConfigured" ], "example": "Configured" }, "AutomationActionsUserPermissions": { "type": "object", "properties": { "permissions": { "nullable": false, "type": "array", "items": { "type": "string", "enum": [ "create", "update", "delete", "invoke" ] }, "example": [ "update", "delete" ] } }, "required": [ "permissions" ] }, "AutomationActionsInvocation": { "allOf": [ { "$ref": "#/components/schemas/Tag/allOf/0" }, { "type": "object", "properties": { "action_snapshot": { "allOf": [ { "type": "object", "properties": { "name": { "type": "string", "example": "Restart apache" }, "action_type": { "$ref": "#/components/parameters/automation_actions_action_type/schema" } }, "required": [ "action_type", "name" ] }, { "type": "object", "properties": { "action_data_reference": { "oneOf": [ { "$ref": "#/components/schemas/AutomationActionsProcessAutomationJobActionDataReference" }, { "$ref": "#/components/schemas/AutomationActionsScriptActionDataReference" } ] } } } ] }, "runner_id": { "type": "string" }, "timing": { "description": "A list of state transitions with timestamps, sorted in ascending order by timestamp. Only the 'created' transition is guaranteed to exist at any time.", "type": "array", "items": { "type": "object", "properties": { "timestamp": { "type": "string", "format": "date-time", "description": "The date/time" }, "state": { "$ref": "#/components/parameters/automation_actions_invocation_state/schema" } }, "required": [ "timestamp", "state" ] } }, "duration": { "description": "The duration of the invocation's execution time.", "example": 23, "type": "integer" }, "state": { "$ref": "#/components/parameters/automation_actions_invocation_state/schema" }, "action_id": { "type": "string" }, "metadata": { "type": "object", "properties": { "agent": { "oneOf": [ { "$ref": "#/components/schemas/UserReference" }, { "$ref": "#/components/schemas/AutomationActionsAbstractAction/allOf/1/properties/last_run_by/oneOf/1" }, { "$ref": "#/components/schemas/Template/allOf/1/properties/created_by/oneOf/1" }, { "type": "object", "properties": { "id": { "type": "string", "example": "PT4KHRS" }, "type": { "type": "string", "example": "incident_workflow_reference" } }, "required": [ "type", "id" ] } ] }, "incident": { "$ref": "#/components/schemas/IncidentReference" } }, "required": [ "agent" ] } }, "required": [ "id", "type", "action_snapshot", "runner_id", "timing", "state", "action_id", "metadata" ] } ] }, "AutomationActionsAbstractAction": { "allOf": [ { "$ref": "#/components/schemas/Tag/allOf/0" }, { "type": "object", "description": "A unit of work to be executed on runner. At most, an account can have 10,000 actions. If action maximum is exceeded, a 400 reponse is returned with error message.", "properties": { "name": { "type": "string", "example": "Restart apache" }, "description": { "type": "string", "example": "Restarts apache on the us-west-2-shopping-cart host" }, "action_type": { "$ref": "#/components/parameters/automation_actions_action_type/schema" }, "action_classification": { "$ref": "#/components/schemas/AutomationActionsActionClassificationEnum" }, "runner": { "type": "string", "maxLength": 36 }, "runner_type": { "$ref": "#/components/schemas/AutomationActionsRunnerTypeEnum" }, "services": { "type": "array", "items": { "$ref": "#/components/schemas/ServiceReference" } }, "privileges": { "$ref": "#/components/schemas/AutomationActionsUserPermissions" }, "metadata": { "type": "object" }, "creation_time": { "type": "string", "format": "date-time", "description": "The date/time" }, "modify_time": { "type": "string", "format": "date-time", "description": "The date/time" }, "last_run": { "type": "string", "format": "date-time", "description": "The date/time" }, "last_run_by": { "oneOf": [ { "$ref": "#/components/schemas/UserReference" }, { "type": "object", "properties": { "id": { "type": "string", "example": "/5471da24-eecd-42e2-ac38-a32b2d907406/service/P000000" }, "type": { "type": "string", "example": "event_orchestration_reference" } }, "required": [ "type", "id" ] }, { "$ref": "#/components/schemas/Template/allOf/1/properties/created_by/oneOf/1" } ] } }, "required": [ "id", "type", "action_type", "name", "creation_time", "modify_time" ] } ] }, "AutomationActionsAbstractActionPostBody": { "type": "object", "properties": { "name": { "type": "string", "example": "Restart apache", "maxLength": 255 }, "description": { "type": "string", "example": "Restarts apache on the us-west-2-shopping-cart host", "maxLength": 1024 }, "action_classification": { "$ref": "#/components/schemas/AutomationActionsActionClassificationEnum" }, "action_type": { "$ref": "#/components/parameters/automation_actions_action_type/schema" }, "runner": { "type": "string", "example": "1a6763bd-b1ad-458f-a347-6c8a9bea2d70", "maxLength": 36 }, "services": { "nullable": false, "type": "array", "items": { "$ref": "#/components/schemas/ServiceReference" } }, "teams": { "nullable": false, "type": "array", "items": { "$ref": "#/components/schemas/TeamReference" } } }, "required": [ "name", "description", "action_type" ] }, "AutomationActionsAbstractActionPutBody": { "type": "object", "properties": { "name": { "type": "string", "example": "Restart apache", "maxLength": 255 }, "description": { "type": "string", "example": "Restarts apache on the us-west-2-shopping-cart host", "maxLength": 1024 }, "action_classification": { "$ref": "#/components/schemas/AutomationActionsActionClassificationEnum" }, "action_type": { "$ref": "#/components/parameters/automation_actions_action_type/schema" }, "runner": { "type": "string", "maxLength": 36 } } }, "AutomationActionsActionClassificationEnum": { "type": "string", "enum": [ "diagnostic", "remediation" ], "nullable": true }, "AutomationActionsProcessAutomationJobAction": { "allOf": [ { "$ref": "#/components/schemas/AutomationActionsAbstractAction" }, { "type": "object", "properties": { "action_data_reference": { "$ref": "#/components/schemas/AutomationActionsProcessAutomationJobActionDataReference" } }, "required": [ "action_data_reference" ] } ] }, "AutomationActionsProcessAutomationJobActionDataReference": { "type": "object", "properties": { "process_automation_job_id": { "type": "string", "example": "79c199bba1aff6e519f198457f5ec0fc", "maxLength": 36 }, "process_automation_job_arguments": { "type": "string", "description": "Arguments to pass to the Process Automation job. The maxLength value is specified in bytes.", "example": "-env production", "maxLength": 1024 }, "process_automation_node_filter": { "type": "string", "description": "Node filter for the Process Automation job. The maxLength value is specified in bytes. Filter syntax: https://docs.rundeck.com/docs/manual/11-node-filters.html#node-filter-syntax", "example": "mynode1 !nodename: mynode2", "maxLength": 1024 } }, "required": [ "process_automation_job_id" ] }, "AutomationActionsProcessAutomationJobActionPostBody": { "allOf": [ { "$ref": "#/components/schemas/AutomationActionsAbstractActionPostBody" }, { "type": "object", "properties": { "action_data_reference": { "$ref": "#/components/schemas/AutomationActionsProcessAutomationJobActionDataReference" } }, "required": [ "action_data_reference" ] } ] }, "AutomationActionsProcessAutomationJobActionPutBody": { "allOf": [ { "$ref": "#/components/schemas/AutomationActionsAbstractActionPutBody" }, { "type": "object", "properties": { "action_data_reference": { "$ref": "#/components/schemas/AutomationActionsProcessAutomationJobActionDataReference" } } } ] }, "AutomationActionsProcessAutomationJobActionWithTeams": { "allOf": [ { "$ref": "#/components/schemas/AutomationActionsProcessAutomationJobAction" }, { "type": "object", "properties": { "teams": { "type": "array", "items": { "$ref": "#/components/schemas/TeamReference" } } } } ] }, "AutomationActionsScriptAction": { "allOf": [ { "$ref": "#/components/schemas/AutomationActionsAbstractAction" }, { "type": "object", "properties": { "action_data_reference": { "$ref": "#/components/schemas/AutomationActionsScriptActionDataReference" } }, "required": [ "action_data_reference" ] } ] }, "AutomationActionsScriptActionDataReference": { "type": "object", "properties": { "script": { "type": "string", "description": "Body of the script to be executed on the Runner. To execute it, the Runner will write the content of the property into a temp file, make the file executable and execute it. It is assumed that the Runner has a properly configured environment to run the script as an executable file. This behaviour can be altered by providing the `invocation_command` property. The maxLength value is specified in bytes.", "example": "print(\"Hello from a Python script!\")", "maxLength": 16777215 }, "invocation_command": { "type": "string", "description": "The command to executed a script with. With the body of the script written into a temp file, the Runner will execute the ` ` command. The maxLength value is specified in bytes.", "example": "/usr/local/bin/python3", "maxLength": 65535 } }, "required": [ "script" ] }, "AutomationActionsScriptActionPostBody": { "allOf": [ { "$ref": "#/components/schemas/AutomationActionsAbstractActionPostBody" }, { "type": "object", "properties": { "action_data_reference": { "$ref": "#/components/schemas/AutomationActionsScriptActionDataReference" } }, "required": [ "action_data_reference" ] } ] }, "AutomationActionsScriptActionPutBody": { "allOf": [ { "$ref": "#/components/schemas/AutomationActionsAbstractActionPutBody" }, { "type": "object", "properties": { "action_data_reference": { "$ref": "#/components/schemas/AutomationActionsScriptActionDataReference" } } } ] }, "AutomationActionsScriptActionWithTeams": { "allOf": [ { "$ref": "#/components/schemas/AutomationActionsScriptAction" }, { "type": "object", "properties": { "teams": { "type": "array", "items": { "$ref": "#/components/schemas/TeamReference" } } } } ] }, "ContentBasedIntelligentAlertGroupingConfiguration": { "type": "object", "title": "Content and Intelligent Grouping", "description": "The configuration for Content Based Intelligent Alert Grouping", "properties": { "aggregate": { "type": "string", "description": "Whether Alerts should be grouped if `all` or `any` specified fields match. If `all` is selected, an exact match on every specified field name must occur for Alerts to be grouped. If `any` is selected, Alerts will be grouped when there is an exact match on at least one of the specified fields.", "enum": [ "all, any" ] }, "fields": { "type": "array", "description": "An array of strings which represent the fields with which to group against. Depending on the aggregate, Alerts will group if some or all the fields match." }, "time_window": { "type": "integer", "minimum": 300, "maximum": 3600, "description": "The maximum amount of time allowed between Alerts. Any Alerts arriving greater than `time_window` seconds apart will not be grouped together. This is a rolling time window up to 24 hours and is counted from the most recently grouped alert. The window is extended every time a new alert is added to the group, up to 24 hours (24 hours only applies to single-service settings). To use the \"recommended_time_window,\" set the value to 0, otherwise the value must be between 300 <= time_window <= 3600." }, "recommended_time_window": { "readOnly": true, "type": "integer", "description": "In order to ensure your Service has the optimal grouping window, we use data science to calculate your Service`s average Alert inter-arrival time. We encourage customer`s to use this value, please set `time_window` to 0 to use the `recommended_time_window`." } } }, "ServiceEventRule": { "allOf": [ { "$ref": "#/components/schemas/EventRule/allOf/0" }, { "type": "object", "properties": { "position": { "type": "integer", "description": "Position/index of the Event Rule on the Service. Starting from position 0 (the first rule), rules are evaluated one-by-one until a matching Event Rule is found or the end of the list is reached." }, "actions": { "$ref": "#/components/schemas/EventRuleActionsCommon" } } } ] }, "EventRuleActionsCommon": { "type": "object", "description": "When an event matches this Event Rule, the actions that will be taken to change the resulting Alert and Incident.", "properties": { "annotate": { "description": "Set a note on the resulting incident.", "type": "object", "nullable": true, "required": [ "value" ], "properties": { "value": { "type": "string", "description": "The content of the note." } } }, "event_action": { "description": "Set whether the resulting alert status is trigger or resolve.", "type": "object", "required": [ "value" ], "nullable": true, "properties": { "value": { "type": "string", "enum": [ "trigger", "resolve" ] } } }, "extractions": { "type": "array", "description": "Dynamically extract values to set and modify new and existing PD-CEF fields.", "items": { "oneOf": [ { "type": "object", "required": [ "target", "source", "regex" ], "properties": { "target": { "type": "string", "description": "The PD-CEF field that will be set with the value from the regex." }, "source": { "type": "string", "description": "The path to the event field where the regex will be applied to extract a value." }, "regex": { "type": "string", "description": "A RE2 regular expression. If it contains one or more capture groups, their values will be extracted and appended together. If it contains no capture groups, the whole match is used." } } }, { "type": "object", "required": [ "target", "template" ], "properties": { "target": { "type": "string", "description": "The PD-CEF field that will be set with the value from the regex." }, "template": { "type": "string", "description": "A value that will be used to populate the target PD-CEF field. You can include variables extracted from the payload by using string interpolation.", "example": "Error number {{count}} on host {{host}}" } } } ] } }, "priority": { "description": "Set the priority ID for the resulting incident. You can find the priority you want by calling the priorities endpoint.", "type": "object", "required": [ "value" ], "nullable": true, "properties": { "value": { "type": "string", "description": "The priority ID." } } }, "severity": { "description": "Set the severity of the resulting alert.", "type": "object", "required": [ "value" ], "nullable": true, "properties": { "value": { "type": "string", "enum": [ "info", "warning", "error", "critical" ] } } }, "suppress": { "description": "Set whether the resulting alert is suppressed. Can optionally be used with a threshold where resulting alerts will be suppressed until the threshold is met in a window of time. If using a threshold the rule must also set a route action.", "type": "object", "required": [ "value" ], "properties": { "value": { "type": "boolean" }, "threshold_value": { "type": "integer", "description": "The number of occurences needed during the window of time to trigger the theshold." }, "threshold_time_unit": { "type": "string", "description": "The time unit for the window of time.", "enum": [ "seconds", "minutes", "hours" ] }, "threshold_time_amount": { "type": "integer", "description": "The amount of time units for the window of time." } } }, "suspend": { "description": "Set the length of time to suspend the resulting alert before triggering. Rules with a suspend action must also set a route action, and cannot have a suppress with threshold action", "type": "object", "required": [ "value" ], "nullable": true, "properties": { "value": { "type": "integer", "description": "The amount of time to suspend the alert in seconds." } } } } }, "EventRule": { "allOf": [ { "type": "object", "properties": { "id": { "type": "string", "readOnly": true, "description": "ID of the Event Rule." }, "self": { "type": "string", "format": "url", "description": "the API show URL at which the object is accessible.", "readOnly": true }, "disabled": { "type": "boolean", "description": "Indicates whether the Event Rule is disabled and would therefore not be evaluated." }, "conditions": { "type": "object", "description": "Conditions evaluated to check if an event matches this Event Rule. Is always empty for the catch_all rule, though.", "properties": { "operator": { "type": "string", "description": "Operator to combine sub-conditions.", "enum": [ "and", "or" ] }, "subconditions": { "type": "array", "description": "Array of sub-conditions.", "items": { "type": "object", "properties": { "operator": { "type": "string", "description": "The type of operator to apply.", "enum": [ "exists", "nexists", "equals", "nequals", "contains", "ncontains", "matches", "nmatches" ] }, "parameters": { "type": "object", "properties": { "path": { "type": "string", "description": "Path to a field in an event, in dot-notation. For Event Rules on a serivce, this will have to be a PD-CEF field." }, "value": { "type": "string", "description": "Value to apply to the operator." }, "options": { "type": "object", "description": "Options to configure the operator." } }, "required": [ "value", "path" ] } }, "required": [ "operator", "parameters" ] } } }, "required": [ "operator", "subconditions" ] }, "time_frame": { "description": "Time-based conditions for limiting when the rule is active.", "type": "object", "properties": { "active_between": { "type": "object", "required": [ "start_time", "end_time" ], "description": "A fixed window of time during which the rule is active.", "properties": { "start_time": { "type": "integer", "description": "The start time in milliseconds." }, "end_time": { "type": "integer", "description": "End time in milliseconds." } } }, "scheduled_weekly": { "type": "object", "required": [ "start_time", "duration", "timezone", "weekdays" ], "description": "A reccuring window of time based on the day of the week, during which the rule is active.", "properties": { "start_time": { "type": "integer", "description": "The amount of milliseconds into the day at which the window starts." }, "duration": { "type": "integer", "description": "The duration of the window in milliseconds." }, "timezone": { "type": "string", "description": "The timezone." }, "weekdays": { "type": "array", "description": "An array of day values. Ex [1, 3, 5] is Monday, Wednesday, Friday.", "items": { "type": "integer" } } } } } }, "variables": { "type": "array", "description": "[Early Access] Populate variables from event payloads and use those variables in other event actions.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "The type of operation to populate the variable.", "enum": [ "regex" ] }, "name": { "type": "string", "description": "The name of the variable." }, "parameters": { "type": "object", "description": "The parameters for performing the operation to populate the", "properties": { "value": { "type": "string", "description": "The value for the operation. For example, an RE2 regular expression for regex-type variables." }, "path": { "type": "string", "description": "Path to a field in an event, in dot-notation. For Event Rules on a Service, this will have to be a PD-CEF field." } }, "required": [ "value", "path" ] } }, "required": [ "type", "name", "parameters" ] } } } }, { "type": "object", "properties": { "position": { "type": "integer", "description": "Position/index of the Event Rule in the Ruleset. Starting from position 0 (the first rule), rules are evaluated one-by-one until a matching rule is found." }, "catch_all": { "type": "boolean", "readOnly": true, "description": "Indicates whether the Event Rule is the last Event Rule of the Ruleset that serves as a catch-all. It has limited functionality compared to other rules and always matches." }, "actions": { "description": "When an event matches this rule, the actions that will be taken to change the resulting alert and incident.", "allOf": [ { "$ref": "#/components/schemas/EventRuleActionsCommon" }, { "type": "object", "properties": { "route": { "description": "Set the service ID of the target service for the resulting alert. You can find the service you want to route to by calling the services endpoint.", "type": "object", "required": [ "value" ], "nullable": true, "properties": { "value": { "type": "string", "description": "The target service's ID." } } } } } ] } } } ] }, "FlexibleTimeWindowIntelligentAlertGroupingConfig": { "type": "object", "title": "Intelligent Alert Grouping", "description": "The configuration for Intelligent Alert Grouping. Note that this configuration is only available for certain plans.", "properties": { "time_window": { "type": "integer", "minimum": 300, "maximum": 3600, "description": "The maximum amount of time allowed between Alerts. Any Alerts arriving greater than `time_window` seconds apart will not be grouped together. This is a rolling time window and is counted from the most recently grouped alert. The window is extended every time a new alert is added to the group, up to 24 hours. To use the \"recommended_time_window,\" set the value to 0, otherwise the value must be between 300 and 3600." }, "recommended_time_window": { "readOnly": true, "type": "integer", "description": "In order to ensure your Service has the optimal grouping window, we use data science to calculate your Service`s average Alert inter-arrival time. We encourage customer`s to use this value, please set `time_window` to 0 to use the `recommended_time_window`." } } }, "Ruleset": { "type": "object", "properties": { "id": { "type": "string", "readOnly": true, "description": "ID of the Ruleset." }, "self": { "type": "string", "format": "url", "description": "the API show URL at which the object is accessible", "readOnly": true }, "type": { "type": "string", "readOnly": true, "enum": [ "global", "default_global" ] }, "name": { "type": "string", "description": "Name of the Ruleset." }, "routing_keys": { "type": "array", "readOnly": true, "description": "Routing keys routed to this Ruleset.", "items": { "type": "string" } }, "created_at": { "type": "string", "format": "date-time", "readOnly": true, "description": "The date the Ruleset was created at." }, "creator": { "type": "object", "readOnly": true, "description": "Reference to the user that has created the Ruleset.", "properties": { "id": { "type": "string", "readOnly": true }, "type": { "type": "string", "description": "A string that determines the schema of the object", "readOnly": true }, "self": { "type": "string", "format": "url", "description": "The API show URL at which the object is accessible", "readOnly": true } } }, "updated_at": { "type": "string", "format": "date-time", "readOnly": true, "description": "The date the Ruleset was last updated." }, "updater": { "type": "object", "readOnly": true, "description": "Reference to the user that has updated the Ruleset last.", "properties": { "id": { "type": "string", "readOnly": true }, "type": { "type": "string", "description": "A string that determines the schema of the object", "readOnly": true }, "self": { "type": "string", "format": "url", "description": "The API show URL at which the object is accessible", "readOnly": true } } }, "team": { "type": "object", "description": "Reference to the team that owns the Ruleset. If none is specified, only admins have access.", "properties": { "id": { "type": "string" }, "type": { "type": "string", "description": "A string that determines the schema of the object", "readOnly": true }, "self": { "type": "string", "format": "url", "description": "The API show URL at which the object is accessible", "readOnly": true } }, "required": [ "id", "type" ] } }, "example": { "id": "0e84de00-9511-4380-9f4f-a7b568bb49a0", "name": "MySQL Clusters", "type": "global", "routing_keys": [ "R0212P1QXGEIQE2NMTQ7L7WXD00DWHIN" ], "self": "https://api.pagerduty.com/rulesets/0e84de00-9511-4380-9f4f-a7b568bb49a0", "created_at": "2019-12-24T21:18:52Z", "creator": { "type": "user_reference", "self": "https://api.pagerduty.com/users/PABO808", "id": "PABO808" }, "updated_at": "2019-12-25T14:54:23Z", "updater": { "type": "user_reference", "self": "https://api.pagerduty.com/users/PABO808", "id": "PABO808" }, "team": { "type": "team_reference", "self": "https://api.pagerduty.com/teams/P3ZQXDF", "id": "P3ZQXDF" } } }, "AcknowledgeLogEntry": { "allOf": [ { "$ref": "#/components/schemas/LogEntry" }, { "type": "object", "properties": { "acknowledgement_timeout": { "type": "integer", "description": "Duration for which the acknowledgement lasts, in seconds. Services can contain an `acknowledgement_timeout` property, which specifies the length of time acknowledgements should last for. Each time an incident is acknowledged, this timeout is copied into the acknowledgement log entry. This property is optional, as older log entries may not contain it. It may also be `null`, as acknowledgements can be performed on incidents whose services have no `acknowledgement_timeout` set." }, "type": { "type": "string", "enum": [ "acknowledgement_log_entry" ] } } } ] }, "AnnotateLogEntry": { "allOf": [ { "$ref": "#/components/schemas/LogEntry" }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "annotate_log_entry" ] } } } ] }, "AssignLogEntry": { "allOf": [ { "$ref": "#/components/schemas/LogEntry" }, { "type": "object", "properties": { "assignees": { "type": "array", "readOnly": true, "description": "An array of assigned Users for this log entry", "items": { "$ref": "#/components/schemas/UserReference" } }, "type": { "type": "string", "enum": [ "assign_log_entry" ] } } } ] }, "DelegateLogEntry": { "allOf": [ { "$ref": "#/components/schemas/LogEntry" }, { "type": "object", "properties": { "assignees": { "type": "array", "readOnly": true, "description": "An array of assigned Users for this log entry", "items": { "$ref": "#/components/schemas/UserReference" } }, "type": { "type": "string", "enum": [ "delegate_log_entry" ] } } } ] }, "EscalateLogEntry": { "allOf": [ { "$ref": "#/components/schemas/LogEntry" }, { "type": "object", "properties": { "assignees": { "type": "array", "readOnly": true, "description": "An array of assigned Users for this log entry", "items": { "$ref": "#/components/schemas/UserReference" } }, "type": { "type": "string", "enum": [ "escalate_log_entry" ] } } } ] }, "ExhaustEscalationPathLogEntry": { "allOf": [ { "$ref": "#/components/schemas/LogEntry" }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "exhaust_escalation_path_log_entry" ] } } } ] }, "LogEntryReference": { "allOf": [ { "$ref": "#/components/schemas/Reference" }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "acknowledge_log_entry_reference", "annotate_log_entry_reference", "assign_log_entry_reference", "escalate_log_entry_reference", "exhaust_escalation_path_log_entry_reference", "notify_log_entry_reference", "reach_trigger_limit_log_entry_reference", "repeat_escalation_path_log_entry_reference", "resolve_log_entry_reference", "snooze_log_entry_reference", "trigger_log_entry_reference", "unacknowledge_log_entry_reference" ] } } } ] }, "LogEntry": { "allOf": [ { "$ref": "#/components/schemas/Tag/allOf/0" }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "acknowledge_log_entry", "annotate_log_entry", "assign_log_entry", "delegate_log_entry", "escalate_log_entry", "exhaust_escalation_path_log_entry", "notify_log_entry", "reach_ack_limit_log_entry", "reach_trigger_limit_log_entry", "repeat_escalation_path_log_entry", "resolve_log_entry", "snooze_log_entry", "trigger_log_entry", "unacknowledge_log_entry", "urgency_change_log_entry" ] }, "created_at": { "type": "string", "format": "date-time", "readOnly": true, "description": "Time at which the log entry was created." }, "channel": { "$ref": "#/components/schemas/Channel" }, "agent": { "$ref": "#/components/schemas/AgentReference" }, "note": { "type": "string", "readOnly": true, "description": "Optional field containing a note, if one was included with the log entry." }, "contexts": { "type": "array", "readOnly": true, "description": "Contexts to be included with the trigger such as links to graphs or images.", "items": { "$ref": "#/components/schemas/Context" } }, "service": { "$ref": "#/components/schemas/ServiceReference" }, "incident": { "$ref": "#/components/schemas/IncidentReference" }, "teams": { "type": "array", "readOnly": true, "description": "Will consist of references unless included", "items": { "$ref": "#/components/schemas/TeamReference" } }, "event_details": { "type": "object", "readOnly": true, "properties": { "description": { "type": "string", "description": "Additional details about the event." } } } } } ] }, "NotifyLogEntry": { "allOf": [ { "$ref": "#/components/schemas/LogEntry" }, { "type": "object", "properties": { "created_at": { "type": "string", "format": "date-time", "readOnly": true, "description": "Time at which the log entry was created" }, "user": { "$ref": "#/components/schemas/UserReference" }, "type": { "type": "string", "enum": [ "notify_log_entry" ] } } } ] }, "ReachAckLimitLogEntry": { "allOf": [ { "$ref": "#/components/schemas/LogEntry" }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "reach_ack_limit_log_entry" ] } } } ] }, "ReachTriggerLimitLogEntry": { "allOf": [ { "$ref": "#/components/schemas/LogEntry" }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "reach_trigger_limit_log_entry" ] } } } ] }, "RepeatEscalationPathLogEntry": { "allOf": [ { "$ref": "#/components/schemas/LogEntry" }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "repeat_escalation_path_log_entry" ] } } } ] }, "ResolveLogEntry": { "allOf": [ { "$ref": "#/components/schemas/LogEntry" }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "resolve_log_entry" ] } } } ] }, "SnoozeLogEntry": { "allOf": [ { "$ref": "#/components/schemas/LogEntry" }, { "type": "object", "properties": { "changed_actions": { "type": "array", "items": { "$ref": "#/components/schemas/IncidentAction" } }, "type": { "type": "string", "enum": [ "snooze_log_entry" ] } } } ] }, "TriggerLogEntry": { "allOf": [ { "$ref": "#/components/schemas/LogEntry" }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "trigger_log_entry" ] } } } ] }, "UnacknowledgeLogEntry": { "allOf": [ { "$ref": "#/components/schemas/LogEntry" }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "unacknowledge_log_entry" ] } } } ] }, "UrgencyChangeLogEntry": { "allOf": [ { "$ref": "#/components/schemas/LogEntry" }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "urgency_change_log_entry" ] } } } ] }, "AddonReference": { "allOf": [ { "$ref": "#/components/schemas/Reference" }, { "type": "object", "properties": { "src": { "type": "string", "format": "url", "description": "The URL source of the Addon" }, "name": { "type": "string", "description": "The user entered name of the Addon." }, "type": { "type": "string", "enum": [ "full_page_addon_reference", "incident_show_addon_reference" ] } } } ] }, "Addon": { "allOf": [ { "$ref": "#/components/schemas/Tag/allOf/0" }, { "type": "object", "properties": { "type": { "type": "string", "description": "The type of Add-on.", "enum": [ "full_page_addon", "incident_show_addon" ] }, "name": { "type": "string", "description": "The name of the Add-on.", "maxLength": 100 }, "src": { "type": "string", "format": "url", "description": "The source URL to display in a frame in the PagerDuty UI. HTTPS is required." } }, "required": [ "type", "name", "src" ], "example": { "type": "full_page_addon", "name": "Internal Status Page", "src": "https://intranet.example.com/status" } } ] }, "BusinessService": { "allOf": [ { "$ref": "#/components/schemas/Tag/allOf/0" }, { "type": "object", "properties": { "name": { "type": "string", "description": "The name of the business service." }, "description": { "type": "string", "description": "The user-provided description of the business service." }, "point_of_contact": { "type": "string", "description": "The point of contact assigned to this service." }, "team": { "type": "object", "nullable": true, "title": "Team", "description": "Reference to the team that owns the business service.", "properties": { "id": { "type": "string" }, "type": { "type": "string", "description": "A string that determines the schema of the object.", "readOnly": true }, "self": { "type": "string", "format": "url", "description": "The API show URL at which the object is accessible.", "readOnly": true } }, "required": [ "id" ] } }, "example": { "id": "P3X2XX3", "type": "business_service", "name": "Self-serve mobile checkout", "description": "Checkout service for our mobile clients", "point_of_contact": "PagerDuty Admin", "team": { "type": "team_reference", "self": "https://api.pagerduty.com/teams/P3ZQXDF", "id": "P3ZQXDF" } } } ] }, "BusinessServiceReference": { "allOf": [ { "$ref": "#/components/schemas/Reference" }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "business_service_reference" ] } } } ] }, "ChangeEvent": { "allOf": [ { "$ref": "#/components/schemas/Tag/allOf/0" }, { "type": "object", "properties": { "timestamp": { "type": "string", "format": "date-time", "readOnly": true, "description": "The time at which the emitting tool detected or generated the event." }, "type": { "type": "string", "readOnly": true, "default": "change_event", "description": "The type of object being created.", "enum": [ "change_event" ] }, "services": { "type": "array", "readOnly": true, "description": "An array containing Service objects that this change event is associated with.", "items": { "$ref": "#/components/schemas/ServiceReference" } }, "integration": { "allOf": [ { "readOnly": true }, { "$ref": "#/components/schemas/IntegrationReference" } ] }, "routing_key": { "readOnly": true, "title": "Routing Key", "description": "This is the 32 character Integration Key for an Integration on a Service. The same Integration Key can be used for both alert and change events.", "type": "string" }, "summary": { "type": "string", "description": "A brief text summary of the event. Displayed in PagerDuty to provide information about the change. The maximum permitted length of this property is 1024 characters." }, "source": { "type": "string", "readOnly": true, "description": "The unique name of the location where the Change Event occurred." }, "links": { "type": "array", "readOnly": true, "description": "List of links to include.", "items": { "type": "object", "properties": { "href": { "type": "string" }, "text": { "type": "string" } } } }, "images": { "type": "array", "readOnly": true, "items": { "type": "object", "properties": { "src": { "type": "string" }, "href": { "type": "string" }, "alt": { "type": "string" } } } }, "custom_details": { "type": "object", "description": "Additional details about the change event.", "title": "Custom Details" } }, "example": { "summary": "Build Success - Increase snapshot create timeout to 30 seconds", "timestamp": "2020-07-17T08:42:58Z", "type": "change_event", "source": "acme-build-pipeline-tool-default-i-9999", "integration": { "id": "PEYSGVF", "type": "inbound_integration_reference" }, "services": [ { "id": "PEYSGRV", "type": "service_reference" } ], "custom_details": { "build_state": "passed", "build_number": "2", "run_time": "1236s" }, "links": [ { "href": "https://acme.pagerduty.dev/build/2", "text": "View more details in Acme!" } ] } } ] }, "Tag": { "allOf": [ { "type": "object", "properties": { "id": { "type": "string", "readOnly": true }, "summary": { "type": "string", "nullable": true, "readOnly": true, "description": "A short-form, server-generated string that provides succinct, important information about an object suitable for primary labeling of an entity in a client. In many cases, this will be identical to `name`, though it is not intended to be an identifier." }, "type": { "type": "string", "readOnly": true, "description": "A string that determines the schema of the object. This must be the standard name for the entity, suffixed by `_reference` if the object is a reference." }, "self": { "type": "string", "nullable": true, "readOnly": true, "format": "url", "description": "the API show URL at which the object is accessible" }, "html_url": { "type": "string", "nullable": true, "readOnly": true, "format": "url", "description": "a URL at which the entity is uniquely displayed in the Web app" } } }, { "type": "object", "properties": { "type": { "type": "string", "description": "The type of object being created.", "default": "tag", "enum": [ "tag" ] }, "label": { "type": "string", "description": "The label of the tag.", "maxLength": 191 } }, "required": [ "label", "type" ], "example": { "type": "tag", "label": "Batman" } } ] }, "TagReference": { "allOf": [ { "$ref": "#/components/schemas/Reference" }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "tag_reference" ] } } } ] }, "EntityReference": { "allOf": [ { "$ref": "#/components/schemas/Reference" }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "user_reference", "team_reference", "escalation_policy_reference" ] } } } ] }, "IncidentAddon": { "allOf": [ { "$ref": "#/components/schemas/Addon" }, { "type": "object", "properties": { "services": { "type": "array", "description": "The services this Add-on is associated with.\nIf non-empty, the Add-on will appear only on incidents for those services.\nIf empty, it will appear on incidents for all services.\n", "items": { "$ref": "#/components/schemas/ServiceReference" } } }, "required": [ "name", "src" ] } ], "example": { "type": "incident_show_addon", "name": "Service Runbook", "src": "https://intranet.example.com/runbook.html", "services": [ { "id": "PIJ90N7", "type": "service", "summary": "My Application Service", "self": "https://api.pagerduty.com/services/PIJ90N7", "html_url": "https://subdomain.pagerduty.com/service-directory/PIJ90N7" } ] } }, "IncidentUrgencyType": { "type": "object", "properties": { "type": { "type": "string", "description": "The type of incident urgency: whether it's constant, or it's dependent on the support hours.", "default": "constant", "enum": [ "constant", "use_support_hours" ] }, "urgency": { "type": "string", "description": "The incidents' urgency, if type is constant.", "default": "high", "enum": [ "low", "high", "severity_based" ] } } }, "IncidentUrgencyRule": { "allOf": [ { "$ref": "#/components/schemas/IncidentUrgencyType" }, { "type": "object", "properties": { "during_support_hours": { "$ref": "#/components/schemas/IncidentUrgencyType" }, "outside_support_hours": { "$ref": "#/components/schemas/IncidentUrgencyType" } } } ] }, "LicenseWithCounts": { "allOf": [ { "type": "object", "required": [ "id", "description", "name", "valid_roles" ], "properties": { "id": { "type": "string", "description": "Uniquely identifies the resource" }, "description": { "type": "string", "description": "Description of the License. May include the names of add-ons associated with\nthe License, if there are any.\n" }, "name": { "type": "string", "description": "Name of the License.\n" }, "valid_roles": { "type": "array", "description": "The roles a User with this License can have", "items": { "type": "string" } }, "role_group": { "type": "string", "enum": [ "FullUser", "Stakeholder" ], "description": "Indicates whether this License is assignable to full or stakeholder Users", "example": "FullUser" }, "type": { "type": "string", "description": "Type of object" }, "self": { "type": "string", "description": "API URL to access the License" }, "html_url": { "type": "string", "description": "HTML URL to access the License" }, "summary": { "type": "string", "description": "Summary of the License" } } }, { "type": "object", "properties": { "current_value": { "type": "integer", "description": "How many of these Licenses are currently allocated to Users" }, "allocations_available": { "type": "integer", "nullable": true, "description": "How many of these licenses are available to be allocated to a user. If this\nvalue is \"null\" then there is no limit on the number of allocations allowed.\n" } } } ] }, "LicenseReference": { "allOf": [ { "$ref": "#/components/schemas/Reference" }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "license_reference" ] } } } ] }, "SupportHours": { "type": "object", "properties": { "type": { "type": "string", "description": "The type of support hours", "default": "fixed_time_per_day", "enum": [ "fixed_time_per_day" ] }, "time_zone": { "type": "string", "format": "activesupport-time-zone", "description": "The time zone for the support hours" }, "days_of_week": { "type": "array", "readOnly": true, "items": { "type": "integer", "readOnly": true, "description": "The days of the week (1 through 7, for Monday through Sunday)" } }, "start_time": { "type": "string", "format": "time", "description": "The support hours' starting time of day (date portion is ignored)" }, "end_time": { "type": "string", "format": "time", "description": "The support hours' ending time of day (date portion is ignored)" } } }, "Reference": { "allOf": [ { "$ref": "#/components/schemas/Tag/allOf/0" }, { "type": "object", "required": [ "type", "id" ] } ] }, "IncidentNote": { "type": "object", "properties": { "id": { "type": "string", "readOnly": true }, "user": { "allOf": [ { "$ref": "#/components/schemas/Reference" }, { "type": "object", "description": "The user who created a Note. If a service created this Note the `user.type` will be \"bot_user_reference\" and `user.summary` will list the name of the service rather than the user.", "properties": { "type": { "type": "string", "enum": [ "user_reference", "bot_user_reference" ] } } } ] }, "channel": { "type": "object", "readOnly": true, "description": "The means by which this Note was created. Has different formats depending on type.", "properties": { "summary": { "type": "string", "description": "A string describing the source of the Note.", "readOnly": true }, "id": { "type": "string", "readOnly": true }, "type": { "type": "string", "description": "A string that determines the schema of the object", "readOnly": true }, "self": { "type": "string", "format": "url", "description": "The API show URL at which the object is accessible", "readOnly": true }, "html_url": { "type": "string", "format": "url", "description": "a URL at which the entity is uniquely displayed in the Web app", "readOnly": true } }, "required": [ "summary" ] }, "content": { "type": "string", "description": "The note content" }, "created_at": { "type": "string", "format": "date-time", "description": "The time at which the note was submitted", "readOnly": true } }, "required": [ "content" ], "example": { "content": "Firefighters are on the scene." } }, "Notification": { "type": "object", "properties": { "id": { "type": "string", "readOnly": true }, "type": { "type": "string", "description": "The type of notification.", "enum": [ "sms_notification", "email_notification", "phone_notification", "push_notification" ], "readOnly": true }, "started_at": { "type": "string", "format": "date-time", "description": "The time at which the notification was sent", "readOnly": true }, "address": { "type": "string", "description": "The address where the notification was sent. This will be null for notification type `push_notification`.", "readOnly": true }, "user": { "$ref": "#/components/schemas/UserReference" }, "conferenceAddress": { "type": "string", "description": "The address of the conference bridge" }, "status": { "type": "string" }, "": { "type": "string" } } }, "Context": { "type": "object", "discriminator": { "propertyName": "type" }, "properties": { "type": { "type": "string", "description": "The type of context being attached to the incident.", "enum": [ "link", "image" ] }, "href": { "type": "string", "description": "The link's target url" }, "src": { "type": "string", "description": "The image's source url" }, "text": { "type": "string", "description": "The alternate display for an image" } }, "required": [ "type" ] }, "Channel": { "type": "object", "description": "Polymorphic object representation of the means by which the action was channeled. Has different formats depending on type, indicated by channel[type]. Will be one of `auto`, `email`, `api`, `nagios`, or `timeout` if `agent[type]` is `service`. Will be one of `email`, `sms`, `website`, `web_trigger`, or `note` if `agent[type]` is `user`. See [below](https://developer.pagerduty.com/documentation/rest/log_entries/show#channel_types) for detailed information about channel formats.", "properties": { "type": { "type": "string", "description": "type" }, "user": { "type": "object" }, "team": { "type": "object" }, "notification": { "$ref": "#/components/schemas/Notification" }, "channel": { "type": "object", "description": "channel" } }, "required": [ "type" ] }, "ScheduledAction": { "type": "object", "properties": { "type": { "type": "string", "description": "The type of schedule action. Must be set to urgency_change.", "enum": [ "urgency_change" ] }, "at": { "type": "object", "description": "Represents when scheduled action will occur.", "properties": { "type": { "type": "string", "description": "Must be set to named_time.", "enum": [ "named_time" ] }, "name": { "type": "string", "description": "Designates either the start or the end of support hours.", "enum": [ "support_hours_start", "support_hours_end" ] } }, "required": [ "type", "name" ] }, "to_urgency": { "type": "string", "description": "Urgency level. Must be set to high.", "enum": [ "high" ] } }, "required": [ "type", "at", "to_urgency" ] }, "IncidentAction": { "description": "An incident action is a pending change to an incident that will automatically happen at some future time.", "type": "object", "properties": { "type": { "type": "string", "enum": [ "unacknowledge", "escalate", "resolve", "urgency_change" ] }, "at": { "type": "string", "format": "date-time" }, "to": { "description": "The urgency that the incident will change to. This field is only present when the type is `urgency_change`.", "type": "string", "enum": [ "high" ] } }, "discriminator": { "propertyName": "type" }, "required": [ "type", "at" ] }, "AgentReference": { "allOf": [ { "$ref": "#/components/schemas/Reference" }, { "type": "object", "description": "The agent (user, service or integration) that created or modified the Incident Log Entry.", "properties": { "type": { "enum": [ "user_reference", "service_reference", "integration_reference" ], "type": "string" } }, "readOnly": true } ] }, "NotificationRuleReference": { "allOf": [ { "$ref": "#/components/schemas/Reference" }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "assignment_notification_rule_reference" ] } } } ] }, "NotificationRule": { "allOf": [ { "$ref": "#/components/schemas/Tag/allOf/0" }, { "type": "object", "description": "A rule for contacting the user.", "properties": { "type": { "type": "string", "description": "The type of object being created.", "default": "assignment_notification_rule", "enum": [ "assignment_notification_rule" ] }, "start_delay_in_minutes": { "type": "integer", "description": "The delay before firing the rule, in minutes.", "minimum": 0 }, "contact_method": { "$ref": "#/components/schemas/ContactMethodReference" }, "urgency": { "type": "string", "enum": [ "high", "low" ], "description": "Which incident urgency this rule is used for. Account must have the `urgencies` ability to have a low urgency notification rule." } }, "required": [ "start_delay_in_minutes", "urgency", "contact_method", "type" ], "example": { "type": "assignment_notification_rule", "start_delay_in_minutes": 0, "contact_method": { "id": "PXPGF42", "type": "email_contact_method_reference" }, "urgency": "high" } } ] }, "ContactMethodReference": { "allOf": [ { "$ref": "#/components/schemas/Reference" }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "email_contact_method_reference", "phone_contact_method_reference", "push_notification_contact_method_reference", "sms_contact_method_reference" ] } } } ] }, "ContactMethod": { "allOf": [ { "$ref": "#/components/schemas/Tag/allOf/0" }, { "type": "object", "description": "The method to contact a user.", "properties": { "type": { "type": "string", "description": "The type of contact method being created.", "enum": [ "email_contact_method", "phone_contact_method", "push_notification_contact_method", "sms_contact_method" ] }, "label": { "type": "string", "description": "The label (e.g., \"Work\", \"Mobile\", etc.)." }, "address": { "type": "string", "description": "The \"address\" to deliver to: email, phone number, etc., depending on the type." } }, "discriminator": { "propertyName": "type" }, "required": [ "type", "label", "address" ] } ] }, "EmailContactMethod": { "description": "The Email Contact Method of the User.", "allOf": [ { "$ref": "#/components/schemas/ContactMethod" }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "email_contact_method" ] }, "send_short_email": { "type": "boolean", "description": "Send an abbreviated email message instead of the standard email output. Useful for email-to-SMS gateways and email based pagers.", "default": false } }, "example": { "type": "email_contact_method", "label": "work", "address": "grady.haylie.126@hickle.net", "send_short_email": false } } ] }, "PhoneContactMethod": { "description": "The Phone Contact Method of the User, used for Voice or SMS.", "allOf": [ { "$ref": "#/components/schemas/ContactMethod" }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "phone_contact_method", "sms_contact_method" ] }, "country_code": { "type": "integer", "description": "The 1-to-3 digit country calling code.", "minimum": 1, "maximum": 1999 }, "enabled": { "type": "boolean", "description": "If true, this phone is capable of receiving SMS messages.", "readOnly": true }, "blacklisted": { "type": "boolean", "description": "If true, this phone has been blacklisted by PagerDuty and no messages will be sent to it.", "readOnly": true } }, "required": [ "country_code" ], "example": { "type": "phone_contact_method", "label": "work", "country_code": 123, "address": "1234567" } } ] }, "PushContactMethodSound": { "type": "object", "properties": { "type": { "type": "string", "description": "The type of sound.", "enum": [ "alert_high_urgency", "alert_low_urgency" ] }, "file": { "type": "string", "description": "The sound file name." } } }, "PushContactMethod": { "description": "The Push Contact Method of the User.", "allOf": [ { "$ref": "#/components/schemas/ContactMethod" }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "push_notification_contact_method" ] }, "device_type": { "type": "string", "description": "The type of device.", "enum": [ "android", "ios" ], "readOnly": true }, "sounds": { "type": "array", "items": { "$ref": "#/components/schemas/PushContactMethodSound" } }, "created_at": { "type": "string", "format": "date-time", "description": "Time at which the contact method was created." }, "blacklisted": { "type": "boolean", "description": "If true, this phone has been blacklisted by PagerDuty and no messages will be sent to it.", "readOnly": true } }, "required": [ "device_type" ], "example": { "type": "push_notification_contact_method", "label": "work", "device_type": "android", "address": "12341234" } } ] }, "UserRole": { "type": "object", "properties": { "role": { "type": "string", "description": "The role of the user for a set of resources.", "enum": [ "observer", "responder", "manager" ], "example": "observer" }, "resources": { "type": "array", "items": { "$ref": "#/components/schemas/Reference" } } }, "example": { "role": "manager", "resources": [ { "id": "PANZZEQ", "type": "escalation_policy", "summary": "Engineering Escalation Policy", "self": "https://api.pagerduty.com/escalation_policies/PANZZEQ", "html_url": "https://subdomain.pagerduty.com/escalation_policies/PANZZEQ" }, { "id": "PI7DH85", "type": "schedule", "summary": "Daily Engineering Rotation", "self": "https://api.pagerduty.com/schedules/PI7DH85", "html_url": "https://subdomain.pagerduty.com/schedules/PI7DH85" } ] } }, "UserReference": { "allOf": [ { "$ref": "#/components/schemas/Reference" }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "user_reference" ] } } } ] }, "UserSession": { "type": "object", "properties": { "id": { "type": "string", "readOnly": true }, "user_id": { "type": "string", "readOnly": true }, "created_at": { "type": "string", "format": "date-time", "readOnly": true, "description": "The date/time the user session was first created." }, "type": { "type": "string", "readOnly": true, "description": "The type of the session", "enum": [ "browser", "oauth" ] }, "summary": { "type": "string", "readOnly": true, "description": "The summary of the session" } }, "required": [ "id", "user_id", "created_at", "type", "summary" ], "example": { "id": "PXPGF42", "user_id": "PXPGF42", "created_at": "2018-10-06T21:30:42Z", "summary": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.131 Safari/537.36", "type": "browser" } }, "User": { "allOf": [ { "$ref": "#/components/schemas/Tag/allOf/0" }, { "type": "object", "properties": { "name": { "type": "string", "description": "The name of the user.", "maxLength": 100 }, "type": { "type": "string", "description": "The type of object being created.", "default": "user", "enum": [ "user" ] }, "email": { "type": "string", "format": "email", "description": "The user's email address.", "minLength": 6, "maxLength": 100 }, "time_zone": { "type": "string", "format": "tzinfo", "description": "The preferred time zone name. If null, the account's time zone will be used." }, "color": { "type": "string", "description": "The schedule color." }, "role": { "description": "The user role. Account must have the `read_only_users` ability to set a user as a `read_only_user` or a `read_only_limited_user`, and must have advanced permissions abilities to set a user as `observer` or `restricted_access`.", "type": "string", "enum": [ "admin", "limited_user", "observer", "owner", "read_only_user", "restricted_access", "read_only_limited_user", "user" ] }, "avatar_url": { "type": "string", "format": "url", "description": "The URL of the user's avatar.", "readOnly": true }, "description": { "type": "string", "description": "The user's bio.", "nullable": true }, "invitation_sent": { "type": "boolean", "readOnly": true, "description": "If true, the user has an outstanding invitation." }, "job_title": { "type": "string", "description": "The user's title.", "maxLength": 100 }, "teams": { "type": "array", "readOnly": true, "description": "The list of teams to which the user belongs. Account must have the `teams` ability to set this.", "items": { "$ref": "#/components/schemas/TeamReference" } }, "contact_methods": { "type": "array", "readOnly": true, "description": "The list of contact methods for the user.", "items": { "$ref": "#/components/schemas/ContactMethodReference" } }, "notification_rules": { "readOnly": true, "type": "array", "description": "The list of notification rules for the user.", "items": { "$ref": "#/components/schemas/NotificationRuleReference" } } }, "required": [ "name", "email", "type" ], "example": { "type": "user", "name": "Earline Greenholt", "email": "125.greenholt.earline@graham.name", "time_zone": "America/Lima", "color": "green", "role": "admin", "job_title": "Director of Engineering", "avatar_url": "https://secure.gravatar.com/avatar/1d1a39d4635208d5664082a6c654a73f.png?d=mm&r=PG", "description": "I'm the boss" } } ] }, "TeamReference": { "allOf": [ { "$ref": "#/components/schemas/Reference" }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "team_reference" ] } } } ] }, "Team": { "allOf": [ { "$ref": "#/components/schemas/Tag/allOf/0" }, { "type": "object", "properties": { "type": { "type": "string", "description": "The type of object being created.", "default": "team", "enum": [ "team" ] }, "name": { "type": "string", "description": "The name of the team.", "maxLength": 100 }, "description": { "type": "string", "description": "The description of the team.", "maxLength": 1024 }, "default_role": { "type": "string", "description": "The team is private if the value is \"none\", or public if it is \"manager\" (the default permissions for a non-member of the team are either \"none\", or their base role up until \"manager\").", "default": "manager", "enum": [ "manager", "none" ] } }, "required": [ "name", "type" ], "example": { "type": "team", "name": "Engineering", "description": "The engineering team" } } ] }, "Impact": { "title": "Impact", "type": "object", "properties": { "id": { "type": "string", "readOnly": true }, "name": { "type": "string", "readOnly": true }, "type": { "type": "string", "description": "The kind of object that has been impacted", "enum": [ "business_service" ] }, "status": { "type": "string", "description": "The current impact status of the object", "enum": [ "impacted", "not_impacted" ] }, "additional_fields": { "type": "object", "properties": { "highest_impacting_priority": { "type": "object", "nullable": true, "description": "Priority information for the highest priority level that is affecting the impacted object.", "properties": { "id": { "type": "string", "readOnly": true }, "order": { "type": "integer", "readOnly": true } } } } } } }, "Impactor": { "title": "Impactor", "type": "object", "properties": { "id": { "type": "string", "readOnly": true }, "type": { "type": "string", "description": "The kind of object that is impacting", "enum": [ "incident" ] } } }, "IncidentReference": { "allOf": [ { "$ref": "#/components/schemas/Reference" }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "incident_reference" ] } } } ] }, "Incident": { "allOf": [ { "$ref": "#/components/schemas/Tag/allOf/0" }, { "type": "object", "properties": { "incident_number": { "type": "integer", "readOnly": true, "description": "The number of the incident. This is unique across your account." }, "title": { "type": "string", "readOnly": false, "description": "A succinct description of the nature, symptoms, cause, or effect of the incident." }, "created_at": { "type": "string", "format": "date-time", "description": "The time the incident was first triggered.", "example": "2019-12-01T20:00:00Z", "readOnly": true }, "updated_at": { "type": "string", "format": "date-time", "example": "2019-12-01T21:02:00Z", "description": "The time the incident was last modified." }, "status": { "type": "string", "description": "The current status of the incident.", "enum": [ "triggered", "acknowledged", "resolved" ] }, "incident_key": { "type": "string", "readOnly": true, "description": "The incident's de-duplication key." }, "service": { "description": "The service the incident is on. If the `include[]=services` query parameter is provided, the full service definition will be returned.", "oneOf": [ { "$ref": "#/components/schemas/ServiceReference" }, { "$ref": "#/components/schemas/Service" } ] }, "assignments": { "type": "array", "description": "List of all assignments for this incident. This list will be empty if the `Incident.status` is `resolved`. Returns a user reference for each assignment. Full user definitions will be returned if the `include[]=assignees` query parameter is provided.", "items": { "$ref": "#/components/schemas/Assignment" } }, "assigned_via": { "type": "string", "description": "How the current incident assignments were decided. Note that `direct_assignment` incidents will not escalate up the attached `escalation_policy`", "enum": [ "escalation_policy", "direct_assignment" ], "readOnly": true }, "last_status_change_at": { "type": "string", "format": "date-time", "description": "The time the status of the incident last changed. If the incident is not currently acknowledged or resolved, this will be the incident's `updated_at`.", "example": "2019-12-01T21:01:00Z", "readOnly": true }, "resolved_at": { "type": "string", "format": "date-time", "example": "2019-12-01T21:01:00Z", "description": "The time the incident became \"resolved\" or `null` if the incident is not resolved." }, "first_trigger_log_entry": { "description": "The first log entry on the incident. The log entry will be of type `TriggerLogEntry` and will represent information about how the incident was triggered. If the `include[]=first_trigger_log_entries` query parameter is provided, the full log entry definition will be returned.", "oneOf": [ { "$ref": "#/components/schemas/LogEntryReference" }, { "$ref": "#/components/schemas/TriggerLogEntry" } ] }, "alert_counts": { "$ref": "#/components/schemas/AlertCount" }, "is_mergeable": { "type": "boolean", "description": "Whether the incident is mergeable. Only incidents that have alerts, or that are manually created can be merged.", "readOnly": true }, "escalation_policy": { "description": "The escalation policy attached to the service that the incident is on. If the `include[]=escalation_policies` query parameter is provided, the full escalation policy definition will be returned.", "oneOf": [ { "$ref": "#/components/schemas/EscalationPolicyReference" }, { "$ref": "#/components/schemas/EscalationPolicy" } ] }, "teams": { "type": "array", "description": "The teams involved in the incident’s lifecycle. If the `include[]=teams` query parameter is provided, the full team definitions will be returned.", "items": { "oneOf": [ { "$ref": "#/components/schemas/TeamReference" }, { "$ref": "#/components/schemas/Team" } ] } }, "pending_actions": { "type": "array", "readOnly": true, "description": "The list of pending_actions on the incident. A pending_action object contains a type of action which can be escalate, unacknowledge, resolve or urgency_change. A pending_action object contains at, the time at which the action will take place. An urgency_change pending_action will contain to, the urgency that the incident will change to.", "items": { "$ref": "#/components/schemas/IncidentAction" } }, "acknowledgements": { "type": "array", "description": "List of all acknowledgements for this incident. This list will be empty if the `Incident.status` is `resolved` or `triggered`. If the `include[]=acknowledgers` query parameter is provided, the full user or service definitions will be returned for each acknowledgement entry.", "items": { "$ref": "#/components/schemas/Acknowledgement" } }, "alert_grouping": { "description": "Describes the alert grouping state of this incident. Will be null if the incident has no alerts.", "type": "object", "properties": { "grouping_type": { "type": "string", "enum": [ "basic", "advanced", "rules" ] }, "started_at": { "type": "string", "format": "date-time" }, "ended_at": { "type": "string", "format": "date-time" }, "alert_grouping_active": { "type": "boolean" } } }, "last_status_change_by": { "description": "The entity that last changed the status of the incident. If the `include[]=agents` query parameter is provided, the full user/service/integration definition will be returned.", "oneOf": [ { "$ref": "#/components/schemas/AgentReference" }, { "$ref": "#/components/schemas/User" }, { "$ref": "#/components/schemas/Service" } ] }, "priority": { "$ref": "#/components/schemas/Priority" }, "resolve_reason": { "$ref": "#/components/schemas/ResolveReason" }, "conference_bridge": { "description": "The conference bridge information attached to the incident. Only returned if the `include[]=conference_bridge` query parameter is provided.", "allOf": [ { "$ref": "#/components/schemas/ConferenceBridge" } ] }, "incidents_responders": { "description": "The responders on the incident. Only returned if the account has access to the [responder requests](https://support.pagerduty.com/docs/add-responders) feature.", "type": "array", "readOnly": true, "items": { "$ref": "#/components/schemas/IncidentsRespondersReference" } }, "responder_requests": { "description": "Previous responder requests made on this incident. Only returned if the account has access to the [responder requests](https://support.pagerduty.com/docs/add-responders) feature.", "type": "array", "readOnly": true, "items": { "$ref": "#/components/schemas/ResponderRequest" } }, "urgency": { "type": "string", "enum": [ "high", "low" ], "description": "The current urgency of the incident." }, "body": { "description": "The additional incident body details. Only returned if the `include[]=body` query parameter is provided.", "allOf": [ { "$ref": "#/components/schemas/IncidentBody" } ] } } } ] }, "EscalationPolicyReference": { "allOf": [ { "$ref": "#/components/schemas/Reference" }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "escalation_policy_reference" ] } } } ] }, "EscalationPolicy": { "allOf": [ { "$ref": "#/components/schemas/Tag/allOf/0" }, { "type": "object", "properties": { "type": { "type": "string", "description": "The type of object being created.", "default": "escalation_policy", "enum": [ "escalation_policy" ] }, "name": { "type": "string", "description": "The name of the escalation policy." }, "description": { "type": "string", "description": "Escalation policy description." }, "num_loops": { "type": "integer", "description": "The number of times the escalation policy will repeat after reaching the end of its escalation.", "default": 0, "minimum": 0 }, "on_call_handoff_notifications": { "type": "string", "description": "Determines how on call handoff notifications will be sent for users on the escalation policy. Defaults to \"if_has_services\".", "enum": [ "if_has_services", "always" ] }, "escalation_rules": { "type": "array", "items": { "$ref": "#/components/schemas/EscalationRule" } }, "services": { "type": "array", "items": { "$ref": "#/components/schemas/ServiceReference" }, "minLength": 0, "readOnly": true }, "teams": { "type": "array", "description": "Team associated with the policy. Account must have the `teams` ability to use this parameter. Only one team may be associated with the policy.", "items": { "$ref": "#/components/schemas/TeamReference" }, "minLength": 0 } }, "required": [ "type", "name", "escalation_rules" ], "example": { "id": "PQIL2IX", "type": "escalation_policy", "name": "Engineering Escalation Policy", "escalation_rules": [ { "escalation_delay_in_minutes": 30, "targets": [ { "id": "PEYSGVF", "type": "user_reference" } ], "escalation_rule_assignment_strategy": [ { "type": "round_robin" } ] } ], "services": [ { "id": "PIJ90N7", "type": "service_reference" } ], "num_loops": 2, "on_call_handoff_notifications": "if_has_services", "teams": [ { "id": "PQ9K7I8", "type": "team_reference" } ], "description": "Here is the ep for the engineering team." } } ] }, "EscalationRule": { "type": "object", "properties": { "id": { "type": "string", "readOnly": true }, "escalation_delay_in_minutes": { "type": "integer", "description": "The number of minutes before an unacknowledged incident escalates away from this rule." }, "targets": { "type": "array", "minItems": 1, "maxItems": 10, "description": "The targets an incident should be assigned to upon reaching this rule.", "items": { "$ref": "#/components/schemas/EscalationTargetReference" } }, "escalation_rule_assignment_strategy": { "type": "string", "description": "The strategy used to assign the escalation rule to an incident.", "enum": [ "round_robin", "assign_to_everyone" ] } }, "required": [ "escalation_delay_in_minutes", "targets" ], "example": { "escalation_delay_in_minutes": 30, "targets": [ { "id": "PAM4FGS", "type": "user_reference" }, { "id": "PI7DH85", "type": "schedule_reference" } ] } }, "EscalationTargetReference": { "allOf": [ { "$ref": "#/components/schemas/Reference" }, { "type": "object", "description": "The escalation target is the entity that will be assigned an incident upon escalation.", "properties": { "type": { "enum": [ "user", "schedule", "user_reference", "schedule_reference" ], "type": "string" } } } ] }, "ExtensionReference": { "allOf": [ { "$ref": "#/components/schemas/Reference" }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "extension_reference" ] } } } ] }, "Extension": { "allOf": [ { "$ref": "#/components/schemas/Tag/allOf/0" }, { "type": "object", "properties": { "name": { "type": "string", "description": "The name of the extension." }, "type": { "type": "string", "description": "The type of object being created.", "default": "extension", "enum": [ "extension" ] }, "endpoint_url": { "type": "string", "format": "url", "description": "The url of the extension." }, "extension_objects": { "type": "array", "description": "The objects for which the extension applies", "items": { "$ref": "#/components/schemas/ServiceReference" } }, "extension_schema": { "$ref": "#/components/schemas/ExtensionSchemaReference" }, "temporarily_disabled": { "type": "boolean", "readOnly": true, "description": "Whether or not this extension is temporarily disabled; for example, a webhook extension that is repeatedly rejected by the server.", "default": false }, "config": { "type": "object", "description": "The object that contains extension configuration values depending on the extension schema specification." } }, "required": [ "extension_objects", "extension_schema", "name" ], "example": { "id": "PJU23I3", "endpoint_url": "https://example.com/receive_a_pagerduty_webhook", "name": "My Webhook", "summary": "My Webhook", "type": "extension", "extension_schema": { "id": "PJFWPEP", "type": "extension_schema_reference" }, "extension_objects": [ { "id": "PIJ90N7", "type": "service_reference" } ], "config": { "anykey": "anyvalue" } } } ] }, "ServiceReference": { "allOf": [ { "$ref": "#/components/schemas/Reference" }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "service_reference" ] } } } ] }, "Service": { "allOf": [ { "$ref": "#/components/schemas/Tag/allOf/0" }, { "type": "object", "properties": { "type": { "type": "string", "description": "The type of object being created.", "default": "service", "enum": [ "service" ] }, "name": { "type": "string", "description": "The name of the service." }, "description": { "type": "string", "description": "The user-provided description of the service." }, "auto_resolve_timeout": { "type": "integer", "description": "Time in seconds that an incident is automatically resolved if left open for that long. Value is `null` if the feature is disabled. Value must not be negative. Setting this field to `0`, `null` (or unset in POST request) will disable the feature.", "default": 14400 }, "acknowledgement_timeout": { "type": "integer", "description": "Time in seconds that an incident changes to the Triggered State after being Acknowledged. Value is `null` if the feature is disabled. Value must not be negative. Setting this field to `0`, `null` (or unset in POST request) will disable the feature.", "default": 1800 }, "created_at": { "type": "string", "format": "date-time", "description": "The date/time when this service was created", "readOnly": true }, "status": { "type": "string", "description": "The current state of the Service. Valid statuses are:\n\n\n- `active`: The service is enabled and has no open incidents. This is the only status a service can be created with.\n- `warning`: The service is enabled and has one or more acknowledged incidents.\n- `critical`: The service is enabled and has one or more triggered incidents.\n- `maintenance`: The service is under maintenance, no new incidents will be triggered during maintenance mode.\n- `disabled`: The service is disabled and will not have any new triggered incidents.\n", "enum": [ "active", "warning", "critical", "maintenance", "disabled" ], "default": "active" }, "last_incident_timestamp": { "type": "string", "format": "date-time", "description": "The date/time when the most recent incident was created for this service.", "readOnly": true }, "escalation_policy": { "$ref": "#/components/schemas/EscalationPolicyReference" }, "response_play": { "deprecated": true, "description": "Response plays associated with this service.", "allOf": [ { "$ref": "#/components/schemas/Reference" }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "response_play_reference" ] } } } ] }, "teams": { "type": "array", "description": "The set of teams associated with this service.", "items": { "$ref": "#/components/schemas/TeamReference" }, "readOnly": true }, "integrations": { "type": "array", "description": "An array containing Integration objects that belong to this service. If `integrations` is passed as an argument, these are full objects - otherwise, these are references.", "items": { "$ref": "#/components/schemas/IntegrationReference" }, "readOnly": true }, "incident_urgency_rule": { "$ref": "#/components/schemas/IncidentUrgencyRule" }, "support_hours": { "$ref": "#/components/schemas/SupportHours" }, "scheduled_actions": { "type": "array", "description": "An array containing scheduled actions for the service.", "items": { "$ref": "#/components/schemas/ScheduledAction" } }, "addons": { "type": "array", "description": "The array of Add-ons associated with this service.", "items": { "$ref": "#/components/schemas/AddonReference" }, "readOnly": true }, "alert_creation": { "type": "string", "deprecated": true, "description": "Whether a service creates only incidents, or both alerts and incidents. A service must create alerts in order to enable incident merging.\n* \"create_incidents\" - The service will create one incident and zero alerts for each incoming event.\n* \"create_alerts_and_incidents\" - The service will create one incident and one associated alert for each incoming event.\nThis attribute has been deprecated as all services will be migrated to use alerts and incidents. Afterward, the incident only service setting will no longer be available. For details, please refer to the knowledge base: https://support.pagerduty.com/docs/alerts#enable-and-disable-alerts-on-a-service.\n", "enum": [ "create_incidents", "create_alerts_and_incidents" ], "default": "create_alerts_and_incidents" }, "alert_grouping_parameters": { "$ref": "#/components/schemas/AlertGroupingParameters" }, "alert_grouping": { "type": "string", "deprecated": true, "description": "Defines how alerts on this service will be automatically grouped into incidents. Note that the alert grouping features are available only on certain plans. There are three available options:\n* null - No alert grouping on the service. Each alert will create a separate incident;\n* \"time\" - All alerts within a specified duration will be grouped into the same incident. This duration is set in the `alert_grouping_timeout` setting (described below). Available on Standard, Enterprise, and Event Intelligence plans;\n* \"intelligent\" - Alerts will be intelligently grouped based on a machine learning model that looks at the alert summary, timing, and the history of grouped alerts. Available on Enterprise and Event Intelligence plans\n", "enum": [ "time", "intelligent" ] }, "alert_grouping_timeout": { "type": "integer", "deprecated": true, "description": "The duration in minutes within which to automatically group incoming alerts. This setting applies only when `alert_grouping` is set to `time`. To continue grouping alerts until the Incident is resolved, set this value to `0`.\n" }, "auto_pause_notifications_parameters": { "$ref": "#/components/schemas/AutoPauseNotificationsParameters" } }, "required": [ "type", "escalation_policy" ], "example": { "id": "PSI2I2O", "summary": "string", "type": "service", "self": "string", "html_url": "string", "name": "My Web App", "description": "My cool web application that does things.", "auto_resolve_timeout": 14400, "acknowledgement_timeout": 600, "status": "active", "escalation_policy": { "id": "PWIP6CQ", "type": "escalation_policy_reference" }, "response_play": { "id": "1677af3c-44cf-50f4-6c68-818f7f514802", "type": "response_play_reference" }, "incident_urgency_rule": { "type": "use_support_hours", "during_support_hours": { "type": "constant", "urgency": "high" }, "outside_support_hours": { "type": "constant", "urgency": "low" } }, "support_hours": { "type": "fixed_time_per_day", "time_zone": "America/Lima", "start_time": "09:00:00", "end_time": "17:00:00", "days_of_week": [ 1, 2, 3, 4, 5 ] }, "scheduled_actions": [ { "type": "urgency_change", "at": { "type": "named_time", "name": "support_hours_start" }, "to_urgency": "high" } ], "alert_creation": "create_alerts_and_incidents", "alert_grouping_parameters": { "type": "time", "config": { "timeout": 2 } }, "auto_pause_notifications_parameters": { "enabled": true, "timeout": 300 } } } ] }, "PriorityReference": { "allOf": [ { "$ref": "#/components/schemas/Reference" }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "priority_reference" ] } } } ] }, "Priority": { "allOf": [ { "$ref": "#/components/schemas/Tag/allOf/0" }, { "type": "object", "properties": { "name": { "type": "string", "description": "The user-provided short name of the priority." }, "description": { "type": "string", "description": "The user-provided description of the priority." } } } ] }, "Integration": { "allOf": [ { "$ref": "#/components/schemas/Tag/allOf/0" }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "aws_cloudwatch_inbound_integration", "cloudkick_inbound_integration", "event_transformer_api_inbound_integration", "generic_email_inbound_integration", "generic_events_api_inbound_integration", "keynote_inbound_integration", "nagios_inbound_integration", "pingdom_inbound_integration", "sql_monitor_inbound_integration", "events_api_v2_inbound_integration" ] }, "name": { "type": "string", "description": "The name of this integration." }, "service": { "$ref": "#/components/schemas/ServiceReference" }, "created_at": { "type": "string", "format": "date-time", "description": "The date/time when this integration was created.", "readOnly": true }, "vendor": { "$ref": "#/components/schemas/VendorReference" }, "integration_email": { "type": "string", "description": "Specify for generic_email_inbound_integration. Must be set to an email address @your-subdomain.pagerduty.com" }, "email_incident_creation": { "type": "string", "description": "Specify for generic_email_inbound_integration", "enum": [ "on_new_email", "on_new_email_subject", "only_if_no_open_incidents", "use_rules" ] }, "email_filter_mode": { "type": "string", "description": "Specify for generic_email_inbound_integration. May override email_incident_creation", "enum": [ "all-email", "or-rules-email", "and-rules-email" ] }, "email_parsers": { "type": "array", "description": "Specify for generic_email_inbound_integration.", "uniqueItems": true, "minItems": 1, "items": { "$ref": "#/components/schemas/EmailParser" } }, "email_parsing_fallback": { "type": "string", "description": "Specify for generic_email_inbound_integration.", "enum": [ "open_new_incident", "discard" ] }, "email_filters": { "type": "array", "description": "Specify for generic_email_inbound_integration.", "uniqueItems": true, "minItems": 1, "items": { "type": "object", "properties": { "subject_mode": { "type": "string", "enum": [ "match", "no-match", "always" ] }, "subject_regex": { "type": "string", "description": "Specify if subject_mode is set to match or no-match" }, "body_mode": { "type": "string", "enum": [ "match", "no-match", "always" ] }, "body_regex": { "type": "string", "description": "Specify if body_mode is set to match or no-match" }, "from_email_mode": { "type": "string", "enum": [ "match", "no-match", "always" ] }, "from_email_regex": { "type": "string", "description": "Specify if from_email_mode is set to match or no-match" } }, "required": [ "subject_mode", "body_mode", "from_email_mode" ] }, "required": [ "type", "name" ] } } } ] }, "IntegrationReference": { "allOf": [ { "$ref": "#/components/schemas/Reference" }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "aws_cloudwatch_inbound_integration_reference", "cloudkick_inbound_integration_reference", "event_transformer_api_inbound_integration_reference", "generic_email_inbound_integration_reference", "generic_events_api_inbound_integration_reference", "keynote_inbound_integration_reference", "nagios_inbound_integration_reference", "pingdom_inbound_integration_reference", "sql_monitor_inbound_integration_reference", "events_api_v2_inbound_integration_reference", "inbound_integration_reference" ] } } } ] }, "MaintenanceWindowReference": { "allOf": [ { "$ref": "#/components/schemas/Reference" }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "maintenance_window_reference" ] } } } ] }, "MaintenanceWindow": { "allOf": [ { "$ref": "#/components/schemas/Tag/allOf/0" }, { "type": "object", "properties": { "type": { "type": "string", "description": "The type of object being created.", "default": "maintenance_window", "enum": [ "maintenance_window" ] }, "sequence_number": { "type": "integer", "readOnly": true, "description": "The order in which the maintenance window was created." }, "start_time": { "type": "string", "format": "date-time", "description": "This maintenance window's start time. This is when the services will stop creating incidents. If this date is in the past, it will be updated to be the current time." }, "end_time": { "type": "string", "format": "date-time", "description": "This maintenance window's end time. This is when the services will start creating incidents again. This date must be in the future and after the `start_time`." }, "description": { "type": "string", "description": "A description for this maintenance window." }, "created_by": { "$ref": "#/components/schemas/UserReference" }, "services": { "type": "array", "items": { "$ref": "#/components/schemas/ServiceReference" } }, "teams": { "type": "array", "items": { "$ref": "#/components/schemas/TeamReference" }, "readOnly": true } }, "required": [ "start_time", "end_time", "services", "type" ], "example": { "id": "PIJ89JD", "type": "maintenance_window", "start_time": "2015-11-09T20:00:00-05:00", "end_time": "2015-11-09T22:00:00-05:00", "description": "Immanentizing the eschaton", "services": [ { "id": "PIJ90N7", "type": "service_reference" } ] } } ] }, "ScheduleReference": { "allOf": [ { "$ref": "#/components/schemas/Reference" }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "schedule_reference" ] } } } ] }, "Schedule": { "allOf": [ { "$ref": "#/components/schemas/Tag/allOf/0" }, { "type": "object", "properties": { "type": { "type": "string", "description": "The type of object being created.", "default": "schedule", "enum": [ "schedule" ] }, "schedule_layers": { "type": "array", "description": "A list of schedule layers.", "items": { "$ref": "#/components/schemas/ScheduleLayer" } }, "time_zone": { "type": "string", "format": "activesupport-time-zone", "description": "The time zone of the schedule." }, "name": { "type": "string", "description": "The name of the schedule" }, "description": { "type": "string", "description": "The description of the schedule" }, "final_schedule": { "$ref": "#/components/schemas/SubSchedule" }, "overrides_subschedule": { "$ref": "#/components/schemas/SubSchedule" }, "escalation_policies": { "type": "array", "readOnly": true, "description": "An array of all of the escalation policies that uses this schedule.", "items": { "$ref": "#/components/schemas/EscalationPolicyReference" } }, "users": { "type": "array", "readOnly": true, "description": "An array of all of the users on the schedule.", "items": { "$ref": "#/components/schemas/UserReference" } }, "teams": { "type": "array", "readOnly": true, "description": "An array of all of the teams on the schedule.", "items": { "$ref": "#/components/schemas/TeamReference" } } }, "required": [ "time_zone", "type" ], "example": { "name": "Daily Engineering Rotation", "type": "schedule", "time_zone": "America/New_York", "description": "Rotation schedule for engineering", "schedule_layers": [ { "name": "Night Shift", "start": "2015-11-06T20:00:00-05:00", "end": "2016-11-06T20:00:00-05:00", "rotation_virtual_start": "2015-11-06T20:00:00-05:00", "rotation_turn_length_seconds": 86400, "users": [ { "user": { "id": "PXPGF42", "type": "user_reference" } } ], "restrictions": [ { "type": "daily_restriction", "start_time_of_day": "08:00:00", "duration_seconds": 32400 } ] } ] } } ] }, "SubSchedule": { "type": "object", "properties": { "name": { "type": "string", "readOnly": true, "description": "The name of the subschedule", "enum": [ "Final Schedule", "Overrides" ] }, "rendered_schedule_entries": { "type": "array", "readOnly": true, "description": "This is a list of entries on the computed layer for the current time range. Since or until must be set in order for this field to be populated.", "items": { "$ref": "#/components/schemas/ScheduleLayerEntry" } }, "rendered_coverage_percentage": { "type": "number", "readOnly": true, "description": "The percentage of the time range covered by this layer. Returns null unless since or until are set." } }, "required": [ "name" ] }, "ScheduleLayer": { "type": "object", "properties": { "id": { "type": "string" }, "start": { "type": "string", "format": "date-time", "description": "The start time of this layer." }, "end": { "type": "string", "format": "date-time", "description": "The end time of this layer. If `null`, the layer does not end." }, "users": { "type": "array", "description": "The ordered list of users on this layer. The position of the user on the list determines their order in the layer.", "items": { "$ref": "#/components/schemas/ScheduleLayerUser" } }, "restrictions": { "type": "array", "description": "An array of restrictions for the layer. A restriction is a limit on which period of the day or week the schedule layer can accept assignments. Restrictions respect the `time_zone` parameter of the request.", "items": { "$ref": "#/components/schemas/Restriction" } }, "rotation_virtual_start": { "type": "string", "format": "date-time", "description": "The effective start time of the layer. This can be before the start time of the schedule." }, "rotation_turn_length_seconds": { "type": "integer", "description": "The duration of each on-call shift in seconds." }, "name": { "type": "string", "description": "The name of the schedule layer." }, "rendered_schedule_entries": { "type": "array", "readOnly": true, "description": "This is a list of entries on the computed layer for the current time range. Since or until must be set in order for this field to be populated.", "items": { "$ref": "#/components/schemas/ScheduleLayerEntry" } }, "rendered_coverage_percentage": { "type": "number", "readOnly": true, "description": "The percentage of the time range covered by this layer. Returns null unless since or until are set." } }, "required": [ "start", "users", "rotation_virtual_start", "rotation_turn_length_seconds" ] }, "ScheduleLayerEntry": { "type": "object", "properties": { "user": { "$ref": "#/components/schemas/UserReference" }, "start": { "type": "string", "format": "date-time", "readOnly": true, "description": "The start time of this entry." }, "end": { "type": "string", "format": "date-time", "readOnly": true, "description": "The end time of this entry. If null, the entry does not end." } }, "required": [ "start", "end" ] }, "ScheduleLayerUser": { "type": "object", "properties": { "user": { "$ref": "#/components/schemas/UserReference" } }, "required": [ "user" ] }, "Standard": { "title": "Standard", "type": "object", "properties": { "active": { "type": "boolean" }, "description": { "type": "string" }, "id": { "type": "string" }, "name": { "type": "string" }, "type": { "type": "string" }, "resource_type": { "type": "string", "enum": [ "technical_service" ] }, "exclusions": { "type": "array", "items": { "$ref": "#/components/schemas/StandardInclusionExclusion" } }, "inclusions": { "type": "array", "items": { "$ref": "#/components/schemas/StandardInclusionExclusion" } } } }, "StatusDashboard": { "title": "StatusDashboard", "type": "object", "properties": { "id": { "type": "string" }, "url_slug": { "type": "string" }, "name": { "type": "string" } } }, "Override": { "allOf": [ { "$ref": "#/components/schemas/Tag/allOf/0" }, { "type": "object", "properties": { "id": { "type": "string", "readOnly": true }, "start": { "description": "The start date and time for the override.", "type": "string", "format": "date-time" }, "end": { "description": "The end date and time for the override.", "type": "string", "format": "date-time" }, "user": { "$ref": "#/components/schemas/UserReference" } }, "required": [ "start", "end", "user" ], "example": { "start": "2012-07-01T00:00:00-04:00", "end": "2012-07-02T00:00:00-04:00", "user": { "id": "PEYSGVF", "type": "user_reference" } } } ] }, "Restriction": { "type": "object", "properties": { "type": { "type": "string", "description": "Specify the types of `restriction`.", "enum": [ "daily_restriction", "weekly_restriction" ] }, "duration_seconds": { "type": "integer", "description": "The duration of the restriction in seconds." }, "start_time_of_day": { "type": "string", "format": "partial-time", "description": "The start time in HH:mm:ss format." }, "start_day_of_week": { "type": "integer", "description": "Only required for use with a `weekly_restriction` restriction type. The first day of the weekly rotation schedule as [ISO 8601 day](https://en.wikipedia.org/wiki/ISO_week_date) (1 is Monday, etc.)", "minimum": 1, "maximum": 7 } }, "discriminator": { "propertyName": "type" }, "required": [ "type", "duration_seconds", "start_time_of_day" ] }, "WeeklyRestriction": { "allOf": [ { "$ref": "#/components/schemas/Restriction" }, { "type": "object", "properties": { "start_day_of_week": { "type": "integer", "description": "The first day of the weekly rotation schedule as [ISO 8601 day](https://en.wikipedia.org/wiki/ISO_week_date) (1 is Monday, etc.)", "minimum": 1, "maximum": 7 } }, "required": [ "start_day_of_week" ] } ] }, "Pagination": { "type": "object", "properties": { "offset": { "type": "integer", "description": "Echoes offset pagination property.", "readOnly": true }, "limit": { "type": "integer", "description": "Echoes limit pagination property.", "readOnly": true }, "more": { "type": "boolean", "description": "Indicates if there are additional records to return", "readOnly": true }, "total": { "type": "integer", "description": "The total number of records matching the given query.", "nullable": true, "readOnly": true } } }, "CursorPagination": { "type": "object", "properties": { "limit": { "type": "integer", "description": "The minimum of the `limit` parameter used in the request or the maximum request size of the API.", "readOnly": true }, "next_cursor": { "type": "string", "description": "An opaque string than will deliver the next set of results when provided as the `cursor` parameter in a subsequent request. A `null` value for this field indicates that there are no additional results.\n", "example": "dXNlcjaVMzc5V0ZYTlo=", "nullable": true, "readOnly": true } }, "required": [ "limit", "next_cursor" ] }, "LiveListResponse": { "type": "object", "properties": { "limit": { "type": "integer", "description": "Echoes limit pagination property.", "readOnly": true }, "more": { "type": "boolean", "description": "Indicates if there are additional records to return", "readOnly": true } } }, "Assignment": { "type": "object", "properties": { "at": { "type": "string", "format": "date-time", "description": "Time at which the assignment was created." }, "assignee": { "oneOf": [ { "$ref": "#/components/schemas/UserReference" }, { "$ref": "#/components/schemas/User" } ] } }, "required": [ "at", "assignee" ] }, "Acknowledgement": { "type": "object", "properties": { "at": { "type": "string", "format": "date-time", "description": "Time at which the acknowledgement was created." }, "acknowledger": { "oneOf": [ { "$ref": "#/components/schemas/AcknowledgerReference" }, { "$ref": "#/components/schemas/User" }, { "$ref": "#/components/schemas/Service" } ] } }, "required": [ "at", "acknowledger" ] }, "AcknowledgerReference": { "allOf": [ { "$ref": "#/components/schemas/Reference" }, { "description": "The acknowledger represents the entity that made the acknowledgement for an incident.", "type": "object", "properties": { "type": { "enum": [ "user_reference", "service_reference" ], "type": "string" } } } ] }, "Oncall": { "type": "object", "properties": { "escalation_policy": { "$ref": "#/components/schemas/EscalationPolicyReference" }, "user": { "$ref": "#/components/schemas/UserReference" }, "schedule": { "$ref": "#/components/schemas/ScheduleReference" }, "escalation_level": { "type": "integer", "readOnly": true, "description": "The escalation level for the on-call." }, "start": { "type": "string", "format": "date-time", "readOnly": true, "description": "The start of the on-call. If `null`, the on-call is a permanent user on-call." }, "end": { "type": "string", "format": "date-time", "readOnly": true, "description": "The end of the on-call. If `null`, the user does not go off-call." } }, "example": { "user": { "id": "PT23IWX", "type": "user_reference", "summary": "Tim Wright", "self": "https://api.pagerduty.com/users/PT23IWX", "html_url": "https://subdomain.pagerduty.com/users/PT23IWX" }, "schedule": { "id": "PI7DH85", "type": "schedule_reference", "summary": "Daily Engineering Rotation", "self": "https://api.pagerduty.com/schedules/PI7DH85", "html_url": "https://subdomain.pagerduty.com/schedules/PI7DH85" }, "escalation_policy": { "id": "PT20YPA", "type": "escalation_policy_reference", "summary": "Engineering Escalation Policy", "self": "https://api.pagerduty.com/escalation_policies/PT20YPA", "html_url": "https://subdomain.pagerduty.com/escalation_policies/PT20YPA" }, "escalation_level": 2, "start": "2015-03-06T15:28:51-05:00", "end": "2015-03-07T15:28:51-05:00" } }, "VendorReference": { "allOf": [ { "$ref": "#/components/schemas/Reference" }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "vendor_reference" ] } } } ] }, "Vendor": { "allOf": [ { "$ref": "#/components/schemas/Tag/allOf/0" }, { "type": "object", "properties": { "name": { "type": "string", "readOnly": true, "description": "The short name of the vendor" }, "website_url": { "type": "string", "format": "url", "readOnly": true, "description": "URL of the vendor's main website" }, "logo_url": { "type": "string", "format": "url", "readOnly": true, "description": "URL of a logo identifying the vendor" }, "thumbnail_url": { "type": "string", "format": "url", "readOnly": true, "description": "URL of a small thumbnail image identifying the vendor" }, "description": { "type": "string", "readOnly": true, "description": "A short description of this vendor, and common use-cases of integrations for this vendor." }, "integration_guide_url": { "type": "string", "format": "url", "readOnly": true, "description": "URL of an integration guide for this vendor" } }, "example": { "type": "vendor", "name": "Amazon CloudWatch", "website_url": "https://aws.amazon.com/cloudwatch", "logo_url": "https://s3.amazonaws.com/pdpartner/cloudwatch_large.png", "thumbnail_url": "https://s3.amazonaws.com/pdpartner/cloudwatch_thumb.png", "description": "Amazon Web Services CloudWatch provides monitoring for AWS cloud resources and customer-run applications. AWS can collect data, gain insight, and alert users to fix problems within applications and organizations. AWS CloudWatch gives system-wide visibility into resource utilization and notifications can be set for when any metrics cross a specified threshold.", "integration_guide_url": "http://www.pagerduty.com/docs/guides/aws-cloudwatch-integration-guide/" } } ] }, "ExtensionSchemaReference": { "allOf": [ { "$ref": "#/components/schemas/Reference" }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "extension_schema_reference" ] } } } ] }, "ExtensionSchema": { "type": "object", "properties": { "icon_url": { "type": "string", "format": "url", "readOnly": true, "description": "A small logo, 18-by-18 pixels." }, "logo_url": { "type": "string", "format": "url", "readOnly": true, "description": "A large logo, 75 pixels high and no more than 300 pixels wide." }, "label": { "type": "string", "readOnly": true, "description": "Human friendly display label" }, "key": { "type": "string", "readOnly": true, "description": "Machine friendly display label" }, "description": { "type": "string", "description": "The long description for the Extension" }, "guide_url": { "type": "string", "format": "url", "readOnly": true, "description": "A link to the extension's support guide" }, "send_types": { "type": "array", "description": "The types of PagerDuty incident events that will activate this Extension", "uniqueItems": true, "items": { "type": "string", "enum": [ "trigger", "acknowledge", "resolve", "delegate", "escalate", "unacknowledge", "assign", "custom" ] } }, "url": { "type": "string", "readOnly": true, "description": "The url that the webhook payload will be sent to for this Extension." } }, "example": { "id": "PJFWPEP", "type": "extension_schema", "summary": "Generic Webhook", "self": "https://api.pagerduty.com/extension_schemas/PJFWPEP", "html_url": "null", "description": "Long description here", "guide_url": "https://developer.pagerduty.com", "icon_url": "https://extension.com/extension.png", "key": "generic_webhook", "label": "Generic Webhook", "logo_url": "https://extension.com/logo.png", "send_types": [ "trigger", "acknowledge", "resolve", "delegate", "escalate", "unacknowledge", "assign", "custom" ], "url": "https://developer.pagerduty.com/my_webhook_endpoint" } }, "ResolveReason": { "type": "object", "properties": { "type": { "type": "string", "description": "The reason the incident was resolved. The only reason currently supported is merge.", "default": "merge_resolve_reason", "enum": [ "merge_resolve_reason" ] }, "incident": { "$ref": "#/components/schemas/IncidentReference" } } }, "Alert": { "allOf": [ { "$ref": "#/components/schemas/Tag/allOf/0" }, { "type": "object", "properties": { "created_at": { "type": "string", "format": "date-time", "readOnly": true, "description": "The date/time the alert was first triggered." }, "type": { "type": "string", "default": "alert", "description": "The type of object being created.", "enum": [ "alert" ] }, "status": { "type": "string", "description": "The current status of the alert.", "enum": [ "triggered", "resolved" ] }, "alert_key": { "type": "string", "readOnly": true, "description": "The alert's de-duplication key." }, "service": { "$ref": "#/components/schemas/ServiceReference" }, "first_trigger_log_entry": { "$ref": "#/components/schemas/LogEntryReference" }, "incident": { "$ref": "#/components/schemas/IncidentReference" }, "suppressed": { "type": "boolean", "readOnly": true, "description": "Whether or not an alert is suppressed. Suppressed alerts are not created with a parent incident.", "default": false }, "severity": { "type": "string", "readOnly": true, "description": "The magnitude of the problem as reported by the monitoring tool.", "enum": [ "info", "warning", "error", "critical" ] }, "integration": { "$ref": "#/components/schemas/IntegrationReference" }, "body": { "type": "object", "readOnly": true, "description": "A JSON object containing data describing the alert.", "title": "Body", "properties": { "type": { "type": "string", "description": "The type of the body.", "enum": [ "alert_body" ] }, "contexts": { "type": "array", "readOnly": true, "description": "Contexts to be included with the body such as links to graphs or images.", "items": { "$ref": "#/components/schemas/Context" } }, "details": { "type": "object", "readOnly": true, "description": "An arbitrary JSON object or string containing any data explaining the nature of the alert." } } } }, "required": [ "type" ], "example": { "type": "alert", "status": "resolved", "incident": { "id": "PEYSGVF", "type": "incident_reference" }, "body": { "type": "alert_body", "contexts": [ { "type": "link" } ], "details": { "customKey": "Server is on fire!", "customKey2": "Other stuff!" } } } } ] }, "AlertReference": { "allOf": [ { "$ref": "#/components/schemas/Reference" }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "alert_reference" ] } } } ] }, "AlertCount": { "type": "object", "properties": { "triggered": { "type": "integer", "description": "The count of triggered alerts grouped into this incident" }, "resolved": { "type": "integer", "description": "The count of resolved alerts grouped into this incident" }, "all": { "type": "integer", "description": "The total count of alerts grouped into this incident" } } }, "IncidentPrivilege": { "type": "object", "properties": { "role": { "type": "string", "enum": [ "admin", "manager", "observer", "owner", "read_only", "responder", "team_responder", "read_only_limited_user", "none" ] }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "create", "update", "destroy", "new", "edit", "crud", "delete", "manage", "add", "index", "read", "show", "manage_incidents", "manually_trigger_incident" ] } } } }, "IncidentBody": { "type": "object", "properties": { "details": { "type": "object", "description": "Additional incident details." } }, "required": [ "type" ] }, "IncidentWorkflow": { "allOf": [ { "$ref": "#/components/schemas/Tag/allOf/0" }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "incident_workflow" ] }, "name": { "type": "string", "description": "A descriptive name for the Incident Workflow" }, "description": { "type": "string", "description": "A description of what the Incident Workflow does" }, "created_at": { "type": "string", "format": "date-time", "description": "The timestamp this Incident Workflow was created", "readOnly": true }, "team": { "type": "object", "readOnly": false, "description": "If specified then workflow edit permissions will be scoped to members of this team", "properties": { "type": { "type": "string", "description": "Type of the referenced object", "readOnly": true, "enum": [ "team_reference" ] }, "id": { "type": "string", "description": "Unique identifier for the resource", "readOnly": true } } }, "steps": { "type": "array", "description": "The ordered list of steps that execute sequentially as part of the workflow", "items": { "allOf": [ { "$ref": "#/components/schemas/Tag/allOf/0" }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "step" ] }, "name": { "type": "string", "description": "A descriptive name for the Step" }, "description": { "type": "string", "readOnly": true, "description": "A description of the action performed by the Step" }, "action_configuration": { "description": "Configuration of automated action executed by this Step", "type": "object", "properties": { "action_id": { "type": "string", "description": "The identifier of the Action to execute" }, "description": { "type": "string", "description": "Description of the Action", "readOnly": true }, "inputs": { "type": "array", "description": "An unordered list of standard inputs used to configure the Action to execute", "items": { "type": "object", "properties": { "name": { "type": "string", "description": "The name for this Input. Input names are unique per action and should be used to find a specific Input." }, "parameter_type": { "type": "string", "description": "The data type of this Input", "readOnly": true }, "value": { "type": "string", "description": "The configured value of the Input" } }, "required": [ "name", "value" ] } }, "inline_steps_inputs": { "type": "array", "description": "An unordered list of specialized inputs used to configure a workflow-within-a-workflow", "items": { "type": "object", "properties": { "name": { "type": "string", "description": "The name for this Input. Input names are unique per action and should be used to find a specific Input." }, "value": { "type": "object", "description": "The configured value of the Inline Steps Input", "properties": { "steps": { "type": "array", "items": { "allOf": [ { "$ref": "#/components/schemas/Tag/allOf/0" }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "step" ] }, "name": { "type": "string", "description": "A descriptive name for the Step" }, "action_configuration": { "description": "Configuration of automated action executed by this Step", "type": "object", "properties": { "action_id": { "type": "string", "description": "The identifier of the Action to execute" }, "description": { "type": "string", "description": "Description of the Action", "readOnly": true }, "inputs": { "type": "array", "description": "An unordered list of standard inputs used to configure the Action to execute", "items": { "type": "object", "properties": { "name": { "type": "string", "description": "The name for this Input. Input names are unique per action and should be used to find a specific Input." }, "parameter_type": { "type": "string", "description": "The data type of this Input", "readOnly": true }, "value": { "type": "string", "description": "The configured value of the Input" } }, "required": [ "name", "value" ] } }, "outputs": { "type": "array", "description": "An unordered list of outputs this action produces", "readOnly": true, "items": { "type": "object", "properties": { "name": { "type": "string", "description": "The name for this Output. Output names are unique per action and should be used to find a specific Output.", "readOnly": true }, "reference_name": { "type": "string", "description": "The reference name of the Output", "readOnly": true }, "parameter_type": { "type": "string", "description": "The data type produced by this Output", "readOnly": true } }, "required": [ "name", "value" ] } } }, "required": [ "action_id", "inputs" ] } }, "required": [ "name", "action_configuration" ] } ] } } } } }, "required": [ "name", "value" ] } }, "outputs": { "type": "array", "description": "An unordered list of outputs this action produces", "readOnly": true, "items": { "type": "object", "properties": { "name": { "type": "string", "description": "The name for this Output. Output names are unique per action and should be used to find a specific Output.", "readOnly": true }, "reference_name": { "type": "string", "description": "The reference name of the Output", "readOnly": true }, "parameter_type": { "type": "string", "description": "The data type produced by this Output", "readOnly": true } }, "required": [ "name", "value" ] } } }, "required": [ "action_id", "inputs" ] } }, "required": [ "name", "action_configuration" ] } ] } } } } ] }, "IncidentWorkflowAction": { "allOf": [ { "$ref": "#/components/schemas/Tag/allOf/0" }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "action" ] }, "domain_name": { "type": "string", "description": "The Verified Domain of the account that created the action" }, "package_name": { "type": "string", "description": "The Package Name corresponding to the broad category of the Action" }, "function_name": { "type": "string", "description": "The Function Name describing the specific functionality of the Action" }, "version": { "type": "number", "description": "The version of the Action" }, "name": { "type": "string", "description": "The descriptive name of the Action" }, "description": { "type": "string", "description": "A description of the Action" }, "action_type": { "type": "string", "description": "The type of Action", "enum": [ "action", "trigger" ] }, "trigger_type": { "type": "string", "description": "The type of Trigger this Action is, if action_type is trigger", "enum": [ "polling", "subscription", "web" ] }, "tags": { "type": "array", "description": "A set of tags to apply to this action.", "items": { "type": "string" } }, "search_keywords": { "type": "array", "description": "A set of search keywords to apply to this action.", "items": { "type": "string" } }, "metadata": { "type": "string", "description": "JSON-formatted string of metadata pertaining to the Action" }, "created_at": { "type": "string", "format": "date-time", "description": "The date-time at which this Action was created" }, "created_by_user_id": { "type": "string", "description": "The obfuscated Id of the User who created this Action" }, "inputs": { "type": "array", "description": "Inputs whose values used during Action execution", "items": { "type": "object", "properties": { "name": { "type": "string", "description": "The name of the Input" }, "description": { "type": "string", "description": "Describes what the purpose of the Input" }, "type": { "type": "string", "description": "The data type of this Input", "enum": [ "text", "password", "integer", "decimal", "date", "dateTime", "boolean", "singleChoice", "multipleChoice", "json", "connection", "trigger" ] }, "default_value": { "type": "string", "description": "Serialized form of the default value that the input will take" }, "is_required": { "type": "boolean", "description": "Whether a value must be provided for this input" }, "is_hidden": { "type": "boolean", "description": "If true then this input will not be shown to users when configuring this action" }, "advanced": { "type": "boolean" }, "metadata": { "type": "string" }, "connection_type_id": { "type": "string", "description": "The configured value of the Input" } } } }, "outputs": { "type": "array", "description": "Outputs whose values set during Action execution", "readOnly": true, "items": { "type": "object", "properties": { "name": { "type": "string", "description": "The name of the Output" }, "description": { "type": "string" }, "type": { "type": "string", "description": "The data type produced by this Output", "enum": [ "text", "password", "integer", "decimal", "date", "dateTime", "boolean", "singleChoice", "multipleChoice", "json" ] } } } } } } ] }, "IncidentWorkflowInstance": { "type": "object", "properties": { "id": { "type": "string", "readOnly": true }, "type": { "type": "string", "readOnly": true, "description": "A string that determines the schema of the object. This must be the standard name for the entity, suffixed by `_reference` if the object is a reference.", "enum": [ "incident_workflow_instance" ] }, "incident": { "$ref": "#/components/schemas/Reference" } } }, "IncidentWorkflowTriggerInstance": { "allOf": [ { "$ref": "#/components/schemas/Tag/allOf/0" }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "incident_workflow_instance" ] }, "name": { "type": "string", "description": "A descriptive name for the Incident Workflow Instance" }, "description": { "type": "string", "description": "A description of what the Incident Workflow does" }, "status": { "type": "string", "description": "The current status of the Incident Workflow Instance", "enum": [ "completed", "running", "queued" ] }, "started_at": { "type": "string", "format": "date-time", "description": "The timestamp this Incident Workflow started", "readOnly": true }, "ended_at": { "type": "string", "format": "date-time", "description": "The timestamp this Incident Workflow ended", "readOnly": true }, "workflow": { "type": "object", "description": "A reference to the Incident Workflow of which this is an instance", "properties": { "id": { "type": "string", "readOnly": true }, "name": { "type": "string", "nullable": true, "readOnly": true }, "type": { "type": "string", "readOnly": true, "description": "A string that determines the schema of the object. This must be the standard name for the entity, suffixed by `_reference` if the object is a reference.", "enum": [ "workflow_reference" ] }, "self": { "type": "string", "nullable": true, "readOnly": true, "format": "url", "description": "the API show URL at which the object is accessible" }, "html_url": { "type": "string", "nullable": true, "readOnly": true, "format": "url", "description": "a URL at which the entity is uniquely displayed in the Web app" } } } } } ] }, "IncidentWorkflowActionInvocation": { "type": "object", "properties": { "id": { "type": "string" }, "type": { "type": "string", "enum": [ "action_invocation" ] }, "action_id": { "type": "string", "description": "Reference to the Action that was invoked" }, "inputs": { "type": "array", "items": { "allOf": [ { "$ref": "#/components/schemas/IncidentWorkflowAction/allOf/1/properties/inputs/items" }, { "type": "object", "properties": { "value": { "type": "string" } } } ] } }, "outputs": { "type": "array", "items": { "allOf": [ { "$ref": "#/components/schemas/IncidentWorkflowAction/allOf/1/properties/outputs/items" }, { "type": "object", "properties": { "value": { "type": "string" } } } ] } } } }, "IncidentWorkflowTrigger": { "allOf": [ { "$ref": "#/components/schemas/Tag/allOf/0" }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "workflow_trigger" ] }, "trigger_type_name": { "type": "string", "readOnly": true, "description": "Human readable name for the trigger type" }, "trigger_type": { "type": "string", "enum": [ "conditional", "manual" ] }, "condition": { "type": "string", "description": "A PCL condition string.\n\nIf specified, the trigger will execute when the condition is met on an incident.\n\nIf unspecified, the trigger will execute on incident creation.\n\nRequired if trigger_type is “conditional”, not allowed if trigger_type is “manual”.\n" }, "trigger_url": { "type": "string", "format": "url", "readOnly": true }, "workflow": { "type": "object", "description": "Workflow to start when this trigger is invoked", "properties": { "id": { "type": "string" }, "type": { "type": "string", "readOnly": true, "description": "A string that determines the schema of the object. This must be the standard name for the entity, suffixed by `_reference` if the object is a reference.", "enum": [ "workflow_reference" ] }, "name": { "type": "string", "readOnly": true, "description": "A descriptive name for the Incident Workflow" }, "self": { "type": "string", "nullable": true, "readOnly": true, "format": "url", "description": "the API show URL at which the object is accessible" }, "html_url": { "type": "string", "nullable": true, "readOnly": true, "format": "url", "description": "a URL at which the entity is uniquely displayed in the Web app" } } }, "services": { "type": "array", "description": "An optional array of Services associated with this workflow. Incidents in any of the listed Services are eligible to fire this Trigger", "items": { "type": "object", "properties": { "id": { "type": "string" }, "summary": { "type": "string", "nullable": true, "readOnly": true, "description": "A short-form, server-generated string that provides succinct, important information about an object suitable for primary labeling of an entity in a client. In many cases, this will be identical to `name`, though it is not intended to be an identifier." }, "type": { "type": "string", "readOnly": true, "description": "A string that determines the schema of the object. This must be the standard name for the entity, suffixed by `_reference` if the object is a reference.", "enum": [ "service" ] }, "self": { "type": "string", "nullable": true, "readOnly": true, "format": "url", "description": "the API show URL at which the object is accessible" }, "html_url": { "type": "string", "nullable": true, "readOnly": true, "format": "url", "description": "a URL at which the entity is uniquely displayed in the Web app" } } } }, "is_subscribed_to_all_services": { "type": "boolean", "description": "Indicates that the Trigger should be associated with All Services" }, "permissions": { "description": "An object detailing who can start this Trigger. Applicable only to manual Triggers.", "type": "object", "properties": { "restricted": { "type": "boolean", "description": "If true, indicates that the Trigger can only be started by authorized Users. If false, any user can start this Trigger. Applicable only to manual Triggers." }, "team_id": { "type": "string", "description": "The ID of the team whose members can manually start this Trigger. Required and allowed if and only if permissions.restricted is true." } } } } } ] }, "StatusUpdate": { "type": "object", "properties": { "id": { "type": "string" }, "message": { "type": "string", "description": "The message of the status update." }, "created_at": { "type": "string", "description": "The date/time when this status update was created." }, "sender": { "$ref": "#/components/schemas/UserReference" }, "subject": { "type": "string", "description": "The subject of the custom html email status update. Present if included in request body." }, "html_message": { "type": "string", "description": "The html content of the custom html email status update. Present if included in request body." } } }, "ResponderRequest": { "type": "object", "properties": { "incident": { "$ref": "#/components/schemas/IncidentReference" }, "requester": { "$ref": "#/components/schemas/UserReference" }, "requested_at": { "type": "string", "description": "The time the request was made" }, "message": { "type": "string", "description": "The message sent with the responder request" }, "responder_request_targets": { "type": "array", "description": "The array of targets the responder request is being sent to", "items": { "$ref": "#/components/schemas/ResponderRequestTargetReference" } } } }, "ResponderRequestTargetReference": { "type": "object", "properties": { "type": { "type": "string", "description": "The type of target (either a user or an escalation policy)" }, "id": { "type": "string", "description": "The id of the user or escalation policy" }, "summary": { "type": "string" }, "incident_responders": { "type": "array", "description": "An array of responders associated with the specified incident", "items": { "$ref": "#/components/schemas/IncidentsRespondersReference" } } } }, "IncidentsRespondersReference": { "type": "object", "properties": { "state": { "type": "string", "description": "The status of the responder being added to the incident", "example": "pending" }, "user": { "$ref": "#/components/schemas/UserReference" }, "incident": { "$ref": "#/components/schemas/IncidentReference" }, "updated_at": { "type": "string" }, "message": { "type": "string", "description": "The message sent with the responder request" }, "requester": { "$ref": "#/components/schemas/UserReference" }, "requested_at": { "type": "string" } } }, "ConferenceBridge": { "type": "object", "properties": { "conference_number": { "type": "string", "description": "The phone number of the conference call for the conference bridge. Phone numbers should be formatted like +1 415-555-1212,,,,1234#, where a comma (,) represents a one-second wait and pound (#) completes access code input." }, "conference_url": { "type": "string", "format": "url", "description": "An URL for the conference bridge. This could be a link to a web conference or Slack channel." } } }, "Action": { "type": "object", "description": "A message containing information about a single PagerDuty action.", "readOnly": true, "properties": { "id": { "type": "string", "format": "uuid", "description": "Uniquely identifies this outgoing webhook message; can be used for idempotency when processing the messages.", "readOnly": true }, "triggered_at": { "type": "string", "format": "date-time", "description": "The date/time when this message was was sent.", "readOnly": true }, "webhook": { "$ref": "#/components/schemas/Webhook" } } }, "WebhookIncidentAction": { "allOf": [ { "$ref": "#/components/schemas/Action" }, { "type": "object", "properties": { "type": { "type": "string", "description": "The type of action being reported by this message. * `incident.trigger` - Sent when an incident is newly created/triggered. * `incident.acknowledge` - Sent when an incident is acknowledged by a user. * `incident.unacknowledge` - Sent when an incident is unacknowledged due to its acknowledgement timing out. * `incident.resolve` - Sent when an incident has been resolved. * `incident.assign` - Sent when an incident has been assigned to another user. Often occurs in concert with an `acknowledge`. * `incident.escalate` - Sent when an incident has been escalated to another user in the same escalation chain. * `incident.delegate` - Sent when an incident has been reassigned to another escalation policy. * `incident.annotate` - Sent when a note is created on an incident.\n", "enum": [ "incident.trigger", "incident.acknowledge", "incident.unacknowledge", "incident.resolve", "incident.assign", "incident.escalate", "incident.delegate", "incident.annotate" ] }, "incident": { "$ref": "#/components/schemas/Incident" }, "log_entries": { "type": "array", "description": "Log Entries that correspond to the action this Webhook is reporting. Includes the channels.", "items": { "oneOf": [ { "$ref": "#/components/schemas/AcknowledgeLogEntry" }, { "$ref": "#/components/schemas/AnnotateLogEntry" }, { "$ref": "#/components/schemas/AssignLogEntry" }, { "$ref": "#/components/schemas/DelegateLogEntry" }, { "$ref": "#/components/schemas/EscalateLogEntry" }, { "$ref": "#/components/schemas/ExhaustEscalationPathLogEntry" }, { "$ref": "#/components/schemas/NotifyLogEntry" }, { "$ref": "#/components/schemas/ReachAckLimitLogEntry" }, { "$ref": "#/components/schemas/ReachTriggerLimitLogEntry" }, { "$ref": "#/components/schemas/RepeatEscalationPathLogEntry" }, { "$ref": "#/components/schemas/ResolveLogEntry" }, { "$ref": "#/components/schemas/SnoozeLogEntry" }, { "$ref": "#/components/schemas/TriggerLogEntry" }, { "$ref": "#/components/schemas/UnacknowledgeLogEntry" }, { "$ref": "#/components/schemas/UrgencyChangeLogEntry" } ] } } }, "example": { "id": "bb4fcb00-6324-11e6-b9aa-22000affca53", "type": "incident.resolve", "triggered_at": "2016-08-15T20:13:28Z", "log_entries": [ { "id": "R0FFIOTKIU30MN7XWR99SI0", "type": "resolve_log_entry", "summary": "Resolved by Earline Greenholt", "self": "https://api.pagerduty.com/log_entries/R0FFIOTKIU30MN7XWR99SI0", "html_url": null, "created_at": "2017-09-22T18:37:29+00:00", "agent": { "id": "PLMUP47", "type": "user_reference", "summary": "Earline Greenholt", "self": "https://api.pagerduty.com/users/PXPGF42", "html_url": "https://subdomain.pagerduty.com/users/PXPGF42" }, "channel": { "type": "slack", "user": { "id": "U60DQ6ZXY", "name": "alisdair" }, "team": { "id": "T029K7I8", "domain": "subdomain" }, "channel": { "id": "C6981DRAW", "name": "subdomain-ops" } }, "service": { "id": "PN49J75", "type": "service_reference", "summary": "Cool Service", "self": "https://api.pagerduty.com/services/PNTDJ30", "html_url": "https://subdomain.pagerduty.com/service-directory/PNTDJ30" }, "incident": { "id": "PVO5OB2", "type": "incident_reference", "summary": "The server is on fire.", "self": "https://api.pagerduty.com/incidents/PT4KHLK", "html_url": "https://subdomain.pagerduty.com/incidents/PT4KHLK" }, "teams": [ { "id": "PQ9K7I8", "type": "team_reference", "summary": "Engineering", "self": "https://api.pagerduty.com/teams/PQ9K7I8", "html_url": "https://subdomain.pagerduty.com/teams/PQ9K7I8" } ] } ], "webhook": { "type": "webhook", "summary": "webhook", "self": "https://api.pagerduty.com/webhooks/PPGPXHO", "html_url": "null", "name": "My Webhook", "endpoint_url": "https://example.com", "webhook_object": { "id": "PNTDJ30", "type": "service_reference", "summary": "Cool Service", "self": "null", "html_url": "null" }, "config": { "anykey": "anyvalue" }, "outbound_integration": { "id": "PJFWPEP", "type": "outbound_integration_reference", "summary": "Generic Webhook V2", "self": "null", "html_url": "null" } }, "incident": { "id": "PT4KHLK", "type": "incident", "summary": "The server is on fire.", "self": "https://api.pagerduty.com/incidents/PT4KHLK", "html_url": "https://subdomain.pagerduty.com/incidents/PT4KHLK", "incident_number": 1234, "created_at": "2015-10-06T21:30:42Z", "status": "resolved", "pending_actions": [ { "type": "unacknowledge", "at": "2015-11-10T01:02:52Z" }, { "type": "resolve", "at": "2015-11-10T04:31:52Z" } ], "incident_key": "baf7cf21b1da41b4b0221008339ff357", "service": { "id": "PIJ90N7", "type": "service_reference", "summary": "My Application Service", "self": "https://api.pagerduty.com/services/PIJ90N7", "html_url": "https://subdomain.pagerduty.com/service-directory/PIJ90N7", "name": "My Application Service", "description": "null", "auto_resolve_timeout": 14400, "acknowledgement_timeout": 600, "created_at": "2015-11-06T11:12:51-05:00", "status": "active", "last_incident_timestamp": "null", "integrations": [ { "id": "PQ12345", "type": "generic_email_inbound_integration_reference", "summary": "Email Integration", "self": "https://api.pagerduty.com/services/PIJ90N7/integrations/PQ12345", "html_url": "https://subdomain.pagerduty.com/services/PIJ90N7/integrations/PQ12345" } ], "escalation_policy": { "id": "PT20YPA", "type": "escalation_policy_reference", "summary": "Another Escalation Policy", "self": "https://api.pagerduty.com/escalation_policies/PT20YPA", "html_url": "https://subdomain.pagerduty.com/escalation_policies/PT20YPA" }, "teams": [ { "id": "PQ9K7I8", "type": "team_reference", "summary": "Engineering", "self": "https://api.pagerduty.com/teams/PQ9K7I8", "html_url": "https://subdomain.pagerduty.com/teams/PQ9K7I8" } ], "incident_urgency_rule": { "type": "use_support_hours", "during_support_hours": { "type": "constant", "urgency": "high" }, "outside_support_hours": { "type": "constant", "urgency": "low" } }, "support_hours": { "type": "fixed_time_per_day", "time_zone": "America/Lima", "start_time": "09:00:00", "end_time": "17:00:00", "days_of_week": [ 1, 2, 3, 4, 5 ] }, "scheduled_actions": [ { "type": "urgency_change", "at": { "type": "named_time", "name": "support_hours_start" }, "to_urgency": "high" } ] }, "assignments": [ { "at": "2015-11-10T00:31:52Z", "assignee": { "id": "PXPGF42", "type": "user_reference", "summary": "Earline Greenholt", "self": "https://api.pagerduty.com/users/PXPGF42", "html_url": "https://subdomain.pagerduty.com/users/PXPGF42" } } ], "acknowledgements": [ { "at": "2015-11-10T00:32:52Z", "acknowledger": { "id": "PXPGF42", "type": "user_reference", "summary": "Earline Greenholt", "self": "https://api.pagerduty.com/users/PXPGF42", "html_url": "https://subdomain.pagerduty.com/users/PXPGF42" } } ], "last_status_change_at": "2015-10-06T21:38:23Z", "last_status_change_by": { "id": "PXPGF42", "type": "user_reference", "summary": "Earline Greenholt", "self": "https://api.pagerduty.com/users/PXPGF42", "html_url": "https://subdomain.pagerduty.com/users/PXPGF42" }, "first_trigger_log_entry": { "id": "Q02JTSNZWHSEKV", "type": "trigger_log_entry_reference", "summary": "Triggered through the API", "self": "https://api.pagerduty.com/log_entries/Q02JTSNZWHSEKV?incident_id=PT4KHLK", "html_url": "https://subdomain.pagerduty.com/incidents/PT4KHLK/log_entries/Q02JTSNZWHSEKV" }, "escalation_policy": { "id": "PT20YPA", "type": "escalation_policy_reference", "summary": "Another Escalation Policy", "self": "https://api.pagerduty.com/escalation_policies/PT20YPA", "html_url": "https://subdomain.pagerduty.com/escalation_policies/PT20YPA" }, "teams": [ { "id": "PQ9K7I8", "type": "team_reference", "summary": "Engineering", "self": "https://api.pagerduty.com/teams/PQ9K7I8", "html_url": "https://subdomain.pagerduty.com/teams/PQ9K7I8" } ], "urgency": "high" } } } ] }, "WebhookObject": { "allOf": [ { "$ref": "#/components/schemas/Reference" }, { "type": "object", "description": "The webhook object (service) that the webhook belongs to.", "properties": { "type": { "type": "string", "enum": [ "service", "service_reference" ] } } } ] }, "Webhook": { "type": "object", "description": "Information about the configured webhook.", "readOnly": true, "properties": { "endpoint_url": { "type": "string", "format": "url", "description": "The url endpoint the webhook payload is sent to." }, "name": { "type": "string", "description": "The name of the webhook." }, "webhook_object": { "$ref": "#/components/schemas/WebhookObject" }, "config": { "type": "object", "description": "The object that contains webhook configuration values depending on the webhook type specification." }, "outbound_integration": { "$ref": "#/components/schemas/OutboundIntegrationReference" } }, "example": { "id": "PPGPXHO", "type": "webhook", "summary": "webhook", "name": "My Webhook", "endpoint_url": "https://example.com", "webhook_object": { "id": "PNTDJ30", "type": "service_reference" }, "config": { "anykey": "anyvalue" }, "outbound_integration": { "id": "PJFWPEP", "type": "outbound_integration_reference" } } }, "WebhookReference": { "allOf": [ { "$ref": "#/components/schemas/Reference" }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "webhook_reference" ] } } } ] }, "OutboundIntegrationReference": { "allOf": [ { "$ref": "#/components/schemas/Reference" }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "outbound_integration_reference" ] } } } ] }, "WebhookSubscription": { "type": "object", "properties": { "id": { "type": "string", "readOnly": true }, "type": { "type": "string", "description": "The type indicating the schema of the object.", "default": "webhook_subscription", "enum": [ "webhook_subscription" ] }, "active": { "type": "boolean", "default": true, "description": "Determines whether this subscription will produce webhook events." }, "delivery_method": { "type": "object", "properties": { "id": { "type": "string", "readOnly": true }, "secret": { "type": "string", "description": "The secret used to sign webhook payloads. Only provided on the initial create response.", "nullable": true, "readOnly": true }, "temporarily_disabled": { "type": "boolean", "description": "Whether or not this webhook subscription is temporarily disabled. Becomes `true` if the delivery method URL is repeatedly rejected by the server." }, "type": { "type": "string", "description": "Indicates the type of the delivery method.", "default": "http_delivery_method", "enum": [ "http_delivery_method" ] }, "url": { "type": "string", "description": "The destination URL for webhook delivery.", "format": "url" }, "custom_headers": { "type": "array", "description": "Optional headers to be set on this webhook subscription when sent. The header values are redacted in GET requests, but are not redacted on the webhook when delivered to the webhook's endpoint." } }, "required": [ "type", "url" ] }, "description": { "type": "string", "description": "A short description of the webhook subscription." }, "events": { "type": "array", "description": "The set of outbound event types the webhook will receive.", "minItems": 1, "uniqueItems": true, "items": { "type": "string" } }, "filter": { "type": "object", "properties": { "id": { "type": "string", "description": "The id of the object being used as the filter. This field is required for all filter types except account_reference." }, "type": { "type": "string", "description": "The type of object being used as the filter.", "enum": [ "account_reference", "service_reference", "team_reference" ] } }, "required": [ "type" ] } }, "required": [ "type", "delivery_method", "events", "filter" ] }, "WebhookSubscriptionUpdate": { "type": "object", "properties": { "webhook_subscription": { "type": "object", "properties": { "description": { "type": "string", "description": "A short description of the webhook subscription." }, "events": { "type": "array", "description": "The set of outbound event types the subscription will receive.", "minItems": 1, "uniqueItems": true, "items": { "type": "string" } }, "filter": { "type": "object", "properties": { "id": { "type": "string", "description": "The id of the object being used as the filter. This field is required for all filter types except account_reference." }, "type": { "type": "string", "description": "The type of object being used as the filter.", "enum": [ "account_reference", "service_reference", "team_reference" ] } } }, "active": { "type": "boolean", "description": "If true, a webhook will be sent. True is the default state. If false, a webhook will not be sent." } } } } }, "WebhooksV1Message": { "type": "object", "description": "A message containing information about a single PagerDuty action.", "readOnly": true, "properties": { "id": { "type": "string", "format": "uuid", "description": "Uniquely identifies this outgoing webhook message; can be used for idempotency when processing the messages.", "readOnly": true }, "type": { "type": "string", "description": "The type of action being reported by this message.", "enum": [ "incident.trigger", "incident.acknowledge", "incident.unacknowledge", "incident.resolve", "incident.assign", "incident.escalate", "incident.delegate" ], "readOnly": true }, "created_on": { "type": "string", "format": "date-time", "description": "The date/time when the incident changed state.", "readOnly": true }, "data": { "type": "object", "properties": { "incident": { "$ref": "#/components/schemas/WebhooksV1IncidentData" } } } } }, "WebhooksV1IncidentData": { "type": "object", "description": "The incident details at the time of the state change.", "readOnly": true, "properties": { "id": { "type": "string", "readOnly": true }, "incident_number": { "type": "integer", "description": "The number of the incident. This is unique across the account.", "readOnly": true }, "created_on": { "type": "string", "format": "date-time", "description": "The date/time the incident was first triggered.", "readOnly": true }, "status": { "type": "string", "description": "The current status of the incident.", "enum": [ "triggered", "acknowledged", "resolved" ], "readOnly": true }, "html_url": { "type": "string", "format": "url", "readOnly": true }, "incident_key": { "type": "string", "description": "The incident's de-duplication key.", "readOnly": true }, "service": { "$ref": "#/components/schemas/WebhooksV1Service" }, "assigned_to_user": { "$ref": "#/components/schemas/WebhooksV1AssignedToUser" }, "assigned_to": { "type": "array", "items": { "$ref": "#/components/schemas/WebhooksV1AssignedTo" }, "readOnly": true }, "trigger_summary_data": { "type": "object", "properties": { "subject": { "type": "string", "readOnly": true } }, "readOnly": true }, "trigger_details_html_url": { "type": "string", "format": "url", "readOnly": true }, "last_status_change_on": { "type": "string", "format": "date-time", "readOnly": true, "description": "The time at which the status of the incident last changed." }, "last_status_change_by": { "$ref": "#/components/schemas/WebhooksV1AssignedToUser" }, "number_of_escalations": { "type": "integer", "minimum": 0, "description": "Number of times the incident has been escalated.", "readOnly": true }, "urgency": { "type": "string", "enum": [ "high", "low" ], "readOnly": true } } }, "WebhooksV1Service": { "type": "object", "description": "The service on which the incident occurred.", "properties": { "id": { "type": "string", "readOnly": true }, "name": { "type": "string", "description": "The name of the service.", "readOnly": true }, "html_url": { "type": "string", "format": "url", "readOnly": true }, "deleted_at": { "type": "string", "format": "date-time", "description": "The date/time the service was deleted, if it has been removed.", "readOnly": true }, "description": { "type": "string", "description": "The description of the service.", "readOnly": true } } }, "WebhooksV1AssignedTo": { "type": "object", "readOnly": true, "properties": { "at": { "type": "string", "format": "date-time", "description": "Time at which the assignment was created." }, "object": { "allOf": [ { "$ref": "#/components/schemas/WebhooksV1AssignedToUser" }, { "properties": { "type": { "type": "string", "enum": [ "user" ] } } } ] } } }, "WebhooksV1AssignedToUser": { "type": "object", "description": "The user assigned to the incident.", "readOnly": true, "properties": { "id": { "type": "string", "readOnly": true }, "name": { "type": "string", "description": "The user's name.", "readOnly": true }, "email": { "type": "string", "format": "email", "description": "The user's email address.", "readOnly": true }, "html_url": { "type": "string", "format": "url", "readOnly": true } } }, "ResponsePlay": { "allOf": [ { "$ref": "#/components/schemas/Tag/allOf/0" }, { "type": "object", "properties": { "type": { "type": "string", "description": "The type of object being created.", "default": "response_play", "enum": [ "response_play" ] }, "name": { "type": "string", "description": "The name of the response play." }, "description": { "type": "string", "nullable": true, "description": "The description of the response play.", "maxLength": 349 }, "team": { "oneOf": [ { "$ref": "#/components/schemas/TeamReference" }, { "type": "object", "nullable": true } ] }, "subscribers": { "type": "array", "nullable": true, "description": "An array containing the users and/or teams to be added as subscribers to any incident on which this response play is run.", "items": { "anyOf": [ { "$ref": "#/components/schemas/UserReference" }, { "$ref": "#/components/schemas/TeamReference" } ], "discriminator": { "propertyName": "type" } } }, "subscribers_message": { "type": "string", "nullable": true, "description": "The content of the notification that will be sent to all incident subscribers upon the running of this response play. Note that this includes any users who may have already been subscribed to the incident prior to the running of this response play. If empty, no notifications will be sent." }, "responders": { "type": "array", "description": "An array containing the users and/or escalation policies to be requested as responders to any incident on which this response play is run.", "items": { "anyOf": [ { "$ref": "#/components/schemas/UserReference" }, { "$ref": "#/components/schemas/EscalationPolicyReference" } ], "discriminator": { "propertyName": "type" } } }, "responders_message": { "type": "string", "nullable": true, "description": "The message body of the notification that will be sent to this response play's set of responders. If empty, a default response request notification will be sent." }, "runnability": { "type": "string", "description": "String representing how this response play is allowed to be run. Valid options are:\n - `services`: This response play cannot be manually run by any users. It will run automatically for new incidents triggered on any services that are configured with this response play.\n - `teams`: This response play can be run manually on an incident only by members of its configured team. This option can only be selected when the `team` property for this response play is not empty.\n - `responders`: This response play can be run manually on an incident by any responders in this account.", "enum": [ "services", "teams", "responders" ], "default": "services" }, "conference_number": { "type": "string", "nullable": true, "description": "The telephone number that will be set as the conference number for any incident on which this response play is run." }, "conference_url": { "type": "string", "description": "The URL that will be set as the conference URL for any incident on which this response play is run.", "nullable": true }, "conference_type": { "type": "string", "description": "This field has three possible values and indicates how the response play was created.\n - `none` : The response play had no conference_number or conference_url set at time of creation.\n - `manual` : The response play had one or both of conference_number and conference_url set at time of creation.\n - `zoom` : Customers with the Zoom-Integration Entitelment can use this value to dynamicly configure conference number and url for zoom", "enum": [ "none", "manual", "zoom" ], "default": "none" } } } ] }, "NotificationSubscriber": { "title": "NotificationSubscriber", "description": "A reference of a subscriber entity.", "type": "object", "properties": { "subscriber_id": { "type": "string", "description": "The ID of the entity being subscribed" }, "subscriber_type": { "type": "string", "description": "The type of the entity being subscribed", "enum": [ "user", "team" ] } }, "example": { "subscriber_id": "PD1234", "subscriber_type": "user" } }, "NotificationSubscriberWithContext": { "title": "NotificationSubscriberWithContext", "description": "A reference of a subscriber entity with additional subscription context.", "type": "object", "example": { "subscriber_id": "PD1234", "subscriber_type": "user" }, "properties": { "subscriber_id": { "type": "string", "description": "The ID of the entity being subscribed" }, "subscriber_type": { "type": "string", "description": "The type of the entity being subscribed", "enum": [ "user", "team" ] }, "has_indirect_subscription": { "type": "boolean", "description": "If this subcriber has an indirect subscription to this incident via another object" }, "subscribed_via": { "nullable": true, "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "description": "The id of the object this subscriber is subscribed via" }, "name": { "type": "string", "description": "The type of the object this subscriber is subscribed via" } } } } } }, "NotificationSubscribable": { "title": "NotificationSubscribable", "description": "A reference of a subscribable entity.", "type": "object", "properties": { "subscribable_id": { "type": "string", "description": "The ID of the entity to subscribe to" }, "subscribable_type": { "type": "string", "description": "The type of the entity being subscribed to", "enum": [ "incident", "business_service" ] } }, "example": { "subscribable_id": "PD1234", "subscribable_type": "incident" } }, "NotificationSubscription": { "title": "NotificationSubscription", "description": "An object describing the relationship of a NotificationSubscriber and a NotificationSubscribable.", "type": "object", "properties": { "subscriber_id": { "type": "string", "description": "The ID of the entity being subscribed" }, "subscriber_type": { "type": "string", "description": "The type of the entity being subscribed", "enum": [ "user", "team" ] }, "subscribable_id": { "type": "string", "description": "The ID of the entity being subscribed to" }, "subscribable_type": { "type": "string", "description": "The type of the entity being subscribed to", "enum": [ "incident", "business_service" ] }, "account_id": { "type": "string", "description": "The ID of the account belonging to the subscriber entity" } }, "x-examples": { "example-1": { "subscriber_id": "string", "subscriber_type": "user", "subscribable_id": "string", "subscribable_type": "incident", "account_id": "string" } } }, "NotificationSubscriptionWithContext": { "title": "NotificationSubscriptionWithContext", "type": "object", "description": "An object describing the relationship of a NotificationSubscriber and a NotificationSubscribable with additional context on status of subscription attempt.", "x-examples": { "example-1": { "subscriber_id": "string", "subscriber_type": "user", "subscribable_id": "string", "subscribable_type": "incident", "account_id": "string", "result": "success" } }, "properties": { "subscriber_id": { "type": "string", "description": "The ID of the entity being subscribed" }, "subscriber_type": { "type": "string", "enum": [ "user", "team" ], "description": "The type of the entity being subscribed" }, "subscribable_id": { "type": "string", "description": "The ID of the entity being subscribed to" }, "subscribable_type": { "type": "string", "enum": [ "incident", "business_service" ], "description": "The type of the entity being subscribed to" }, "account_id": { "type": "string", "description": "The type of the entity being subscribed to" }, "result": { "type": "string", "enum": [ "success", "duplicate", "unauthorized" ], "description": "The resulting status of the subscription" } } }, "AlertGroupingSetting": { "type": "object", "description": "Defines how alerts will be automatically grouped into incidents based on the configurations defined. Note that the Alert Grouping Setting features are available only on certain plans.\n", "properties": { "id": { "type": "string", "readOnly": true }, "name": { "type": "string", "nullable": true, "description": "An optional short-form string that provides succinct information about an AlertGroupingSetting object suitable for primary labeling of the entity. It is not intended to be an identifier." }, "description": { "type": "string", "nullable": true, "description": "An optional description in string that provides more information about an AlertGroupingSetting object." }, "type": { "type": "string", "enum": [ "content_based", "content_based_intelligent" ] }, "config": { "anyOf": [ { "$ref": "#/components/schemas/ContentBasedAlertGroupingConfiguration" }, { "$ref": "#/components/schemas/ContentBasedIntelligentAlertGroupingConfiguration" } ] }, "services": { "type": "array", "description": "The array of one or many Services with just ServiceID/name that the AlertGroupingSetting applies to. Type of content_based_intelligent allows for only one service in the array.", "items": { "$ref": "#/components/schemas/ServiceReference" } }, "created_at": { "type": "string", "format": "date-time", "description": "The ISO8601 date/time an AlertGroupingSetting got created at.", "readOnly": true }, "updated_at": { "type": "string", "format": "date-time", "description": "The ISO8601 date/time an AlertGroupingSetting last got updated at.", "readOnly": true } } }, "AlertGroupingParameters": { "type": "object", "description": "Defines how alerts on this service will be automatically grouped into incidents. Note that the alert grouping features are available only on certain plans. To turn grouping off set the type to null.\n", "properties": { "type": { "type": "string", "nullable": true, "enum": [ "time", "intelligent", "content_based", null ] }, "config": { "anyOf": [ { "$ref": "#/components/schemas/FlexibleTimeWindowIntelligentAlertGroupingConfig" }, { "$ref": "#/components/schemas/TimeBasedAlertGroupingConfiguration" }, { "$ref": "#/components/schemas/ContentBasedAlertGroupingConfiguration" } ] } } }, "ContentBasedAlertGroupingConfiguration": { "type": "object", "title": "Content Only Grouping", "description": "The configuration for Content Based Alert Grouping", "properties": { "aggregate": { "type": "string", "description": "Whether Alerts should be grouped if `all` or `any` specified fields match. If `all` is selected, an exact match on every specified field name must occur for Alerts to be grouped. If `any` is selected, Alerts will be grouped when there is an exact match on at least one of the specified fields.", "enum": [ "all, any" ] }, "fields": { "type": "array", "description": "An array of strings which represent the fields with which to group against. Depending on the aggregate, Alerts will group if some or all the fields match." }, "time_window": { "type": "integer", "minimum": 300, "maximum": 86400, "description": "The maximum amount of time allowed between Alerts. Any Alerts arriving greater than `time_window` seconds apart will not be grouped together. This is a rolling time window up to 24 hours and is counted from the most recently grouped alert. The window is extended every time a new alert is added to the group, up to 24 hours (24 hours only applies to single-service settings). To use the \"recommended_time_window,\" set the value to 0, otherwise the value must be between 300 <= time_window <= 3600 or 86400(i.e. 24 hours)." }, "recommended_time_window": { "readOnly": true, "type": "integer", "description": "In order to ensure your Service has the optimal grouping window, we use data science to calculate your Service`s average Alert inter-arrival time. We encourage customer`s to use this value, please set `time_window` to 0 to use the `recommended_time_window`." } } }, "TimeBasedAlertGroupingConfiguration": { "type": "object", "title": "Time Grouping", "description": "The configuration for Time Based Alert Grouping", "properties": { "timeout": { "type": "integer", "description": "The duration in minutes within which to automatically group incoming Alerts. To continue grouping Alerts until the Incident is resolved, set this value to 0." } } }, "RelatedIncidentServiceDependencyBase": { "type": "object", "properties": { "id": { "type": "string", "description": "The ID of the Service referenced.", "readOnly": true }, "type": { "type": "string", "description": "The type of the related Service.", "enum": [ "business_service_reference", "technical_service_reference" ] }, "self": { "type": "string", "nullable": true, "readOnly": true, "format": "url", "description": "The API show URL at which the object is accessible." } } }, "RelatedIncidentMachineLearningRelationship": { "type": "object", "description": "The data for a type of relationship where the Incident is related due to our machine learning algorithm.\n", "properties": { "grouping_classification": { "type": "string", "description": "The classification for why this Related Incident was grouped into this group.\nValues can be one of: [similar_contents, prior_feedback], where:\nsimilar_contents - The Related Incident was due to similar contents of the Incidents.\nprior_feedback - The Related Incident was determined to be related, based on User feedback or Incident merge/unmerge actions.\n", "enum": [ "similar_contents", "prior_feedback" ] }, "user_feedback": { "type": "object", "description": "The feedback provided from Users to influence the machine learning algorithm for future Related Incidents.", "properties": { "positive_feedback_count": { "type": "integer", "description": "The total number of times Users agreed that the Incidents are related." }, "negative_feedback_count": { "type": "integer", "description": "The total number of times Users disagreed that the Incidents are related." } } } } }, "RelatedIncidentServiceDependencyRelationship": { "type": "object", "description": "The data for a type of relationship where the Incident is related due to Business or Technical Service dependencies.\n\nBoth `dependent_services` and `supporting_services` are returned to signify the dependencies between the Services\nthat the Incident and Related Incident belong to.\n\nEach Service reference returned in the list of supporting and dependent Services has a type of:\n[business_service_reference, technical_service_reference].\n", "properties": { "dependent_services": { "type": "array", "items": { "$ref": "#/components/schemas/RelatedIncidentServiceDependencyBase" } }, "supporting_services": { "type": "array", "items": { "$ref": "#/components/schemas/RelatedIncidentServiceDependencyBase" } } } }, "EmailParser": { "type": "object", "properties": { "action": { "type": "string", "enum": [ "trigger", "resolve" ] }, "match_predicate": { "$ref": "#/components/schemas/MatchPredicate" }, "value_extractors": { "type": "array", "description": "Additional values that will be pulled in to the Incident object. Exactly one value extractor must have a `value_name` of `incident_key`.", "uniqueItems": true, "minItems": 1, "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "entire", "regex", "between" ] }, "part": { "type": "string", "enum": [ "body", "subject", "from_addresses" ] }, "value_name": { "type": "string", "minLength": 1, "description": "The field name to set in the Incident object. Exactly one must use the `value_name` of `incident_key`" }, "regex": { "type": "string" }, "starts_after": { "type": "string" }, "ends_with": { "type": "string" } }, "required": [ "type", "part", "value_name" ] } } }, "required": [ "action", "match_predicate" ] }, "MatchPredicate": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "all", "any", "not", "contains", "exactly", "regex" ] }, "matcher": { "type": "string", "description": "Required if the type is `contains`, `exactly` or `regex`.", "minLength": 1 }, "part": { "type": "string", "description": "The email field that will attempt to use the matcher expression. Required if the type is `contains`, `exactly` or `regex`.", "enum": [ "body", "subject", "from_addresses" ] }, "children": { "type": "array", "description": "Additional matchers to be run. Must be not empty if the type is `all`, `any`, or `not`.", "items": { "$ref": "#/components/schemas/MatchPredicate" } } }, "required": [ "type", "part", "children" ] }, "HandoffNotificationRule": { "type": "object", "description": "A rule for contacting the user for Handoff Notifications.", "properties": { "id": { "type": "string", "readOnly": true }, "notify_advance_in_minutes": { "type": "integer", "description": "The delay before firing the rule, in minutes.", "minimum": 0 }, "handoff_type": { "type": "string", "description": "The type of handoff being created.", "default": "both", "enum": [ "both", "oncall", "offcall" ] }, "contact_method": { "$ref": "#/components/schemas/ContactMethodReference" } }, "required": [ "id", "handoff_type", "contact_method" ], "example": { "id": "PXPGF42", "notify_advance_in_minutes": 180, "handoff_type": "both", "contact_method": { "id": "PXPGF42", "type": "email_contact_method_reference" } } }, "Orchestration": { "type": "object", "properties": { "id": { "type": "string", "description": "ID of the Orchestration.", "readOnly": true }, "self": { "type": "string", "format": "url", "description": "The API show URL at which the object is accessible", "readOnly": true }, "name": { "type": "string", "description": "Name of the Orchestration." }, "description": { "type": "string", "description": "A description of this Orchestration's purpose." }, "team": { "type": "object", "description": "Reference to the team that owns the Orchestration. If none is specified, only admins have access.", "properties": { "id": { "type": "string" }, "type": { "type": "string", "description": "A string that determines the schema of the object", "readOnly": true }, "self": { "type": "string", "format": "url", "description": "The API show URL at which the object is accessible", "readOnly": true } } }, "integrations": { "type": "array", "items": { "$ref": "#/components/schemas/OrchestrationIntegration" }, "readOnly": true }, "routes": { "type": "integer", "description": "Number of different Service Orchestration being routed to", "readOnly": true }, "created_at": { "type": "string", "format": "date-time", "description": "The date the Orchestration was created at.", "readOnly": true }, "created_by": { "type": "object", "description": "Reference to the user that has created the Orchestration.", "properties": { "id": { "type": "string", "readOnly": true }, "type": { "type": "string", "description": "A string that determines the schema of the object", "readOnly": true }, "self": { "type": "string", "format": "url", "description": "The API show URL at which the object is accessible", "readOnly": true } }, "readOnly": true }, "updated_at": { "type": "string", "format": "date-time", "description": "The date the Orchestration was last updated.", "readOnly": true }, "updated_by": { "type": "object", "description": "Reference to the user that has updated the Orchestration last.", "properties": { "id": { "type": "string", "readOnly": true }, "type": { "type": "string", "description": "A string that determines the schema of the object", "readOnly": true }, "self": { "type": "string", "format": "url", "description": "The API show URL at which the object is accessible", "readOnly": true } }, "readOnly": true }, "version": { "type": "string", "description": "Version of the Orchestration.", "readOnly": true } } }, "OrchestrationCacheVariable": { "type": "object", "properties": { "id": { "type": "string", "readOnly": true }, "name": { "type": "string", "description": "The name of the Cache Variable" }, "configuration": { "oneOf": [ { "type": "object", "description": "Defines how the value of the Cache Variable will be set.\n", "properties": { "type": { "type": "string", "description": "Cache Variable will be set to the most recent value seen, based on the source event field and the extraction regex specified\n", "enum": [ "recent_value" ] }, "source": { "type": "string", "description": "The path to the event field where the regex will be applied to extract a value.", "example": "event.summary" }, "regex": { "type": "string", "description": "A RE2 regular expression. If it contains one or more capture groups, their values will be extracted and appended together. If it contains no capture groups, the whole match is used.\n" } }, "required": [ "type", "source", "regex" ] }, { "type": "object", "description": "Defines how the value of the Cache Variable will be set.\n", "properties": { "type": { "type": "string", "description": "Cache Variable will be set to the number of trigger events that have been seen within the TTL range\n", "enum": [ "trigger_event_count" ] }, "ttl_seconds": { "type": "integer", "description": "The time to live (in seconds) for how long to count trigger events before resetting back to 0.\n" } }, "required": [ "type", "ttl_seconds" ] } ] }, "conditions": { "type": "array", "description": "Each of these conditions is evaluated to check if an event matches this rule. The rule is considered a match if **any** of these conditions match.", "items": { "type": "object", "properties": { "expression": { "type": "string", "example": "event.summary matches part 'my service error'", "description": "A PCL condition string.\n\nNote: The `trigger_count` and `resetting_trigger_count` operators are unsupported for Cache Variables\n" } } } }, "disabled": { "type": "boolean", "description": "Indicates whether the Cache Variable is disabled and would therefore not be evaluated." }, "created_at": { "type": "string", "format": "date-time", "description": "The date/time the object was created.", "readOnly": true }, "created_by": { "type": "object", "description": "Reference to the user that created the object.", "properties": { "id": { "type": "string", "readOnly": true }, "type": { "type": "string", "description": "A string that determines the schema of the object. This must be the standard name for the entity, suffixed by `_reference` if the object is a reference.", "readOnly": true }, "self": { "type": "string", "format": "url", "description": "The API show URL at which the object is accessible", "readOnly": true } }, "readOnly": true }, "updated_at": { "type": "string", "format": "date-time", "description": "The date/time the object was last updated.", "readOnly": true }, "updated_by": { "type": "object", "description": "Reference to the user that last updated the object.", "properties": { "id": { "type": "string", "readOnly": true }, "type": { "type": "string", "description": "A string that determines the schema of the object. This must be the standard name for the entity, suffixed by `_reference` if the object is a reference.", "readOnly": true }, "self": { "type": "string", "format": "url", "description": "The API show URL at which the object is accessible", "readOnly": true } }, "readOnly": true } }, "required": [ "name", "configuration" ] }, "OrchestrationIntegration": { "type": "object", "properties": { "id": { "type": "string", "description": "ID of the Integration.", "readOnly": true }, "label": { "type": "string", "description": "Name of the Integration." }, "parameters": { "type": "object", "readOnly": true, "properties": { "routing_key": { "type": "string", "description": "Routing Key used to send Events to this Orchestration", "readOnly": true }, "type": { "type": "string", "default": "global", "readOnly": true } } } } }, "OrchestrationGlobal": { "allOf": [ { "type": "object", "properties": { "orchestration_path": { "type": "object", "properties": { "type": { "type": "string", "default": "service", "readOnly": true }, "parent": { "type": "object", "properties": { "id": { "type": "string", "description": "ID of the object these Orchestration Rules belongs to.", "readOnly": true }, "type": { "type": "string", "description": "A string that determines the schema of the parent object", "readOnly": true }, "self": { "type": "string", "format": "url", "description": "The API show URL at which the parent object is accessible", "readOnly": true } }, "readOnly": true }, "sets": { "type": "array", "description": "Must contain at least a \"start\" set, but can contain any number of additional sets that are routed to by other rules to form a directional graph of rules.", "items": { "type": "object", "description": "A set of rules", "properties": { "id": { "type": "string", "description": "The ID of this set of rules. Rules in other sets can route events into this set using the \"route_to\" properties.", "default": "start" }, "rules": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "description": "ID of the rule", "readOnly": true }, "label": { "type": "string", "description": "A description of this rule's purpose." }, "conditions": { "type": "array", "description": "Each of these conditions is evaluated to check if an event matches this rule. The rule is considered a match if **any** of these conditions match.", "items": { "type": "object", "properties": { "expression": { "type": "string", "description": "A PCL condition string", "example": "event.summary matches part 'my service error'" } } } }, "actions": { "type": "object", "description": "When an event matches this rule, these are the actions that will be taken to change the resulting alert and incident." }, "disabled": { "type": "boolean", "description": "Indicates whether the rule is disabled and would therefore not be evaluated." } } } } } } }, "catch_all": { "type": "object", "description": "When none of the Rules in a set match an event, we apply the catch_all actions to the event.", "properties": { "actions": { "type": "object", "description": "These are the actions that will be taken to change the resulting alert and incident." } } }, "created_at": { "type": "string", "format": "date-time", "description": "The date/time the object was created.", "readOnly": true }, "created_by": { "type": "object", "description": "Reference to the user that created the object.", "properties": { "id": { "type": "string", "readOnly": true }, "type": { "type": "string", "description": "A string that determines the schema of the object. This must be the standard name for the entity, suffixed by `_reference` if the object is a reference.", "readOnly": true }, "self": { "type": "string", "format": "url", "description": "The API show URL at which the object is accessible", "readOnly": true } }, "readOnly": true }, "updated_at": { "type": "string", "format": "date-time", "description": "The date/time the object was last updated.", "readOnly": true }, "updated_by": { "type": "object", "description": "Reference to the user that last updated the object.", "properties": { "id": { "type": "string", "readOnly": true }, "type": { "type": "string", "description": "A string that determines the schema of the object. This must be the standard name for the entity, suffixed by `_reference` if the object is a reference.", "readOnly": true }, "self": { "type": "string", "format": "url", "description": "The API show URL at which the object is accessible", "readOnly": true } }, "readOnly": true }, "version": { "type": "string", "description": "Version of these Orchestration Rules", "readOnly": true } } } }, "required": [ "orchestration_path" ] }, { "type": "object", "properties": { "orchestration_path": { "properties": { "type": { "description": "Indicates that these are a set of \"global\" rules.", "default": "global" }, "parent": { "properties": { "id": { "description": "ID of the Global Event Orchestration these Global Rules belongs to." }, "type": { "enum": [ "event_orchestration_reference" ] } } }, "sets": { "description": "You must define at least a \"start\" set, but you can also define any number of additional sets that are routed to by other rules to form a directional graph.", "items": { "properties": { "rules": { "items": { "properties": { "actions": { "allOf": [ { "properties": { "route_to": { "type": "string", "description": "The ID of a Set from this Global Orchestration whose rules you also want to use with event that match this rule." } } }, { "$ref": "#/components/schemas/OrchestrationGlobal/allOf/1/properties/orchestration_path/properties/catch_all/properties/actions/allOf/0" }, { "$ref": "#/components/schemas/OrchestrationGlobal/allOf/1/properties/orchestration_path/properties/catch_all/properties/actions/allOf/1" }, { "$ref": "#/components/schemas/OrchestrationUnrouted/allOf/1/properties/orchestration_path/properties/catch_all/properties/actions" }, { "$ref": "#/components/schemas/OrchestrationGlobal/allOf/1/properties/orchestration_path/properties/catch_all/properties/actions/allOf/3" }, { "$ref": "#/components/schemas/OrchestrationGlobal/allOf/1/properties/orchestration_path/properties/catch_all/properties/actions/allOf/4" } ] } } } } } } }, "catch_all": { "description": "When none of the rules match an event, the event will be routed according to the catch_all settings.", "properties": { "actions": { "allOf": [ { "type": "object", "properties": { "suppress": { "type": "boolean", "description": "If true, the resulting alert is suppressed. Suppressed alerts will not trigger an incident." }, "suspend": { "type": "integer", "description": "The number of seconds to suspend the resulting alert before triggering. This effectively pauses incident notifications. If a resolve event arrives before the alert triggers then PagerDuty won't create an incident for this the resulting alert." }, "drop_event": { "type": "boolean", "description": "If true, this event will be dropped. Dropped events will not trigger or resolve an alert or an incident. Dropped events will not be evaluated against router rules." } } }, { "type": "object", "properties": { "priority": { "type": "string", "description": "The ID of the priority you want to set on resulting incident. You can find the list of priority IDs for your account by calling the priorities endpoint.", "example": "P53ZZH5" }, "annotate": { "type": "string", "description": "Add this text as a note on the resulting incident. AIOps users can additionally use the {{event}} variable to include elements of the event payload in the note." } } }, { "$ref": "#/components/schemas/OrchestrationUnrouted/allOf/1/properties/orchestration_path/properties/catch_all/properties/actions" }, { "type": "object", "properties": { "automation_actions": { "type": "array", "description": "Create a Webhoook associated with the resulting incident.", "items": { "type": "object", "properties": { "name": { "type": "string", "description": "The name of the Webhook." }, "url": { "type": "string", "description": "The API endpoint where PagerDuty's servers will send the webhook request." }, "auto_send": { "type": "boolean", "description": "When true, PagerDuty's servers will automatically send this webhook request as soon as the resulting incident is created. When false, your incident responder will be able to manually trigger the Webhook via the PagerDuty website & mobile app.", "default": false }, "headers": { "type": "array", "description": "Specify custom key/value pairs that'll be sent with the webhook request as request headers.", "items": { "type": "object", "properties": { "key": { "type": "string" }, "value": { "type": "string", "description": "AIOps users can additionally use the {{event}} variable to include elements of the event payload in the header value." } } } }, "parameters": { "type": "array", "description": "Specify custom key/value pairs that'll be included in the webhook request's JSON payload.", "items": { "type": "object", "properties": { "key": { "type": "string" }, "value": { "type": "string", "description": "AIOps users can additionally use the {{event}} variable to include elements of the event payload in the parameter value." } } } } } } } } }, { "type": "object", "properties": { "incident_custom_field_updates": { "type": "array", "description": "Configure custom field updates for the incident.", "items": { "type": "object", "properties": { "id": { "type": "string", "description": "Unique identifier for the custom field resource. You can find the list of IDs by calling the List Custom Fields endpoint.", "example": "PEXCK89" }, "value": { "type": "string", "description": "A value that will be used to populate the specified Incident Custom Field. AIOps users can additionally use the {{event}} variable to include elements of the event payload in the custom field value.", "example": "High CPU on server" } } } } } } ] } } } } } }, "example": { "$ref": "#/components/examples/OrchestrationPathGlobalTypeResponse/value" } } ] }, "OrchestrationRouter": { "allOf": [ { "$ref": "#/components/schemas/OrchestrationGlobal/allOf/0" }, { "type": "object", "properties": { "orchestration_path": { "properties": { "type": { "description": "Indicates that these are a \"router\" type set of rules.", "default": "router" }, "parent": { "properties": { "id": { "description": "ID of the Global Event Orchestration this Router belongs to." }, "type": { "enum": [ "event_orchestration_reference" ] } } }, "sets": { "description": "The Router contains a single set of rules (the \"start\" set). The Router evaluates Events against these Rules, one at a time, and routes each Event to a specific Service based on the first rule that matches.", "maxItems": 1, "minItems": 1, "items": { "properties": { "rules": { "items": { "properties": { "actions": { "properties": { "route_to": { "type": "string", "description": "The ID of the target Service for the resulting alert. You can find the service you want to route to by calling the services endpoint.", "example": "PSI2I2O" } } } } } } } } }, "catch_all": { "description": "When none of the rules match an event, the event will be routed according to the catch_all settings.", "properties": { "actions": { "properties": { "route_to": { "description": "With a value of 'unrouted', all events are sent to the Unrouted Orchestration.", "type": "string", "default": "unrouted" } } } } } } } }, "example": { "orchestration_path": { "type": "router", "parent": { "id": "b02e973d-9620-4e0a-9edc-00fedf7d4694", "self": "https://api.pagerduty.com/event_orchestrations/b02e973d-9620-4e0a-9edc-00fedf7d4694", "type": "event_orchestration_reference" }, "self": "https://api.pagerduty.com/event_orchestrations/b02e973d-9620-4e0a-9edc-00fedf7d4694/router", "sets": [ { "id": "start", "rules": [ { "label": "Events relating to our relational database", "id": "1c26698b", "conditions": [ { "expression": "event.summary matches part 'database'" }, { "expression": "event.source matches regex 'db[0-9]+-server'" } ], "actions": { "route_to": "PB31XBA" } }, { "label": "Events relating to our www app server", "id": "d9801904", "conditions": [ { "expression": "event.summary matches part 'www'" } ], "actions": { "route_to": "PC2D9ML" } } ] } ], "catch_all": { "actions": { "route_to": "unrouted" } }, "created_at": "2021-11-18T16:42:01Z", "created_by": { "id": "P8B9WR8", "self": "https://api.pagerduty.com/users/P8B9WR8", "type": "user_reference" }, "updated_at": "2021-11-18T16:42:01Z", "updated_by": { "id": "P8B9WR8", "self": "https://api.pagerduty.com/users/P8B9WR8", "type": "user_reference" }, "version": "9co0z4b152oICsoV91_PW2.ww8ip_xap" } } } ] }, "OrchestrationUnrouted": { "allOf": [ { "$ref": "#/components/schemas/OrchestrationGlobal/allOf/0" }, { "type": "object", "properties": { "orchestration_path": { "properties": { "type": { "description": "Indicates that these are a \"unrouted\" type set of rules.", "default": "unrouted" }, "parent": { "properties": { "id": { "description": "ID of the Global Event Orchestration this Unrouted Orchestration belongs to." }, "type": { "enum": [ "event_orchestration_reference" ] } } }, "sets": { "description": "An Unrouted Orchestration must contain at least a \"start\" set, but can contain any number of additional sets that are routed to by other rules to form a directional graph.", "items": { "properties": { "rules": { "items": { "properties": { "actions": { "allOf": [ { "properties": { "route_to": { "type": "string", "description": "The ID of a Set from this Unrouted Orchestration whose rules you also want to use with event that match this rule." } } }, { "$ref": "#/components/schemas/OrchestrationUnrouted/allOf/1/properties/orchestration_path/properties/catch_all/properties/actions" } ] } } } } } } }, "catch_all": { "properties": { "actions": { "type": "object", "properties": { "severity": { "type": "string", "description": "Set the severity of the resulting alert.", "enum": [ "info", "error", "warning", "critical" ] }, "event_action": { "type": "string", "description": "Set whether the resulting alert status is trigger or resolve.", "enum": [ "trigger", "resolve" ] }, "variables": { "type": "array", "description": "Populate variables from event payloads and use those variables in other event actions.", "items": { "type": "object", "properties": { "name": { "type": "string", "description": "The name of the variable", "example": "server_name" }, "path": { "type": "string", "description": "Path to a field in an event, in dot-notation.", "example": "event.summary" }, "type": { "type": "string", "description": "The type of operation to populate the variable. Currently only Regex-based variable extraction is supported.", "enum": [ "regex" ] }, "value": { "type": "string", "description": "A RE2 regular expression. If it contains one or more capture groups, their values will be extracted and appended together. If it contains no capture groups, the whole match is used.", "example": "High CPU on (.*) server" } } } }, "extractions": { "type": "array", "description": "Dynamically extract values to set and modify new and existing PD-CEF fields.", "items": { "anyOf": [ { "type": "object", "description": "Use a template string & variables", "properties": { "target": { "type": "string", "description": "The PD-CEF field that will be set with the value from the template.", "example": "event.summary" }, "template": { "type": "string", "description": "A value that will be used to populate the target PD-CEF field. You can include variables extracted from the payload by using string interpolation.", "example": "High CPU on {{hostname}} server" } } }, { "type": "object", "description": "Use a regex to extract a value", "properties": { "target": { "type": "string", "description": "The PD-CEF field that will be set with the value from the regex.", "example": "event.custom_details.server" }, "regex": { "type": "string", "description": "A RE2 regular expression. If it contains one or more capture groups, their values will be extracted and appended together. If it contains no capture groups, the whole match is used.", "example": "High CPU on (.*) server" }, "source": { "type": "string", "description": "The path to the event field where the regex will be applied to extract a value.", "example": "event.summary" } } } ] } } } } } } } } }, "example": { "orchestration_path": { "type": "unrouted", "parent": { "id": "b02e973d-9620-4e0a-9edc-00fedf7d4694", "self": "https://api.pagerduty.com/event_orchestrations/b02e973d-9620-4e0a-9edc-00fedf7d4694", "type": "event_orchestration_reference" }, "self": "https://api.pagerduty.com/event_orchestrations/b02e973d-9620-4e0a-9edc-00fedf7d4694/router", "sets": [ { "id": "start", "rules": [ { "label": "Update the summary of un-matched Critical alerts so they're easier to spot", "id": "38880ffb", "conditions": [ { "expression": "event.severity matches 'critical'" } ], "actions": { "extractions": [ { "target": "event.summary", "template": "[Critical Unrouted] {{event.summary}}" } ] } }, { "label": "Reduce the severity of all other unrouted events", "id": "3896801e", "conditions": [], "actions": { "severity": "info" } } ] } ], "catch_all": { "actions": { "suppress": true } }, "created_at": "2021-11-18T16:42:01Z", "created_by": { "id": "P8B9WR8", "self": "https://api.pagerduty.com/users/P8B9WR8", "type": "user_reference" }, "updated_at": "2021-11-18T16:42:01Z", "updated_by": { "id": "P8B9WR8", "self": "https://api.pagerduty.com/users/P8B9WR8", "type": "user_reference" }, "version": "aZO.EEf9zWb9Vg0NYq.Uqad1hOC2Maod" } } } ] }, "ServiceOrchestration": { "allOf": [ { "$ref": "#/components/schemas/OrchestrationGlobal/allOf/0" }, { "type": "object", "properties": { "orchestration_path": { "allOf": [ { "type": "object", "properties": { "migrated_at": { "type": "string", "format": "date-time", "description": "The date/time the service's Event Rules were converted to this Service Orchestration. This property is only included if the `migrated_metadata` query parameter is provided.", "readOnly": true }, "migrated_by": { "type": "object", "description": "Reference to the user that converted the service's Event Rules to this Service Orchestration. This property is only included if the `migrated_metadata` query parameter is provided.", "properties": { "id": { "type": "string", "readOnly": true }, "type": { "type": "string", "description": "A string that determines the schema of the object. This must be the standard name for the entity, suffixed by `_reference` if the object is a reference.", "readOnly": true }, "self": { "type": "string", "format": "url", "description": "The API show URL at which the object is accessible", "readOnly": true } }, "readOnly": true }, "migrated_from": { "type": "object", "description": "Reference to the Service Event Rules that were converted to this Service Orchestration. This property is only included if the `migrated_metadata` query parameter is provided.", "properties": { "id": { "type": "string", "readOnly": true }, "type": { "type": "string", "description": "A string that determines the schema of the object. This must be the standard name for the entity, suffixed by `_reference` if the object is a reference.", "readOnly": true }, "self": { "type": "string", "format": "url", "description": "The API show URL at which the object is accessible", "readOnly": true } }, "readOnly": true }, "migrated_status": { "type": "string", "description": "The status indicating whether the service's Event Rules were successfully converted to this Service Orchestration. This property is only included if the `migrated_metadata` query parameter is provided.", "enum": [ "completed" ], "readOnly": true }, "migrated_via": { "type": "string", "description": "Indicates whether the conversion was performed via the PagerDuty API or PagerDuty website. This property is only included if the `migrated_metadata` query parameter is provided.", "enum": [ "API", "UI" ], "readOnly": true } } }, { "type": "object", "properties": { "type": { "description": "Indicates that these are sets of rules belonging to a service.", "default": "service" }, "parent": { "properties": { "id": { "description": "The ID of the Service this Orchestration belongs to." }, "type": { "enum": [ "service_reference" ] } } }, "sets": { "description": "A Service Orchestration must contain at least a \"start\" set, but can contain any number of additional sets that are routed to by other rules to form a directional graph.", "items": { "properties": { "rules": { "items": { "properties": { "actions": { "allOf": [ { "properties": { "route_to": { "type": "string", "description": "The ID of a Set from this Service Orchestration whose rules you also want to use with event that match this rule." } } }, { "$ref": "#/components/schemas/ServiceOrchestration/allOf/1/properties/orchestration_path/allOf/1/properties/catch_all/properties/actions/allOf/0" }, { "$ref": "#/components/schemas/OrchestrationGlobal/allOf/1/properties/orchestration_path/properties/catch_all/properties/actions/allOf/1" }, { "$ref": "#/components/schemas/OrchestrationUnrouted/allOf/1/properties/orchestration_path/properties/catch_all/properties/actions" }, { "$ref": "#/components/schemas/ServiceOrchestration/allOf/1/properties/orchestration_path/allOf/1/properties/catch_all/properties/actions/allOf/3" }, { "$ref": "#/components/schemas/OrchestrationGlobal/allOf/1/properties/orchestration_path/properties/catch_all/properties/actions/allOf/3" }, { "$ref": "#/components/schemas/OrchestrationGlobal/allOf/1/properties/orchestration_path/properties/catch_all/properties/actions/allOf/4" } ] } } } } } } }, "catch_all": { "properties": { "actions": { "allOf": [ { "type": "object", "properties": { "suppress": { "type": "boolean", "description": "If true, the resulting alert is suppressed. Suppressed alerts will not trigger an incident." }, "suspend": { "type": "integer", "description": "The number of seconds to suspend the resulting alert before triggering. This effectively pauses incident notifications. If a resolve event arrives before the alert triggers then PagerDuty won't create an incident for this the resulting alert." } } }, { "$ref": "#/components/schemas/OrchestrationGlobal/allOf/1/properties/orchestration_path/properties/catch_all/properties/actions/allOf/1" }, { "$ref": "#/components/schemas/OrchestrationUnrouted/allOf/1/properties/orchestration_path/properties/catch_all/properties/actions" }, { "type": "object", "properties": { "pagerduty_automation_actions": { "type": "array", "description": "Configure an Automation Action associated with the resulting incident.", "items": { "type": "object", "properties": { "action_id": { "type": "string", "description": "Automation Action ID" } } } } } }, { "$ref": "#/components/schemas/OrchestrationGlobal/allOf/1/properties/orchestration_path/properties/catch_all/properties/actions/allOf/3" }, { "$ref": "#/components/schemas/OrchestrationGlobal/allOf/1/properties/orchestration_path/properties/catch_all/properties/actions/allOf/4" } ] } } } } } ] } }, "example": { "orchestration_path": { "type": "service", "parent": { "id": "PC2D9ML", "self": "https://api.pagerduty.com/service/PC2D9ML", "type": "service_reference" }, "self": "https://api.pagerduty.com/event_orchestrations/service/PC2D9ML", "sets": [ { "id": "start", "rules": [ { "label": "Always apply some consistent event transformations to all events", "id": "c91f72f3", "conditions": [], "actions": { "variables": [ { "name": "hostname", "path": "event.component", "value": "hostname: (.*)", "type": "regex" } ], "extractions": [ { "template": "{{variables.hostname}}", "target": "event.custom_details.hostname" }, { "source": "event.source", "regex": "www (.*) service", "target": "event.source" } ], "incident_custom_field_updates": [ { "id": "PEXCK89", "value": "#my-team-channel" }, { "id": "PN1C4A2", "value": "{{event.timestamp}}" } ], "route_to": "step-two" } } ] }, { "id": "step-two", "rules": [ { "label": "All critical alerts should be treated as P1 incidents", "id": "7c54529d", "conditions": [ "event.severity matches 'critical'" ], "actions": { "annotate": "Please use our P1 runbook: https://docs.test/p1-runbook", "priority": "P0IN2KQ", "suppress": false, "incident_custom_field_updates": [ { "id": "PEXCK89", "value": "#p1-incident-response" } ] } }, { "label": "If the API endpoints return HTTP 502 run an Automation Action that restarts the service", "id": "8a874630", "conditions": [ "event.custom_details.http_status_code equals '502'" ], "actions": { "pagerduty_automation_actions": [ { "action_id": "01CSB5SMOKCKVRI5GN0LJG7SMB" } ] } }, { "label": "If there's something wrong on the canary let the team know about it in our deployments Slack channel", "id": "1f6d9a33", "conditions": [ "event.custom_details.hostname matches part 'canary'" ], "actions": { "automation_actions": [ { "name": "Canary Slack Notification", "url": "https://our-slack-listerner.test/send-notification", "auto_send": true, "headers": [ { "key": "X-Notification-Source", "value": "PagerDuty Incident Webhook" } ], "parameters": [ { "key": "channel", "value": "#my-team-channel" }, { "key": "message", "value": "Something is wrong with the canary deployment" } ] } ], "incident_custom_field_updates": [ { "id": "PEXCK89", "value": "#my-team-channel" } ] } }, { "label": "Never bother the on-call for info-level events outside of work hours", "id": "cd770384", "conditions": [ "event.severity matches 'info' and not (now in Mon,Tue,Wed,Thu,Fri 09:00:00 to 17:00:00 America/Los_Angeles)" ], "actions": { "suppress": true } } ] } ], "catch_all": { "actions": { "suppress": true, "incident_custom_field_updates": [ { "id": "PEXCK89", "value": "#general-incident-notifications" } ] } }, "created_at": "2021-11-18T16:42:01Z", "created_by": { "id": "P8B9WR8", "self": "https://api.pagerduty.com/users/P8B9WR8", "type": "user_reference" }, "updated_at": "2021-11-18T16:42:01Z", "updated_by": { "id": "P8B9WR8", "self": "https://api.pagerduty.com/users/P8B9WR8", "type": "user_reference" }, "migrated_at": "2023-06-14T13:51:31Z", "migrated_by": { "id": "P8B9WR8", "self": "https://api.pagerduty.com/users/P8B9WR8", "type": "user_reference" }, "migrated_from": { "id": "PC2D9ML", "self": "https://api.pagerduty.com/services/PC2D9ML/rules", "type": "service_event_rules_reference" }, "migrated_status": "completed", "migrated_via": "UI", "version": "rn1Mja13T1HBdmPChqFilSQXUW2fWXM_" } } } ] }, "OrchestrationWarningIneligible": { "type": "object", "description": "This rule is using a feature that is currently unavailable on the current account plan.", "properties": { "message": { "type": "string", "description": "A description of the warning and any potential side effects." }, "rule_id": { "type": "string", "description": "The ID of the rule using the feature." }, "feature": { "type": "string", "description": "The feature that the current account plan does not have access to.\n\nExample values include:\n* `threshold_condition`\n* `nested_rules`\n* `suspend`\n* `automation_actions`\n* `cache_variable:automation_actions`\n* `cache_variable:annotate`\n* `variables`\n* `interpolation:annotate`\n* `interpolation:extractions`\n* `interpolation:incident_custom_field_updates`\n* `suppress`\n* `incident_custom_field_updates`\n" }, "feature_type": { "type": "string", "description": "Specifies whether the feature is a part of the rule's conditions, or its actions.\n\nExample values include:\n* `conditions`\n* `actions`\n* `nested_rules`\n* `global_orchestrations`\n" }, "warning_type": { "type": "string", "description": "The type of warning that is being returned for the rule.", "enum": [ "forbidden_feature" ] } } }, "OrchestrationWarningInvalidData": { "type": "object", "description": "This rule includes invalid data for a feature item.", "properties": { "message": { "type": "string", "description": "A description of the warning and any potential side effects." }, "rule_id": { "type": "string", "description": "The ID of the rule using the feature." }, "feature": { "type": "string", "description": "The feature that includes invalid data.\n\nExample values include:\n * `incident_custom_field_updates`\n * `cache_variable:annotate`\n * `cache_variable:conditions`\n * `cache_variable:automation_actions`\n" }, "feature_type": { "type": "string", "description": "Specifies the feature type of the impacted item.\n\nExample values include:\n * `actions`\n * `conditions`\n" }, "warning_type": { "type": "string", "description": "The type of warning that is being returned for the rule.", "enum": [ "invalid_data" ] } } }, "Template": { "allOf": [ { "$ref": "#/components/schemas/EditableTemplate" }, { "type": "object", "properties": { "id": { "type": "string", "readOnly": true }, "summary": { "type": "string", "nullable": true, "readOnly": true, "description": "A short-form, server-generated string that provides succinct, important information about an object suitable for primary labeling of an entity in a client. In many cases, this will be identical to `name`, though it is not intended to be an identifier." }, "self": { "type": "string", "nullable": true, "readOnly": true, "format": "url", "description": "the API show URL at which the object is accessible" }, "html_url": { "type": "string", "nullable": true, "readOnly": true, "format": "url", "description": "a URL at which the entity is uniquely displayed in the Web app" }, "type": { "type": "string", "enum": [ "template" ] }, "created_by": { "description": "User/Account object reference of the creator", "oneOf": [ { "$ref": "#/components/schemas/UserReference" }, { "allOf": [ { "$ref": "#/components/schemas/Reference" }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "account_reference" ] } } } ] } ] }, "updated_by": { "description": "User/Account object reference of the updator", "oneOf": [ { "$ref": "#/components/schemas/UserReference" }, { "$ref": "#/components/schemas/Template/allOf/1/properties/created_by/oneOf/1" } ] } } } ] }, "RenderedTemplate": { "type": "object", "properties": { "templated_fields": { "type": "object", "properties": { "email_subject": { "type": "string", "description": "The rendered e-mail subject" }, "email_body": { "type": "string", "description": "The rendered e-mail body" }, "message": { "type": "string", "description": "The rendered short message (SMS, Push, Slack, etc)" } } }, "warnings": { "description": "List of render warnings messages for each rendered field.\n(Ex: [\"{{incident.invalid_field}} does not exist.\"])", "type": "object", "properties": { "email_subject": { "type": "array", "description": "List of warnings for email_subject" }, "email_body": { "type": "array", "description": "List of warnings for email_body" }, "message": { "type": "array", "description": "List of warnings for message field" } } }, "errors": { "description": "List of errors", "type": "array", "items": { "type": "string" } } } }, "EditableTemplate": { "type": "object", "properties": { "template_type": { "type": "string", "description": "The type of template (`status_update` is the only supported template at this time)", "enum": [ "status_update" ] }, "name": { "type": "string", "description": "The name of the template" }, "description": { "type": "string", "nullable": true, "description": "Description of the template" }, "templated_fields": { "type": "object", "properties": { "email_subject": { "type": "string", "nullable": true, "description": "The subject of the e-mail" }, "email_body": { "type": "string", "nullable": true, "description": "The HTML body of the e-mail message" }, "message": { "type": "string", "nullable": true, "description": "The short-message of the template (SMS, Push notification, Slack,\netc)" } } } } }, "StatusUpdateTemplateInput": { "type": "object", "properties": { "incident_id": { "type": "string", "description": "The incident id to render the template for" }, "status_update": { "type": "object", "properties": { "message": { "type": "string", "description": "An optional status update message that will be sent to the template" } } }, "external": { "description": "An optional object collection that can be referenced in the template." } } }, "CustomFieldsField": { "allOf": [ { "$ref": "#/components/schemas/CustomFieldsEditableField" }, { "type": "object", "properties": { "id": { "type": "string", "readOnly": true, "description": "The ID of the resource." }, "name": { "$ref": "#/components/schemas/CustomFieldsFieldValue/properties/name" }, "summary": { "type": "string", "nullable": true, "readOnly": true, "description": "A short-form, server-generated string that provides succinct, important information about an object suitable for primary labeling of an entity in a client. In many cases, this will be identical to `name`, though it is not intended to be an identifier." }, "self": { "type": "string", "nullable": true, "readOnly": true, "format": "url", "description": "The API show URL at which the object is accessible" }, "type": { "type": "string", "enum": [ "field" ], "readOnly": true }, "created_at": { "type": "string", "format": "date-time", "description": "The date/time the object was created at.", "readOnly": true }, "updated_at": { "type": "string", "format": "date-time", "description": "The date/time the object was last updated.", "readOnly": true }, "data_type": { "$ref": "#/components/schemas/CustomFieldsFieldValue/properties/data_type" }, "field_type": { "$ref": "#/components/schemas/CustomFieldsFieldValue/properties/field_type" } } } ], "required": [ "id", "summary", "self", "type", "created_at", "updated_at", "data_type", "namespace", "name", "display_name", "field_type" ] }, "CustomFieldsEditableField": { "type": "object", "properties": { "display_name": { "$ref": "#/components/schemas/CustomFieldsFieldValue/properties/display_name" }, "description": { "$ref": "#/components/schemas/CustomFieldsFieldValue/properties/description" }, "default_value": { "oneOf": [ { "$ref": "#/components/schemas/CustomFieldsFieldValue/properties/value/oneOf/0" }, { "$ref": "#/components/schemas/CustomFieldsFieldValue/properties/value/oneOf/2" }, { "$ref": "#/components/schemas/CustomFieldsFieldValue/properties/value/oneOf/1" }, { "$ref": "#/components/schemas/CustomFieldsFieldValue/properties/value/oneOf/3" }, { "$ref": "#/components/schemas/CustomFieldsFieldValue/properties/value/oneOf/4" }, { "$ref": "#/components/schemas/CustomFieldsFieldValue/properties/value/oneOf/5" } ], "nullable": true } } }, "CustomFieldsFieldOption": { "allOf": [ { "$ref": "#/components/schemas/CustomFieldsEditableFieldOption" }, { "type": "object", "required": [ "id", "type", "data", "created_at", "updated_at" ] } ] }, "CustomFieldsEditableFieldOption": { "type": "object", "properties": { "id": { "type": "string", "readOnly": true, "description": "The ID of the resource." }, "type": { "type": "string", "enum": [ "field_option" ] }, "created_at": { "type": "string", "format": "date-time", "description": "The date/time the object was created at.", "readOnly": true }, "updated_at": { "type": "string", "format": "date-time", "description": "The date/time the object was last updated.", "readOnly": true }, "data": { "oneOf": [ { "type": "object", "properties": { "data_type": { "type": "string", "description": "The kind of data represented by this option. Must match the Field's `data_type`.", "enum": [ "string" ] }, "value": { "type": "string", "maxLength": 200 } }, "required": [ "data_type", "value" ] } ], "discriminator": { "propertyName": "data_type", "mapping": { "string": "#/paths/~1incidents~1custom_fields/get/responses/200/content/application~1json/schema/allOf/0/properties/fields/items/allOf/1/properties/field_options/items/allOf/0/properties/data/oneOf/0" } } } }, "required": [ "id", "type", "created_at", "updated_at" ], "description": "" }, "CustomFieldsFieldWithOptions": { "allOf": [ { "$ref": "#/components/schemas/CustomFieldsField" }, { "type": "object", "properties": { "field_options": { "type": "array", "description": "The fixed list of value options that may be stored in this field.", "items": { "$ref": "#/components/schemas/CustomFieldsFieldOption" }, "nullable": true } } } ] }, "CustomFieldsFieldValue": { "type": "object", "properties": { "id": { "type": "string", "description": "Id of the field." }, "name": { "type": "string", "title": "Field Name", "description": "The name of the field. May include ASCII characters, specifically lowercase letters, digits, and underescores. The `name` for a Field must be unique.", "maxLength": 50 }, "type": { "type": "string", "description": "Determines the type of the reference.", "enum": [ "field_value" ] }, "display_name": { "type": "string", "description": "The human-readable name of the field. This must be unique across an account.", "maxLength": 50 }, "field_type": { "type": "string", "description": "The type of data this field contains. In combination with the `data_type` field.", "enum": [ "single_value", "single_value_fixed", "multi_value", "multi_value_fixed" ] }, "data_type": { "type": "string", "description": "The kind of data the custom field is allowed to contain.", "enum": [ "boolean", "integer", "float", "string", "datetime", "url" ] }, "description": { "type": "string", "nullable": true, "description": "A description of the data this field contains.", "maxLength": 1000 }, "value": { "oneOf": [ { "type": "object", "title": "Boolean", "properties": { "value": { "type": "boolean", "nullable": true } } }, { "type": "object", "title": "Float", "properties": { "value": { "type": "number", "nullable": true } } }, { "type": "object", "title": "Integer", "properties": { "value": { "type": "integer", "nullable": true } } }, { "type": "object", "title": "String", "properties": { "value": { "oneOf": [ { "type": "string", "maxLength": 200, "nullable": true }, { "type": "array", "items": { "type": "string", "maxLength": 200 }, "maxItems": 10, "uniqueItems": true, "nullable": true } ] } } }, { "type": "object", "title": "Datetime", "properties": { "value": { "type": "string", "nullable": true, "format": "date-time" } } }, { "type": "object", "title": "Url", "properties": { "value": { "type": "string", "format": "uri", "maxLength": 200, "nullable": true } } } ] } }, "required": [ "id", "type", "name", "value", "display_name", "data_type", "field_type", "description" ] }, "CustomFieldsEditableFieldValue": { "title": "Custom Field Value", "oneOf": [ { "type": "object", "title": "Value by Field Name", "properties": { "name": { "$ref": "#/components/schemas/CustomFieldsFieldValue/properties/name" }, "value": { "oneOf": [ { "$ref": "#/components/schemas/CustomFieldsFieldValue/properties/value/oneOf/0" }, { "$ref": "#/components/schemas/CustomFieldsFieldValue/properties/value/oneOf/1" }, { "$ref": "#/components/schemas/CustomFieldsFieldValue/properties/value/oneOf/2" }, { "$ref": "#/components/schemas/CustomFieldsFieldValue/properties/value/oneOf/3" }, { "$ref": "#/components/schemas/CustomFieldsFieldValue/properties/value/oneOf/4" }, { "$ref": "#/components/schemas/CustomFieldsFieldValue/properties/value/oneOf/5" } ] } } }, { "type": "object", "title": "Value by Field ID", "properties": { "id": { "type": "string", "description": "The ID of the Field." }, "value": { "oneOf": [ { "$ref": "#/components/schemas/CustomFieldsFieldValue/properties/value/oneOf/0" }, { "$ref": "#/components/schemas/CustomFieldsFieldValue/properties/value/oneOf/1" }, { "$ref": "#/components/schemas/CustomFieldsFieldValue/properties/value/oneOf/2" }, { "$ref": "#/components/schemas/CustomFieldsFieldValue/properties/value/oneOf/3" }, { "$ref": "#/components/schemas/CustomFieldsFieldValue/properties/value/oneOf/4" }, { "$ref": "#/components/schemas/CustomFieldsFieldValue/properties/value/oneOf/5" } ] } } } ] }, "StandardApplied": { "title": "StandardApplied", "type": "object", "properties": { "resource_id": { "type": "string" }, "resource_type": { "type": "string", "enum": [ "technical_service" ] }, "score": { "type": "object", "properties": { "passing": { "type": "integer" }, "total": { "type": "integer" } } }, "standards": { "type": "array", "items": { "type": "object", "properties": { "active": { "type": "boolean" }, "description": { "type": "string" }, "id": { "type": "string" }, "name": { "type": "string" }, "type": { "type": "string" }, "pass": { "type": "boolean" } } } } } }, "StandardInclusionExclusion": { "title": "StandardInclusionExclusion", "type": "object", "properties": { "type": { "type": "string", "enum": [ "technical_service_reference" ] }, "id": { "type": "string" } } }, "StatusPage": { "type": "object", "title": "StatusPage", "description": "A Status Page with all the configuration needed to present the system status in a public or private manner.", "properties": { "id": { "type": "string", "description": "An unique identifier within Status Page scope that defines a Status Page entry.", "nullable": false, "readOnly": true }, "name": { "type": "string", "description": "The name of a Status Page to be presented as a brand title (for example, the rendered Status Page HTML header).", "nullable": false, "minLength": 1, "maxLength": 125 }, "published_at": { "type": "string", "description": "The date time moment when a Status Page was published to be publicly available.", "nullable": true, "readOnly": true, "format": "date-time" }, "status_page_type": { "type": "string", "description": "The type of Status Pages to retrieve - public is accessible to everyone on the internet or private requiring some sort of authentication/authorization layer.", "nullable": false, "enum": [ "public", "private" ] }, "url": { "type": "string", "description": "The URL from which the Status Page can be accessed on the internet (either customer's domain or default *.trust.pagerduty.com).", "nullable": false, "format": "url" }, "type": { "type": "string", "description": "A string that determines the schema of the object. This must be the standard name for the entity, suffixed by _reference if the object is a reference." } } }, "StatusPageImpact": { "type": "object", "title": "StatusPageImpact", "description": "A StatusPageImpact resource represents a level of impact for a given Status Page Post.", "properties": { "id": { "type": "string", "description": "An unique identifier within Status Page scope that defines a Impact entry.", "nullable": false, "readOnly": true }, "self": { "type": "string", "description": "The API resource URL of the Impact.", "nullable": false, "readOnly": true }, "description": { "type": "string", "description": "The description is a human-readable text that describes the Impact level.", "nullable": false }, "post_type": { "type": "string", "description": "The type of the Post.", "nullable": false, "enum": [ "incident", "maintenance" ] }, "status_page": { "description": "Status Page", "nullable": false, "properties": { "id": { "description": "Status page unique identifier", "type": "string" }, "type": { "description": "A string that determines the schema of the object.", "type": "string" } }, "required": [ "id" ], "type": "object" }, "type": { "type": "string", "description": "The type of the object returned by the API - in this case, a Status Page Impact." } } }, "StatusPagePost": { "type": "object", "title": "StatusPagePost", "description": "A Post represents a communication resource presented in the Status Page about certain aspects of one or more services associated.", "properties": { "id": { "type": "string", "description": "An unique identifier within Status Page scope that defines a single Post resource.", "nullable": false, "readOnly": true }, "self": { "type": "string", "description": "The API resource URL of the Post.", "nullable": false, "readOnly": true }, "type": { "type": "string", "description": "The type of the object returned by the API - in this case, a Status Page Post.", "nullable": false, "readOnly": true, "default": "status_page_post" }, "post_type": { "type": "string", "description": "The type of the Post.", "nullable": false, "enum": [ "incident", "maintenance" ] }, "status_page": { "description": "Status Page", "nullable": false, "properties": { "id": { "description": "Status page unique identifier", "type": "string" }, "type": { "description": "A string that determines the schema of the object.", "type": "string" } }, "required": [ "id" ], "type": "object" }, "linked_resource": { "description": "Linked resource", "nullable": false, "properties": { "id": { "description": "Linked resource unique identifier", "type": "string" }, "type": { "description": "A string that determines the schema of the object.", "type": "string" } }, "required": [ "id" ], "type": "object" }, "postmortem": { "description": "Postmortem", "nullable": false, "properties": { "id": { "description": "Postmortem unique identifier", "type": "string" }, "type": { "description": "A string that determines the schema of the object.", "type": "string" } }, "required": [ "id" ], "type": "object" }, "title": { "type": "string", "description": "The title given to a Post.", "nullable": false }, "starts_at": { "type": "string", "description": "The date and time the Post intent becomes effective - only for maintenance post type.", "nullable": true, "format": "date-time" }, "ends_at": { "type": "string", "description": "The date and time the Post intent is concluded - only for maintenance post type.", "nullable": true, "format": "date-time" }, "updates": { "type": "array", "description": "List of status_page_post_update references associated to a Post.", "items": { "type": "object", "description": "Post Update associated to a given Post as a referenced or included resource", "nullable": false, "anyOf": [ { "$ref": "#/components/schemas/StatusPagePostUpdate" } ] }, "minItems": 1, "maxItems": 50 } } }, "StatusPagePostPostRequest": { "type": "object", "title": "StatusPagePostRequest", "description": "Request schema for creating/updating a given Status Page Post resource.", "properties": { "type": { "type": "string", "description": "The type of the object returned by the API - in this case, a Status Page Post.", "nullable": false, "enum": [ "status_page_post" ] }, "title": { "type": "string", "description": "The title given to a Post.", "nullable": false, "minLength": 1, "maxLength": 128 }, "post_type": { "type": "string", "description": "The type of the Post.", "nullable": false, "enum": [ "incident", "maintenance" ] }, "starts_at": { "type": "string", "description": "The date and time the Post intent becomes effective - only for maintenance post type.", "nullable": true, "format": "date-time" }, "ends_at": { "type": "string", "description": "The date and time the Post intent is concluded - only for maintenance post type.", "nullable": true, "format": "date-time" }, "updates": { "type": "array", "description": "Post Updates to be associated with a Post", "items": { "$ref": "#/components/schemas/StatusPagePostUpdateRequest" }, "nullable": false, "minItems": 1, "maxItems": 50 }, "status_page": { "description": "Status Page", "nullable": false, "properties": { "id": { "description": "Status page unique identifier", "type": "string" }, "type": { "description": "A string that determines the schema of the object.", "type": "string" } }, "required": [ "id" ], "type": "object" } }, "required": [ "type", "title", "post_type", "starts_at", "ends_at", "updates", "status_page" ] }, "StatusPagePostPutRequest": { "type": "object", "title": "StatusPagePostPutRequest", "description": "Request schema for creating a given Status Page Post resource.", "properties": { "type": { "type": "string", "description": "The type of the object returned by the API - in this case, a Status Page Post.", "nullable": false, "enum": [ "status_page_post" ] }, "title": { "type": "string", "description": "The title given to a Post.", "nullable": false, "minLength": 1, "maxLength": 128 }, "post_type": { "type": "string", "description": "The type of the Post.", "nullable": false, "enum": [ "incident", "maintenance" ] }, "starts_at": { "type": "string", "description": "The date and time the Post intent becomes effective - only for maintenance post type.", "nullable": true, "format": "date-time" }, "ends_at": { "type": "string", "description": "The date and time the Post intent is concluded - only for maintenance post type.", "nullable": true, "format": "date-time" }, "status_page": { "description": "Status Page", "nullable": false, "properties": { "id": { "description": "Status page unique identifier", "type": "string" }, "type": { "description": "A string that determines the schema of the object.", "type": "string" } }, "required": [ "id" ], "type": "object" } }, "required": [ "type", "title", "post_type", "starts_at", "ends_at", "status_page" ] }, "StatusPagePostUpdate": { "type": "object", "title": "StatusPagePostUpdate", "description": "An update for a Post.", "properties": { "id": { "type": "string", "description": "The ID of the Post Update.", "nullable": false, "readOnly": true }, "self": { "type": "string", "description": "The path to which the Post Update resource is accessible.", "nullable": false, "readOnly": true }, "post": { "description": "Status Page Post", "nullable": false, "properties": { "id": { "description": "Status page post unique identifier", "type": "string" }, "type": { "description": "A string that determines the schema of the object.", "type": "string" } }, "required": [ "id" ], "type": "object" }, "message": { "type": "string", "description": "The message of the Post Update.", "nullable": false }, "reviewed_status": { "type": "string", "description": "The status of the Post Updates to retrieve.", "nullable": false, "enum": [ "approved", "not_reviewed" ] }, "status": { "description": "Status Page Status", "nullable": false, "properties": { "id": { "description": "Status page Status unique identifier", "type": "string" }, "type": { "description": "A string that determines the schema of the object.", "type": "string" } }, "required": [ "id" ], "type": "object" }, "severity": { "description": "Status Page Severity", "nullable": false, "properties": { "id": { "description": "Status page Severity unique identifier", "type": "string" }, "type": { "description": "A string that determines the schema of the object.", "type": "string" } }, "required": [ "id" ], "type": "object" }, "impacted_services": { "type": "array", "description": "Impacted services represent the status page services affected by a post update, and its impact.", "items": { "type": "object", "title": "StatusPagePostUpdateImpact", "description": "Status Page Post Update Impact", "properties": { "service": { "description": "Status Page Service", "nullable": false, "properties": { "id": { "type": "string", "description": "An unique identifier within Status Page scope that defines a Service entry.", "nullable": false, "readOnly": true }, "type": { "type": "string", "description": "The type of the object returned by the API - in this case, a Status Page Service." } } }, "impact": { "description": "Status Page Impact", "nullable": false, "properties": { "id": { "type": "string", "description": "An unique identifier within Status Page scope that defines a Status Page Impact entry.", "nullable": false, "readOnly": true }, "type": { "type": "string", "description": "The type of the object returned by the API - in this case, a Status Page Impact." } } } } }, "minItems": 0 }, "update_frequency_ms": { "type": "integer", "description": "The frequency of the next Post Update in milliseconds.", "nullable": true }, "notify_subscribers": { "type": "boolean", "description": "Determines if the subscribers should be notified of the Post Update.", "nullable": false }, "reported_at": { "type": "string", "description": "The date and time the Post Update was reported.", "nullable": true, "format": "date-time" }, "type": { "type": "string", "description": "The type of the object returned by the API - in this case, a Status Page Post Update." } } }, "StatusPagePostUpdateRequest": { "type": "object", "title": "StatusPagePostUpdateRequest", "description": "Attributes for Post Update creation/update", "properties": { "self": { "type": "string", "description": "The path to which the Post Update resource is accessible.", "nullable": false, "readOnly": true }, "post": { "description": "Status Page Post", "nullable": false, "properties": { "id": { "description": "Status page post unique identifier", "type": "string" }, "type": { "description": "A string that determines the schema of the object.", "type": "string" } }, "required": [ "id" ], "type": "object" }, "message": { "type": "string", "description": "The message of the Post Update.", "nullable": false }, "status": { "description": "Status Page Status", "nullable": false, "properties": { "id": { "description": "Status page Status unique identifier", "type": "string" }, "type": { "description": "A string that determines the schema of the object.", "type": "string" } }, "required": [ "id" ], "type": "object" }, "severity": { "description": "Status Page Severity", "nullable": false, "properties": { "id": { "description": "Status page Severity unique identifier", "type": "string" }, "type": { "description": "A string that determines the schema of the object.", "type": "string" } }, "required": [ "id" ], "type": "object" }, "impacted_services": { "type": "array", "description": "Impacted services represent the status page services affected by a post update, and its impact.", "items": { "$ref": "#/components/schemas/StatusPagePostUpdate/properties/impacted_services/items" }, "minItems": 0 }, "update_frequency_ms": { "type": "integer", "description": "The frequency of the next Post Update in milliseconds.", "nullable": true }, "notify_subscribers": { "type": "boolean", "description": "Determines if the subscribers should be notified of the Post Update.", "nullable": false }, "reported_at": { "type": "string", "description": "The date and time the Post Update was reported.", "nullable": true, "format": "date-time" }, "type": { "type": "string", "description": "The type of the object returned by the API - in this case, a Status Page Post Update." } }, "required": [ "type", "message", "status", "severity", "update_frequency_ms", "notify_subscribers", "impacted_services", "post" ] }, "StatusPagePostmortem": { "type": "object", "title": "StatusPagePostmortem", "description": "A Postmortem represents a communication resource presented in the Status Page about follow-up made to a certain Post.", "properties": { "id": { "type": "string", "description": "An unique identifier within Status Page scope that defines a single Postmortem resource.", "nullable": false, "readOnly": true }, "self": { "type": "string", "description": "The API resource URL of the Postmortem.", "nullable": false, "readOnly": true }, "post": { "description": "Status Page Post", "nullable": false, "properties": { "id": { "description": "The id of the status page post.", "type": "string" }, "type": { "description": "A string that determines the schema of the object.", "type": "string" } }, "required": [ "id" ], "type": "object" }, "message": { "type": "string", "description": "The message of the Postmortem (supports Rich-Text).", "nullable": false, "maxLength": 10000 }, "notify_subscribers": { "type": "boolean", "description": "Whether or not subscribers of the Status Page should be notified about the Postmortem.", "nullable": false }, "reported_at": { "type": "string", "description": "The date and time the Postmortem was reported.", "nullable": false, "format": "date-time" }, "type": { "type": "string", "description": "The type of the object returned by the API - in this case, a Status Page Post Postmortem." } } }, "StatusPagePostmortemRequest": { "type": "object", "title": "PostmortemRequest", "description": "Request to create/update a given Postmortem resource.", "properties": { "type": { "type": "string", "description": "The type of the object returned by the API - in this case, a Status Page Post Postmortem.", "nullable": false, "readOnly": true, "enum": [ "status_page_post_postmortem" ], "default": "status_page_post_postmortem" }, "post": { "description": "Status Page Post", "nullable": false, "properties": { "id": { "description": "Status page post unique identifier", "type": "string" }, "type": { "description": "A string that determines the schema of the object.", "type": "string" } }, "required": [ "id" ], "type": "object" }, "message": { "type": "string", "description": "The message of the Postmortem (supports Rich-Text).", "nullable": false, "maxLength": 10000 }, "notify_subscribers": { "type": "boolean", "description": "Whether or not subscribers of the Status Page should be notified about the Postmortem.", "nullable": false } }, "required": [ "type", "message", "post", "notify_subscribers" ] }, "StatusPageService": { "type": "object", "title": "StatusPageService", "description": "A Service represents a PagerDuty service that is linked to a Status Page.", "properties": { "id": { "description": "An unique identifier within Status Page scope that defines a Service entry.", "type": "string", "nullable": false, "readOnly": true }, "self": { "type": "string", "description": "The API resource URL of the Service.", "nullable": false, "readOnly": true }, "name": { "type": "string", "description": "The name of the Service.", "nullable": false }, "status_page": { "description": "Status Page", "nullable": false, "properties": { "id": { "description": "Status page unique identifier", "type": "string" }, "type": { "description": "A string that determines the schema of the object.", "type": "string" } }, "required": [ "id" ], "type": "object" }, "business_service": { "description": "Business Service", "nullable": false, "properties": { "id": { "description": "Business Service unique identifier", "type": "string" }, "type": { "description": "A string that determines the schema of the object.", "type": "string" } }, "required": [ "id" ] }, "type": { "type": "string", "description": "A string that determines the schema of the object." } } }, "StatusPageSeverity": { "type": "object", "title": "StatusPageSeverity", "description": "A Severity represents a level of impact for a given Status Page post.", "properties": { "id": { "type": "string", "description": "An unique identifier within Status Page scope that defines a Severity entry.", "nullable": false, "readOnly": true }, "self": { "type": "string", "description": "The API resource URL of the Severity.", "nullable": false, "readOnly": true }, "description": { "type": "string", "description": "The description is a human-readable text that describes the Severity level.", "nullable": false }, "post_type": { "type": "string", "description": "The type of the Post.", "nullable": false, "enum": [ "incident", "maintenance" ] }, "status_page": { "description": "Status Page", "nullable": false, "properties": { "id": { "description": "Status page unique identifier", "type": "string" }, "type": { "description": "A string that determines the schema of the object.", "type": "string" } }, "required": [ "id" ], "type": "object" }, "type": { "type": "string", "description": "The type of the object returned by the API - in this case, a Status Page Severity." } } }, "StatusPageSubscription": { "type": "object", "title": "StatusPageSubscription", "description": "A StatusPageSubscription resource represents a subscription to a specific status page entity.", "properties": { "channel": { "description": "The channel of the subscription.", "enum": [ "webhook", "email", "slack" ], "nullable": false, "title": "SubscriptionChannel", "type": "string" }, "contact": { "description": "The subscriber's contact - email address, webhook URL, etc...", "type": "string" }, "id": { "description": "The ID of the Subscription.", "type": "string" }, "self": { "description": "The path in which the Subscription resource is accessible.", "type": "string" }, "status": { "description": "The status of the Subscription.", "enum": [ "active", "pending" ], "nullable": false, "title": "SubscriptionStatus", "type": "string" }, "status_page": { "description": "Status Page", "nullable": false, "properties": { "id": { "description": "Status page unique identifier", "type": "string" }, "type": { "description": "A string that determines the schema of the object.", "type": "string" } }, "required": [ "id" ], "type": "object" }, "subscribable_object": { "description": "The subscribed entity for a given subscription.", "properties": { "id": { "description": "The ID of the subscribed entity.", "type": "string" }, "type": { "description": "The type of the subscribed entity.", "enum": [ "status_page", "status_page_service", "status_page_post" ], "type": "string" } }, "title": "SubscribableObject", "type": "object" }, "type": { "description": "A string that determines the schema of the object.", "type": "string" } } }, "StatusPageStatus": { "type": "object", "title": "StatusPageStatus", "description": "A Status represents a level of undergoing work and/or assessment for a given Status Page post.", "properties": { "id": { "type": "string", "description": "An unique identifier within Status Page scope that defines a Status entry.", "nullable": false, "readOnly": true }, "self": { "type": "string", "description": "The API resource URL of the Status.", "nullable": false, "readOnly": true }, "description": { "type": "string", "description": "The description is a human-readable text that describes the Status level.", "nullable": false }, "post_type": { "type": "string", "description": "The type of the Post.", "nullable": false, "enum": [ "incident", "maintenance" ] }, "status_page": { "description": "Status Page", "nullable": false, "properties": { "id": { "description": "Status page unique identifier", "type": "string" }, "type": { "description": "A string that determines the schema of the object.", "type": "string" } }, "required": [ "id" ], "type": "object" }, "type": { "type": "string", "description": "The type of the object returned by the API - in this case, a Status Page Status." } } } } }, "paths": { "/{entity_type}/{id}/change_tags": { "post": { "x-pd-requires-scope": "tags.write", "tags": [ "Tags" ], "operationId": "createEntityTypeByIdChangeTags", "description": "Assign existing or new tags.\n\nA Tag is applied to Escalation Policies, Teams or Users and can be used to filter them.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#tags)\n\nScoped OAuth requires: `tags.write`\n", "summary": "Assign tags", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/entity_type" }, { "$ref": "#/components/parameters/id" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "description": "Tags to add to or remove from the entity.", "properties": { "add": { "type": "array", "description": "Array of tags and/or tag references to add to the entity.\nFor elements with type `tag_reference`, the tag with the corresponding `id` is added to the entity.\nFor elements with type `tag`, if there is an existing tag with the given\nlabel that tag is added to the entity. If there is no existing tag with that label and the user has permission\nto create tags, a new tag is created with that label and assigned to the entity.\n", "items": { "title": "Tags to add", "type": "object", "properties": { "type": { "type": "string", "enum": [ "tag", "tag_reference" ] }, "label": { "type": "string", "description": "The label of the tag. Should be used when type is \"tag\".", "maxLength": 191 }, "id": { "type": "string", "description": "The id of the tag. Should be used when type is \"tag_reference\".", "readOnly": true } }, "required": [ "type" ] } }, "remove": { "type": "array", "description": "Array of tag references to remove from the entity.", "items": { "title": "Tags to remove.", "type": "object", "properties": { "type": { "type": "string", "enum": [ "tag_reference" ] }, "id": { "type": "string", "description": "The id of the tag", "readOnly": true } }, "required": [ "type", "id" ] } } } }, "examples": { "tags": { "summary": "Request Example", "value": { "add": [ { "type": "tag", "label": "Batman" }, { "type": "tag_reference", "id": "P5IYCNZ" } ], "remove": [ { "type": "tag_reference", "id": "POE7RY8" }, { "type": "tag_reference", "id": "PG68P1M" } ] } } } } } }, "responses": { "200": { "description": "The tags were added and/or removed.", "content": { "application/json": { "schema": { "type": "object" }, "examples": { "response": { "summary": "Request Example", "value": { "add": [ { "type": "tag", "label": "Batman" }, { "type": "tag_reference", "id": "P5IYCNZ" } ], "remove": [ { "type": "tag_reference", "id": "POE7RY8" }, { "type": "tag_reference", "id": "PG68P1M" } ] } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } } }, "/{entity_type}/{id}/tags": { "get": { "x-pd-requires-scope": "tags.read", "tags": [ "Tags" ], "operationId": "getEntityTypeByIdTags", "description": "Get related tags for Users, Teams or Escalation Policies.\n\nA Tag is applied to Escalation Policies, Teams or Users and can be used to filter them.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#tags)\n\nScoped OAuth requires: `tags.read`\n", "summary": "Get tags for entities", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/offset_limit" }, { "$ref": "#/components/parameters/offset_offset" }, { "$ref": "#/components/parameters/offset_total" }, { "$ref": "#/components/parameters/entity_type" }, { "$ref": "#/components/parameters/id" } ], "responses": { "200": { "description": "An array of tags.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/Pagination" }, { "type": "object", "properties": { "tags": { "type": "array", "items": { "$ref": "#/components/schemas/Tag" } } }, "required": [ "tags" ] } ] }, "examples": { "response": { "summary": "Response Example", "value": { "tags": [ { "type": "tag", "summary": "Batman", "self": "https://api.pagerduty.com/tags/P5IYCNZ", "label": "Batman", "id": "P5IYCNZ", "html_url": null } ], "limit": 100, "offset": 0, "total": 1, "more": false } } } } } }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } } }, "/abilities": { "description": "List your account's abilities.", "get": { "x-pd-requires-scope": "abilities.read", "tags": [ "Abilities" ], "operationId": "listAbilities", "description": "List all of your account's abilities, by name.\n\n\"Abilities\" describes your account's capabilities by feature name. For example `\"teams\"`.\n\nAn ability may be available to your account based on things like your pricing plan or account state.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#abilities)\n\nScoped OAuth requires: `abilities.read`\n", "summary": "List abilities", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" } ], "responses": { "200": { "description": "An array of ability names.", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "properties": { "abilities": { "type": "array", "description": "The set of abilities your account has.", "items": { "type": "string", "description": "A single ability, as a name.", "readOnly": true } } }, "required": [ "abilities" ] } ] }, "examples": { "response": { "summary": "Example Response", "value": { "abilities": [ "teams", "read_only_users", "service_support_hours", "urgencies" ] } } } } } }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } } }, "/abilities/{id}": { "description": "Get an ability.", "get": { "x-pd-requires-scope": "abilities.read", "tags": [ "Abilities" ], "operationId": "getAbility", "description": "Test whether your account has a given ability.\n\n\"Abilities\" describes your account's capabilities by feature name. For example `\"teams\"`.\n\nAn ability may be available to your account based on things like your pricing plan or account state.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#abilities)\n\nScoped OAuth requires: `abilities.read`\n", "summary": "Test an ability", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" } ], "responses": { "204": { "description": "The account has the requested ability." }, "401": { "$ref": "#/components/responses/Unauthorized" }, "402": { "$ref": "#/components/responses/PaymentRequired" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } } }, "/addons": { "description": "List and add Add-ons to your account.", "get": { "x-pd-requires-scope": "addons.read", "tags": [ "Add-ons" ], "operationId": "listAddon", "description": "List all of the Add-ons installed on your account.\n\nAddon's are pieces of functionality that developers can write to insert new functionality into PagerDuty's UI.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#add-ons)\n\nScoped OAuth requires: `addons.read`\n", "summary": "List installed Add-ons", "parameters": [ { "$ref": "#/components/parameters/offset_limit" }, { "$ref": "#/components/parameters/offset_offset" }, { "$ref": "#/components/parameters/offset_total" }, { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/include_addon" }, { "$ref": "#/components/parameters/addon_services" }, { "$ref": "#/components/parameters/addon_filter" } ], "responses": { "200": { "description": "A paginated array of installed Add-ons.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/Pagination" }, { "type": "object", "properties": { "addons": { "type": "array", "items": { "$ref": "#/components/schemas/AddonReference" } } }, "required": [ "addons" ] } ] }, "examples": { "response": { "summary": "Example Response", "value": { "addons": [ { "id": "PKX7619", "type": "full_page_addon_reference", "summary": "Internal Status Page", "self": "https://api.pagerduty.com/addons/PKX7619", "html_url": null, "name": "Internal Status Page", "src": "https://intranet.example.com/status" } ], "limit": 25, "offset": 0, "more": false, "total": null } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } }, "post": { "x-pd-requires-scope": "addons.write", "tags": [ "Add-ons" ], "operationId": "createAddon", "description": "Install an Add-on for your account.\n\nAddon's are pieces of functionality that developers can write to insert new functionality into PagerDuty's UI.\n\nGiven a configuration containing a `src` parameter, that URL will be embedded in an `iframe` on a page that's available to users from a drop-down menu.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#add-ons)\n\nScoped OAuth requires: `addons.write`\n", "summary": "Install an Add-on", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "addon": { "$ref": "#/components/schemas/Addon" } }, "required": [ "addon" ] }, "examples": { "request": { "summary": "Request Example", "value": { "addon": { "type": "full_page_addon", "name": "Internal Status Page", "src": "https://intranet.example.com/status" } } } } } }, "description": "The Add-on to be installed." }, "responses": { "201": { "description": "The Add-on that was installed.", "content": { "application/json": { "schema": { "type": "object", "properties": { "addon": { "$ref": "#/components/schemas/AddonReference" } }, "required": [ "addon" ] }, "examples": { "response": { "summary": "Response Example", "value": { "addon": { "id": "PKX7619", "type": "full_page_addon_reference", "summary": "Internal Status Page", "self": "https://api.pagerduty.com/addons/PKX7619", "html_url": null, "name": "Internal Status Page", "src": "https://intranet.example.com/status" } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } } }, "/addons/{id}": { "description": "Perform actions on the specified Add-on.", "get": { "x-pd-requires-scope": "addons.read", "tags": [ "Add-ons" ], "operationId": "getAddon", "description": "Get details about an existing Add-on.\n\nAddon's are pieces of functionality that developers can write to insert new functionality into PagerDuty's UI.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#add-ons)\n\nScoped OAuth requires: `addons.read`\n", "summary": "Get an Add-on", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" } ], "responses": { "200": { "description": "The requested Add-on.", "content": { "application/json": { "schema": { "type": "object", "properties": { "addon": { "$ref": "#/components/schemas/Addon" } }, "required": [ "addon" ] }, "examples": { "response": { "summary": "Example Response", "value": { "addon": { "id": "PKX7F81", "type": "incident_show_addon", "name": "Service Runbook", "src": "https://intranet.example.com/runbook.html", "services": [ { "id": "PIJ90N7", "type": "service", "summary": "My Application Service", "self": "https://api.pagerduty.com/services/PIJ90N7", "html_url": "https://subdomain.pagerduty.com/service-directory/PIJ90N7" } ] } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } }, "delete": { "x-pd-requires-scope": "addons.write", "tags": [ "Add-ons" ], "operationId": "deleteAddon", "description": "Remove an existing Add-on.\n\nAddon's are pieces of functionality that developers can write to insert new functionality into PagerDuty's UI.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#add-ons)\n\nScoped OAuth requires: `addons.write`\n", "summary": "Delete an Add-on", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" } ], "responses": { "204": { "description": "The Add-on was deleted successfully." }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } }, "put": { "x-pd-requires-scope": "addons.write", "tags": [ "Add-ons" ], "operationId": "updateAddon", "description": "Update an existing Add-on.\n\nAddon's are pieces of functionality that developers can write to insert new functionality into PagerDuty's UI.\n\nGiven a configuration containing a `src` parameter, that URL will be embedded in an `iframe` on a page that's available to users from a drop-down menu.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#add-ons)\n\nScoped OAuth requires: `addons.write`\n", "summary": "Update an Add-on", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "addon": { "$ref": "#/components/schemas/Addon" } }, "required": [ "addon" ] }, "examples": { "request": { "summary": "Request Example", "value": { "addon": { "type": "full_page_addon", "name": "Internal Status Page", "src": "https://intranet.example.com/status" } } } } } }, "description": "The Add-on to be updated." }, "responses": { "200": { "description": "The Add-on that was updated.", "content": { "application/json": { "schema": { "type": "object", "properties": { "addon": { "$ref": "#/components/schemas/Addon" } }, "required": [ "addon" ] }, "examples": { "response": { "summary": "Response Example", "value": { "addon": { "id": "PKX7F81", "type": "incident_show_addon", "name": "Service Runbook", "src": "https://intranet.example.com/runbook.html", "services": [ { "id": "PIJ90N7", "type": "service", "summary": "My Application Service", "self": "https://api.pagerduty.com/services/PIJ90N7", "html_url": "https://subdomain.pagerduty.com/service-directory/PIJ90N7" } ] } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } } }, "/alert_grouping_settings": { "description": "List", "get": { "x-pd-requires-scope": "services.read", "tags": [ "Alert Grouping Settings" ], "operationId": "listAlertGroupingSettings", "description": "List all of your alert grouping settings including both single service settings and global content based settings.\n\nThe settings part of Alert Grouper service allows us to create Alert Grouping Settings and configs that are required to be used during grouping of the alerts.\n\nScoped OAuth requires: `services.read`\n", "summary": "List alert grouping settings", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/offset_after" }, { "$ref": "#/components/parameters/offset_before" }, { "$ref": "#/components/parameters/offset_total" }, { "$ref": "#/components/parameters/offset_limit" }, { "$ref": "#/components/parameters/services" } ], "responses": { "200": { "description": "An array of alert grouping settings.", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "properties": { "alert_grouping_settings": { "type": "array", "description": "The list of alert grouping settings your account has.", "items": { "$ref": "#/components/schemas/AlertGroupingSetting" } } }, "required": [ "alert_grouping_settings" ] } ] }, "examples": { "response": { "summary": "Response Example", "value": { "alert_grouping_settings": [ { "id": "PJWA06X", "name": "Example of Alert Grouping Setting", "description": "This is an example of list of Alert Grouping Settings", "type": "content_based", "config": { "time_window": 86400, "aggregate": "all", "fields": [ "summary", "component", "custom_details.host", "custom_details.field1.field2" ] }, "services": [ { "id": "P0KJZ0A", "name": "Payment Service" }, { "id": "PA15YRT", "name": "Checkout Service" } ], "created_at": "2022-12-13T19:55:01.171Z", "updated_at": "2023-08-24T18:29:35.630Z" } ], "after": "g3QAAAACZAACaWRhB2QAC2luc2VydGVkX2F0dAAAAAlkAApfX3N0cnVjdF9fZAAURWxpeGlyLk5haXZlRGF0ZVRpbWVkAAhjYWxlbmRhcmQAE0VsaXhpci5DYWxlbmRhci5JU09kAANkYXlhA2QABGhvdXJhFGQAC21pY3Jvc2Vjb25kaAJiAAL81WEGZAAGbWludXRlYR5kAAVtb250aGEIZAAGc2Vjb25kYR5kAAR5ZWFyYgAAB", "before": "g3QAAAACZAACaWRhCGQAC2luc2VydGVkX2F0dAAAAAlkAApfX3N0cnVjdF9fZAAURWxpeGlyLk5haXZlRGF0ZVRpbWVkAAhjYWxlbmRhcmQAE0VsaXhpci5DYWxlbmRhci5JU09kAANkYXlhA2QABGhvdXJhFGQAC21pY3Jvc2Vjb25kaAJiAANYzWEGZAAGbWludXRlYR5kAAVtb250aGEIZAAGc2Vjb25kYR5kAAR5ZWFyYgAAB", "limit": 25, "total": null } } } } } }, "401": { "$ref": "#/components/responses/Unauthorized" } } }, "post": { "x-pd-requires-scope": "services.write", "tags": [ "Alert Grouping Settings" ], "operationId": "postAlertGroupingSettings", "description": "Create a new Alert Grouping Setting.\n\nThe settings part of Alert Grouper service allows us to create Alert Grouping Settings and configs that are required to be used during grouping of the alerts.\n\nThis endpoint will be used to create an instance of AlertGroupingSettings for either one service or many services that are in the alert group setting.\n\nScoped OAuth requires: `services.write`\n", "summary": "Create an Alert Grouping Setting", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "alert_grouping_setting": { "$ref": "#/components/schemas/AlertGroupingSetting" } }, "required": [ "alert_grouping_setting" ] }, "examples": { "request": { "summary": "Request Example", "value": { "alert_grouping_setting": { "id": "PZC4OM1", "name": "Example of Alert Grouping Setting", "description": "This Alert Grouping Setting is an example", "type": "content_based", "config": { "time_window": 900, "aggregate": "all", "fields": [ "summary", "component", "custom_details.host", "custom_details.field1.field2" ] }, "services": [ { "id": "P0KJZ0A" }, { "id": "PA15YRT" } ] } } } } } } }, "responses": { "201": { "description": "The new Alert Grouping Setting.", "content": { "application/json": { "schema": { "type": "object", "properties": { "alert_grouping_setting": { "$ref": "#/components/schemas/AlertGroupingSetting" } }, "required": [ "alert_grouping_setting" ] }, "examples": { "response": { "summary": "Response Example", "value": { "alert_grouping_setting": { "id": "PZC4OM1", "name": "Example of Alert Grouping Setting", "description": "This Alert Grouping Setting is an example", "type": "content_based", "config": { "time_window": 900, "aggregate": "all", "fields": [ "summary", "component", "custom_details.host", "custom_details.field1.field2" ] }, "services": [ { "id": "P0KJZ0A", "name": "Payment Service" }, { "id": "PA15YRT", "name": "Checkout Service" } ], "created_at": "2022-12-13T19:55:01.171Z", "updated_at": "2023-08-24T18:29:35.630Z" } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" } } } }, "/alert_grouping_settings/{id}": { "description": "Retrieve, modify, or delete Alert Grouping Settings", "get": { "x-pd-requires-scope": "services.read", "tags": [ "Alert Grouping Settings" ], "operationId": "getAlertGroupingSetting", "description": "Get an existing Alert Grouping Setting.\n\nThe settings part of Alert Grouper service allows us to create Alert Grouping Settings and configs that are required to be used during grouping of the alerts.\n\nScoped OAuth requires: `services.read`\n", "summary": "Get an Alert Grouping Setting", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" } ], "responses": { "200": { "description": "The Alert Grouping Setting.", "content": { "application/json": { "schema": { "type": "object", "properties": { "alert_grouping_setting": { "$ref": "#/components/schemas/AlertGroupingSetting" } }, "required": [ "alert_grouping_setting" ] }, "examples": { "response": { "summary": "Response Example", "value": { "alert_grouping_setting": { "id": "PZC4OM1", "name": "Example of Alert Grouping Setting", "description": "This Alert Grouping Setting is an example", "type": "content_based", "config": { "time_window": 900, "aggregate": "all", "fields": [ "summary", "component", "custom_details.host", "custom_details.field1.field2" ] }, "services": [ { "id": "P0KJZ0A", "name": "Payment Service" }, { "id": "PA15YRT", "name": "Checkout Service" } ], "created_at": "2022-12-13T19:55:01.171Z", "updated_at": "2023-08-24T18:29:35.630Z" } } } } } } }, "401": { "$ref": "#/components/responses/Unauthorized" }, "404": { "$ref": "#/components/responses/NotFound" } } }, "delete": { "x-pd-requires-scope": "services.write", "tags": [ "Alert Grouping Settings" ], "operationId": "deleteAlertGroupingSetting", "description": "Delete an existing Alert Grouping Setting.\n\nThe settings part of Alert Grouper service allows us to create Alert Grouping Settings and configs that are required to be used during grouping of the alerts.\n\nScoped OAuth requires: `services.write`\n", "summary": "Delete an Alert Grouping Setting", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" } ], "responses": { "204": { "description": "The Alert Grouping Setting was deleted successfully." }, "401": { "$ref": "#/components/responses/Unauthorized" }, "404": { "$ref": "#/components/responses/NotFound" } } }, "put": { "x-pd-requires-scope": "services.write", "tags": [ "Alert Grouping Settings" ], "operationId": "putAlertGroupingSetting", "description": "Update an Alert Grouping Setting.\n\nThe settings part of Alert Grouper service allows us to create Alert Grouping Settings and configs that are required to be used during grouping of the alerts.\n\nif `services` are not provided in the request, then the existing services will not be removed from the setting.\n\nScoped OAuth requires: `services.write`\n", "summary": "Update an Alert Grouping Setting", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "alert_grouping_setting": { "$ref": "#/components/schemas/AlertGroupingSetting" } }, "required": [ "alert_grouping_setting" ] }, "examples": { "request": { "summary": "Request Example", "value": { "alert_grouping_setting": { "id": "PZC4OM1", "name": "Example of Alert Grouping Setting", "description": "This Alert Grouping Setting is an example", "type": "content_based", "config": { "time_window": 900, "aggregate": "all", "fields": [ "summary", "component", "custom_details.host", "custom_details.field1.field2" ] }, "services": [ { "id": "P0KJZ0A" }, { "id": "PA15YRT" } ] } } } } } } }, "responses": { "200": { "description": "The updated Alert Grouping Setting.", "content": { "application/json": { "schema": { "type": "object", "properties": { "alert_grouping_setting": { "$ref": "#/components/schemas/AlertGroupingSetting" } }, "required": [ "alert_grouping_setting" ] }, "examples": { "response": { "summary": "Response Example", "value": { "alert_grouping_setting": { "id": "PZC4OM1", "name": "Example of Alert Grouping Setting", "description": "This Alert Grouping Setting is an example", "type": "content_based", "config": { "time_window": 900, "aggregate": "all", "fields": [ "summary", "component", "custom_details.host", "custom_details.field1.field2" ] }, "services": [ { "id": "P0KJZ0A", "name": "Payment Service" }, { "id": "PA15YRT", "name": "Checkout Service" } ], "created_at": "2022-12-13T19:55:01.171Z", "updated_at": "2023-08-24T18:29:35.630Z" } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "404": { "$ref": "#/components/responses/NotFound" } } } }, "/analytics/metrics/incidents/all": { "post": { "x-pd-requires-scope": "analytics.read", "summary": "Get aggregated incident data", "operationId": "getAnalyticsMetricsIncidentsAll", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "properties": { "data": { "type": "array", "items": { "title": "Analytics Incident Metrics", "type": "object", "properties": { "mean_assignment_count": { "type": "integer", "description": "Mean count of instances where responders were assigned an incident (including through reassignment or escalation) or accepted a responder request." }, "mean_engaged_seconds": { "type": "integer", "description": "Mean engaged time across all responders.\nEngaged time is measured from the time a user engages with an incident (by\nacknowledging or accepting a responder request) until the incident is resolved.\nThis may include periods in which the incidents were snoozed." }, "mean_engaged_user_count": { "type": "integer", "description": "Mean number of users who engaged with an incident. *Engaged* is defined as\nacknowledging an incident or accepting a responder request in it." }, "mean_seconds_to_engage": { "type": "integer", "description": "A measure of *people response time*. This metric measures the time from\nthe first user engagement (acknowledge or responder accept) to the last.\nThis metric is only used for incidents with **multiple responders**;\nfor incidents with one or no engaged users, this value is null." }, "mean_seconds_to_first_ack": { "type": "integer", "description": "Mean time between the start of an incident, and the first responder to acknowledge." }, "mean_seconds_to_mobilize": { "type": "integer", "description": "Mean time between the start of an incident, and the last additional responder\nto acknowledge. For incidents with one or no engaged users, this value is null." }, "mean_seconds_to_resolve": { "type": "integer", "description": "Mean time from when an incident was triggered until it was resolved." }, "mean_user_defined_engaged_seconds": { "type": "integer", "description": "Mean engaged time across all responders. Engaged time is measured from the time \na user engages with an incident (by acknowledging or accepting a responder request) \nuntil the incident is resolved. This may include periods in which the incidents were snoozed.\nThis metric uses the incident response effort values that \n[users have defined](https://support.pagerduty.com/docs/edit-incidents#edit-incident-duration),\nif they exist." }, "p50_seconds_to_first_ack": { "type": "integer", "description": "Median time between the start of an incident, and the first responder to acknowledge." }, "p50_seconds_to_resolve": { "type": "integer", "description": "Median time from when an incident was triggered until it was resolved." }, "p75_seconds_to_first_ack": { "type": "integer", "description": "75th percentile for the time between the start of an incident, and the first responder to acknowledge." }, "p75_seconds_to_resolve": { "type": "integer", "description": "75th percentile for the time when an incident was triggered until it was resolved." }, "p90_seconds_to_first_ack": { "type": "integer", "description": "90th percentile for the time between the start of an incident, and the first responder to acknowledge." }, "p90_seconds_to_resolve": { "type": "integer", "description": "90th percentile for the time when an incident was triggered until it was resolved." }, "p95_seconds_to_first_ack": { "type": "integer", "description": "95th percentile for the time between the start of an incident, and the first responder to acknowledge." }, "p95_seconds_to_resolve": { "type": "integer", "description": "95th percentile for the time when an incident was triggered until it was resolved." }, "range_start": { "type": "string", "description": "Start of the date range for which the metrics were calculated. Only included when an aggregate unit is specified in the request." }, "service_id": { "type": "string", "description": "ID of the service. Only included when aggregating by service. Not included when aggregating by all." }, "service_name": { "type": "string", "description": "Name of the service. Only included when aggregating by service. Not included when aggregating by all." }, "team_id": { "type": "string", "description": "ID of the team to which the incident was assigned. Not included when aggregating by all." }, "team_name": { "type": "string", "description": "Name of the team to which the incident was assigned. Not included when aggregating by all." }, "total_business_hour_interruptions": { "type": "integer", "description": "Total number of unique interruptions during business hours; 8am-6pm Mon-Fri, based on the user’s time zone." }, "total_engaged_seconds": { "type": "integer", "description": "Total engaged time across all responders. Engaged time is measured from\nthe time a user engages with an incident (by acknowledging or accepting a responder request)\nuntil the incident is resolved. This may include periods in which the incidents were snoozed." }, "total_escalation_count": { "type": "integer", "description": "Total count of instances where an incident is escalated between responders\nassigned to an escalation policy." }, "total_incident_count": { "type": "integer", "description": "The total number of incidents that were created." }, "total_incidents_acknowledged": { "type": "integer", "description": "The total count of assigned incidents acknowledged. \nOnly explicit incident acknowledgment counts; reassign, resolve, and escalation actions do not imply acknowledgement." }, "total_incidents_auto_resolved": { "description": "The total count of incidents that were resolved automatically. \nThis count includes incidents resolved via an integration and those that were [auto-resolved in PagerDuty](https://support.pagerduty.com/docs/configurable-service-settings#auto-resolution)." }, "total_incidents_manual_escalated": { "type": "integer", "description": "The total count of incidents that were manually escalated." }, "total_incidents_reassigned": { "type": "integer", "description": "The total count of incidents that were reassigned." }, "total_incidents_timeout_escalated": { "type": "integer", "description": "The total count of incidents that were escalated due to timeouts." }, "total_interruptions": { "type": "integer", "description": "Total number of unique interruptions." }, "total_notifications": { "type": "integer", "description": "The total count of incident notifications sent via email, SMS, phone call and push." }, "total_off_hour_interruptions": { "type": "integer", "description": "Total number of unique interruptions during off hours; 6pm-10pm Mon-Fri and all day Sat-Sun, based on the user’s time zone." }, "total_sleep_hour_interruptions": { "type": "integer", "description": "Total number of unique interruptions during sleep hours.\nSleep hours: 10pm-8am every day, based on the user’s time zone." }, "total_snoozed_seconds": { "type": "integer", "description": "Total number of seconds incidents were snoozed." }, "total_user_defined_engaged_seconds": { "type": "integer", "description": "Total engaged time across all responders. Engaged time is measured from\nthe time a user engages with an incident (by acknowledging or accepting a responder request)\nuntil the incident is resolved. This may include periods in which the incidents were snoozed.\nThis metric uses the edited incident response effort values that \n[users have defined](https://support.pagerduty.com/docs/edit-incidents#edit-incident-duration),\nif they exist." }, "up_time_pct": { "type": "number", "description": "The percentage of time in the defined date range that the service was not interrupted\nby a [major incident](https://support.pagerduty.com/docs/operational-reviews#major-incidents).\nOnly included when aggregating by team, escalation policy, service, or all services." } } } } } }, { "$ref": "#/components/schemas/AnalyticsModel" } ] }, "examples": { "Example Response": { "value": { "aggregate_unit": "day", "data": [ { "mean_assignment_count": 1, "mean_engaged_seconds": 366, "mean_engaged_user_count": 1, "mean_seconds_to_engage": 81, "mean_seconds_to_first_ack": 63, "mean_seconds_to_mobilize": 41, "mean_seconds_to_resolve": 380, "mean_user_defined_engaged_seconds": 366, "range_start": "2024-01-01T00:00:00", "total_business_hour_interruptions": 81, "total_engaged_seconds": 3591, "total_escalation_count": 5, "total_incident_count": 124, "total_incidents_acknowledged": 0, "total_incidents_auto_resolved": 0, "total_incidents_manual_escalated": 0, "total_incidents_reassigned": 0, "total_incidents_timeout_escalated": 0, "total_interruptions": 2, "total_notifications": 2, "total_off_hour_interruptions": 20, "total_sleep_hour_interruptions": 21, "total_snoozed_seconds": 78, "total_user_defined_engaged_seconds": 3591 } ], "filters": { "create_range_start": "2024-01-01T00:00:00Z", "create_range_end": "2024-02-01T00:00:00Z", "urgency": "high", "major": true, "team_ids": [ "PGVXG6U", "PNVU4U4" ], "service_ids": [ "PQVUB8D", "PU2D9X3" ] }, "time_zone": "Etc/UTC" } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "429": { "$ref": "#/components/responses/TooManyRequests" } }, "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AnalyticsModel" }, "examples": { "Example Request": { "value": { "filters": { "created_at_start": "2024-01-01T00:00:00-05:00", "created_at_end": "2024-01-31T00:00:00-05:00", "urgency": "high", "major": true, "team_ids": [ "PGVXG6U", "PNVU4U4" ], "service_ids": [ "PQVUB8D", "PU2D9X3" ] }, "aggregate_unit": "day", "time_zone": "Etc/UTC" } } } } }, "description": "Parameters and filters to apply to the dataset." }, "description": "Provides aggregated enriched metrics for incidents.\n\nThe provided metrics are aggregated by day, week, month using the aggregate_unit parameter, or for the entire period if no aggregate_unit is provided.\n\n\n> A `team_ids` or `service_ids` filter is required for [user-level API keys](https://support.pagerduty.com/docs/using-the-api#section-generating-a-personal-rest-api-key) or keys generated through an OAuth flow. Account-level API keys do not have this requirement.\n\n> **Note:** Analytics data is updated once per day. It takes up to 24 hours before new incidents appear in the Analytics API.\n\nScoped OAuth requires: `analytics.read`\n", "tags": [ "Analytics" ] }, "parameters": [] }, "/analytics/metrics/incidents/escalation_policies": { "post": { "x-pd-requires-scope": "analytics.read", "summary": "Get aggregated escalation policy data", "operationId": "getAnalyticsMetricsIncidentsEscalationPolicy", "responses": { "200": { "description": "Only returns data for escalation policies that match the filters and have data.", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/AnalyticsIncidentMetricsEscalationPolicy" } } } }, { "$ref": "#/components/schemas/AnalyticsModel" } ] }, "examples": { "Example Response": { "value": { "data": [ { "distinct_responder_count": 1, "escalation_policy_id": "PDESCP1", "escalation_policy_name": "Escalation Policy 1", "mean_assignment_count": 1, "mean_engaged_seconds": 81, "mean_engaged_user_count": 63, "mean_seconds_to_engage": 41, "mean_seconds_to_first_ack": 380, "mean_seconds_to_mobilize": 81, "mean_seconds_to_resolve": 3591, "mean_user_defined_engaged_seconds": 81, "team_id": "PDTEAM1", "team_name": "Team 1", "total_business_hour_interruptions": 5, "total_engaged_seconds": 124, "total_escalation_count": 20, "total_incident_count": 21, "total_incidents_acknowledged": 78, "total_incidents_auto_resolved": 3, "total_incidents_manual_escalated": 3, "total_incidents_reassigned": 4, "total_incidents_timeout_escalated": 1, "total_interruptions": 1, "total_notifications": 23, "total_off_hour_interruptions": 3, "total_sleep_hour_interruptions": 1, "total_snoozed_seconds": 341, "total_user_defined_engaged_seconds": 124, "up_time_pct": 9.124123 }, { "distinct_responder_count": 1, "escalation_policy_id": "PDESCP2", "escalation_policy_name": "Escalation Policy 2", "mean_assignment_count": 1, "mean_engaged_seconds": 81, "mean_engaged_user_count": 63, "mean_seconds_to_engage": 41, "mean_seconds_to_first_ack": 380, "mean_seconds_to_mobilize": 81, "mean_seconds_to_resolve": 3591, "mean_user_defined_engaged_seconds": 81, "team_id": "PDTEAM1", "team_name": "Team 1", "total_business_hour_interruptions": 5, "total_engaged_seconds": 124, "total_escalation_count": 20, "total_incident_count": 21, "total_incidents_acknowledged": 78, "total_incidents_auto_resolved": 3, "total_incidents_manual_escalated": 3, "total_incidents_reassigned": 4, "total_incidents_timeout_escalated": 1, "total_interruptions": 1, "total_notifications": 23, "total_off_hour_interruptions": 3, "total_sleep_hour_interruptions": 1, "total_snoozed_seconds": 341, "total_user_defined_engaged_seconds": 124, "up_time_pct": 9.124123 } ], "filters": { "created_at_start": "2023-06-10T00:00:00Z", "created_at_end": "2023-06-12T00:00:00Z", "urgency": "high", "major": true, "escalation_policy_ids": [ "PDESCP1", "PDESCP2" ] }, "time_zone": "Etc/UTC" } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "429": { "$ref": "#/components/responses/TooManyRequests" } }, "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AnalyticsModel" }, "examples": { "Example Request": { "value": { "filters": { "created_at_start": "2023-06-10T00:00:00-07:00", "created_at_end": "2023-06-11T23:59:59-07:00", "urgency": "high", "major": true, "escalation_policy_ids": [ "PDESCP1", "PDESCP2" ] }, "time_zone": "Etc/UTC" } } } } }, "description": "Parameters and filters to apply to the dataset." }, "description": "Provides aggregated metrics for incidents aggregated into units of time by escalation policy.\n\nExample metrics include Seconds to Resolve, Seconds to Engage, Snoozed Seconds, and Sleep Hour Interruptions. Metric definitions can be found in our [Knowledge Base](https://support.pagerduty.com/docs/insights#escalation-policy-list).\n\n\n> **Note:** Analytics data is updated once per day. It takes up to 24 hours before new incidents appear in the Analytics API.\n\nScoped OAuth requires: `analytics.read`\n", "tags": [ "Analytics" ] }, "parameters": [] }, "/analytics/metrics/incidents/escalation_policies/all": { "post": { "x-pd-requires-scope": "analytics.read", "summary": "Get aggregated metrics for all escalation policies", "operationId": "getAnalyticsMetricsIncidentsEscalationPolicyAll", "responses": { "200": { "description": "Only returns data for escalation policies that match the filters and have data.", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/AnalyticsIncidentMetricsEscalationPolicy" } } } }, { "$ref": "#/components/schemas/AnalyticsModel" } ] }, "examples": { "Example Response": { "value": { "data": [ { "distinct_responder_count": 1, "mean_assignment_count": 1, "mean_engaged_seconds": 81, "mean_engaged_user_count": 63, "mean_seconds_to_engage": 41, "mean_seconds_to_first_ack": 380, "mean_seconds_to_mobilize": 81, "mean_seconds_to_resolve": 3591, "mean_user_defined_engaged_seconds": 81, "total_business_hour_interruptions": 5, "total_engaged_seconds": 124, "total_escalation_count": 20, "total_incident_count": 21, "total_incidents_acknowledged": 78, "total_incidents_auto_resolved": 3, "total_incidents_manual_escalated": 3, "total_incidents_reassigned": 4, "total_incidents_timeout_escalated": 1, "total_interruptions": 1, "total_notifications": 23, "total_off_hour_interruptions": 3, "total_sleep_hour_interruptions": 1, "total_snoozed_seconds": 341, "total_user_defined_engaged_seconds": 124, "up_time_pct": 9.124123 } ], "filters": { "created_at_start": "2023-06-17T07:00:00Z", "created_at_end": "2023-07-02T06:59:59Z", "escalation_policy_ids": [ "PDESCP1", "PDESCP2" ] }, "time_zone": "Etc/UTC" } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "429": { "$ref": "#/components/responses/TooManyRequests" } }, "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AnalyticsModel" }, "examples": { "Example Request": { "value": { "filters": { "created_at_start": "2023-06-17T00:00:00-07:00", "created_at_end": "2023-07-01T23:59:59-07:00", "escalation_policy_ids": [ "PDESCP1", "PDESCP2" ] }, "time_zone": "Etc/UTC" } } } } }, "description": "Parameters and filters to apply to the dataset." }, "description": "Provides aggregated metrics across all escalation policies.\n\nExample metrics include Seconds to Resolve, Seconds to Engage, Snoozed Seconds, and Sleep Hour Interruptions. Metric definitions can be found in our [Knowledge Base](https://support.pagerduty.com/docs/insights#escalation-policy-list).\n\n\n> **Note:** Analytics data is updated once per day. It takes up to 24 hours before new incidents appear in the Analytics API.\n\nScoped OAuth requires: `analytics.read`\n", "tags": [ "Analytics" ] }, "parameters": [] }, "/analytics/metrics/incidents/services": { "post": { "x-pd-requires-scope": "analytics.read", "summary": "Get aggregated service data", "operationId": "getAnalyticsMetricsIncidentsService", "responses": { "200": { "description": "Only returns data for services that match the filters and have data.", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/AnalyticsIncidentMetrics" } } } }, { "$ref": "#/components/schemas/AnalyticsModel" } ] }, "examples": { "Example Response": { "value": { "aggregate_unit": "day", "data": [ { "mean_assignment_count": 1, "mean_engaged_seconds": 366, "mean_engaged_user_count": 1, "mean_seconds_to_engage": 81, "mean_seconds_to_first_ack": 63, "mean_seconds_to_mobilize": 41, "mean_seconds_to_resolve": 380, "mean_user_defined_engaged_seconds": 366, "range_start": "2023-06-11T00:00:00", "service_id": "PPSCXAN", "service_name": "Critical Prod Service 1", "team_id": "P3XUQ75", "team_name": "Engineering", "total_business_hour_interruptions": 81, "total_engaged_seconds": 3591, "total_escalation_count": 5, "total_incident_count": 124, "total_incidents_acknowledged": 1, "total_incidents_auto_resolved": 12, "total_incidents_manual_escalated": 9, "total_incidents_reassigned": 1, "total_incidents_timeout_escalated": 4, "total_interruptions": 1, "total_notifications": 342, "total_off_hour_interruptions": 20, "total_sleep_hour_interruptions": 21, "total_snoozed_seconds": 78, "total_user_defined_engaged_seconds": 3591, "up_time_pct": 99.92677595628416 }, { "mean_assignment_count": 12, "mean_engaged_seconds": 432, "mean_engaged_user_count": 1, "mean_seconds_to_engage": 77, "mean_seconds_to_first_ack": 32, "mean_seconds_to_mobilize": 32, "mean_seconds_to_resolve": 87, "mean_user_defined_engaged_seconds": 432, "range_start": "2023-06-10T00:00:00", "service_id": "PPSCXAN", "service_name": "Critical Prod Service 1", "team_id": "P3XUQ75", "team_name": "Engineering", "total_business_hour_interruptions": 12, "total_engaged_seconds": 3645, "total_escalation_count": 5, "total_incident_count": 124, "total_incidents_acknowledged": 1, "total_incidents_auto_resolved": 12, "total_incidents_manual_escalated": 9, "total_incidents_reassigned": 1, "total_incidents_timeout_escalated": 4, "total_interruptions": 1, "total_notifications": 32, "total_off_hour_interruptions": 42, "total_sleep_hour_interruptions": 3, "total_snoozed_seconds": 123, "total_user_defined_engaged_seconds": 3645, "up_time_pct": 99.234416 } ], "filters": { "created_at_start": "2023-06-10T00:00:00Z", "created_at_end": "2023-06-12T00:00:00Z", "team_ids": [ "P3XUQ75" ], "service_ids": [ "PPSCXAN" ] }, "time_zone": "Etc/UTC" } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "429": { "$ref": "#/components/responses/TooManyRequests" } }, "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AnalyticsModel" }, "examples": { "Example Request": { "value": { "filters": { "created_at_start": "2023-06-10T00:00:00-07:00", "created_at_end": "2023-06-11T23:59:59-07:00", "urgency": "high", "major": true, "team_ids": [ "P3XUQ75" ], "service_ids": [ "PPSCXAN" ] }, "aggregate_unit": "day", "time_zone": "Etc/UTC" } } } } }, "description": "Parameters and filters to apply to the dataset." }, "description": "Provides aggregated metrics for incidents aggregated into units of time by service.\n\nExample metrics include Seconds to Resolve, Seconds to Engage, Snoozed Seconds, and Sleep Hour Interruptions. Metric definitions can be found in our [Knowledge Base](https://support.pagerduty.com/docs/insights#services-list).\nData can be aggregated by day, week or month in addition to by service, or provided just as a collection of aggregates for each service in the dataset for the entire period. If a unit is provided, each row in the returned dataset will include a 'range_start' timestamp.\n\n\n> **Note:** Analytics data is updated once per day. It takes up to 24 hours before new incidents appear in the Analytics API.\n\nScoped OAuth requires: `analytics.read`\n", "tags": [ "Analytics" ] }, "parameters": [] }, "/analytics/metrics/incidents/services/all": { "post": { "x-pd-requires-scope": "analytics.read", "summary": "Get aggregated metrics for all services", "operationId": "getAnalyticsMetricsIncidentsServiceAll", "responses": { "200": { "description": "Only returns data for services that match the filters and have data.", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/AnalyticsIncidentMetrics" } } } }, { "$ref": "#/components/schemas/AnalyticsModel" } ] }, "examples": { "Example Response": { "value": { "data": [ { "mean_assignment_count": 1, "mean_engaged_seconds": 366, "mean_engaged_user_count": 1, "mean_seconds_to_engage": 81, "mean_seconds_to_first_ack": 63, "mean_seconds_to_mobilize": 41, "mean_seconds_to_resolve": 380, "mean_user_defined_engaged_seconds": 366, "total_business_hour_interruptions": 81, "total_engaged_seconds": 3591, "total_escalation_count": 5, "total_incident_count": 124, "total_incidents_acknowledged": 1, "total_incidents_auto_resolved": 12, "total_incidents_manual_escalated": 9, "total_incidents_reassigned": 1, "total_incidents_timeout_escalated": 4, "total_interruptions": 1, "total_notifications": 342, "total_off_hour_interruptions": 20, "total_sleep_hour_interruptions": 21, "total_snoozed_seconds": 78, "total_user_defined_engaged_seconds": 3591, "up_time_pct": 99.92677595628416 } ], "filters": { "created_at_start": "2023-06-17T07:00:00Z", "created_at_end": "2023-07-02T06:59:59Z", "service_ids": [ "PQVUB8D", "PU2D9X3" ] }, "time_zone": "Etc/UTC" } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "429": { "$ref": "#/components/responses/TooManyRequests" } }, "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AnalyticsModel" }, "examples": { "Example Request": { "value": { "filters": { "created_at_start": "2023-06-17T00:00:00-07:00", "created_at_end": "2023-07-01T23:59:59-07:00", "service_ids": [ "PQVUB8D", "PU2D9X3" ] }, "time_zone": "Etc/UTC" } } } } }, "description": "Parameters and filters to apply to the dataset." }, "description": "Provides aggregated metrics across all services.\n\nExample metrics include Seconds to Resolve, Seconds to Engage, Snoozed Seconds, and Sleep Hour Interruptions. Metric definitions can be found in our [Knowledge Base](https://support.pagerduty.com/docs/insights#services-list).\n\n\n> A `team_ids` or `service_ids` filter is required for [user-level API keys](https://support.pagerduty.com/docs/using-the-api#section-generating-a-personal-rest-api-key) or keys generated through an OAuth flow. Account-level API keys do not have this requirement.\n\n> **Note:** Analytics data is updated once per day. It takes up to 24 hours before new incidents appear in the Analytics API.\n\nScoped OAuth requires: `analytics.read`\n", "tags": [ "Analytics" ] }, "parameters": [] }, "/analytics/metrics/incidents/teams": { "post": { "x-pd-requires-scope": "analytics.read", "summary": "Get aggregated team data", "operationId": "getAnalyticsMetricsIncidentsTeam", "responses": { "200": { "description": "Only returns data for teams that match the filters and have data.", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/AnalyticsIncidentMetrics" } } } }, { "$ref": "#/components/schemas/AnalyticsModel" } ] }, "examples": { "Example Response": { "value": { "aggregate_unit": "day", "data": [ { "mean_assignment_count": 1, "mean_engaged_seconds": 366, "mean_engaged_user_count": 1, "mean_seconds_to_engage": 81, "mean_seconds_to_first_ack": 63, "mean_seconds_to_mobilize": 41, "mean_seconds_to_resolve": 380, "mean_user_defined_engaged_seconds": 366, "range_start": "2023-06-11T00:00:00", "team_id": "P3XUQ75", "team_name": "Engineering", "total_business_hour_interruptions": 81, "total_engaged_seconds": 3591, "total_escalation_count": 5, "total_incident_count": 124, "total_incidents_acknowledged": 1, "total_incidents_auto_resolved": 12, "total_incidents_manual_escalated": 9, "total_incidents_reassigned": 1, "total_incidents_timeout_escalated": 4, "total_interruptions": 1, "total_notifications": 342, "total_off_hour_interruptions": 20, "total_sleep_hour_interruptions": 21, "total_snoozed_seconds": 78, "total_user_defined_engaged_seconds": 3591, "up_time_pct": 99.92677595628416 }, { "mean_assignment_count": 12, "mean_engaged_seconds": 432, "mean_engaged_user_count": 1, "mean_seconds_to_engage": 77, "mean_seconds_to_first_ack": 32, "mean_seconds_to_mobilize": 32, "mean_seconds_to_resolve": 87, "mean_user_defined_engaged_seconds": 432, "range_start": "2023-06-10T00:00:00", "team_id": "P3XUQ75", "team_name": "Engineering", "total_business_hour_interruptions": 12, "total_engaged_seconds": 3645, "total_escalation_count": 5, "total_incident_count": 124, "total_incidents_acknowledged": 1, "total_incidents_auto_resolved": 12, "total_incidents_manual_escalated": 9, "total_incidents_reassigned": 1, "total_incidents_timeout_escalated": 4, "total_interruptions": 1, "total_notifications": 32, "total_off_hour_interruptions": 42, "total_sleep_hour_interruptions": 3, "total_snoozed_seconds": 123, "total_user_defined_engaged_seconds": 3645, "up_time_pct": 99.234416 } ], "filters": { "created_at_start": "2023-06-10T00:00:00Z", "created_at_end": "2023-06-12T00:00:00Z", "urgency": "high", "major": true, "team_ids": [ "P3XUQ75" ] }, "time_zone": "Etc/UTC" } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "429": { "$ref": "#/components/responses/TooManyRequests" } }, "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AnalyticsModel" }, "examples": { "Example Request": { "value": { "filters": { "created_at_start": "2023-06-10T00:00:00-07:00", "created_at_end": "2023-06-11T23:59:59-07:00", "urgency": "high", "major": true, "team_ids": [ "P3XUQ75" ] }, "aggregate_unit": "day", "time_zone": "Etc/UTC" } } } } }, "description": "Parameters and filters to apply to the dataset." }, "description": "Provides aggregated metrics for incidents aggregated into units of time by team.\n\nExample metrics include Seconds to Resolve, Seconds to Engage, Snoozed Seconds, and Sleep Hour Interruptions. Metric definitions can be found in our [Knowledge Base](https://support.pagerduty.com/docs/insights#teams-list).\nData can be aggregated by day, week or month in addition to by team, or provided just as a collection of aggregates for each team in the dataset for the entire period. If a unit is provided, each row in the returned dataset will include a 'range_start' timestamp.\n\n\n> A `team_ids` or `service_ids` filter is required for [user-level API keys](https://support.pagerduty.com/docs/using-the-api#section-generating-a-personal-rest-api-key) or keys generated through an OAuth flow. Account-level API keys do not have this requirement.\n\n> **Note:** Analytics data is updated once per day. It takes up to 24 hours before new incidents appear in the Analytics API.\n\nScoped OAuth requires: `analytics.read`\n", "tags": [ "Analytics" ] }, "parameters": [] }, "/analytics/metrics/incidents/teams/all": { "post": { "x-pd-requires-scope": "analytics.read", "summary": "Get aggregated metrics for all teams", "operationId": "getAnalyticsMetricsIncidentsTeamAll", "responses": { "200": { "description": "Only returns data for teams that match the filters and have data.", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/AnalyticsIncidentMetrics" } } } }, { "$ref": "#/components/schemas/AnalyticsModel" } ] }, "examples": { "Example Response": { "value": { "data": [ { "mean_assignment_count": 1, "mean_engaged_seconds": 366, "mean_engaged_user_count": 1, "mean_seconds_to_engage": 81, "mean_seconds_to_first_ack": 63, "mean_seconds_to_mobilize": 41, "mean_seconds_to_resolve": 380, "mean_user_defined_engaged_seconds": 366, "total_business_hour_interruptions": 81, "total_engaged_seconds": 3591, "total_escalation_count": 5, "total_incident_count": 124, "total_incidents_acknowledged": 1, "total_incidents_auto_resolved": 12, "total_incidents_manual_escalated": 9, "total_incidents_reassigned": 1, "total_incidents_timeout_escalated": 4, "total_interruptions": 1, "total_notifications": 342, "total_off_hour_interruptions": 20, "total_sleep_hour_interruptions": 21, "total_snoozed_seconds": 78, "total_user_defined_engaged_seconds": 3591 } ], "filters": { "created_at_start": "2023-06-10T00:00:00Z", "created_at_end": "2023-06-12T00:00:00Z", "urgency": "high", "major": true, "team_ids": [ "P3XUQ75" ] }, "time_zone": "Etc/UTC" } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "429": { "$ref": "#/components/responses/TooManyRequests" } }, "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AnalyticsModel" }, "examples": { "Example Request": { "value": { "filters": { "created_at_start": "2023-06-10T00:00:00-07:00", "created_at_end": "2023-06-11T23:59:59-07:00", "urgency": "high", "major": true, "team_ids": [ "P3XUQ75" ] }, "time_zone": "Etc/UTC" } } } } }, "description": "Parameters and filters to apply to the dataset." }, "description": "Provides aggregated metrics across all teams.\n\nExample metrics include Seconds to Resolve, Seconds to Engage, Snoozed Seconds, and Sleep Hour Interruptions. Metric definitions can be found in our [Knowledge Base](https://support.pagerduty.com/docs/insights#teams-list).\n\n\n> A `team_ids` or `service_ids` filter is required for [user-level API keys](https://support.pagerduty.com/docs/using-the-api#section-generating-a-personal-rest-api-key) or keys generated through an OAuth flow. Account-level API keys do not have this requirement.\n\n> **Note:** Analytics data is updated once per day. It takes up to 24 hours before new incidents appear in the Analytics API.\n\nScoped OAuth requires: `analytics.read`\n", "tags": [ "Analytics" ] }, "parameters": [] }, "/analytics/metrics/responders/all": { "post": { "x-pd-requires-scope": "analytics.read", "summary": "Get aggregated metrics for all responders", "operationId": "getAnalyticsMetricsRespondersAll", "responses": { "200": { "description": "Only returns data for responders that match the filters and have data.", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/AnalyticsResponderMetrics" } } } }, { "$ref": "#/components/schemas/AnalyticsResponderFilter" } ] }, "examples": { "Example Response": { "value": { "data": [ { "mean_engaged_seconds": 366, "mean_time_to_acknowledge_seconds": 1, "total_business_hour_interruptions": 81, "total_engaged_seconds": 63, "total_incident_count": 41, "total_incidents_acknowledged": 380, "total_incidents_manual_escalated_from": 81, "total_incidents_manual_escalated_to": 3591, "total_incidents_reassigned_from": 5, "total_incidents_reassigned_to": 124, "total_incidents_timeout_escalated_from": 20, "total_incidents_timeout_escalated_to": 21, "total_interruptions": 4, "total_notifications": 78, "total_off_hour_interruptions": 23, "total_seconds_on_call": 604799, "total_seconds_on_call_level_1": 126000, "total_seconds_on_call_level_2_plus": 604799, "total_sleep_hour_interruptions": 0 } ], "filters": { "date_range_start": "2023-06-10T00:00:00Z", "date_range_end": "2023-06-12T00:00:00Z", "responder_ids": [ "PDUSER1", "PDUSER2" ], "urgency": "high" }, "time_zone": "Etc/UTC" } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "429": { "$ref": "#/components/responses/TooManyRequests" } }, "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AnalyticsResponderFilter" }, "examples": { "Example Request": { "value": { "filters": { "date_range_start": "2023-06-10T00:00:00-07:00", "date_range_end": "2023-06-11T23:59:59-07:00", "urgency": "high", "responder_ids": [ "PDUSER1", "PDUSER2" ] }, "time_zone": "Etc/UTC" } } } } }, "description": "Parameters and filters to apply to the dataset." }, "description": "Provides aggregated incident metrics for all selected responders.\n\nExample metrics include Seconds to Resolve, Seconds to Engage, Snoozed Seconds, and Sleep Hour Interruptions. Metric definitions can be found in our [Knowledge Base](https://support.pagerduty.com/docs/insights#responders-list).\n\n\n> **Note:** Analytics data is updated once per day. It takes up to 24 hours before new incidents appear in the Analytics API.\n\nScoped OAuth requires: `analytics.read`\n", "tags": [ "Analytics" ] }, "parameters": [] }, "/analytics/metrics/responders/teams": { "post": { "x-pd-requires-scope": "analytics.read", "summary": "Get responder data aggregated by team", "operationId": "getAnalyticsMetricsRespondersTeam", "responses": { "200": { "description": "Only returns data for responders and teams that match the filters and have data.", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/AnalyticsResponderMetrics" } } } }, { "$ref": "#/components/schemas/AnalyticsResponderFilter" } ] }, "examples": { "Example Response": { "value": { "data": [ { "mean_engaged_seconds": 366, "mean_time_to_acknowledge_seconds": 1, "responder_id": "PDUSER1", "responder_name": "User 1", "team_id": "PPSCXAN", "team_name": "Best Team A #1", "total_business_hour_interruptions": 81, "total_engaged_seconds": 63, "total_incident_count": 41, "total_incidents_acknowledged": 380, "total_incidents_manual_escalated_from": 81, "total_incidents_manual_escalated_to": 3591, "total_incidents_reassigned_from": 5, "total_incidents_reassigned_to": 124, "total_incidents_timeout_escalated_from": 20, "total_incidents_timeout_escalated_to": 21, "total_interruptions": 4, "total_notifications": 78, "total_off_hour_interruptions": 23, "total_seconds_on_call": 604799, "total_seconds_on_call_level_1": 126000, "total_seconds_on_call_level_2_plus": 604799, "total_sleep_hour_interruptions": 0 }, { "mean_engaged_seconds": 366, "mean_time_to_acknowledge_seconds": 1, "responder_id": "PDUSER2", "responder_name": "User 2", "team_id": "PPSCXAN", "team_name": "Best Team A #1", "total_business_hour_interruptions": 81, "total_engaged_seconds": 63, "total_incident_count": 41, "total_incidents_acknowledged": 380, "total_incidents_manual_escalated_from": 81, "total_incidents_manual_escalated_to": 3591, "total_incidents_reassigned_from": 5, "total_incidents_reassigned_to": 124, "total_incidents_timeout_escalated_from": 20, "total_incidents_timeout_escalated_to": 21, "total_interruptions": 6, "total_notifications": 78, "total_off_hour_interruptions": 23, "total_seconds_on_call": 120000, "total_seconds_on_call_level_1": 120000, "total_seconds_on_call_level_2_plus": 0, "total_sleep_hour_interruptions": 0 } ], "filters": { "date_range_start": "2023-06-10T00:00:00Z", "date_range_end": "2023-06-12T00:00:00Z", "responder_ids": [ "PDUSER1", "PDUSER2" ], "urgency": "high" }, "time_zone": "Etc/UTC" } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "429": { "$ref": "#/components/responses/TooManyRequests" } }, "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AnalyticsResponderFilter" }, "examples": { "Example Request": { "value": { "filters": { "date_range_start": "2023-06-10T00:00:00-07:00", "date_range_end": "2023-06-11T23:59:59-07:00", "urgency": "high", "responder_ids": [ "PDUSER1", "PDUSER2" ] }, "time_zone": "Etc/UTC" } } } } }, "description": "Parameters and filters to apply to the dataset." }, "description": "Provides incident metrics aggregated by responder.\n\nExample metrics include Seconds to Resolve, Seconds to Engage, Snoozed Seconds, and Sleep Hour Interruptions. Metric definitions can be found in our [Knowledge Base](https://support.pagerduty.com/docs/insights#responders-list).\n\n\n> **Note:** Analytics data is updated once per day. It takes up to 24 hours before new incidents appear in the Analytics API.\n\nScoped OAuth requires: `analytics.read`\n", "tags": [ "Analytics" ] }, "parameters": [] }, "/analytics/raw/incidents": { "post": { "x-pd-requires-scope": "analytics.read", "summary": "Get raw data - multiple incidents", "operationId": "getAnalyticsIncidents", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "first": { "type": "string", "description": "Cursor to identify the first object in the response." }, "last": { "type": "string", "description": "Cursor to identify the last object in the response." }, "limit": { "type": "integer", "description": "Number of results to include in the batch." }, "more": { "type": "boolean", "description": "Indicates if there are more resources available than were returned." }, "order": { "type": "string", "description": "The order in which the results were sorted; asc for ascending, desc for descending.", "enum": [ "asc", "desc" ] }, "order_by": { "type": "string", "description": "The column that was used for ordering the results.", "enum": [ "created_at", "seconds_to_resolve" ] }, "filters": { "type": "object", "description": "A collection of filters that were applied to the results.", "properties": { "created_at_start": { "type": "string", "description": "The lower boundary for the created_at range filter applied to the results." }, "created_at_end": { "type": "string", "description": "The upper boundary for the created_at range filter applied to the results." }, "urgency": { "type": "string", "description": "The urgency filter applied to the results.", "enum": [ "high", "low" ] }, "major": { "type": "boolean", "description": "The [major incident](https://support.pagerduty.com/docs/operational-reviews#major-incidents) filter applied to the results." }, "team_ids": { "type": "array", "description": "The team_ids filter applied to the results.", "items": { "type": "string" } }, "service_ids": { "type": "array", "description": "The service_ids filter applied to the results.", "items": { "type": "string" } }, "priority_ids": { "type": "array", "description": "The priority_ids filter applied to the results.", "maxItems": 5, "items": { "type": "string" } }, "priority_names": { "type": "array", "description": "The priority_names filter applied to the results.", "maxItems": 5, "items": { "type": "string" } } } }, "time_zone": { "type": "string", "description": "The time zone that the results are in." }, "data": { "type": "array", "items": { "$ref": "#/components/schemas/AnalyticsRawIncident" } } }, "required": [ "first", "last", "limit", "more", "order", "order_by", "time_zone", "data" ] }, "examples": { "Example Response": { "value": { "data": [ { "acknowledged_user_ids": [ "PRJ4208" ], "acknowledged_user_names": [ "John Smith" ], "acknowledgement_count": 1, "active_user_count": 3, "assigned_user_ids": [ "PRJ4208", "PA02301" ], "assigned_user_names": [ "John Smith", "Jane Doe" ], "assignment_count": 2, "auto_resolved": false, "business_hour_interruptions": 5, "created_at": "2023-05-31T10:05:00", "description": "The server is on fire!", "engaged_seconds": 3510, "engaged_user_count": 10, "escalation_count": 1, "escalation_policy_id": "PDESCP1", "escalation_policy_name": "Escalation Policy 1", "id": "PYC0H08", "incident_number": 928, "joined_user_ids": [ "PRJ4208", "PA02301", "P40D0J1" ], "joined_user_names": [ "John Smith", "Jane Doe", "Wanda Evans" ], "major": false, "manual_escalation_count": 0, "off_hour_interruptions": 4, "priority_id": null, "priority_name": null, "priority_order": null, "reassignment_count": 0, "resolved_at": "2023-05-31T10:15:00", "resolved_by_user_id": "PRJ4208", "resolved_by_user_name": "John Smith", "seconds_to_engage": 70, "seconds_to_first_ack": 5, "seconds_to_mobilize": 19, "seconds_to_resolve": 3305, "service_id": "PPSCXAN", "service_name": "Engineering", "sleep_hour_interruptions": 3, "snoozed_seconds": 604, "status": "resolved", "team_id": null, "team_name": null, "timeout_escalation_count": 0, "total_interruptions\"": null, "total_notifications": 2, "urgency": "low", "user_defined_effort_seconds": null }, { "acknowledged_user_ids": [ "PMT4102" ], "acknowledged_user_names": [ "Sally Styles" ], "acknowledgement_count": 1, "active_user_count": 1, "assigned_user_ids": [ "PMT4102" ], "assigned_user_names": [ "Sally Styles" ], "assignment_count": 1, "business_hour_interruptions": 2, "created_at": "2023-05-31T10:00:00", "description": "Reply on social media", "engaged_seconds": 521, "engaged_user_count": 6, "escalation_count": 1, "escalation_policy_id": "PDESCP1", "escalation_policy_name": "Escalation Policy 1", "id": "PCOOHCY", "incident_number": 929, "joined_user_ids": [ "PMT4102" ], "joined_user_names": [ "Sally Styles" ], "major": false, "manual_escalation_count": 0, "off_hour_interruptions": 3, "priority_id": "POTCOTX", "priority_name": "SEV-2", "priority_order": null, "reassignment_count": 0, "resolved_at": "2023-05-30T10:00:05", "resolved_by_user_id": "PMT4102", "resolved_by_user_name": "Sally Styles", "seconds_to_engage": 24, "seconds_to_first_ack": 48, "seconds_to_mobilize": 122, "seconds_to_resolve": 2029, "service_id": "PPSCXAN", "service_name": "Social media tracking", "sleep_hour_interruptions": 1, "snoozed_seconds": 698, "status": "resolved", "team_id": null, "team_name": "Marketing", "timeout_escalation_count": 0, "total_interruptions\"": null, "total_notifications": 2, "urgency": "low", "user_defined_effort_seconds": null } ], "ending_before": null, "filters": {}, "first": "PYC0H08", "last": "PCOOHCY", "limit": 10, "more": true, "order": "desc", "order_by": "created_at", "starting_after": null, "time_zone": "Etc/UTC" } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "429": { "$ref": "#/components/responses/TooManyRequests" } }, "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "filters": { "type": "object", "description": "Filters the result, only show incidents that match the conditions passed in the filter.", "properties": { "created_at_start": { "type": "string", "description": "Filters the result, showing only the incidents where the creation timestamp is greater than the filter value.", "example": "2023-05-01T00:00:00-04:00" }, "created_at_end": { "type": "string", "description": "Filters the result, showing only the incidents where the creation timestamp is less than the filter value.", "example": "2023-06-01T00:00:00-04:00" }, "urgency": { "type": "string", "description": "Filters the result, showing only the incidents where urgency matches the filter value.", "example": "high" }, "major": { "type": "boolean", "description": "An incident is classified as a [major incident](https://support.pagerduty.com/docs/operational-reviews#major-incidents) if it has one of the two highest priorities, or if multiple responders are added and acknowledge the incident.", "example": true }, "team_ids": { "type": "array", "description": "An array of team IDs. Only incidents that are assigned to a member of these teams will be returned. Account must have the teams ability to use this parameter.", "items": { "type": "string" }, "example": [ "P373JQQ", "PAECHJV", "P7SYGW6" ] }, "service_ids": { "type": "array", "description": "An array of service IDs. Only results related to these services will be returned.", "items": { "type": "string" }, "example": [ "PC8O0L3", "PX01HJD", "P5FK83M" ] }, "priority_ids": { "type": "array", "description": "The priority_ids filter applied to the results.", "items": { "type": "string" }, "example": [ "PITMC5Y", "PEHBBT8", "PB8QADI" ] }, "priority_names": { "type": "array", "description": "The priority_names filter applied to the results.", "items": { "type": "string" }, "example": [ "P1", "P2", "P3" ] } } }, "starting_after": { "type": "string", "description": "A cursor to indicate the reference point that the results should follow" }, "ending_before": { "type": "string", "description": "A cursor to indicate the reference point that the results should precede" }, "order": { "type": "string", "description": "The order the results; asc for ascending, desc for descending. Defaults to 'desc'.", "enum": [ "asc", "desc" ] }, "order_by": { "type": "string", "description": "The column to use for ordering the results. Defaults to 'created_at'.", "enum": [ "created_at", "seconds_to_resolve" ] }, "limit": { "type": "integer", "description": "Number of results to include in each batch.\nLimits between 1 to 1000 are accepted.", "example": 20, "minimum": 0, "exclusiveMinimum": true, "maximum": 1000, "exclusiveMaximum": false }, "time_zone": { "type": "string", "description": "The time zone to use for the results.", "example": "Etc/UTC" } } }, "examples": { "Example Request": { "value": { "filters": { "created_at_start": "2024-01-01T00:00:00-05:00", "created_at_end": "2024-01-31T00:00:00-05:00", "urgency": "high", "major": true, "team_ids": [ "PGVXG6U", "PNVU4U4" ], "service_ids": [ "PQVUB8D", "PU2D9X3" ], "priority_names": [ "P1", "P2" ] }, "limit": 20, "order": "desc", "order_by": "created_at", "time_zone": "Etc/UTC" } } } } }, "description": "Parameters and filters to apply to the dataset." }, "description": "Provides enriched incident data and metrics for multiple incidents.\n\nExample metrics include Seconds to Resolve, Seconds to Engage, Snoozed Seconds, and Sleep Hour Interruptions. Metric definitions can be found in our [Knowledge Base](https://support.pagerduty.com/docs/insights#incidents-list).\n\n\n> A `team_ids` or `service_ids` filter is required for [user-level API keys](https://support.pagerduty.com/docs/using-the-api#section-generating-a-personal-rest-api-key) or keys generated through an OAuth flow. Account-level API keys do not have this requirement.\n\n> **Note:** Analytics data is updated once per day. It takes up to 24 hours before new incidents appear in the Analytics API.\n\nScoped OAuth requires: `analytics.read`\n", "tags": [ "Analytics" ] }, "parameters": [] }, "/analytics/raw/incidents/{id}": { "parameters": [ { "$ref": "#/components/parameters/id" } ], "get": { "x-pd-requires-scope": "analytics.read", "summary": "Get raw data - single incident", "tags": [ "Analytics" ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AnalyticsRawIncident" }, "examples": { "Example Response": { "value": { "time_zone": "Etc/UTC", "data": { "acknowledged_user_ids": [ "PRJ4208" ], "acknowledged_user_names": [ "Santos Dicera" ], "acknowledgement_count": 1, "active_user_count": 2, "assigned_user_ids": [ "PRJ4208", "PA02301" ], "assigned_user_names": [ "Santos Dicera", "Jane Doe" ], "assignment_count": 2, "auto_resolved": false, "business_hour_interruptions": 0, "created_at": "2024-01-01T21:00:00Z", "description": "The server is on fire!", "engaged_seconds": 75, "engaged_user_count": 2, "escalation_count": 0, "escalation_policy_id": "PCI3U5T", "escalation_policy_name": "Sputnik", "id": "PJASD33", "incident_number": 924, "joined_user_ids": [ "PRJ4208", "PA02301" ], "joined_user_names": [ "Santos Dicera", "Jane Doe" ], "major": true, "manual_escalation_count": 0, "off_hour_interruptions": 2, "priority_id": "PZOZQXA", "priority_name": "SEV-1", "priority_order": 67108864, "reassignment_count": 0, "resolved_at": "2024-01-02T21:01:00Z", "resolved_by_user_id": "PRJ4208", "resolved_by_user_name": "Santos Dicera", "seconds_to_engage": 30, "seconds_to_first_ack": 15, "seconds_to_mobilize": 15, "seconds_to_resolve": 60, "service_id": "PAQTPI2", "service_name": "Engineering", "sleep_hour_interruptions": 0, "snoozed_seconds": 0, "status": "resolved", "team_id": "PNVU4UR", "team_name": "Engineering team 7", "timeout_escalation_count": 0, "total_interruptions": null, "total_notifications": 2, "urgency": "high", "user_defined_effort_seconds": null } } } } } } }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" } }, "operationId": "getAnalyticsIncidentsById", "description": "Provides enriched incident data and metrics for a single incident.\n\nExample metrics include Seconds to Resolve, Seconds to Engage, Snoozed Seconds, and Sleep Hour Interruptions. Metric definitions can be found in our [Knowledge Base](https://support.pagerduty.com/docs/insights#incidents-list).\n\n\n> **Note:** Analytics data is updated once per day. It takes up to 24 hours before new incidents appear in the Analytics API.\n\nScoped OAuth requires: `analytics.read`\n", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" } ] } }, "/analytics/raw/incidents/{id}/responses": { "parameters": [ { "$ref": "#/components/parameters/id" } ], "get": { "x-pd-requires-scope": "analytics.read", "summary": "Get raw responses from a single incident", "tags": [ "Analytics" ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "incident_id": { "type": "string", "description": "The Incident ID passed into the request." }, "limit": { "type": "integer", "description": "Number of results to include in the batch." }, "order": { "type": "string", "description": "The order in which the results were sorted; asc for ascending, desc for descending.", "enum": [ "asc", "desc" ] }, "order_by": { "type": "string", "description": "The column that was used for ordering the results.", "enum": [ "requested_at" ] }, "time_zone": { "type": "string", "description": "The time zone that the results are in." }, "responses": { "type": "array", "items": { "$ref": "#/components/schemas/AnalyticsRawIncidentResponses" } } } }, "examples": { "Example Response": { "value": { "incident_id": "PJASD33", "limit": 100, "order": "asc", "order_by": "requested_at", "time_zone": "Etc/UTC", "responses": { "requested_at": "2024-01-05T10:15:00", "responded_at": "2024-01-05T10:18:00", "responder_id": "PXPGF42", "responder_name": "Earline Greenholt", "responder_type": "added_responder", "response_status": "accepted", "time_to_respond_seconds": 180 } } } } } } }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "limit": { "type": "integer", "description": "Number of results to include in each batch.\nLimits between 1 to 1000 are accepted.", "example": 20, "minimum": 0, "exclusiveMinimum": true, "maximum": 1000, "exclusiveMaximum": false }, "order": { "type": "string", "description": "The order in which to display the results; asc for ascending, desc for descending. Defaults to `desc`.", "enum": [ "asc", "desc" ] }, "order_by": { "type": "string", "description": "The column to use for ordering the results.", "enum": [ "requested_at" ] }, "time_zone": { "type": "string", "description": "The time zone to use for the results.", "example": "Etc/UTC" } } }, "examples": { "Example Request": { "value": { "limit": 20, "order": "desc", "order_by": "requested_at", "time_zone": "America/Los_Angeles" } } } } }, "description": "Parameters to apply to the dataset." }, "operationId": "getAnalyticsIncidentResponsesById", "description": "Provides enriched responder data for a single incident.\n\nExample metrics include Time to Respond, Responder Type, and Response Status. See metric definitions below.\n\n\n> **Note:** Analytics data is updated once per day. It takes up to 24 hours before new incident responses appear in the Analytics API.\nScoped OAuth requires: `analytics.read`\n", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" } ] } }, "/analytics/raw/responders/{responder_id}/incidents": { "parameters": [ { "$ref": "#/components/parameters/responder_id" } ], "post": { "x-pd-requires-scope": "analytics.read", "summary": "Get raw incidents for a single responder_id", "operationId": "getAnalyticsResponderIncidents", "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "first": { "type": "string", "description": "Cursor to identify the first object in the response." }, "last": { "type": "string", "description": "Cursor to identify the last object in the response." }, "responder_id": { "type": "string", "description": "The Responder ID passed into the request." }, "limit": { "type": "integer", "description": "Number of results to include in the batch." }, "order": { "type": "string", "description": "The order in which the results were sorted; asc for ascending, desc for descending.", "enum": [ "asc", "desc" ] }, "order_by": { "type": "string", "description": "The column that was used for ordering the results.", "enum": [ "incident_created_at" ] }, "time_zone": { "type": "string", "description": "The time zone that the results are in." }, "filters": { "type": "object", "description": "A collection of filters that were applied to the results.", "properties": { "created_at_start": { "type": "string", "description": "The lower boundary for the created_at range filter applied to the results." }, "created_at_end": { "type": "string", "description": "The upper boundary for the created_at range filter applied to the results." }, "urgency": { "type": "string", "description": "The urgency filter applied to the results.", "enum": [ "high", "low" ] }, "major": { "type": "boolean", "description": "The [major incident](https://support.pagerduty.com/docs/operational-reviews#major-incidents) filter applied to the results." }, "team_ids": { "type": "array", "description": "The team_ids filter applied to the results.", "items": { "type": "string" } }, "service_ids": { "type": "array", "description": "The service_ids filter applied to the results.", "items": { "type": "string" } }, "priority_ids": { "type": "array", "description": "The priority_ids filter applied to the results.", "maxItems": 5, "items": { "type": "string" } }, "priority_names": { "type": "array", "description": "The priority_names filter applied to the results.", "maxItems": 5, "items": { "type": "string" } } } }, "data": { "type": "array", "items": { "$ref": "#/components/schemas/AnalyticsRawResponderIncidents" } } } }, "examples": { "Example Response": { "value": { "responder_id": "PDUSER1", "limit": 100, "order": "asc", "order_by": "incident_created_at", "time_zone": "Etc/UTC", "data": [ { "incident_created_at": "2023-06-10T22:08:35", "incident_description": 30, "incident_id": "QPDINCIDENT1", "incident_number": 123456, "incident_priority_id": "PZOZQXA", "incident_priority_name": "P1", "incident_priority_order": 67108864, "incident_urgency": 75, "mean_time_to_acknowledge_seconds": 2, "responder_id": "PDUSER1", "responder_name": "User 1", "service_id": "PDSERV1", "service_name": "Service 1", "service_team_id": "PDTEAM1", "service_team_name": "Team 1", "total_acknowledgements": 12, "total_business_hour_interruptions": 3, "total_engaged_seconds": 244, "total_interruptions": 2, "total_manual_escalations_from": 5, "total_manual_escalations_to": 1, "total_off_hour_interruptions": 0, "total_reassignments_from": 0, "total_reassignments_to": 0, "total_sleep_hour_interruptions": 0, "total_timeout_escalations_from": 0, "total_timeout_escalations_to": 0 }, { "incident_created_at": "2023-06-11T22:08:35", "incident_description": 30, "incident_id": "QPDINCIDENT2", "incident_number": 123456, "incident_priority_id": "PZOZQXA", "incident_priority_name": "P1", "incident_priority_order": 67108864, "incident_urgency": 75, "mean_time_to_acknowledge_seconds": 2, "responder_id": "PDUSER1", "responder_name": "User 1", "service_id": "PDSERV2", "service_name": "Service 2", "service_team_id": "PDTEAM1", "service_team_name": "Team 1", "total_acknowledgements": 12, "total_business_hour_interruptions": 3, "total_engaged_seconds": 945, "total_interruptions": 2, "total_manual_escalations_from": 5, "total_manual_escalations_to": 1, "total_off_hour_interruptions": 0, "total_reassignments_from": 0, "total_reassignments_to": 0, "total_sleep_hour_interruptions": 0, "total_timeout_escalations_from": 0, "total_timeout_escalations_to": 0 } ] } } } } } }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" } }, "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "filters": { "type": "object", "description": "Filters the result, only show incidents that match the conditions passed in the filter.", "properties": { "created_at_start": { "type": "string", "description": "Filters the result, showing only the incidents where the creation timestamp is greater than the filter value.", "example": "2023-05-01T00:00:00-04:00" }, "created_at_end": { "type": "string", "description": "Filters the result, showing only the incidents where the creation timestamp is less than the filter value.", "example": "2023-06-01T00:00:00-04:00" }, "urgency": { "type": "string", "description": "Filters the result, showing only the incidents where urgency matches the filter value.", "example": "high" }, "major": { "type": "boolean", "description": "An incident is classified as a [major incident](https://support.pagerduty.com/docs/operational-reviews#major-incidents) if it has one of the two highest priorities, or if multiple responders are added and acknowledge the incident.", "example": true }, "team_ids": { "type": "array", "description": "An array of team IDs. Only incidents that are assigned to a member of these teams will be returned. Account must have the teams ability to use this parameter.", "items": { "type": "string" }, "example": [ "P373JQQ", "PAECHJV", "P7SYGW6" ] }, "service_ids": { "type": "array", "description": "An array of service IDs. Only results related to these services will be returned.", "items": { "type": "string" }, "example": [ "PC8O0L3", "PX01HJD", "P5FK83M" ] }, "priority_ids": { "type": "array", "description": "The priority_ids filter applied to the results.", "items": { "type": "string" }, "example": [ "PITMC5Y", "PEHBBT8", "PB8QADI" ] }, "priority_names": { "type": "array", "description": "The priority_names filter applied to the results.", "items": { "type": "string" }, "example": [ "P1", "P2", "P3" ] } } }, "starting_after": { "type": "string", "description": "A cursor to indicate the reference point that the results should follow" }, "ending_before": { "type": "string", "description": "A cursor to indicate the reference point that the results should precede" }, "order": { "type": "string", "description": "The order in which to display the results; asc for ascending, desc for descending. Defaults to `desc`.", "enum": [ "asc", "desc" ] }, "order_by": { "type": "string", "description": "The column to use for ordering the results. Defaults to `incident_created_at`.", "enum": [ "incident_created_at" ] }, "limit": { "type": "integer", "description": "Number of results to include in each batch.\nLimits between 1 to 1000 are accepted.", "example": 20, "minimum": 0, "exclusiveMinimum": true, "maximum": 1000, "exclusiveMaximum": false }, "time_zone": { "type": "string", "description": "The time zone to use for the results.", "example": "Etc/UTC" } } }, "examples": { "Example Request": { "value": { "filters": { "created_at_start": "2023-06-10T00:00:00-07:00", "created_at_end": "2023-06-11T23:59:59-07:00" }, "responder_id": "PDUSER1", "limit": 100, "order": "asc", "order_by": "incident_created_at", "time_zone": "Etc/UTC" } } } } }, "description": "Parameters and filters to apply to the dataset." }, "tags": [ "Analytics" ], "description": "Provides enriched incident data and metrics for a specific responder.\n\nExample metrics include Mean Seconds to Resolve, Mean Seconds to Engage, Snoozed Seconds, and Sleep Hour Interruptions. Metric definitions can be found in our [Knowledge Base](https://support.pagerduty.com/docs/insights#incidents-list).\n\n\n> **Note:** Analytics data is updated once per day. It takes up to 24 hours before new incidents appear in the Analytics API.\n\nScoped OAuth requires: `analytics.read`\n" } }, "/audit/records": { "description": "List audit records.", "get": { "x-pd-requires-scope": "audit_records.read", "summary": "List audit records", "tags": [ "Audit" ], "operationId": "listAuditRecords", "description": "List audit trail records matching provided query params or default criteria.\n\nThe returned records are sorted by the `execution_time` from newest to oldest.\n\nSee [`Cursor-based pagination`](https://developer.pagerduty.com/docs/rest-api-v2/pagination/) for instructions on how to paginate through the result set.\n\nOnly admins, account owners, or global API tokens on PagerDuty account [pricing plans](https://www.pagerduty.com/pricing) with the \"Audit Trail\" feature can access this endpoint.\n\nFor other role based access to audit records by resource ID, see the resource's API documentation.\n\nFor more information see the [Audit API Document](https://developer.pagerduty.com/docs/rest-api-v2/audit-records-api/).\n\nScoped OAuth requires: `audit_records.read`\n", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/cursor_limit" }, { "$ref": "#/components/parameters/cursor_cursor" }, { "$ref": "#/components/parameters/audit_since" }, { "$ref": "#/components/parameters/audit_until" }, { "$ref": "#/components/parameters/audit_root_resource_types" }, { "$ref": "#/components/parameters/audit_actor_type" }, { "$ref": "#/components/parameters/audit_actor_id" }, { "$ref": "#/components/parameters/audit_method_type" }, { "$ref": "#/components/parameters/audit_method_truncated_token" }, { "$ref": "#/components/parameters/audit_actions" } ], "responses": { "200": { "description": "Records matching the query criteria.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuditRecordResponseSchema" }, "examples": { "response": { "$ref": "#/components/examples/AuditRecordResponse" } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "402": { "$ref": "#/components/responses/PaymentRequired" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" }, "500": { "$ref": "#/components/responses/InternalServerError" } } } }, "/automation_actions/actions": { "description": "List and create Automation Actions", "post": { "summary": "Create an Automation Action", "tags": [ "Automation Actions" ], "description": "Create a Script, Process Automation, or Runbook Automation action\n", "operationId": "createAutomationAction", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "action": { "oneOf": [ { "$ref": "#/components/schemas/AutomationActionsScriptActionPostBody" }, { "$ref": "#/components/schemas/AutomationActionsProcessAutomationJobActionPostBody" } ], "discriminator": { "propertyName": "action_type", "mapping": { "script": "#/components/schemas/AutomationActionsScriptActionPostBody", "process_automation": "#/components/schemas/AutomationActionsProcessAutomationJobActionPostBody" } } } }, "required": [ "action" ] }, "examples": { "request": { "value": { "action": { "name": "Restart apache", "description": "Restarts apache on the us-west-2-shopping-cart host", "action_type": "script", "action_data_reference": { "script": "java --version" }, "teams": [ { "id": "PQ9K7I8", "type": "team_reference" } ], "services": [ { "id": "PRDRWUJ", "type": "service_reference" } ] } } } } } }, "required": true }, "responses": { "201": { "description": "Action information", "content": { "application/json": { "schema": { "type": "object", "properties": { "action": { "oneOf": [ { "$ref": "#/components/schemas/AutomationActionsScriptActionWithTeams" }, { "$ref": "#/components/schemas/AutomationActionsProcessAutomationJobActionWithTeams" } ], "discriminator": { "propertyName": "action_type", "mapping": { "script": "#/components/schemas/AutomationActionsScriptActionWithTeams", "process_automation": "#/components/schemas/AutomationActionsProcessAutomationJobActionWithTeams" } } } }, "required": [ "action" ] }, "examples": { "response": { "summary": "Response Example", "value": { "action": { "action_data_reference": { "script": "java --version" }, "action_type": "script", "type": "action", "creation_time": "2022-11-08T14:54:02.267989Z", "description": "Restarts apache on the us-west-2-shopping-cart host", "id": "01DA2MLYN0J5EFC1LKWXUKDDKT", "modify_time": "2022-11-08T14:54:02.267989Z", "name": "Restart apache", "privileges": { "permissions": [ "read", "update", "delete", "invoke" ] }, "services": [ { "id": "PRDRWUJ", "type": "service_reference" } ], "teams": [ { "id": "PQ9K7I8", "type": "team_reference" } ] } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "402": { "$ref": "#/components/responses/PaymentRequired" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" }, "500": { "$ref": "#/components/responses/InternalServerError" } } }, "get": { "summary": "List Automation Actions", "tags": [ "Automation Actions" ], "operationId": "getAllAutomationActions", "description": "Lists Automation Actions matching provided query params.\n\nThe returned records are sorted by action name in alphabetical order.\n\nSee [`Cursor-based pagination`](https://developer.pagerduty.com/docs/rest-api-v2/pagination/) for instructions on how to paginate through the result set.\n", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/cursor_limit" }, { "$ref": "#/components/parameters/cursor_cursor" }, { "$ref": "#/components/parameters/automation_actions_name" }, { "$ref": "#/components/parameters/automation_actions_runner_id" }, { "$ref": "#/components/parameters/automation_actions_classification" }, { "$ref": "#/components/parameters/automation_actions_team_id" }, { "$ref": "#/components/parameters/automation_actions_service_id" }, { "$ref": "#/components/parameters/automation_actions_action_type" } ], "responses": { "200": { "description": "An array of actions", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "properties": { "actions": { "type": "array", "items": { "oneOf": [ { "$ref": "#/components/schemas/AutomationActionsScriptAction" }, { "$ref": "#/components/schemas/AutomationActionsProcessAutomationJobAction" } ], "discriminator": { "propertyName": "action_type", "mapping": { "script": "#/components/schemas/AutomationActionsScriptAction", "process_automation": "#/components/schemas/AutomationActionsProcessAutomationJobAction" } } } } }, "required": [ "actions" ] }, { "type": "object", "properties": { "privileges": { "$ref": "#/components/schemas/AutomationActionsUserPermissions" } } }, { "$ref": "#/components/schemas/CursorPagination" } ] }, "examples": { "response": { "summary": "Response Example", "value": { "actions": [ { "action_data_reference": { "script": "java --version" }, "action_type": "script", "type": "action", "creation_time": "2022-11-08T14:54:02.267989Z", "description": "Restarts apache on the us-west-2-shopping-cart host", "id": "01DA2MLYN0J5EFC1LKWXUKDDKT", "modify_time": "2022-11-08T14:54:02.267989Z", "name": "Restart apache", "privileges": { "permissions": [ "read", "update", "delete", "invoke" ] }, "services": [ { "id": "PRDRWUJ", "type": "service_reference" } ] }, { "action_data_reference": { "script": "java --version" }, "action_type": "script", "type": "action", "creation_time": "2022-11-08T14:54:02.267989Z", "description": "Restarts apache on the us-west-2-shopping-cart host", "id": "01DACKMP6Q3Y5YG51ENA26CX2I", "modify_time": "2022-11-08T14:54:02.267989Z", "name": "Restart apache", "privileges": { "permissions": [ "read", "update" ] } } ], "limit": 2, "next_cursor": null, "privileges": { "permissions": [ "read", "update" ] } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "402": { "$ref": "#/components/responses/PaymentRequired" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" }, "500": { "$ref": "#/components/responses/InternalServerError" } } } }, "/automation_actions/actions/{id}": { "description": "View, Update and Delete Automation Actions", "get": { "summary": "Get an Automation Action", "tags": [ "Automation Actions" ], "operationId": "getAutomationAction", "description": "Get an Automation Action\n", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" } ], "responses": { "200": { "description": "Action information", "content": { "application/json": { "schema": { "type": "object", "properties": { "action": { "oneOf": [ { "$ref": "#/components/schemas/AutomationActionsScriptActionWithTeams" }, { "$ref": "#/components/schemas/AutomationActionsProcessAutomationJobActionWithTeams" } ], "discriminator": { "propertyName": "action_type", "mapping": { "script": "#/components/schemas/AutomationActionsScriptActionWithTeams", "process_automation": "#/components/schemas/AutomationActionsProcessAutomationJobActionWithTeams" } } } }, "required": [ "action" ] }, "examples": { "response": { "value": { "action": { "action_data_reference": { "script": "java --version" }, "action_type": "script", "type": "action", "creation_time": "2022-11-08T14:54:02.267989Z", "description": "Restarts apache on the us-west-2-shopping-cart host", "id": "01DA2MLYN0J5EFC1LKWXUKDDKT", "modify_time": "2022-11-08T14:54:02.267989Z", "name": "Restart apache", "privileges": { "permissions": [ "read", "update", "delete", "invoke" ] }, "services": [ { "id": "PRDRWUJ", "type": "service_reference" } ], "teams": [ { "id": "PQ9K7I8", "type": "team_reference" } ] } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "402": { "$ref": "#/components/responses/PaymentRequired" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" }, "500": { "$ref": "#/components/responses/InternalServerError" } } }, "delete": { "summary": "Delete an Automation Action", "tags": [ "Automation Actions" ], "operationId": "deleteAutomationAction", "description": "Delete an Automation Action\n", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" } ], "responses": { "204": { "description": "Deleted successfully." }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "402": { "$ref": "#/components/responses/PaymentRequired" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" }, "500": { "$ref": "#/components/responses/InternalServerError" } } }, "put": { "summary": "Update an Automation Action", "tags": [ "Automation Actions" ], "operationId": "updateAutomationAction", "description": "Updates an Automation Action\n", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "action": { "oneOf": [ { "$ref": "#/components/schemas/AutomationActionsScriptActionPutBody" }, { "$ref": "#/components/schemas/AutomationActionsProcessAutomationJobActionPutBody" } ], "discriminator": { "propertyName": "action_type", "mapping": { "script": "#/components/schemas/AutomationActionsScriptActionPutBody", "process_automation": "#/components/schemas/AutomationActionsProcessAutomationJobActionPutBody" } } } }, "required": [ "action" ] } } }, "required": true }, "responses": { "200": { "description": "Action information", "content": { "application/json": { "schema": { "type": "object", "properties": { "action": { "oneOf": [ { "$ref": "#/components/schemas/AutomationActionsScriptActionWithTeams" }, { "$ref": "#/components/schemas/AutomationActionsProcessAutomationJobActionWithTeams" } ], "discriminator": { "propertyName": "action_type", "mapping": { "script": "#/components/schemas/AutomationActionsScriptActionWithTeams", "process_automation": "#/components/schemas/AutomationActionsProcessAutomationJobActionWithTeams" } } } }, "required": [ "action" ] }, "examples": { "response": { "value": { "action": { "action_data_reference": { "script": "java --version" }, "action_type": "script", "type": "action", "creation_time": "2022-11-08T14:54:02.267989Z", "description": "Restarts apache on the us-west-2-shopping-cart host", "id": "01DA2MLYN0J5EFC1LKWXUKDDKT", "modify_time": "2022-11-08T14:54:02.267989Z", "name": "Restart apache", "privileges": { "permissions": [ "read", "update", "delete", "invoke" ] }, "services": [ { "id": "PRDRWUJ", "type": "service_reference" } ], "teams": [ { "id": "PQ9K7I8", "type": "team_reference" } ] } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "402": { "$ref": "#/components/responses/PaymentRequired" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" }, "500": { "$ref": "#/components/responses/InternalServerError" } } } }, "/automation_actions/actions/{id}/invocations": { "description": "Create an Invocation", "post": { "summary": "Create an Invocation", "tags": [ "Automation Actions" ], "description": "Invokes an Action\n", "operationId": "createAutomationActionInvocation", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "invocation": { "type": "object", "properties": { "metadata": { "type": "object", "properties": { "incident_id": { "type": "string" } }, "required": [ "incident_id" ] } }, "required": [ "metadata" ] } }, "required": [ "invocation" ] }, "examples": { "request": { "value": { "invocation": { "metadata": { "incident_id": "Q2LAR4ADCXC8IB" } } } } } } }, "required": true }, "responses": { "201": { "description": "Created invocation", "content": { "application/json": { "schema": { "type": "object", "properties": { "invocation": { "allOf": [ { "$ref": "#/components/schemas/AutomationActionsInvocation" }, { "type": "object" } ] } }, "required": [ "invocation" ] }, "examples": { "response": { "summary": "Response Example", "value": { "invocation": { "id": "01DBYD4A25RCXAXQDC9ZX0678V", "type": "invocation", "action_snapshot": { "name": "Restart apache", "action_type": "script", "action_data_reference": { "script": "print(\\Hello from a Python script!\\)", "invocation_command": "/usr/local/bin/python3" } }, "runner_id": "01COQFFNVWIONSLY8C66YTU2O5", "timing": [ { "timestamp": "2022-11-08T22:57:14.756Z", "state": "sent" } ], "duration": 23, "state": "sent", "action_id": "01DAW70HK24JZORNE0P9C2V1L9", "metadata": { "agent": { "id": "PT4KHLK", "type": "user_reference" }, "incident": { "id": "Q2LAR4ADCXC8IB", "type": "incident_reference" } } } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "402": { "$ref": "#/components/responses/PaymentRequired" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" }, "500": { "$ref": "#/components/responses/InternalServerError" } } } }, "/automation_actions/actions/{id}/services": { "description": "Manage Action-Service associations", "get": { "summary": "Get all service references associated with an Automation Action", "tags": [ "Automation Actions" ], "operationId": "getAutomationActionsActionServiceAssociations", "description": "Gets all service references associated with an Automation Action", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" } ], "responses": { "200": { "description": "An array of service references", "content": { "application/json": { "schema": { "type": "object", "properties": { "services": { "type": "array", "items": { "$ref": "#/components/schemas/ServiceReference" } } } }, "examples": { "response": { "value": { "services": [ { "id": "PQ9K7I8", "type": "service_reference" } ] } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "402": { "$ref": "#/components/responses/PaymentRequired" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" }, "500": { "$ref": "#/components/responses/InternalServerError" } } }, "post": { "summary": "Associate an Automation Action with a service", "tags": [ "Automation Actions" ], "operationId": "createAutomationActionServiceAssocation", "description": "Associate an Automation Action with a service\n", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "service": { "$ref": "#/components/schemas/ServiceReference" } }, "required": [ "service" ] }, "examples": { "request": { "value": { "service": { "id": "PRDRWUJ", "type": "service_reference" } } } } } }, "required": true }, "responses": { "201": { "description": "The action-service association was created", "content": { "application/json": { "schema": { "type": "object", "properties": { "service": { "$ref": "#/components/schemas/ServiceReference" } }, "required": [ "service" ] }, "examples": { "response": { "value": { "service": { "id": "PRDRWUJ", "type": "service_reference" } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "402": { "$ref": "#/components/responses/PaymentRequired" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" }, "500": { "$ref": "#/components/responses/InternalServerError" } } } }, "/automation_actions/actions/{id}/services/{service_id}": { "description": "Manage Action-Service associations", "get": { "summary": "Get the details of an Automation Action / service relation", "tags": [ "Automation Actions" ], "operationId": "getAutomationActionsActionServiceAssociation", "description": "Gets the details of a Automation Action / service relation", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" }, { "$ref": "#/components/parameters/service_id" } ], "responses": { "200": { "description": "Service reference", "content": { "application/json": { "schema": { "type": "object", "properties": { "service": { "$ref": "#/components/schemas/ServiceReference" } } }, "examples": { "response": { "value": { "service": { "id": "PQ9K7I8", "type": "service_reference" } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "402": { "$ref": "#/components/responses/PaymentRequired" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" }, "500": { "$ref": "#/components/responses/InternalServerError" } } }, "delete": { "summary": "Disassociate an Automation Action from a service", "tags": [ "Automation Actions" ], "operationId": "deleteAutomationActionServiceAssociation", "description": "Disassociate an Automation Action from a service\n", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" }, { "$ref": "#/components/parameters/service_id" } ], "responses": { "204": { "description": "Ok." }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "402": { "$ref": "#/components/responses/PaymentRequired" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" }, "500": { "$ref": "#/components/responses/InternalServerError" } } } }, "/automation_actions/actions/{id}/teams": { "description": "Manage Action-Team associations", "post": { "summary": "Associate an Automation Action with a team", "tags": [ "Automation Actions" ], "operationId": "createAutomationActionTeamAssociation", "description": "Associate an Automation Action with a team\n", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "team": { "$ref": "#/components/schemas/TeamReference" } }, "required": [ "team" ] }, "examples": { "request": { "value": { "team": { "id": "PQ9K7I8", "type": "team_reference" } } } } } }, "required": true }, "responses": { "201": { "description": "The action-team association was created", "content": { "application/json": { "schema": { "type": "object", "properties": { "team": { "$ref": "#/components/schemas/TeamReference" } }, "required": [ "team" ] }, "examples": { "response": { "value": { "team": { "id": "PQ9K7I8", "type": "team_reference" } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "402": { "$ref": "#/components/responses/PaymentRequired" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" }, "500": { "$ref": "#/components/responses/InternalServerError" } } }, "get": { "summary": "Get all team references associated with an Automation Action", "tags": [ "Automation Actions" ], "operationId": "getAutomationActionsActionTeamAssociations", "description": "Gets all team references associated with an Automation Action", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "teams": { "type": "array", "items": { "$ref": "#/components/schemas/TeamReference" } } } }, "examples": { "response": { "value": { "teams": [ { "id": "PQ9K7I8", "type": "team_reference" } ] } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "402": { "$ref": "#/components/responses/PaymentRequired" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" }, "500": { "$ref": "#/components/responses/InternalServerError" } } } }, "/automation_actions/actions/{id}/teams/{team_id}": { "description": "Manage Action-Team associations", "delete": { "summary": "Disassociate an Automation Action from a team", "tags": [ "Automation Actions" ], "operationId": "deleteAutomationActionTeamAssociation", "description": "Disassociate an Automation Action from a team\n", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" }, { "$ref": "#/components/parameters/team_id" } ], "responses": { "204": { "description": "Ok." }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "402": { "$ref": "#/components/responses/PaymentRequired" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" }, "500": { "$ref": "#/components/responses/InternalServerError" } } }, "get": { "summary": "Get the details of an Automation Action / team relation", "tags": [ "Automation Actions" ], "operationId": "getAutomationActionsActionTeamAssociation", "description": "Gets the details of an Automation Action / team relation", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" }, { "$ref": "#/components/parameters/team_id" } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "team": { "$ref": "#/components/schemas/TeamReference" } } }, "examples": { "response": { "value": { "team": { "id": "PQ9K7I8", "type": "team_reference" } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "402": { "$ref": "#/components/responses/PaymentRequired" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" }, "500": { "$ref": "#/components/responses/InternalServerError" } } } }, "/automation_actions/invocations": { "description": "List Invocations", "get": { "summary": "List Invocations", "tags": [ "Automation Actions" ], "description": "List Invocations\n", "operationId": "listAutomationActionInvocations", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/automation_actions_invocation_state" }, { "$ref": "#/components/parameters/automation_actions_not_invocation_state" }, { "$ref": "#/components/parameters/automation_actions_incident_id" }, { "$ref": "#/components/parameters/automation_actions_action_id" } ], "responses": { "200": { "description": "Invocations matching the criteria", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "properties": { "invocations": { "type": "array", "description": "List of invocations sorted by creation_time in reverse chronological order (newest invocations first). At most 25 invocations are returned.", "items": { "$ref": "#/components/schemas/AutomationActionsInvocation" } } }, "required": [ "invocations" ] } ] }, "examples": { "response": { "summary": "Response Example", "value": { "invocations": [ { "id": "01DBYD4A25RCXAXQDC9ZX0678V", "type": "invocation", "action_id": "01DAW70HK24JZORNE0P9C2V1L9", "action_snapshot": { "name": "Restart Apache", "action_type": "process_automation", "action_data_reference": { "process_automation_job_arguments": "prod-datapipe", "process_automation_node_filter": "mynode1 !nodename: mynode2", "process_automation_job_id": "79c199bba1aff6e519f198457f5ec0fc" } }, "duration": 5, "metadata": { "agent": { "id": "PRJ94S1", "type": "user_reference" }, "incident": { "id": "Q2LAR4ADCXC8IB", "type": "incident_reference" } }, "runner_id": "01COQFFNVWIONSLY8C66YTU2O5", "state": "completed", "timing": [ { "creation_timestamp": "2022-11-08T06:30:05.018949Z", "state": "created" }, { "creation_timestamp": "2022-11-08T06:30:10.069000Z", "state": "running" }, { "creation_timestamp": "2022-11-08T06:30:10.083000Z", "state": "completed" }, { "creation_timestamp": "2022-11-08T06:30:10.066000Z", "state": "queued" } ] } ] } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "402": { "$ref": "#/components/responses/PaymentRequired" }, "403": { "$ref": "#/components/responses/Forbidden" }, "429": { "$ref": "#/components/responses/TooManyRequests" }, "500": { "$ref": "#/components/responses/InternalServerError" } } } }, "/automation_actions/invocations/{id}": { "description": "View an Automation Actions Invocation", "get": { "summary": "Get an Invocation", "tags": [ "Automation Actions" ], "operationId": "getAutomationActionsInvocation", "description": "Get an Automation Action Invocation\n", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" } ], "responses": { "200": { "description": "Invocation information", "content": { "application/json": { "schema": { "type": "object", "properties": { "invocation": { "$ref": "#/components/schemas/AutomationActionsInvocation" } }, "required": [ "invocation" ] }, "examples": { "response": { "summary": "Response Example", "value": { "invocation": { "id": "01DBYD4A25RCXAXQDC9ZX0678V", "type": "invocation", "action_id": "01DAW70HK24JZORNE0P9C2V1L9", "action_snapshot": { "name": "Restart Apache", "action_type": "process_automation", "action_data_reference": { "process_automation_job_arguments": "prod-datapipe", "process_automation_node_filter": "mynode1 !nodename: mynode2", "process_automation_job_id": "79c199bba1aff6e519f198457f5ec0fc" } }, "duration": 5, "metadata": { "agent": { "id": "PRJ94S1", "type": "user_reference" }, "incident": { "id": "Q2LAR4ADCXC8IB", "type": "incident_reference" } }, "runner_id": "01COQFFNVWIONSLY8C66YTU2O5", "state": "completed", "timing": [ { "creation_timestamp": "2022-11-08T06:30:05.018949Z", "state": "created" }, { "creation_timestamp": "2022-11-08T06:30:10.069000Z", "state": "running" }, { "creation_timestamp": "2022-11-08T06:30:10.083000Z", "state": "completed" }, { "creation_timestamp": "2022-11-08T06:30:10.066000Z", "state": "queued" } ] } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "402": { "$ref": "#/components/responses/PaymentRequired" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" }, "500": { "$ref": "#/components/responses/InternalServerError" } } } }, "/automation_actions/runners": { "description": "List and create Automation Action runners.", "post": { "summary": "Create an Automation Action runner.", "tags": [ "Automation Actions" ], "description": "Create a Process Automation or a Runbook Automation runner.\n", "operationId": "createAutomationActionsRunner", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "runner": { "oneOf": [ { "$ref": "#/components/schemas/AutomationActionsRunnerSidecarPostBody" }, { "$ref": "#/components/schemas/AutomationActionsRunnerRunbookPostBody" } ], "discriminator": { "propertyName": "runner_type" } } }, "required": [ "runner" ] }, "examples": { "request": { "value": { "runner": { "name": "us-west-2 prod sidecar runner", "description": "us-west-2 prod sidecar runner provisioned by SRE", "runner_type": "sidecar", "teams": [ { "id": "PQ9K7I8", "type": "team_reference" } ] } } } } } }, "required": true }, "responses": { "201": { "description": "Runner information", "content": { "application/json": { "schema": { "type": "object", "properties": { "runner": { "allOf": [ { "$ref": "#/components/schemas/AutomationActionsRunner" }, { "type": "object", "properties": { "secret": { "description": "Secret used for authentication of sidecar runner_types", "type": "string" } } } ] } }, "required": [ "runner" ] }, "examples": { "response": { "summary": "Response Example", "value": { "runner": { "id": "01DA2MLYN0J5EFC1LKWXUKDDKT", "name": "us-west-2 prod sidecar runner", "summary": "us-west-2 prod sidecar runner", "type": "runner", "description": "us-west-2 prod sidecar runner provisioned by SRE", "creation_time": "2022-10-21T19:42:52.127369Z", "runner_type": "sidecar", "status": "Configured", "secret": "01DAZ9ZJ97OE23JUI6WH9XN7BK", "teams": [ { "id": "PQ9K7I8", "type": "team_reference" } ], "privileges": { "permissions": [ "read", "update" ] } } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "402": { "$ref": "#/components/responses/PaymentRequired" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" }, "500": { "$ref": "#/components/responses/InternalServerError" } } }, "get": { "summary": "List Automation Action runners", "tags": [ "Automation Actions" ], "operationId": "getAutomationActionsRunners", "description": "Lists Automation Action runners matching provided query params.\nThe returned records are sorted by runner name in alphabetical order.\n\nSee [`Cursor-based pagination`](https://developer.pagerduty.com/docs/rest-api-v2/pagination/) for instructions on how to paginate through the result set.\n", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/cursor_limit" }, { "$ref": "#/components/parameters/cursor_cursor" }, { "$ref": "#/components/parameters/automation_actions_name" }, { "$ref": "#/components/parameters/automation_actions_runners_include" } ], "responses": { "200": { "description": "Runners matching the criteria.", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "properties": { "runners": { "type": "array", "items": { "$ref": "#/components/schemas/AutomationActionsRunner" } } } }, { "type": "object", "properties": { "privileges": { "$ref": "#/components/schemas/AutomationActionsUserPermissions" } } }, { "$ref": "#/components/schemas/CursorPagination" } ] }, "examples": { "response": { "summary": "Response Example", "value": { "runners": [ { "id": "01DACKMP6Q3Y5YG51ENA26CX2I", "name": "us-west-2 prod runbook runner", "description": "us-west-2 prod runbook runner provisioned by SRE", "creation_time": "2022-10-21T19:42:52.127369Z", "type": "runner", "runner_type": "runbook", "runbook_base_uri": "acme.prod", "status": "Configured", "teams": [ { "id": "PQ9K7I8", "type": "team_reference" } ], "privileges": { "permissions": [ "read", "update", "delete" ] } }, { "id": "01DA2MLYN0J5EFC1LKWXUKDDKT", "name": "us-west-2 prod sidecar runner", "description": "us-west-2 prod sidecar runner provisioned by SRE", "creation_time": "2022-10-21T19:42:52.127369Z", "type": "runner", "runner_type": "sidecar", "status": "Configured", "privileges": { "permissions": [ "read", "update" ] } } ], "privileges": { "permissions": [ "create" ] }, "limit": 2, "next_cursor": "eyJjMiI6IjAxREEyTUxZTjBKNUVGQzFMS1dYVUtEREtUIiwiYzEiOiJSQkEgU2hhcmVkIFN0YWdpbmcgSW5zdGFuY2UifQ==" } } } } } }, "401": { "$ref": "#/components/responses/Unauthorized" }, "402": { "$ref": "#/components/responses/PaymentRequired" }, "429": { "$ref": "#/components/responses/TooManyRequests" }, "500": { "$ref": "#/components/responses/InternalServerError" } } } }, "/automation_actions/runners/{id}": { "description": "View, Update and Delete Automation Action runners", "get": { "summary": "Get an Automation Action runner", "tags": [ "Automation Actions" ], "operationId": "getAutomationActionsRunner", "description": "Get an Automation Action runner\n", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" } ], "responses": { "200": { "description": "Runner information", "content": { "application/json": { "schema": { "type": "object", "properties": { "runner": { "$ref": "#/components/schemas/AutomationActionsRunner" } }, "required": [ "runner" ] }, "examples": { "response": { "summary": "Response Example", "value": { "runner": { "id": "01DA2MLYN0J5EFC1LKWXUKDDKT", "name": "us-west-2 prod sidecar runner", "summary": "us-west-2 prod sidecar runner", "type": "runner", "description": "us-west-2 prod sidecar runner provisioned by SRE", "creation_time": "2022-10-21T19:42:52.127369Z", "runner_type": "sidecar", "status": "Configured", "teams": [ { "id": "PQ9K7I8", "type": "team_reference" } ], "privileges": { "permissions": [ "read", "update" ] } } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "402": { "$ref": "#/components/responses/PaymentRequired" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" }, "500": { "$ref": "#/components/responses/InternalServerError" } } }, "put": { "summary": "Update an Automation Action runner", "tags": [ "Automation Actions" ], "operationId": "updateAutomationActionsRunner", "description": "Update an Automation Action runner\n", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "runner": { "oneOf": [ { "$ref": "#/components/schemas/AutomationActionsRunnerSidecarBody" }, { "$ref": "#/components/schemas/AutomationActionsRunnerRunbookBody" } ], "discriminator": { "propertyName": "runner_type" } } }, "required": [ "runner" ] }, "examples": { "request": { "value": { "runner": { "name": "us-west-2 prod sidecar runner", "description": "us-west-2 prod sidecar runner provisioned by SRE" } } } } } }, "required": true }, "responses": { "200": { "description": "Runner information", "content": { "application/json": { "schema": { "type": "object", "properties": { "runner": { "$ref": "#/components/schemas/AutomationActionsRunner" } }, "required": [ "runner" ] }, "examples": { "response": { "summary": "Response Example", "value": { "runner": { "id": "01DA2MLYN0J5EFC1LKWXUKDDKT", "name": "us-west-2 prod sidecar runner", "summary": "us-west-2 prod sidecar runner", "type": "runner", "description": "us-west-2 prod sidecar runner provisioned by SRE", "creation_time": "2022-10-21T19:42:52.127369Z", "runner_type": "sidecar", "status": "Configured", "teams": [ { "id": "PQ9K7I8", "type": "team_reference" } ], "privileges": { "permissions": [ "read", "update" ] } } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "402": { "$ref": "#/components/responses/PaymentRequired" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" }, "500": { "$ref": "#/components/responses/InternalServerError" } } }, "delete": { "summary": "Delete an Automation Action runner", "tags": [ "Automation Actions" ], "operationId": "deleteAutomationActionsRunner", "description": "Delete an Automation Action runner\n", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" } ], "responses": { "204": { "description": "Deleted successfully." }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "402": { "$ref": "#/components/responses/PaymentRequired" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" }, "500": { "$ref": "#/components/responses/InternalServerError" } } } }, "/automation_actions/runners/{id}/teams": { "description": "Manage Runner-Team associations", "post": { "summary": "Associate a runner with a team", "tags": [ "Automation Actions" ], "operationId": "createAutomationActionsRunnerTeamAssociation", "description": "Associate a runner with a team\n", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "team": { "$ref": "#/components/schemas/TeamReference" } }, "required": [ "team" ] }, "examples": { "request": { "value": { "team": { "id": "PQ9K7I8", "type": "team_reference" } } } } } }, "required": true }, "responses": { "201": { "description": "The runner-team association that was created.", "content": { "application/json": { "schema": { "type": "object", "properties": { "team": { "$ref": "#/components/schemas/TeamReference" } }, "required": [ "team" ] }, "examples": { "response": { "summary": "Response Example", "value": { "team": { "id": "PQ9K7I8", "type": "team_reference" } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "402": { "$ref": "#/components/responses/PaymentRequired" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" }, "500": { "$ref": "#/components/responses/InternalServerError" } } }, "get": { "summary": "Get all team references associated with a runner", "tags": [ "Automation Actions" ], "operationId": "getAutomationActionsRunnerTeamAssociations", "description": "Gets all team references associated with a runner", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "teams": { "type": "array", "items": { "$ref": "#/components/schemas/TeamReference" } } } }, "examples": { "response": { "value": { "teams": [ { "id": "PQ9K7I8", "type": "team_reference" } ] } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "402": { "$ref": "#/components/responses/PaymentRequired" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" }, "500": { "$ref": "#/components/responses/InternalServerError" } } } }, "/automation_actions/runners/{id}/teams/{team_id}": { "description": "Manage Runner-Team associations", "delete": { "summary": "Disassociate a runner from a team", "tags": [ "Automation Actions" ], "operationId": "deleteAutomationActionsRunnerTeamAssociation", "description": "Disassociates a runner from a team\n", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" }, { "$ref": "#/components/parameters/team_id" } ], "responses": { "204": { "description": "Ok." }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "402": { "$ref": "#/components/responses/PaymentRequired" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" }, "500": { "$ref": "#/components/responses/InternalServerError" } } }, "get": { "summary": "Get the details of a runner / team relation", "tags": [ "Automation Actions" ], "operationId": "getAutomationActionsRunnerTeamAssociation", "description": "Gets the details of a runner / team relation", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" }, { "$ref": "#/components/parameters/team_id" } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "team": { "$ref": "#/components/schemas/TeamReference" } } }, "examples": { "response": { "value": { "team": { "id": "PQ9K7I8", "type": "team_reference" } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "402": { "$ref": "#/components/responses/PaymentRequired" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" }, "500": { "$ref": "#/components/responses/InternalServerError" } } } }, "/business_services": { "description": "List and create Business Services.", "get": { "x-pd-requires-scope": "services.read", "tags": [ "Business Services" ], "operationId": "listBusinessServices", "description": "List existing Business Services.\n\nBusiness services model capabilities that span multiple technical services and that may be owned by several different teams.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#business-services)\n\nScoped OAuth requires: `services.read`\n", "summary": "List Business Services", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/offset_limit" }, { "$ref": "#/components/parameters/offset_offset" }, { "$ref": "#/components/parameters/offset_total" } ], "responses": { "200": { "description": "A paginated array of services.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/Pagination" }, { "type": "object", "properties": { "business_services": { "type": "array", "items": { "$ref": "#/components/schemas/BusinessService" } } }, "required": [ "business_services" ] } ] }, "examples": { "response": { "summary": "Response Example", "value": { "business_services": [ { "type": "business_service", "self": "https://api.pagerduty.com/business_services/P3U7V58", "html_url": null, "point_of_contact": "PagerDuty Admin", "name": "stand-alone node", "team": null, "id": "P3U7V58", "description": "Very important business function", "summary": "stand-alone node" }, { "type": "business_service", "self": "https://api.pagerduty.com/business_services/P1L1YEE", "html_url": null, "point_of_contact": "PagerDuty Admin", "name": "Cross-tier business service", "id": "P1L1YEE", "summary": "Cross-tier business service", "team": { "id": "PQ9K7I8", "type": "team_reference", "self": "https://api.pagerduty.com/teams/PQ9K7I8" } } ], "limit": 100, "offset": 0, "total": null, "more": false } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" } } }, "post": { "x-pd-requires-scope": "services.write", "tags": [ "Business Services" ], "operationId": "createBusinessService", "description": "Create a new Business Service.\n\nBusiness services model capabilities that span multiple technical services and that may be owned by several different teams.\n\nThere is a limit of 5,000 business services per account. If the limit is reached, the API will respond with an error.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#business-services)\n\nScoped OAuth requires: `services.write`\n", "summary": "Create a Business Service", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "business_service": { "type": "object", "description": "The Business Service to be created", "properties": { "name": { "type": "string", "description": "The name of the Business Service." }, "description": { "type": "string", "description": "The description of the Business Service." }, "point_of_contact": { "type": "string", "description": "The owner of the Business Service." }, "team": { "type": "object", "title": "Team", "description": "Reference to the team that owns the Business Service.", "properties": { "id": { "type": "string", "description": "The Team ID" } } } } } } }, "examples": { "request": { "summary": "Request Example", "value": { "business_service": { "name": "Self-serve mobile checkout", "description": "Checkout service for our mobile clients", "point_of_contact": "PagerDuty Admin", "team": { "id": "P3ZQXDF" } } } } } } } }, "responses": { "200": { "description": "The Business Service that was created.", "content": { "application/json": { "schema": { "type": "object", "properties": { "business_service": { "$ref": "#/components/schemas/BusinessService" } }, "required": [ "business_service" ] }, "examples": { "response": { "summary": "Response Example", "value": { "business_service": { "id": "P1L1YEE", "type": "business_service", "self": "https://api.pagerduty.com/business_services/P1L1YEE", "html_url": null, "point_of_contact": "PagerDuty Admin", "name": "Self-serve mobile checkout", "description": "Checkout service for our mobile clients.", "summary": "Self-serve mobile checkout", "team": { "id": "P3ZQXDF", "type": "team_reference", "self": "https://api.pagerduty.com/teams/P3ZQXDF" } } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" } } } }, "/business_services/{id}": { "description": "Manage a Business Service.", "get": { "x-pd-requires-scope": "services.read", "tags": [ "Business Services" ], "operationId": "getBusinessService", "description": "Get details about an existing Business Service.\n\nBusiness services model capabilities that span multiple technical services and that may be owned by several different teams.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#business-services)\n\nScoped OAuth requires: `services.read`\n", "summary": "Get a Business Service", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" } ], "responses": { "200": { "description": "The service business requested.", "content": { "application/json": { "schema": { "type": "object", "properties": { "business_service": { "$ref": "#/components/schemas/BusinessService" } }, "required": [ "business_service" ] }, "examples": { "response": { "summary": "Response Example", "value": { "business_service": { "id": "P1L1YEE", "type": "business_service", "self": "https://api.pagerduty.com/business_services/P1L1YEE", "html_url": null, "name": "Cross-tier business service", "description": "Business service affected by multiple teams", "point_of_contact": "PagerDuty Admin", "summary": "Cross-tier business services", "team": { "id": "PQ9K7I8", "type": "team_reference", "self": "https://api.pagerduty.com/teams/PQ9K7I8" } } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" } } }, "delete": { "x-pd-requires-scope": "services.write", "tags": [ "Business Services" ], "operationId": "deleteBusinessService", "description": "Delete an existing Business Service.\n\nOnce the service is deleted, it will not be accessible from the web UI and new incidents won't be able to be created for this service.\n\nBusiness services model capabilities that span multiple technical services and that may be owned by several different teams.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#business-services)\n\nScoped OAuth requires: `services.write`\n", "summary": "Delete a Business Service", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" } ], "responses": { "204": { "description": "The Business Service was deleted successfully." }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" } } }, "put": { "x-pd-requires-scope": "services.write", "tags": [ "Business Services" ], "operationId": "updateBusinessService", "description": "Update an existing Business Service. NOTE that this endpoint also accepts the PATCH verb.\n\nBusiness services model capabilities that span multiple technical services and that may be owned by several different teams.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#business-services)\n\nScoped OAuth requires: `services.write`\n", "summary": "Update a Business Service", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "business_service": { "type": "object", "description": "The Business Service to be created", "properties": { "name": { "type": "string", "description": "The name of the Business Service." }, "description": { "type": "string", "description": "The description of the Business Service." }, "point_of_contact": { "type": "string", "description": "The owner of the Business Service." }, "team": { "type": "object", "title": "Team", "description": "Reference to the team that owns the Business Service.", "properties": { "id": { "type": "string", "description": "The team ID" } } } } } } }, "examples": { "request": { "summary": "Request Example", "value": { "business_service": { "name": "Self-serve mobile checkout", "description": "Checkout service for our mobile clients", "point_of_contact": "PagerDuty Admin", "team": { "id": "P3ZQXDF" } } } } } } } }, "responses": { "200": { "description": "The Business Service that was updated.", "content": { "application/json": { "schema": { "type": "object", "properties": { "business_service": { "$ref": "#/components/schemas/BusinessService" } }, "required": [ "business_service" ] }, "examples": { "response": { "summary": "Response Example", "value": { "business_service": { "id": "P1L1YEE", "type": "business_service", "self": "https://api.pagerduty.com/business_services/P1L1YEE", "html_url": null, "point_of_contact": "PagerDuty Admin", "name": "Self-serve mobile checkout", "description": "Checkout service for our mobile clients.", "summary": "Self-serve mobile checkout", "team": { "id": "P3ZQXDF", "type": "team_reference", "self": "https://api.pagerduty.com/teams/P3ZQXDF" } } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" } } } }, "/business_services/{id}/account_subscription": { "post": { "x-pd-requires-scope": "subscribers.write", "summary": "Create Business Service Account Subscription", "tags": [ "Business Services" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "account_is_subscribed": { "type": "boolean" } }, "required": [ "account_is_subscribed" ] }, "examples": { "response": { "summary": "Response Example", "value": { "account_is_subscribed": true } } } } } }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "422": { "$ref": "#/components/responses/UnprocessableEntity" } }, "operationId": "createBusinessServiceAccountSubscription", "description": "Subscribe your Account to a Business Service.\n\nScoped OAuth requires: `subscribers.write`\n", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/id" } ] }, "delete": { "x-pd-requires-scope": "subscribers.write", "summary": "Delete Business Service Account Subscription", "tags": [ "Business Services" ], "operationId": "removeBusinessServiceAccountSubscription", "responses": { "204": { "description": "The account was unsubscribed successfully." }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "422": { "$ref": "#/components/responses/UnprocessableEntity" } }, "description": "Unsubscribe your Account from a Business Service.\n\nScoped OAuth requires: `subscribers.write`\n", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/id" } ] } }, "/business_services/{id}/subscribers": { "get": { "x-pd-requires-scope": "subscribers.read", "summary": "List Business Service Subscribers", "tags": [ "Business Services" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/Pagination" }, { "type": "object", "properties": { "subscribers": { "type": "array", "items": { "$ref": "#/components/schemas/NotificationSubscriber" } } } }, { "type": "object", "properties": { "account_id": { "type": "string", "description": "The ID of the account belonging to the subscriber entity" } } } ] }, "examples": { "response": { "summary": "Response Example", "value": { "limit": 100, "more": false, "offset": 0, "subscribers": [ { "subscriber_id": "PD1234", "subscriber_type": "user" }, { "subscriber_id": "PD1234", "subscriber_type": "team" } ], "account_id": "PD1234", "total": 2 } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "422": { "$ref": "#/components/responses/UnprocessableEntity" }, "429": { "$ref": "#/components/responses/TooManyRequests" } }, "operationId": "getBusinessServiceSubscribers", "description": "Retrieve a list of Notification Subscribers on the Business Service.\n\n\n> Users must be added through `POST /business_services/{id}/subscribers` to be returned from this endpoint.\nScoped OAuth requires: `subscribers.read`\n", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/id" } ] }, "post": { "x-pd-requires-scope": "subscribers.write", "summary": "Create Business Service Subscribers", "tags": [ "Business Services" ], "operationId": "createBusinessServiceNotificationSubscribers", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "subscriptions": { "type": "array", "items": { "$ref": "#/components/schemas/NotificationSubscriptionWithContext" } } } }, "examples": { "response": { "summary": "Response Example", "value": { "subscriptions": [ { "account_id": "PD1234", "subscribable_id": "PD1234", "subscribable_type": "business_service", "subscriber_id": "PD1234", "subscriber_type": "user", "result": "success" }, { "account_id": "PD1234", "subscribable_id": "PD1234", "subscribable_type": "business_service", "subscriber_id": "PD1234", "subscriber_type": "team", "result": "duplicate" }, { "account_id": "PD1234", "subscribable_id": "PD1235", "subscribable_type": "business_service", "subscriber_id": "PD1234", "subscriber_type": "team", "result": "unauthorized" } ] } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "422": { "$ref": "#/components/responses/UnprocessableEntity" } }, "description": "Subscribe the given entities to the given Business Service.\n\nScoped OAuth requires: `subscribers.write`\n", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/id" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "subscribers": { "type": "array", "uniqueItems": true, "minItems": 1, "items": { "$ref": "#/components/schemas/NotificationSubscriber" } } }, "required": [ "subscribers" ] }, "examples": { "request": { "summary": "Request Example", "value": { "subscribers": [ { "subscriber_id": "PD1234", "subscriber_type": "team" }, { "subscriber_id": "PD1235", "subscriber_type": "team" }, { "subscriber_id": "PD1234", "subscriber_type": "user" } ] } } } } }, "description": "The entities to subscribe." } } }, "/business_services/{id}/supporting_services/impacts": { "get": { "x-pd-requires-scope": "services.read", "summary": "List the supporting Business Services for the given Business Service Id, sorted by impacted status.", "tags": [ "Business Services" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/LiveListResponse" }, { "type": "object", "properties": { "services": { "type": "array", "items": { "$ref": "#/components/schemas/Impact" } } } }, { "type": "object", "properties": { "additional_fields": { "type": "object", "properties": { "total_impacted_count": { "type": "integer" } } } } } ] }, "examples": { "response": { "summary": "Response Example", "value": { "limit": 100, "more": false, "services": [ { "id": "PD1234", "name": "Web API", "type": "business_service", "status": "impacted", "additional_fields": { "highest_impacting_priority": { "id": "PQOMK4S", "order": 128 } } }, { "id": "PF9KMXH", "name": "Analytics Backend", "type": "business_service", "status": "not_impacted", "additional_fields": { "highest_impacting_priority": null } } ], "additional_fields": { "total_impacted_count": 1 } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "422": { "$ref": "#/components/responses/UnprocessableEntity" }, "429": { "$ref": "#/components/responses/TooManyRequests" } }, "operationId": "getBusinessServiceSupportingServiceImpacts", "description": "Retrieve of Business Services that support the given Business Service sorted by highest Impact with `status` included.\nThis endpoint does not return an exhaustive list of Business Services but rather provides access to the most impacted up to the limit of 200.\n\nThe returned Business Services are sorted first by Impact, secondarily by most recently impacted, and finally by name.\n\nTo get impact information about a specific set of Business Services, use the `ids[]` parameter on the `/business_services/impacts` endpoint.\nScoped OAuth requires: `services.read`\n", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/id" }, { "$ref": "#/components/parameters/early_access_bis" }, { "$ref": "#/components/parameters/impacts_additional_fields" }, { "$ref": "#/components/parameters/ids" } ] } }, "/business_services/{id}/unsubscribe": { "post": { "x-pd-requires-scope": "subscribers.write", "summary": "Remove Business Service Subscribers", "tags": [ "Business Services" ], "operationId": "removeBusinessServiceNotificationSubscriber", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "deleted_count": { "type": "number" }, "unauthorized_count": { "type": "number" }, "non_existent_count": { "type": "number" } }, "required": [ "deleted_count", "unauthorized_count", "non_existent_count" ] }, "examples": { "response": { "summary": "Response Example", "value": { "deleted_count": 1, "unauthorized_count": 1, "non_existent_count": 0 } } } } } }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "422": { "$ref": "#/components/responses/UnprocessableEntity" } }, "description": "Unsubscribes the matching Subscribers from a Business Service.\n\nScoped OAuth requires: `subscribers.write`\n", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/id" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "subscribers": { "type": "array", "uniqueItems": true, "minItems": 1, "items": { "$ref": "#/components/schemas/NotificationSubscriber" } } }, "required": [ "subscribers" ] }, "examples": { "request": { "summary": "Request Example", "value": { "subscribers": [ { "subscriber_id": "PD1234", "subscriber_type": "team" }, { "subscriber_id": "PD1234", "subscriber_type": "user" } ] } } } } }, "description": "The entities to unsubscribe." } } }, "/business_services/impactors": { "get": { "x-pd-requires-scope": "services.read", "summary": "List Impactors affecting Business Services", "tags": [ "Business Services" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/LiveListResponse" }, { "type": "object", "properties": { "impactors": { "type": "array", "items": { "$ref": "#/components/schemas/Impactor" } } } } ] }, "examples": { "response": { "summary": "Response Example", "value": { "limit": 100, "more": false, "impactors": [ { "id": "PD1234", "type": "incident" }, { "id": "PF9KMXH", "type": "incident" } ] } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "422": { "$ref": "#/components/responses/UnprocessableEntity" }, "429": { "$ref": "#/components/responses/TooManyRequests" } }, "operationId": "getBusinessServiceTopLevelImpactors", "description": "Retrieve a list of Impactors for the top-level Business Services on the account. Impactors are currently limited to Incidents.\n\nThis endpoint does not return an exhaustive list of Impactors but rather provides access to the highest priority Impactors for the Business Services in question up to the limit of 200.\n\nTo get Impactors for a specific set of Business Services, use the `ids[]` parameter.\n\nThe returned Impactors are sorted first by priority and secondarily by their creation date.\nScoped OAuth requires: `services.read`\n", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/early_access_bis" }, { "$ref": "#/components/parameters/ids" } ] } }, "/business_services/impacts": { "get": { "x-pd-requires-scope": "services.read", "summary": "List Business Services sorted by impacted status", "tags": [ "Business Services" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/LiveListResponse" }, { "type": "object", "properties": { "services": { "type": "array", "items": { "$ref": "#/components/schemas/Impact" } } } }, { "type": "object", "properties": { "additional_fields": { "type": "object", "properties": { "total_impacted_count": { "type": "integer" } } } } } ] }, "examples": { "response": { "summary": "Response Example", "value": { "limit": 100, "more": false, "services": [ { "id": "PD1234", "name": "Web API", "type": "business_service", "status": "impacted", "additional_fields": { "highest_impacting_priority": { "id": "PQOMK4S", "order": 128 } } }, { "id": "PF9KMXH", "name": "Analytics Backend", "type": "business_service", "status": "not_impacted", "additional_fields": { "highest_impacting_priority": null } } ], "additional_fields": { "total_impacted_count": 1 } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "422": { "$ref": "#/components/responses/UnprocessableEntity" }, "429": { "$ref": "#/components/responses/TooManyRequests" } }, "operationId": "getBusinessServiceImpacts", "description": "Retrieve a list top-level Business Services sorted by highest Impact with `status` included.\nWhen called without the `ids[]` parameter, this endpoint does not return an exhaustive list of Business Services but rather provides access to the most impacted up to the limit of 200.\n\nThe returned Business Services are sorted first by Impact, secondarily by most recently impacted, and finally by name.\n\nTo get impact information about a specific set of Business Services, use the `ids[]` parameter.\nScoped OAuth requires: `services.read`\n", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/early_access_bis" }, { "$ref": "#/components/parameters/impacts_additional_fields" }, { "$ref": "#/components/parameters/ids" } ] } }, "/business_services/priority_thresholds": { "get": { "x-pd-requires-scope": "services.read", "summary": "Get the global priority threshold for a Business Service to be considered impacted by an Incident", "tags": [ "Business Services" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "global_threshold": { "type": "object", "nullable": true, "properties": { "id": { "type": "string" }, "order": { "type": "integer" } } } } }, "examples": { "response": { "summary": "Response Example", "value": { "limit": 100, "more": false, "global_threshold": null, "type": "object", "properties": { "id": "string", "order": "integer" } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "422": { "$ref": "#/components/responses/UnprocessableEntity" }, "429": { "$ref": "#/components/responses/TooManyRequests" } }, "operationId": "getBusinessServicePriorityThresholds", "description": "Retrieves the priority threshold information for an account. Currently, there is a `global_threshold` that can be set for the account. Incidents that have a priority meeting or exceeding this threshold will be considered impacting on any Business Service that depends on the Service to which the Incident belongs.\nScoped OAuth requires: `services.read`\n", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/early_access_bis" } ] }, "delete": { "x-pd-requires-scope": "services.write", "summary": "Deletes the account-level priority threshold for Business Service impact", "tags": [ "Business Services" ], "responses": { "204": { "description": "The Priority Threshold for the account was successfully cleared." }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "429": { "$ref": "#/components/responses/TooManyRequests" } }, "operationId": "deleteBusinessServicePriorityThresholds", "description": "Clears the Priority Threshold for the account. If the priority threshold is cleared, any Incident with a Priority set will be able to impact Business Services.\nScoped OAuth requires: `services.write`\n", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/early_access_bis" } ] }, "put": { "x-pd-requires-scope": "services.write", "summary": "Set the Account-level priority threshold for Business Service impact.", "tags": [ "Business Services" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "description": "", "type": "object", "properties": { "global_threshold": { "type": "object", "properties": { "id": { "type": "string" }, "order": { "type": "number" } }, "required": [ "id", "order" ] } }, "required": [ "global_threshold" ] }, "examples": { "response": { "summary": "Response Example", "value": { "global_threshold": { "id": "PTLNKGF", "order": 256 } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "422": { "$ref": "#/components/responses/UnprocessableEntity" }, "429": { "$ref": "#/components/responses/TooManyRequests" }, "500": { "description": "Internal Server Error" } }, "operationId": "putBusinessServicePriorityThresholds", "description": "Set the Account-level priority threshold for Business Service.\nScoped OAuth requires: `services.write`\n", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/early_access_bis" } ], "requestBody": { "content": { "application/json": { "schema": { "description": "", "type": "object", "properties": { "global_threshold": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1 }, "order": { "type": "number" } }, "required": [ "id", "order" ] } }, "required": [ "global_threshold" ] }, "examples": { "example": { "value": { "global_threshold": { "id": "PTLNKGF", "order": 256 } } } } } }, "description": "Set the `id` and `order` of the global Priority Threshold. These values can be obtained by calling the `/priorities` endpoint.\n\nOnce set, Incidents must be at or above the specified level in order to impact Business Services. An exception to this rule is if the Incident has been added to the incident directly using the `PUT /incidents/{id}/business_services/{business_service_id}/impacts` endpoint." } } }, "/change_events": { "description": "List change events.", "get": { "x-pd-requires-scope": "change_events.read", "tags": [ "Change Events" ], "operationId": "listChangeEvents", "description": "List all of the existing Change Events.\n\nScoped OAuth requires: `change_events.read`\n", "summary": "List Change Events", "parameters": [ { "$ref": "#/components/parameters/offset_limit" }, { "$ref": "#/components/parameters/offset_offset" }, { "$ref": "#/components/parameters/offset_total" }, { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/team_ids" }, { "$ref": "#/components/parameters/integration_ids" }, { "$ref": "#/components/parameters/change_since" }, { "$ref": "#/components/parameters/change_until" } ], "responses": { "200": { "description": "The array of Change Events returned by the query.", "content": { "application/json": { "schema": { "type": "object", "properties": { "change_events": { "type": "array", "items": { "$ref": "#/components/schemas/ChangeEvent" } } } }, "examples": { "response": { "summary": "Response Example", "value": { "change_events": [ { "summary": "Build Success - Increase snapshot create timeout to 30 seconds", "id": "01BBYA6PEVW6A852BUO6QYUE7O", "timestamp": "2020-07-17T08:42:58Z", "type": "change_event", "source": "acme-build-pipeline-tool-default-i-9999", "integration": { "id": "PEYSGVF", "type": "inbound_integration_reference" }, "services": [ { "id": "PEYSGRV", "type": "service_reference" } ], "custom_details": { "build_state": "passed", "build_number": "2", "run_time": "1236s" }, "links": [ { "href": "https://acme.pagerduty.dev/build/2", "text": "View more details in Acme!" } ] }, { "summary": "Build Success - Increase snapshot create timeout to 15 seconds", "id": "01BBYA6PDIXPL8KO1HPIUL9CZN", "timestamp": "2020-07-17T07:42:58Z", "type": "change_event", "source": "acme-build-pipeline-tool-default-i-9999", "integration": { "id": "PEYSGVF", "type": "inbound_integration_reference" }, "services": [ { "id": "PEYSGRV", "type": "service_reference" } ], "custom_details": { "build_state": "passed", "build_number": "1", "run_time": "1233s" }, "links": [ { "href": "https://acme.pagerduty.dev/build/1", "text": "View more details in Acme!" } ] } ], "limit": null, "offset": null, "total": null, "more": false } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" } } }, "post": { "summary": "Create a Change Event", "description": "Sending Change Events is documented as part of the V2 Events API. See [`Send Change Event`](https://developer.pagerduty.com/api-reference/b3A6Mjc0ODI2Ng-send-change-events-to-the-pager-duty-events-api).\n", "operationId": "createChangeEvent", "tags": [ "Change Events" ], "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" } ], "responses": { "202": { "description": "See [`Send Change Event`](https://developer.pagerduty.com/api-reference/b3A6Mjc0ODI2Ng-send-change-events-to-the-pager-duty-events-api) in the V2 Events API reference." } } } }, "/change_events/{id}": { "description": "Read and update a Change Event.", "get": { "x-pd-requires-scope": "change_events.read", "tags": [ "Change Events" ], "operationId": "getChangeEvent", "description": "Get details about an existing Change Event.\n\nScoped OAuth requires: `change_events.read`\n", "summary": "Get a Change Event", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" } ], "responses": { "200": { "description": "The Change Event requested.", "content": { "application/json": { "schema": { "type": "object", "properties": { "change_event": { "$ref": "#/components/schemas/ChangeEvent" } } }, "examples": { "response": { "summary": "Response Example", "value": { "change_event": { "summary": "Build Success - Increase snapshot create timeout to 30 seconds", "timestamp": "2020-07-17T08:42:58Z", "type": "change_event", "source": "acme-build-pipeline-tool-default-i-9999", "integration": { "id": "PEYSGVF", "type": "inbound_integration_reference" }, "services": [ { "id": "PEYSGRV", "type": "service_reference" } ], "custom_details": { "build_state": "passed", "build_number": "2", "run_time": "1236s" }, "links": [ { "href": "https://acme.pagerduty.dev/build/2", "text": "View more details in Acme!" } ] } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" } } }, "put": { "x-pd-requires-scope": "change_events.write", "summary": "Update a Change Event", "description": "Update an existing Change Event\n\nScoped OAuth requires: `change_events.write`\n", "tags": [ "Change Events" ], "operationId": "updateChangeEvent", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "change_event": { "$ref": "#/components/schemas/ChangeEvent" } }, "required": [ "change_event" ] }, "examples": { "request": { "summary": "Request Example", "value": { "change_event": { "summary": "Build Success - Increase snapshot create timeout to 30 seconds", "type": "change_event", "custom_details": { "build_state": "passed", "build_number": "2", "run_time": "1236s" } } } } } } }, "description": "The Change Event to be updated." }, "responses": { "200": { "description": "The Change Event that was updated.", "content": { "application/json": { "schema": { "type": "object", "properties": { "change_event": { "$ref": "#/components/schemas/ChangeEvent" } } }, "examples": { "response": { "summary": "Response Example", "value": { "change_event": { "summary": "Build Success - Increase snapshot create timeout to 30 seconds", "timestamp": "2020-07-17T08:42:58Z", "type": "change_event", "source": "acme-build-pipeline-tool-default-i-9999", "integration": { "id": "PEYSGVF", "type": "inbound_integration_reference" }, "services": [ { "id": "PEYSGRV", "type": "service_reference" } ], "custom_details": { "build_state": "passed", "build_number": "2", "run_time": "1236s" }, "links": [ { "href": "https://acme.pagerduty.dev/build/2", "text": "View more details in Acme!" } ] } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" } } } }, "/escalation_policies": { "description": "List and create escalation policies.", "get": { "tags": [ "Escalation Policies" ], "x-pd-requires-scope": "escalation_policies.read", "operationId": "listEscalationPolicies", "description": "List all of the existing escalation policies.\n\nEscalation policies define which user should be alerted at which time.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#escalation-policies)\n\nScoped OAuth requires: `escalation_policies.read`\n", "summary": "List escalation policies", "parameters": [ { "$ref": "#/components/parameters/offset_limit" }, { "$ref": "#/components/parameters/offset_offset" }, { "$ref": "#/components/parameters/offset_total" }, { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/query" }, { "$ref": "#/components/parameters/user_ids_escalation_policies" }, { "$ref": "#/components/parameters/team_ids" }, { "$ref": "#/components/parameters/include_escalation_policy" }, { "$ref": "#/components/parameters/sort_by_escalation_policy" } ], "responses": { "200": { "description": "A paginated array of escalation policy objects.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/Pagination" }, { "type": "object", "properties": { "escalation_policies": { "type": "array", "items": { "$ref": "#/components/schemas/EscalationPolicy" } } }, "required": [ "escalation_policies" ] } ] }, "examples": { "response": { "summary": "Response Example", "value": { "escalation_policies": [ { "id": "PANZZEQ", "type": "escalation_policy", "summary": "Engineering Escalation Policy", "on_call_handoff_notifications": "if_has_services", "self": "https://api.pagerduty.com/escalation_policies/PANZZEQ", "html_url": "https://subdomain.pagerduty.com/escalation_policies/PANZZEQ", "name": "Engineering Escalation Policy", "escalation_rules": [ { "id": "PANZZEQ", "escalation_delay_in_minutes": 30, "targets": [ { "id": "PEYSGVF", "summary": "PagerDuty Admin", "type": "user_reference", "self": "https://api.pagerduty.com/users/PEYSGVF", "html_url": "https://subdomain.pagerduty.com/users/PEYSGVF" }, { "id": "PI7DH85", "summary": "Daily Engineering Rotation", "type": "schedule_reference", "self": "https://api.pagerduty.com/schedules/PI7DH85", "html_url": "https://subdomain.pagerduty.com/schedules/PI7DH85" } ] } ], "services": [ { "id": "PIJ90N7", "type": "service_reference", "summary": "My Mail Service", "self": "https://api.pagerduty.com/services/PIJ90N7", "html_url": "https://subdomain.pagerduty.com/service-directory/PIJ90N7" } ], "num_loops": 0, "teams": [ { "id": "PQ9K7I8", "type": "team_reference", "summary": "Engineering", "self": "https://api.pagerduty.com/teams/PQ9K7I8", "html_url": "https://subdomain.pagerduty.com/teams/PQ9K7I8" } ] } ], "limit": 25, "offset": 0, "more": false, "total": null } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } }, "post": { "tags": [ "Escalation Policies" ], "x-pd-requires-scope": "escalation_policies.write", "operationId": "createEscalationPolicy", "description": "Creates a new escalation policy. At least one escalation rule must be provided.\n\nEscalation policies define which user should be alerted at which time.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#escalation-policies)\n\nScoped OAuth requires: `escalation_policies.write`\n", "summary": "Create an escalation policy", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/optional_from_header" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "escalation_policy": { "$ref": "#/components/schemas/EscalationPolicy" } }, "required": [ "escalation_policy" ] }, "examples": { "request": { "summary": "Request Example", "value": { "escalation_policy": { "type": "escalation_policy", "name": "Engineering Escalation Policy", "escalation_rules": [ { "escalation_delay_in_minutes": 30, "targets": [ { "id": "PEYSGVF", "type": "user_reference" } ], "escalation_rule_assignment_strategy": { "type": "round_robin" } } ], "services": [ { "id": "PIJ90N7", "type": "service_reference" } ], "num_loops": 2, "on_call_handoff_notifications": "if_has_services", "teams": [ { "id": "PQ9K7I8", "type": "team_reference" } ], "description": "Here is the ep for the engineering team." } } } } } }, "description": "The escalation policy to be created." }, "responses": { "201": { "description": "The escalation policy that was created.", "content": { "application/json": { "schema": { "type": "object", "properties": { "escalation_policy": { "$ref": "#/components/schemas/EscalationPolicy" } }, "required": [ "escalation_policy" ] }, "examples": { "response": { "summary": "Response Example", "value": { "escalation_policy": { "id": "PT20YPA", "type": "escalation_policy", "summary": "Engineering Escalation Policy", "on_call_handoff_notifications": "if_has_services", "self": "https://api.pagerduty.com/escalation_policies/PT20YPA", "html_url": "https://subdomain.pagerduty.com/escalation_policies/PT20YPA", "name": "Engineering Escalation Policy", "escalation_rules": [ { "id": "PT20YPA", "escalation_delay_in_minutes": 22, "targets": [ { "id": "PXPGF42", "summary": "Earline Greenholt", "type": "user_reference", "self": "https://api.pagerduty.com/users/PXPGF42", "html_url": "https://subdomain.pagerduty.com/users/PXPGF42" }, { "id": "PI7DH85", "summary": "Daily Engineering Rotation", "type": "schedule_reference", "self": "https://api.pagerduty.com/schedules/PI7DH85", "html_url": "https://subdomain.pagerduty.com/schedules/PI7DH85" } ] } ], "services": [ { "id": "PIJ90N7", "type": "service_reference", "summary": "My Mail Service", "self": "https://api.pagerduty.com/services/PIJ90N7", "html_url": "https://subdomain.pagerduty.com/service-directory/PIJ90N7" } ], "num_loops": 2, "teams": [ { "id": "PQ9K7I8", "type": "team_reference", "summary": "Engineering", "self": "https://api.pagerduty.com/teams/PQ9K7I8", "html_url": "https://subdomain.pagerduty.com/teams/PQ9K7I8" } ] } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "402": { "$ref": "#/components/responses/PaymentRequired" }, "403": { "$ref": "#/components/responses/Forbidden" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } } }, "/escalation_policies/{id}": { "description": "Manage an escalation policy.", "get": { "tags": [ "Escalation Policies" ], "x-pd-requires-scope": "escalation_policies.read", "operationId": "getEscalationPolicy", "description": "Get information about an existing escalation policy and its rules.\n\nEscalation policies define which user should be alerted at which time.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#escalation-policies)\n\nScoped OAuth requires: `escalation_policies.read`\n", "summary": "Get an escalation policy", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" }, { "$ref": "#/components/parameters/include_escalation_policy" } ], "responses": { "200": { "description": "The escalation policy object.", "content": { "application/json": { "schema": { "type": "object", "properties": { "escalation_policy": { "$ref": "#/components/schemas/EscalationPolicy" } }, "required": [ "escalation_policy" ] }, "examples": { "response": { "summary": "Response Example", "value": { "escalation_policy": { "id": "PT20YPA", "type": "escalation_policy", "summary": "Another Escalation Policy", "on_call_handoff_notifications": "if_has_services", "self": "https://api.pagerduty.com/escalation_policies/PT20YPA", "html_url": "https://subdomain.pagerduty.com/escalation_policies/PT20YPA", "name": "Another Escalation Policy", "escalation_rules": [ { "id": "PGHDV41", "escalation_delay_in_minutes": 30, "targets": [ { "id": "PAM4FGS", "summary": "Kyler Kuhn", "type": "user_reference", "self": "https://api.pagerduty.com/users/PAM4FGS", "html_url": "https://subdomain.pagerduty.com/users/PAM4FGS" }, { "id": "PI7DH85", "summary": "Daily Engineering Rotation", "type": "schedule_reference", "self": "https://api.pagerduty.com/schedules/PI7DH85", "html_url": "https://subdomain.pagerduty.com/schedules/PI7DH85" } ] } ], "services": [ { "id": "PIJ90N7", "type": "service_reference", "summary": "My Mail Service", "self": "https://api.pagerduty.com/services/PIJ90N7", "html_url": "https://subdomain.pagerduty.com/service-directory/PIJ90N7" } ], "num_loops": 2, "teams": [ { "id": "PQ9K7I8", "type": "team_reference", "summary": "Engineering", "self": "https://api.pagerduty.com/teams/PQ9K7I8", "html_url": "https://subdomain.pagerduty.com/teams/PQ9K7I8" } ], "description": "This is yet another escalation policy" } } } } } } }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" } } }, "delete": { "tags": [ "Escalation Policies" ], "x-pd-requires-scope": "escalation_policies.write", "operationId": "deleteEscalationPolicy", "description": "Deletes an existing escalation policy and rules. The escalation policy must not be in use by any services.\n\nEscalation policies define which user should be alerted at which time.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#escalation-policies)\n\nScoped OAuth requires: `escalation_policies.write`\n", "summary": "Delete an escalation policy", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" } ], "responses": { "204": { "description": "The escalation policy was deleted successfully." }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } }, "put": { "tags": [ "Escalation Policies" ], "x-pd-requires-scope": "escalation_policies.write", "operationId": "updateEscalationPolicy", "description": "Updates an existing escalation policy and rules.\n\nEscalation policies define which user should be alerted at which time.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#escalation-policies)\n\nScoped OAuth requires: `escalation_policies.write`\n", "summary": "Update an escalation policy", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "escalation_policy": { "$ref": "#/components/schemas/EscalationPolicy" } }, "required": [ "escalation_policy" ] }, "examples": { "request": { "summary": "Request Example", "value": { "escalation_policy": { "type": "escalation_policy", "name": "Engineering Escalation Policy", "escalation_rules": [ { "escalation_delay_in_minutes": 30, "targets": [ { "id": "PEYSGVF", "type": "user_reference" } ], "escalation_rule_assignment_strategy": { "type": "round_robin" } } ], "services": [ { "id": "PIJ90N7", "type": "service_reference" } ], "num_loops": 2, "on_call_handoff_notifications": "if_has_services", "teams": [ { "id": "PQ9K7I8", "type": "team_reference" } ], "description": "Here is the ep for the engineering team." } } } } } }, "description": "The escalation policy to be updated." }, "responses": { "200": { "description": "The escalation policy that was updated.", "content": { "application/json": { "schema": { "type": "object", "properties": { "escalation_policy": { "$ref": "#/components/schemas/EscalationPolicy" } }, "required": [ "escalation_policy" ] }, "examples": { "response": { "summary": "Response Example", "value": { "escalation_policy": { "id": "PT20YPA", "type": "escalation_policy", "summary": "Another Escalation Policy", "on_call_handoff_notifications": "if_has_services", "self": "https://api.pagerduty.com/escalation_policies/PT20YPA", "html_url": "https://subdomain.pagerduty.com/escalation_policies/PT20YPA", "name": "Another Escalation Policy", "escalation_rules": [ { "id": "PGHDV41", "escalation_delay_in_minutes": 30, "targets": [ { "id": "PAM4FGS", "summary": "Kyler Kuhn", "type": "user_reference", "self": "https://api.pagerduty.com/users/PAM4FGS", "html_url": "https://subdomain.pagerduty.com/users/PAM4FGS" }, { "id": "PI7DH85", "summary": "Daily Engineering Rotation", "type": "schedule_reference", "self": "https://api.pagerduty.com/schedules/PI7DH85", "html_url": "https://subdomain.pagerduty.com/schedules/PI7DH85" } ] } ], "services": [ { "id": "PIJ90N7", "type": "service_reference", "summary": "My Mail Service", "self": "https://api.pagerduty.com/services/PIJ90N7", "html_url": "https://subdomain.pagerduty.com/service-directory/PIJ90N7" } ], "num_loops": 2, "teams": [ { "id": "PQ9K7I8", "type": "team_reference", "summary": "Engineering", "self": "https://api.pagerduty.com/teams/PQ9K7I8", "html_url": "https://subdomain.pagerduty.com/teams/PQ9K7I8" } ], "description": "This is yet another escalation policy" } } } } } } }, "401": { "$ref": "#/components/responses/Unauthorized" }, "402": { "$ref": "#/components/responses/PaymentRequired" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } } }, "/escalation_policies/{id}/audit/records": { "description": "List audit records of changes made to the escalation policy.", "get": { "x-pd-requires-scope": "audit_records.read", "tags": [ "Escalation Policies" ], "operationId": "listEscalationPolicyAuditRecords", "summary": "List audit records for an escalation policy", "description": "The returned records are sorted by the `execution_time` from newest to oldest.\n\nSee [`Cursor-based pagination`](https://developer.pagerduty.com/docs/rest-api-v2/pagination/) for instructions on how to paginate through the result set.\n\nFor more information see the [Audit API Document](https://developer.pagerduty.com/docs/rest-api-v2/audit-records-api/).\n\nScoped OAuth requires: `audit_records.read`\n", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" }, { "$ref": "#/components/parameters/cursor_limit" }, { "$ref": "#/components/parameters/cursor_cursor" }, { "$ref": "#/components/parameters/audit_since" }, { "$ref": "#/components/parameters/audit_until" } ], "responses": { "200": { "description": "Records matching the query criteria.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuditRecordResponseSchema" }, "examples": { "response": { "$ref": "#/components/examples/AuditRecordEscalationPolicyResponse" } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "402": { "$ref": "#/components/responses/PaymentRequired" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" }, "500": { "$ref": "#/components/responses/InternalServerError" } } } }, "/event_orchestrations": { "description": "Manage Global Event Orchestrations.", "get": { "x-pd-requires-scope": "event_orchestrations.read", "tags": [ "Event Orchestrations" ], "operationId": "listEventOrchestrations", "description": "List all Global Event Orchestrations on an Account.\n\nGlobal Event Orchestrations allow you define a set of Global Rules and Router Rules, so that when you ingest events using the Orchestration's Routing Key your events will have actions applied via the Global Rules & then routed to the correct Service by the Router Rules, based on the event's content.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#event-orchestrations)\n\nScoped OAuth requires: `event_orchestrations.read`\n", "summary": "List Event Orchestrations", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/offset_limit" }, { "$ref": "#/components/parameters/offset_offset" }, { "$ref": "#/components/parameters/sort_by_event_orchestration" } ], "responses": { "200": { "description": "A paginated array of Event Orchestration objects.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/Pagination" }, { "type": "object", "properties": { "orchestrations": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "description": "ID of the Orchestration.", "readOnly": true }, "self": { "type": "string", "format": "url", "description": "The API show URL at which the object is accessible", "readOnly": true }, "name": { "type": "string", "description": "Name of the Orchestration." }, "description": { "type": "string", "description": "A description of this Orchestration's purpose." }, "team": { "type": "object", "description": "Reference to the team that owns the Orchestration. If none is specified, only admins have access.", "properties": { "id": { "type": "string" }, "type": { "type": "string", "description": "A string that determines the schema of the object", "readOnly": true }, "self": { "type": "string", "format": "url", "description": "The API show URL at which the object is accessible", "readOnly": true } } }, "routes": { "type": "integer", "description": "Number of different Service Orchestration being routed to", "readOnly": true }, "created_at": { "type": "string", "format": "date-time", "description": "The date the Orchestration was created at.", "readOnly": true }, "created_by": { "type": "object", "description": "Reference to the user that has created the Orchestration.", "properties": { "id": { "type": "string", "readOnly": true }, "type": { "type": "string", "description": "A string that determines the schema of the object", "readOnly": true }, "self": { "type": "string", "format": "url", "description": "The API show URL at which the object is accessible", "readOnly": true } }, "readOnly": true }, "updated_at": { "type": "string", "format": "date-time", "description": "The date the Orchestration was last updated.", "readOnly": true }, "updated_by": { "type": "object", "description": "Reference to the user that has updated the Orchestration last.", "properties": { "id": { "type": "string", "readOnly": true }, "type": { "type": "string", "description": "A string that determines the schema of the object", "readOnly": true }, "self": { "type": "string", "format": "url", "description": "The API show URL at which the object is accessible", "readOnly": true } }, "readOnly": true }, "version": { "type": "string", "description": "Version of the Orchestration.", "readOnly": true } } } } } } ] }, "examples": { "response": { "summary": "Response Example", "value": { "orchestrations": [ { "id": "b02e973d-9620-4e0a-9edc-00fedf7d4694", "self": "https://api.pagerduty.com/event_orchestrations/b02e973d-9620-4e0a-9edc-00fedf7d4694", "name": "Shopping Cart Orchestration", "description": "Send shopping cart alerts to the right services", "team": { "id": "PQYP5MN", "type": "team_reference", "self": "https://api.pagerduty.com/teams/PQYP5MN" }, "routes": 0, "created_at": "2021-11-18T16:42:01Z", "created_by": { "id": "P8B9WR8", "self": "https://api.pagerduty.com/users/P8B9WR8", "type": "user_reference" }, "updated_at": "2021-11-18T16:42:01Z", "updated_by": { "id": "P8B9WR8", "self": "https://api.pagerduty.com/users/P8B9WR8", "type": "user_reference" }, "version": "9co0z4b152oICsoV91_PW2.ww8ip_xap" } ], "limit": 25, "offset": 0, "more": false, "total": 1 } } } } } }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" } } }, "post": { "x-pd-requires-scope": "event_orchestrations.write", "tags": [ "Event Orchestrations" ], "description": "Create a Global Event Orchestration.\n\nGlobal Event Orchestrations allow you define a set of Global Rules and Router Rules, so that when you ingest events using the Orchestration's Routing Key your events will have actions applied via the Global Rules & then routed to the correct Service by the Router Rules, based on the event's content.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#event-orchestrations)\n\nScoped OAuth requires: `event_orchestrations.write`\n", "summary": "Create an Orchestration", "operationId": "postOrchestration", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "orchestration": { "$ref": "#/components/schemas/Orchestration" } }, "required": [ "orchestration" ] }, "examples": { "create_orchestration": { "summary": "Example: Create Orchestration", "value": { "orchestration": { "name": "New Orchestration", "description": "This is a newly created orchestration", "team": { "id": "PXD0WR8" } } } } } } } }, "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" } ], "responses": { "201": { "description": "The Orchestration that was created.", "content": { "application/json": { "schema": { "type": "object", "properties": { "orchestration": { "$ref": "#/components/schemas/Orchestration" } } }, "examples": { "response": { "summary": "Response Example", "value": { "orchestration": { "id": "3aae9a17-8585-4d8c-93d3-99742801cd95", "self": "https://api.pagerduty.com/event_orchestrations/3aae9a17-8585-4d8c-93d3-99742801cd95", "name": "New Orchestration", "description": "This is a newly created orchestration", "team": { "id": "PXD0WR8", "self": "https://api.pagerduty.com/teams/PXD0WR8", "type": "team_reference" }, "integrations": [ { "id": "461cd942-d7cc-43ef-ac7d-86ba2d58fc45", "label": "New Orchestration Default Integration", "parameters": { "routing_key": "R022XIJR9M266DX570EVE6EXP1AFBN6D", "type": "global" } } ], "routes": 0, "created_at": "2021-12-02T14:21:42Z", "created_by": { "id": "P8B9WR8", "self": "https://api.pagerduty.com/users/P8B9WR8", "type": "user_reference" }, "updated_at": "2021-12-02T14:21:42Z", "updated_by": { "id": "P8B9WR8", "self": "https://api.pagerduty.com/users/P8B9WR8", "type": "user_reference" }, "version": "oBgzJsGDOz99G.FKZ0c1C6hw35twk_Ib" } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "405": { "$ref": "#/components/responses/NotAllowed" }, "409": { "$ref": "#/components/responses/Conflict" } } } }, "/event_orchestrations/{id}": { "description": "Manage a Global Event Orchestration.", "get": { "x-pd-requires-scope": "event_orchestrations.read", "tags": [ "Event Orchestrations" ], "operationId": "getOrchestration", "description": "Get a Global Event Orchestration.\n\nGlobal Event Orchestrations allow you define a set of Global Rules and Router Rules, so that when you ingest events using the Orchestration's Routing Key your events will have actions applied via the Global Rules & then routed to the correct Service by the Router Rules, based on the event's content.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#event-orchestrations)\n\nScoped OAuth requires: `event_orchestrations.read`\n", "summary": "Get an Orchestration", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/event_orchestration_id" } ], "responses": { "200": { "description": "The Orchestration object.", "content": { "application/json": { "schema": { "type": "object", "properties": { "orchestration": { "$ref": "#/components/schemas/Orchestration" } } }, "examples": { "response": { "summary": "Response Example", "value": { "orchestration": { "id": "b02e973d-9620-4e0a-9edc-00fedf7d4694", "self": "https://api.pagerduty.com/event_orchestrations/b02e973d-9620-4e0a-9edc-00fedf7d4694", "name": "Shopping Cart Orchestration", "description": "Send shopping cart alerts to the right services", "team": { "id": "PQYP5MN", "type": "team_reference", "self": "https://api.pagerduty.com/teams/PQYP5MN" }, "integrations": [ { "id": "9c5ff030-12da-4204-a067-25ee61a8df6c", "label": "Shopping Cart Orchestration Default Integration", "parameters": { "routing_key": "R028DIE06SNKNO6V5ACSLRV7Y0TUVG7T", "type": "global" } } ], "routes": 0, "created_at": "2021-11-18T16:42:01Z", "created_by": { "id": "P8B9WR8", "self": "https://api.pagerduty.com/users/P8B9WR8", "type": "user_reference" }, "updated_at": "2021-11-18T16:42:01Z", "updated_by": { "id": "P8B9WR8", "self": "https://api.pagerduty.com/users/P8B9WR8", "type": "user_reference" }, "version": "9co0z4b152oICsoV91_PW2.ww8ip_xap" } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" } } }, "put": { "x-pd-requires-scope": "event_orchestrations.write", "tags": [ "Event Orchestrations" ], "operationId": "updateOrchestration", "description": "Update a Global Event Orchestration.\n\nGlobal Event Orchestrations allow you define a set of Global Rules and Router Rules, so that when you ingest events using the Orchestration's Routing Key your events will have actions applied via the Global Rules & then routed to the correct Service by the Router Rules, based on the event's content.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#event-orchestrations)\n\nScoped OAuth requires: `event_orchestrations.write`\n", "summary": "Update an Orchestration", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/event_orchestration_id" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "orchestration": { "$ref": "#/components/schemas/Orchestration" } }, "required": [ "orchestration" ] }, "examples": { "change_name": { "summary": "Example: Change name", "value": { "orchestration": { "name": "Go-Kart Orchestration" } } }, "change_team": { "summary": "Example: Change team", "value": { "orchestration": { "team": { "id": "PWL7QXS" } } } }, "change_description": { "summary": "Example: Change description", "value": { "orchestration": { "description": "Orchestration that does some stuff" } } } } } }, "description": "" }, "responses": { "200": { "description": "The Orchestration that was updated.", "content": { "application/json": { "schema": { "type": "object", "properties": { "orchestration": { "$ref": "#/components/schemas/Orchestration" } } }, "examples": { "response": { "summary": "Response Example", "value": { "orchestration": { "id": "b02e973d-9620-4e0a-9edc-00fedf7d4694", "self": "https://api.pagerduty.com/event_orchestrations/b02e973d-9620-4e0a-9edc-00fedf7d4694", "name": "Go-Kart Orchestration", "description": "Orchestration that does some stuff", "team": { "id": "PWL7QXS", "type": "team_reference", "self": "https://api.pagerduty.com/teams/PWL7QXS" }, "integrations": [ { "id": "9c5ff030-12da-4204-a067-25ee61a8df6c", "label": "Go-Kart Orchestration Default Integration", "parameters": { "routing_key": "R028DIE06SNKNO6V5ACSLRV7Y0TUVG7T", "type": "global" } } ], "routes": 0, "created_at": "2021-11-18T16:42:01Z", "created_by": { "id": "P8B9WR8", "self": "https://api.pagerduty.com/users/P8B9WR8", "type": "user_reference" }, "updated_at": "2021-11-19T11:42:32Z", "updated_by": { "id": "P8B9WR8", "self": "https://api.pagerduty.com/users/P8B9WR8", "type": "user_reference" }, "version": "BrWLKQBLm8QO2ZYQ0GosHLxdbgWZ0ZR3" } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "405": { "$ref": "#/components/responses/NotAllowed" }, "409": { "$ref": "#/components/responses/Conflict" } } }, "delete": { "x-pd-requires-scope": "event_orchestrations.write", "tags": [ "Event Orchestrations" ], "operationId": "deleteOrchestration", "description": "Delete a Global Event Orchestration.\n\nOnce deleted, you will no longer be able to ingest events into PagerDuty using this Orchestration's Routing Key.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#event-orchestrations)\n\nScoped OAuth requires: `event_orchestrations.write`\n", "summary": "Delete an Orchestration", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/event_orchestration_id" } ], "responses": { "204": { "description": "The Orchestration was deleted successfully." }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "405": { "$ref": "#/components/responses/NotAllowed" }, "409": { "$ref": "#/components/responses/Conflict" } } } }, "/event_orchestrations/{id}/integrations": { "description": "Manage Integrations for a Global Event Orchestration.", "get": { "x-pd-requires-scope": "event_orchestrations.read", "tags": [ "Event Orchestrations" ], "description": "List the Integrations associated with this Event Orchestrations.\n\nYou can use a Routing Key from these Integrations to send events to PagerDuty!\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#event-orchestrations)\n\nScoped OAuth requires: `event_orchestrations.read`\n", "summary": "List Integrations for an Event Orchestration", "operationId": "listOrchestrationIntegrations", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/event_orchestration_id" } ], "responses": { "200": { "description": "The Integrations for this Event Orchestration.", "content": { "application/json": { "schema": { "type": "object", "properties": { "integrations": { "type": "array", "items": { "$ref": "#/components/schemas/OrchestrationIntegration" } }, "total": { "$ref": "#/components/schemas/Pagination/properties/total" } } }, "examples": { "response": { "summary": "Response Example", "value": { "integrations": [ { "id": "9c5ff030-12da-4204-a067-25ee61a8df6c", "label": "Go-Kart Orchestration Default Integration", "parameters": { "routing_key": "R022XIJR9M266DX570EVE6EXP1AFBN6D", "type": "global" } }, { "id": "11832872-88b6-4661-8972-db5712b69496", "label": "Integration for Monitoring Tool X", "parameters": { "routing_key": "R028DIE06SNKNO6V5ACSLRV7Y0TUVG7T", "type": "global" } } ], "total": 2 } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "405": { "$ref": "#/components/responses/NotAllowed" } } }, "post": { "x-pd-requires-scope": "event_orchestrations.write", "tags": [ "Event Orchestrations" ], "description": "Create an Integration associated with this Event Orchestration.\n\nYou can then use the Routing Key from this new Integration to send events to PagerDuty!\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#event-orchestrations)\n\nScoped OAuth requires: `event_orchestrations.write`\n", "summary": "Create an Integration for an Event Orchestration", "operationId": "postOrchestrationIntegration", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "integration": { "type": "object", "properties": { "label": { "type": "string", "description": "Name of the Integration." } }, "required": [ "label" ] } }, "required": [ "integration" ] }, "examples": { "create_orchestration": { "summary": "Example: Create an Integration", "value": { "integration": { "label": "Integration for Monitoring Tool X" } } } } } } }, "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/event_orchestration_id" } ], "responses": { "201": { "description": "The Integration that was created.", "content": { "application/json": { "schema": { "type": "object", "properties": { "integration": { "$ref": "#/components/schemas/OrchestrationIntegration" } } }, "examples": { "response": { "summary": "Response Example", "value": { "integration": { "id": "11832872-88b6-4661-8972-db5712b69496", "label": "Integration for Monitoring Tool X", "parameters": { "routing_key": "R028DIE06SNKNO6V5ACSLRV7Y0TUVG7T", "type": "global" } } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "405": { "$ref": "#/components/responses/NotAllowed" }, "409": { "$ref": "#/components/responses/Conflict" } } } }, "/event_orchestrations/{id}/integrations/{integration_id}": { "description": "Manage an Integration for a Global Event Orchestration.", "get": { "x-pd-requires-scope": "event_orchestrations.read", "tags": [ "Event Orchestrations" ], "description": "Get an Integration associated with this Event Orchestrations.\n\nYou can use the Routing Key from this Integration to send events to PagerDuty!\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#event-orchestrations)\n\nScoped OAuth requires: `event_orchestrations.read`\n", "summary": "Get an Integration for an Event Orchestration", "operationId": "getOrchestrationIntegration", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/event_orchestration_id" }, { "$ref": "#/components/parameters/event_orchestration_integration_id" } ], "responses": { "200": { "description": "An Integration for this Event Orchestration.", "content": { "application/json": { "schema": { "properties": { "integration": { "$ref": "#/components/schemas/OrchestrationIntegration" } } }, "examples": { "response": { "summary": "Response Example", "value": { "integration": { "id": "9c5ff030-12da-4204-a067-25ee61a8df6c", "label": "Go-Kart Orchestration Default Integration", "parameters": { "routing_key": "R022XIJR9M266DX570EVE6EXP1AFBN6D", "type": "global" } } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "405": { "$ref": "#/components/responses/NotAllowed" } } }, "put": { "x-pd-requires-scope": "event_orchestrations.write", "tags": [ "Event Orchestrations" ], "description": "Update an Integration associated with this Event Orchestrations.\n\nYou can use the Routing Key from this Integration to send events to PagerDuty!\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#event-orchestrations)\n\nScoped OAuth requires: `event_orchestrations.write`\n", "summary": "Update an Integration for an Event Orchestration", "operationId": "updateOrchestrationIntegration", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "integration": { "type": "object", "properties": { "label": { "type": "string", "description": "Name of the Integration." } }, "required": [ "label" ] } }, "required": [ "integration" ] }, "examples": { "create_orchestration": { "summary": "Example: Update an Integration", "value": { "integration": { "label": "New Name for my Integration" } } } } } } }, "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/event_orchestration_id" }, { "$ref": "#/components/parameters/event_orchestration_integration_id" } ], "responses": { "200": { "description": "The Integration that was updated.", "content": { "application/json": { "schema": { "type": "object", "properties": { "integration": { "$ref": "#/components/schemas/OrchestrationIntegration" } } }, "examples": { "response": { "summary": "Response Example", "value": { "integration": { "id": "11832872-88b6-4661-8972-db5712b69496", "label": "New Name for my Integration", "parameters": { "routing_key": "R028DIE06SNKNO6V5ACSLRV7Y0TUVG7T", "type": "global" } } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "405": { "$ref": "#/components/responses/NotAllowed" }, "409": { "$ref": "#/components/responses/Conflict" } } }, "delete": { "x-pd-requires-scope": "event_orchestrations.write", "tags": [ "Event Orchestrations" ], "description": "Delete an Integration and its associated Routing Key.\n\nOnce deleted, PagerDuty will drop all future events sent to PagerDuty using the Routing Key.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#event-orchestrations)\n\nScoped OAuth requires: `event_orchestrations.write`\n", "summary": "Delete an Integration for an Event Orchestration", "operationId": "deleteOrchestrationIntegration", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/event_orchestration_id" }, { "$ref": "#/components/parameters/event_orchestration_integration_id" } ], "responses": { "204": { "description": "The Integration was deleted successfully." }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "405": { "$ref": "#/components/responses/NotAllowed" }, "409": { "$ref": "#/components/responses/Conflict" } } } }, "/event_orchestrations/{id}/integrations/migration": { "description": "Migrate an Integration to this Global Event Orchestration.", "post": { "x-pd-requires-scope": "event_orchestrations.write", "tags": [ "Event Orchestrations" ], "description": "Move an Integration and its Routing Key from the Event Orchestration specified in the request payload, to the Event Orchestration specified in the request URL.\n\nAny future events sent to this Integration's Routing Key will be processed by this Event Orchestration's Rules.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#event-orchestrations)\n\nScoped OAuth requires: `event_orchestrations.write`\n", "summary": "Migrate an Integration from one Event Orchestration to another", "operationId": "migrateOrchestrationIntegration", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "source_id": { "type": "string", "description": "The ID of the Event Orchestration you'll be moving the Integration away from" }, "source_type": { "type": "string", "description": "The type of of the `source_id` object", "enum": [ "orchestration" ] }, "integration_id": { "type": "string", "description": "The ID of the Integration you'll be moving" } }, "required": [ "source_id", "source_type", "integration_id" ] }, "examples": { "migrate_integration": { "summary": "Example: Migrate an Integration", "value": { "source_type": "orchestration", "source_id": "b02e973d-9620-4e0a-9edc-00fedf7d4694", "integration_id": "11832872-88b6-4661-8972-db5712b69496" } } } } } }, "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/event_orchestration_id" } ], "responses": { "200": { "description": "The Integration that was migrated", "content": { "application/json": { "schema": { "type": "object", "properties": { "integrations": { "type": "array", "items": { "$ref": "#/components/schemas/OrchestrationIntegration" } }, "total": { "$ref": "#/components/schemas/Pagination/properties/total" } } }, "examples": { "response": { "summary": "Response Example", "value": { "integrations": [ { "id": "9c5ff030-12da-4204-a067-25ee61a8df6c", "label": "Go-Kart Orchestration Default Integration", "parameters": { "routing_key": "R022XIJR9M266DX570EVE6EXP1AFBN6D", "type": "global" } }, { "id": "11832872-88b6-4661-8972-db5712b69496", "label": "Integration for Monitoring Tool X", "parameters": { "routing_key": "R028DIE06SNKNO6V5ACSLRV7Y0TUVG7T", "type": "global" } } ], "total": 2 } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "405": { "$ref": "#/components/responses/NotAllowed" }, "409": { "$ref": "#/components/responses/Conflict" } } } }, "/event_orchestrations/{id}/global": { "description": "View and update Global Orchestration Rules.", "get": { "x-pd-requires-scope": "event_orchestrations.read", "tags": [ "Event Orchestrations" ], "operationId": "getOrchPathGlobal", "summary": "Get the Global Orchestration for an Event Orchestration", "description": "Get the Global Orchestration for an Event Orchestration.\n\nGlobal Orchestration Rules allows you to create a set of Event Rules. These rules evaluate against all Events sent to an Event Orchestration. When a matching rule is found, it can modify and enhance the event and can route the event to another set of Global Rules within this Orchestration for further processing.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#event-orchestrations)\n\nScoped OAuth requires: `event_orchestrations.read`\n", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/event_orchestration_id" } ], "responses": { "200": { "description": "The Global Orchestration Rules object.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OrchestrationGlobal" }, "examples": { "response": { "$ref": "#/components/examples/OrchestrationPathGlobalTypeResponse" } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" } } }, "put": { "x-pd-requires-scope": "event_orchestrations.write", "tags": [ "Event Orchestrations" ], "operationId": "updateOrchPathGlobal", "summary": "Update the Global Orchestration for an Event Orchestration", "description": "Update the Global Orchestration for an Event Orchestration.\n\nGlobal Orchestration Rules allows you to create a set of Event Rules. These rules evaluate against all Events sent to an Event Orchestration. When a matching rule is found, it can modify and enhance the event and can route the event to another set of Global Rules within this Orchestration for further processing.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#event-orchestrations)\n\nScoped OAuth requires: `event_orchestrations.write`\n", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/event_orchestration_id" } ], "requestBody": { "description": "Update Global Orchestration rules. Omitted rules and rule details are deleted.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OrchestrationGlobal" }, "examples": { "request": { "summary": "Example Request", "value": { "orchestration_path": { "sets": [ { "id": "start", "rules": [ { "label": "Always apply some consistent event transformations to all events", "id": "c91f72f3", "conditions": [], "actions": { "variables": [ { "name": "hostname", "path": "event.component", "value": "hostname: (.*)", "type": "regex" } ], "extractions": [ { "template": "{{variables.hostname}}", "target": "event.custom_details.hostname" }, { "source": "event.source", "regex": "www (.*) service", "target": "event.source" } ], "incident_custom_field_updates": [ { "id": "PEXCK89", "value": "#my-team-channel" }, { "id": "PN1C4A2", "value": "{{event.timestamp}}" } ] }, "route_to": "step-two" } ] }, { "id": "step-two", "rules": [ { "label": "All critical alerts should be treated as P1 incidents", "id": "7c54529d", "conditions": [ { "expression": "event.severity matches 'critical'" } ], "actions": { "priority": "P0IN2KQ", "suppress": false, "incident_custom_field_updates": [ { "id": "PEXCK89", "value": "#p1-incident-response" } ] } }, { "label": "Drop all events from the very-noisy monitoring tool", "id": "1f6d9a33", "conditions": [ { "expression": "event.source matches part 'very-noisy'" } ], "actions": { "drop_event": true } }, { "label": "Never bother the on-call for info-level events outside of work hours", "id": "cd770384", "conditions": [ { "expression": "event.severity matches 'info' and not (now in Mon,Tue,Wed,Thu,Fri 09:00:00 to 17:00:00 America/Los_Angeles)" } ], "actions": { "suppress": true } } ] } ], "catch_all": { "actions": { "suppress": true }, "incident_custom_field_updates": [ { "id": "PEXCK89", "value": "#general-incident-notifications" } ] } } } } } } } }, "responses": { "200": { "description": "The Global Orchestration Rules object.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/OrchestrationGlobal" }, { "type": "object", "properties": { "warnings": { "type": "array", "items": { "anyOf": [ { "$ref": "#/components/schemas/OrchestrationWarningIneligible" }, { "$ref": "#/components/schemas/OrchestrationWarningInvalidData" } ] } } } } ] }, "examples": { "response": { "summary": "Example Response", "value": { "orchestration_path": { "type": "global", "parent": { "id": "b02e973d-9620-4e0a-9edc-00fedf7d4694", "self": "https://api.pagerduty.com/event_orchestrations/b02e973d-9620-4e0a-9edc-00fedf7d4694", "type": "event_orchestration_reference" }, "self": "https://api.pagerduty.com/event_orchestrations/b02e973d-9620-4e0a-9edc-00fedf7d4694/global", "sets": [ { "id": "start", "rules": [ { "label": "Always apply some consistent event transformations to all events", "id": "c91f72f3", "conditions": [], "actions": { "variables": [ { "name": "hostname", "path": "event.component", "value": "hostname: (.*)", "type": "regex" } ], "extractions": [ { "template": "{{variables.hostname}}", "target": "event.custom_details.hostname" }, { "source": "event.source", "regex": "www (.*) service", "target": "event.source" } ], "incident_custom_field_updates": [ { "id": "PEXCK89", "value": "#my-team-channel" }, { "id": "PN1C4A2", "value": "{{event.timestamp}}" } ], "route_to": "step-two" } } ] }, { "id": "step-two", "rules": [ { "label": "All critical alerts should be treated as P1 incidents", "id": "7c54529d", "conditions": [ { "expression": "event.severity matches 'critical'" } ], "actions": { "priority": "P0IN2KQ", "suppress": false }, "incident_custom_field_updates": [ { "id": "PEXCK89", "value": "#p1-incident-response" } ] }, { "label": "Drop all events from the very-noisy monitoring tool", "id": "1f6d9a33", "conditions": [ { "expression": "event.source matches part 'very-noisy'" } ], "actions": { "drop_event": true } }, { "label": "Never bother the on-call for info-level events outside of work hours", "id": "cd770384", "conditions": [ { "expression": "event.severity matches 'info' and not (now in Mon,Tue,Wed,Thu,Fri 09:00:00 to 17:00:00 America/Los_Angeles)" } ], "actions": { "suppress": true } } ] } ], "catch_all": { "actions": { "suppress": true, "incident_custom_field_updates": [ { "id": "PEXCK89", "value": "#general-incident-notifications" } ] } }, "created_at": "2021-11-18T16:42:01Z", "created_by": { "id": "P8B9WR8", "self": "https://api.pagerduty.com/users/P8B9WR8", "type": "user_reference" }, "updated_at": "2021-11-18T16:42:01Z", "updated_by": { "id": "P8B9WR8", "self": "https://api.pagerduty.com/users/P8B9WR8", "type": "user_reference" }, "version": "rn1Mja13T1HBdmPChqFilSQXUW2fWXM_" }, "warnings": [ { "feature": "nested_rules", "feature_type": "nested_rules", "message": "This orchestration contains Nested Rules, which is not available on your account plan. The orchestration will be updated, however, only rules in the 'start' set will be evaluated", "rule_id": null, "warning_type": "forbidden_feature" }, { "feature": "variables", "feature_type": "actions", "message": "This rule uses Dynamic Field Enrichment & Extraction, which is an action not available on your account plan. The rule will be updated, but the action will not be fired when the rule is evaluated", "rule_id": "c91f72f3", "warning_type": "forbidden_feature" }, { "feature": "extractions", "feature_type": "actions", "message": "This rule uses Dynamic Field Enrichment & Extraction, which is an action not available on your account plan. The rule will be updated, but the action will not be fired when the rule is evaluated", "rule_id": "c91f72f3", "warning_type": "forbidden_feature" }, { "feature": "recurring_condition", "feature_type": "conditions", "message": "This rule uses Recurring Condition, which is a condition not available on your account plan. The rule will be updated, but it will not be evaluated by events", "rule_id": "cd770384", "warning_type": "forbidden_feature" }, { "feature": "incident_custom_field_updates", "feature_type": "actions", "message": "This rule uses Incident Custom Field update, which is an action not available on your account plan. The rule will be updated, but the action will not be fired when the rule is evaluated", "rule_id": "c91f72f3", "warning_type": "forbidden_feature" } ] } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "405": { "$ref": "#/components/responses/NotAllowed" }, "409": { "$ref": "#/components/responses/Conflict" } } } }, "/event_orchestrations/{id}/router": { "description": "View and update an Orchestration Router.", "get": { "x-pd-requires-scope": "event_orchestrations.read", "tags": [ "Event Orchestrations" ], "operationId": "getOrchPathRouter", "summary": "Get the Router for an Event Orchestration", "description": "Get a Global Orchestration's Routing Rules.\n\nAn Orchestration Router allows you to create a set of Event Rules. The Router evaluates Events you send to this Global Orchestration against each of its rules, one at a time, and routes the event to a specific Service based on the first rule that matches. If an event doesn't match any rules, it'll be sent to service specified in as the `catch_all` or the \"Unrouted\" Orchestration if no service is specified.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#event-orchestrations)\n\nScoped OAuth requires: `event_orchestrations.read`\n", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/event_orchestration_id" } ], "responses": { "200": { "$ref": "#/components/responses/OrchestrationPathRouterTypeResponse" }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" } } }, "put": { "x-pd-requires-scope": "event_orchestrations.write", "tags": [ "Event Orchestrations" ], "operationId": "updateOrchPathRouter", "summary": "Update the Router for an Event Orchestration", "description": "Update a Global Orchestration's Routing Rules.\n\nAn Orchestration Router allows you to create a set of Event Rules. The Router evaluates Events you send to this Global Orchestration against each of its rules, one at a time, and routes the event to a specific Service based on the first rule that matches. If an event doesn't match any rules, it'll be sent to service specified in as the `catch_all` or the \"Unrouted\" Orchestration if no service is specified.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#event-orchestrations)\n\nScoped OAuth requires: `event_orchestrations.write`\n", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/event_orchestration_id" } ], "requestBody": { "description": "Updates to Orchestration Router details. Omitted rules and rule details are deleted.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OrchestrationRouter" }, "examples": { "request": { "summary": "Example Request", "value": { "orchestration_path": { "sets": [ { "id": "start", "rules": [ { "label": "Events relating to our relational database", "id": "1c26698b", "conditions": [ { "expression": "event.summary matches part 'database'" }, { "expression": "event.source matches regex 'db[0-9]+-server'" } ], "actions": { "route_to": "PB31XBA" } }, { "label": "Events relating to our www app server", "id": "d9801904", "conditions": [ { "expression": "event.summary matches part 'www'" } ], "actions": { "route_to": "PC2D9ML" } }, { "label": "Events relating to our delivery pipeline", "id": "ed624931", "conditions": [ { "expression": "trigger_count over 1 minute > 3" } ], "actions": { "route_to": "PQSJBMA" } } ] } ] } } } } } } }, "responses": { "200": { "description": "The Orchestration Router object.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/OrchestrationRouter" }, { "type": "object", "properties": { "warnings": { "type": "array", "description": "List of applicable warnings messages for each rule using a feature not available on your account plan.", "items": { "anyOf": [ { "$ref": "#/components/schemas/OrchestrationWarningIneligible" } ] } } } } ] }, "examples": { "response": { "summary": "Example Response", "value": { "orchestration_path": { "type": "router", "parent": { "id": "b02e973d-9620-4e0a-9edc-00fedf7d4694", "self": "https://api.pagerduty.com/event_orchestrations/b02e973d-9620-4e0a-9edc-00fedf7d4694", "type": "event_orchestration_reference" }, "self": "https://api.pagerduty.com/event_orchestrations/b02e973d-9620-4e0a-9edc-00fedf7d4694/router", "sets": [ { "id": "start", "rules": [ { "label": "Events relating to our relational database", "id": "1c26698b", "conditions": [ { "expression": "event.summary matches part 'database'" }, { "expression": "event.source matches regex 'db[0-9]+-server'" } ], "actions": { "route_to": "PB31XBA" } }, { "label": "Events relating to our www app server", "id": "d9801904", "conditions": [ { "expression": "event.summary matches part 'www'" } ], "actions": { "route_to": "PC2D9ML" } }, { "label": "Events relating to our delivery pipeline", "id": "ed624931", "conditions": [ { "expression": "trigger_count over 1 minute > 3" } ], "actions": { "route_to": "PQSJBMA" } } ] } ], "catch_all": { "actions": { "route_to": "unrouted" } }, "created_at": "2021-11-18T16:42:01Z", "created_by": { "id": "P8B9WR8", "self": "https://api.pagerduty.com/users/P8B9WR8", "type": "user_reference" }, "updated_at": "2021-11-18T16:42:01Z", "updated_by": { "id": "P8B9WR8", "self": "https://api.pagerduty.com/users/P8B9WR8", "type": "user_reference" }, "version": "9co0z4b152oICsoV91_PW2.ww8ip_xap" }, "warnings": [ { "feature": "threshold_condition", "feature_type": "conditions", "message": "This rule uses Threshold Condition, which is a condition not available on your account plan. The rule will be updated, but it will not be evaluated by events", "rule_id": "ed624931", "warning_type": "forbidden_feature" } ] } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "405": { "$ref": "#/components/responses/NotAllowed" }, "409": { "$ref": "#/components/responses/Conflict" } } } }, "/event_orchestrations/{id}/unrouted": { "description": "View and update an Unrouted Orchestration.", "get": { "x-pd-requires-scope": "event_orchestrations.read", "tags": [ "Event Orchestrations" ], "operationId": "getOrchPathUnrouted", "summary": "Get the Unrouted Orchestration for an Event Orchestration", "description": "Get a Global Event Orchestration's Rules for Unrouted events.\n\nAn Unrouted Orchestration allows you to create a set of Event Rules that will be evaluated against all events that don't match any rules in the Global Orchestration's Router. Events that reach the Unrouted Orchestration will never be routed to a specific Service.\n\nThe Unrouted Orchestration evaluates Events sent to it against each of its rules, beginning with the rules in the \"start\" set. When a matching rule is found, it can modify and enhance the event and can route the event to another set of rules within this Unrouted Orchestration for further processing.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#event-orchestrations)\n\nScoped OAuth requires: `event_orchestrations.read`\n", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/event_orchestration_id" } ], "responses": { "200": { "$ref": "#/components/responses/OrchestrationPathUnroutedTypeResponse" }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" } } }, "put": { "x-pd-requires-scope": "event_orchestrations.write", "tags": [ "Event Orchestrations" ], "operationId": "updateOrchPathUnrouted", "summary": "Update the Unrouted Orchestration for an Event Orchestration", "description": "Update a Global Event Orchestration's Rules for Unrouted events.\n\nAn Unrouted Orchestration allows you to create a set of Event Rules that will be evaluated against all events that don't match any rules in the Global Orchestration's Router. Events that reach the Unrouted Orchestration will never be routed to a specific Service.\n\nThe Unrouted Orchestration evaluates Events sent to it against each of its rules, beginning with the rules in the \"start\" set. When a matching rule is found, it can modify and enhance the event and can route the event to another set of rules within this Unrouted Orchestration for further processing.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#event-orchestrations)\n\nScoped OAuth requires: `event_orchestrations.write`\n", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/event_orchestration_id" } ], "requestBody": { "description": "Updates to Unrouted Orchestration rules. Omitted rules and rule details are deleted.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OrchestrationUnrouted" }, "examples": { "request": { "summary": "Example Request", "value": { "orchestration_path": { "sets": [ { "id": "start", "rules": [ { "label": "Update the summary of un-matched Critical alerts so they're easier to spot", "id": "38880ffb", "conditions": [ { "expression": "event.severity matches 'critical'" } ], "actions": { "extractions": [ { "target": "event.summary", "template": "[Critical Unrouted] {{event.summary}}" } ] } }, { "label": "Reduce the severity of all other unrouted events", "id": "3896801e", "conditions": [], "actions": { "severity": "info" } } ] } ], "catch_all": { "actions": { "suppress": true } } } } } } } } }, "responses": { "200": { "description": "The Unrouted Orchestration object.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/OrchestrationUnrouted" }, { "type": "object", "properties": { "warnings": { "type": "array", "description": "List of applicable warnings messages for each rule using a feature not available on your account plan.", "items": { "anyOf": [ { "$ref": "#/components/schemas/OrchestrationWarningIneligible" } ] } } } } ] }, "examples": { "response": { "summary": "Example Response", "value": { "orchestration_path": { "type": "unrouted", "parent": { "id": "b02e973d-9620-4e0a-9edc-00fedf7d4694", "self": "https://api.pagerduty.com/event_orchestrations/b02e973d-9620-4e0a-9edc-00fedf7d4694", "type": "event_orchestration_reference" }, "self": "https://api.pagerduty.com/event_orchestrations/b02e973d-9620-4e0a-9edc-00fedf7d4694/router", "sets": [ { "id": "start", "rules": [ { "label": "Update the summary of un-matched Critical alerts so they're easier to spot", "id": "38880ffb", "conditions": [ { "expression": "event.severity matches 'critical'" } ], "actions": { "extractions": [ { "target": "event.summary", "template": "[Critical Unrouted] {{event.summary}}" } ] } }, { "label": "Reduce the severity of all other unrouted events", "id": "3896801e", "conditions": [], "actions": { "severity": "info" } } ] } ], "catch_all": { "actions": { "suppress": true } }, "created_at": "2021-11-18T16:42:01Z", "created_by": { "id": "P8B9WR8", "self": "https://api.pagerduty.com/users/P8B9WR8", "type": "user_reference" }, "updated_at": "2021-11-18T16:42:01Z", "updated_by": { "id": "P8B9WR8", "self": "https://api.pagerduty.com/users/P8B9WR8", "type": "user_reference" }, "version": "aZO.EEf9zWb9Vg0NYq.Uqad1hOC2Maod" }, "warnings": [ { "feature": "extractions", "feature_type": "actions", "message": "This rule uses Dynamic Field Enrichment & Extraction, which is an action not available on your account plan. The rule will be updated, but the action will not be fired when the rule is evaluated", "rule_id": "3896801e", "warning_type": "forbidden_feature" } ] } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "405": { "$ref": "#/components/responses/NotAllowed" }, "409": { "$ref": "#/components/responses/Conflict" } } } }, "/event_orchestrations/services/{service_id}": { "description": "View and update a Service Orchestration.", "get": { "x-pd-requires-scope": "services.read", "tags": [ "Event Orchestrations" ], "operationId": "getOrchPathService", "summary": "Get the Service Orchestration for a Service", "description": "Get a Service Orchestration.\n\nA Service Orchestration allows you to create a set of Event Rules. The Service Orchestration evaluates Events sent to this Service against each of its rules, beginning with the rules in the \"start\" set. When a matching rule is found, it can modify and enhance the event and can route the event to another set of rules within this Service Orchestration for further processing.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#event-orchestrations)\n\nScoped OAuth requires: `services.read`\n", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/service_id" }, { "$ref": "#/components/parameters/include_ruleset_migrated_metadata" } ], "responses": { "200": { "$ref": "#/components/responses/OrchestrationPathServiceTypeResponse" }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" } } }, "put": { "x-pd-requires-scope": "services.write", "tags": [ "Event Orchestrations" ], "operationId": "updateOrchPathService", "summary": "Update the Service Orchestration for a Service", "description": "Update a Service Orchestration.\n\nA Service Orchestration allows you to create a set of Event Rules. The Service Orchestration evaluates Events sent to this Service against each of its rules, beginning with the rules in the \"start\" set. When a matching rule is found, it can modify and enhance the event and can route the event to another set of rules within this Service Orchestration for further processing.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#event-orchestrations)\n\nScoped OAuth requires: `services.write`\n", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/service_id" } ], "requestBody": { "description": "Update Service Orchestration rules. Omitted rules and rule details are deleted.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ServiceOrchestration" }, "examples": { "request": { "summary": "Example Request", "value": { "orchestration_path": { "sets": [ { "id": "start", "rules": [ { "label": "Always apply some consistent event transformations to all events", "id": "c91f72f3", "conditions": [], "actions": { "variables": [ { "name": "hostname", "path": "event.component", "value": "hostname: (.*)", "type": "regex" } ], "extractions": [ { "template": "{{variables.hostname}}", "target": "event.custom_details.hostname" }, { "source": "event.source", "regex": "www (.*) service", "target": "event.source" } ], "pagerduty_automation_actions": [ { "action_id": "01CSB5SMOKCKVRI5GN0LJG7SMB" } ], "incident_custom_field_updates": [ { "id": "PEXCK89", "value": "#my-team-channel" }, { "id": "PN1C4A2", "value": "{{event.timestamp}}" } ] }, "route_to": "step-two" } ] }, { "id": "step-two", "rules": [ { "label": "All critical alerts should be treated as P1 incidents", "id": "7c54529d", "conditions": [ { "expression": "event.severity matches 'critical'" } ], "actions": { "annotate": "Please use our P1 runbook: https://docs.test/p1-runbook", "priority": "P0IN2KQ", "suppress": false, "incident_custom_field_updates": [ { "id": "PEXCK89", "value": "#p1-incident-response" } ] } }, { "label": "If there's something wrong on the canary let the team know about it in our deployments Slack channel", "id": "1f6d9a33", "conditions": [ { "expression": "event.custom_details.hostname matches part 'canary'" } ], "actions": { "automation_actions": [ { "name": "Canary Slack Notification", "url": "https://our-slack-listerner.test/send-notification", "auto_send": true, "headers": [ { "key": "X-Notification-Source", "value": "PagerDuty Incident Webhook" } ], "parameters": [ { "key": "channel", "value": "#my-team-channel" }, { "key": "message", "value": "Something is wrong with the canary deployment" } ] } ], "incident_custom_field_updates": [ { "id": "PEXCK89", "value": "#my-team-channel" } ] } }, { "label": "Never bother the on-call for info-level events outside of work hours", "id": "cd770384", "conditions": [ { "expression": "event.severity matches 'info' and not (now in Mon,Tue,Wed,Thu,Fri 09:00:00 to 17:00:00 America/Los_Angeles)" } ], "actions": { "suppress": true } } ] } ], "catch_all": { "actions": { "suppress": true }, "incident_custom_field_updates": [ { "id": "PEXCK89", "value": "#general-incident-notifications" } ] } } } } } } } }, "responses": { "200": { "description": "The Service Orchestration object.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ServiceOrchestration" }, { "type": "object", "properties": { "warnings": { "type": "array", "items": { "anyOf": [ { "$ref": "#/components/schemas/OrchestrationWarningIneligible" }, { "$ref": "#/components/schemas/OrchestrationWarningInvalidData" } ] } } } } ] }, "examples": { "response": { "summary": "Example Response", "value": { "orchestration_path": { "type": "service", "parent": { "id": "PC2D9ML", "self": "https://api.pagerduty.com/service/PC2D9ML", "type": "service_reference" }, "self": "https://api.pagerduty.com/event_orchestrations/service/PC2D9ML", "sets": [ { "id": "start", "rules": [ { "label": "Always apply some consistent event transformations to all events", "id": "c91f72f3", "conditions": [], "actions": { "variables": [ { "name": "hostname", "path": "event.component", "value": "hostname: (.*)", "type": "regex" } ], "extractions": [ { "template": "{{variables.hostname}}", "target": "event.custom_details.hostname" }, { "source": "event.source", "regex": "www (.*) service", "target": "event.source" } ], "pagerduty_automation_actions": [ { "action_id": "01CSB5SMOKCKVRI5GN0LJG7SMB" } ], "incident_custom_field_updates": [ { "id": "PEXCK89", "value": "#my-team-channel" }, { "id": "PN1C4A2", "value": "{{event.timestamp}}" } ], "route_to": "step-two" } } ] }, { "id": "step-two", "rules": [ { "label": "All critical alerts should be treated as P1 incidents", "id": "7c54529d", "conditions": [ { "expression": "event.severity matches 'critical'" } ], "actions": { "annotate": "Please use our P1 runbook: https://docs.test/p1-runbook", "priority": "P0IN2KQ", "suppress": false, "incident_custom_field_updates": [ { "id": "PEXCK89", "value": "#p1-incident-response" } ] } }, { "label": "If there's something wrong on the canary let the team know about it in our deployments Slack channel", "id": "1f6d9a33", "conditions": [ { "expression": "event.custom_details.hostname matches part 'canary'" } ], "actions": { "automation_actions": [ { "name": "Canary Slack Notification", "url": "https://our-slack-listerner.test/send-notification", "auto_send": true, "headers": [ { "key": "X-Notification-Source", "value": "PagerDuty Incident Webhook" } ], "parameters": [ { "key": "channel", "value": "#my-team-channel" }, { "key": "message", "value": "Something is wrong with the canary deployment" } ] } ] } }, { "label": "Never bother the on-call for info-level events outside of work hours", "id": "cd770384", "conditions": [ { "expression": "event.severity matches 'info' and not (now in Mon,Tue,Wed,Thu,Fri 09:00:00 to 17:00:00 America/Los_Angeles)" } ], "actions": { "suppress": true } } ] } ], "catch_all": { "actions": { "suppress": true, "incident_custom_field_updates": [ { "id": "PEXCK89", "value": "#general-incident-notifications" } ] } }, "created_at": "2021-11-18T16:42:01Z", "created_by": { "id": "P8B9WR8", "self": "https://api.pagerduty.com/users/P8B9WR8", "type": "user_reference" }, "updated_at": "2021-11-18T16:42:01Z", "updated_by": { "id": "P8B9WR8", "self": "https://api.pagerduty.com/users/P8B9WR8", "type": "user_reference" }, "version": "rn1Mja13T1HBdmPChqFilSQXUW2fWXM_" }, "warnings": [ { "feature": "nested_rules", "feature_type": "nested_rules", "message": "This orchestration contains Nested Rules, which is not available on your account plan. The orchestration will be updated, however, only rules in the 'start' set will be evaluated", "rule_id": null, "warning_type": "forbidden_feature" }, { "feature": "variables", "feature_type": "actions", "message": "This rule uses Dynamic Field Enrichment & Extraction, which is an action not available on your account plan. The rule will be updated, but the action will not be fired when the rule is evaluated", "rule_id": "c91f72f3", "warning_type": "forbidden_feature" }, { "feature": "extractions", "feature_type": "actions", "message": "This rule uses Dynamic Field Enrichment & Extraction, which is an action not available on your account plan. The rule will be updated, but the action will not be fired when the rule is evaluated", "rule_id": "c91f72f3", "warning_type": "forbidden_feature" }, { "feature": "pagerduty_automation_actions", "feature_type": "actions", "message": "This rule uses PagerDuty Automation Actions, which is an action not available on your account plan. The rule will be updated, but the action will not be fired when the rule is evaluated", "rule_id": "c91f72f3", "warning_type": "forbidden_feature" }, { "feature": "automation_actions", "feature_type": "actions", "message": "This rule uses Automation Actions, which is an action not available on your account plan. The rule will be updated, but the action will not be fired when the rule is evaluated", "rule_id": "1f6d9a33", "warning_type": "forbidden_feature" }, { "feature": "recurring_condition", "feature_type": "conditions", "message": "This rule uses Recurring Condition, which is a condition not available on your account plan. The rule will be updated, but it will not be evaluated by events", "rule_id": "c91f72f3", "warning_type": "forbidden_feature" }, { "feature": "incident_custom_field_updates", "feature_type": "actions", "message": "This rule uses Incident Custom Field update, which is an action not available on your account plan. The rule will be updated, but the action will not be fired when the rule is evaluated", "rule_id": "4g6d2a901", "warning_type": "forbidden_feature" } ] } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "405": { "$ref": "#/components/responses/NotAllowed" }, "409": { "$ref": "#/components/responses/Conflict" } } } }, "/event_orchestrations/services/{service_id}/active": { "description": "View and update a Service Orchestration's active status.", "get": { "x-pd-requires-scope": "services.read", "tags": [ "Event Orchestrations" ], "operationId": "getOrchActiveStatus", "summary": "Get the Service Orchestration active status for a Service", "description": "Get a Service Orchestration's active status.\n\nA Service Orchestration allows you to set an active status based on whether an event will be evaluated against a service orchestration path (true) or service ruleset (false).\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#event-orchestrations)\n\nScoped OAuth requires: `services.read`\n", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/service_id" } ], "responses": { "200": { "$ref": "#/components/responses/OrchestrationPathServiceActiveResponse" }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" } } }, "put": { "x-pd-requires-scope": "services.write", "tags": [ "Event Orchestrations" ], "operationId": "updateOrchActiveStatus", "summary": "Update the Service Orchestration active status for a Service", "description": "Update a Service Orchestration's active status.\n\nA Service Orchestration allows you to set an active status based on whether an event will be evaluated against a service orchestration path (true) or service ruleset (false).\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#event-orchestrations)\n\nScoped OAuth requires: `services.write`\n", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/service_id" } ], "requestBody": { "description": "Update Service Orchestration's active status.", "content": { "application/json": { "schema": { "$ref": "#/components/responses/OrchestrationPathServiceActiveResponse/content/application~1json/schema" }, "examples": { "request": { "summary": "Example Request", "value": { "active": false } } } } } }, "responses": { "200": { "$ref": "#/components/responses/OrchestrationPathServiceActiveResponse" }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "405": { "$ref": "#/components/responses/NotAllowed" }, "409": { "$ref": "#/components/responses/Conflict" } } } }, "/event_orchestrations/{id}/cache_variables": { "description": "Manage Cache Variables for a Global Event Orchestration.", "get": { "x-pd-requires-scope": "event_orchestrations.read", "tags": [ "Event Orchestrations" ], "operationId": "listCacheVarOnGlobalOrch", "description": "List Cache Variables for a Global Event Orchestration.\n\nCache Variables allow you to store event data on an Event Orchestration, which can then be used in Event Orchestration rules as part of conditions or actions.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#event-orchestrations)\n\nScoped OAuth requires: `event_orchestrations.read`\n", "summary": "List Cache Variables for a Global Event Orchestration", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/event_orchestration_id" } ], "responses": { "200": { "$ref": "#/components/responses/OrchestrationCacheVariableListResponse" }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" } } }, "post": { "x-pd-requires-scope": "event_orchestrations.write", "tags": [ "Event Orchestrations" ], "operationId": "createCacheVarOnGlobalOrch", "description": "Create a Cache Variable for a Global Event Orchestration.\n\nCache Variables allow you to store event data on an Event Orchestration, which can then be used in Event Orchestration rules as part of conditions or actions.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#event-orchestrations)\n\nScoped OAuth requires: `event_orchestrations.write`\n", "summary": "Create a Cache Variable for a Global Event Orchestration", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/event_orchestration_id" } ], "requestBody": { "$ref": "#/components/requestBodies/OrchestrationCacheVariablePostRequest" }, "responses": { "200": { "$ref": "#/components/responses/OrchestrationCacheVariablePostResponse" }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "405": { "$ref": "#/components/responses/NotAllowed" } } } }, "/event_orchestrations/{id}/cache_variables/{cache_variable_id}": { "description": "Manage a Cache Variable for a Global Event Orchestration.", "get": { "x-pd-requires-scope": "event_orchestrations.read", "tags": [ "Event Orchestrations" ], "operationId": "getCacheVarOnGlobalOrch", "description": "Get a Cache Variable for a Global Event Orchestration.\n\nCache Variables allow you to store event data on an Event Orchestration, which can then be used in Event Orchestration rules as part of conditions or actions.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#event-orchestrations)\n\nScoped OAuth requires: `event_orchestrations.read`\n", "summary": "Get a Cache Variable for a Global Event Orchestration", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/event_orchestration_id" }, { "$ref": "#/components/parameters/event_orchestration_cache_variable_id" } ], "responses": { "200": { "$ref": "#/components/responses/OrchestrationCacheVariableGetResponse" }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" } } }, "put": { "x-pd-requires-scope": "event_orchestrations.write", "tags": [ "Event Orchestrations" ], "operationId": "updateCacheVarOnGlobalOrch", "description": "Update a Cache Variable for a Global Event Orchestration.\n\nCache Variables allow you to store event data on an Event Orchestration, which can then be used in Event Orchestration rules as part of conditions or actions.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#event-orchestrations)\n\nScoped OAuth requires: `event_orchestrations.write`\n", "summary": "Update a Cache Variable for a Global Event Orchestration", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/event_orchestration_id" }, { "$ref": "#/components/parameters/event_orchestration_cache_variable_id" } ], "requestBody": { "$ref": "#/components/requestBodies/OrchestrationCacheVariablePutRequest" }, "responses": { "200": { "$ref": "#/components/responses/OrchestrationCacheVariablePutResponse" }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "405": { "$ref": "#/components/responses/NotAllowed" } } }, "delete": { "x-pd-requires-scope": "event_orchestrations.write", "tags": [ "Event Orchestrations" ], "operationId": "deleteCacheVarOnGlobalOrch", "description": "Delete a Cache Variable for a Global Event Orchestration.\n\nCache Variables allow you to store event data on an Event Orchestration, which can then be used in Event Orchestration rules as part of conditions or actions.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#event-orchestrations)\n\nScoped OAuth requires: `event_orchestrations.write`\n", "summary": "Delete a Cache Variable for a Global Event Orchestration", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/event_orchestration_id" }, { "$ref": "#/components/parameters/event_orchestration_cache_variable_id" } ], "responses": { "204": { "description": "The Cache Variable was deleted successfully." }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" } } } }, "/event_orchestrations/services/{service_id}/cache_variables": { "description": "Manage Cache Variables for a Service Event Orchestration.", "get": { "x-pd-requires-scope": "services.read", "tags": [ "Event Orchestrations" ], "operationId": "listCacheVarOnServiceOrch", "description": "List Cache Variables for a Service Event Orchestration.\n\nCache Variables allow you to store event data on an Event Orchestration, which can then be used in Event Orchestration rules as part of conditions or actions.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#event-orchestrations)\n\nScoped OAuth requires: `services.read`\n", "summary": "List Cache Variables for a Service Event Orchestration", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/service_id" } ], "responses": { "200": { "$ref": "#/components/responses/OrchestrationCacheVariableListResponse" }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" } } }, "post": { "x-pd-requires-scope": "services.write", "tags": [ "Event Orchestrations" ], "operationId": "createCacheVarOnServiceOrch", "description": "Create a Cache Variable for a Service Event Orchestration.\n\nCache Variables allow you to store event data on an Event Orchestration, which can then be used in Event Orchestration rules as part of conditions or actions.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#event-orchestrations)\n\nScoped OAuth requires: `services.write`\n", "summary": "Create a Cache Variable for a Service Event Orchestration", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/service_id" } ], "requestBody": { "$ref": "#/components/requestBodies/OrchestrationCacheVariablePostRequest" }, "responses": { "200": { "$ref": "#/components/responses/OrchestrationCacheVariablePostResponse" }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "405": { "$ref": "#/components/responses/NotAllowed" } } } }, "/event_orchestrations/services/{service_id}/cache_variables/{cache_variable_id}": { "description": "Manage a Cache Variable for a Service Event Orchestration.", "get": { "x-pd-requires-scope": "services.read", "tags": [ "Event Orchestrations" ], "operationId": "getCacheVarOnServiceOrch", "description": "Get a Cache Variable for a Service Event Orchestration.\n\nCache Variables allow you to store event data on an Event Orchestration, which can then be used in Event Orchestration rules as part of conditions or actions.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#event-orchestrations)\n\nScoped OAuth requires: `services.read`\n", "summary": "Get a Cache Variable for a Service Event Orchestration", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/service_id" }, { "$ref": "#/components/parameters/event_orchestration_cache_variable_id" } ], "responses": { "200": { "$ref": "#/components/responses/OrchestrationCacheVariableGetResponse" }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" } } }, "put": { "x-pd-requires-scope": "services.write", "tags": [ "Event Orchestrations" ], "operationId": "updateCacheVarOnServiceOrch", "description": "Update a Cache Variable for a Service Event Orchestration.\n\nCache Variables allow you to store event data on an Event Orchestration, which can then be used in Event Orchestration rules as part of conditions or actions.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#event-orchestrations)\n\nScoped OAuth requires: `services.write`\n", "summary": "Update a Cache Variable for a Service Event Orchestration", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/service_id" }, { "$ref": "#/components/parameters/event_orchestration_cache_variable_id" } ], "requestBody": { "$ref": "#/components/requestBodies/OrchestrationCacheVariablePutRequest" }, "responses": { "200": { "$ref": "#/components/responses/OrchestrationCacheVariablePutResponse" }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "405": { "$ref": "#/components/responses/NotAllowed" } } }, "delete": { "x-pd-requires-scope": "services.write", "tags": [ "Event Orchestrations" ], "operationId": "deleteCacheVarOnServiceOrch", "description": "Delete a Cache Variable for a Service Event Orchestration.\n\nCache Variables allow you to store event data on an Event Orchestration, which can then be used in Event Orchestration rules as part of conditions or actions.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#event-orchestrations)\n\nScoped OAuth requires: `services.write`\n", "summary": "Delete a Cache Variable for a Service Event Orchestration", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/service_id" }, { "$ref": "#/components/parameters/event_orchestration_cache_variable_id" } ], "responses": { "204": { "description": "The Cache Variable was deleted successfully." }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" } } } }, "/extension_schemas": { "description": "List extension schemas.", "get": { "x-pd-requires-scope": "extension_schemas.read", "tags": [ "Extension Schemas" ], "operationId": "listExtensionSchemas", "description": "List all extension schemas.\n\nA PagerDuty extension vendor represents a specific type of outbound extension such as Generic Webhook, Slack, ServiceNow.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#extension-schemas)\n\nScoped OAuth requires: `extension_schemas.read`\n", "summary": "List extension schemas", "parameters": [ { "$ref": "#/components/parameters/offset_limit" }, { "$ref": "#/components/parameters/offset_offset" }, { "$ref": "#/components/parameters/offset_total" }, { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" } ], "responses": { "200": { "description": "A paginated array of extension schemas.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/Pagination" }, { "type": "object", "properties": { "extension_schemas": { "type": "array", "items": { "$ref": "#/components/schemas/ExtensionSchema" } } }, "required": [ "extension_schemas" ] } ] }, "examples": { "response": { "summary": "Response Example", "value": { "extension_schemas": [ { "id": "PJFWPEP", "type": "extension_schema", "summary": "Generic Webhook", "self": "https://api.pagerduty.com/extension_schemas/PJFWPEP", "description": "Long description here", "guide_url": "https://developer.pagerduty.com", "icon_url": "https://extension.com/extension.png", "key": "generic_webhook", "label": "Generic Webhook", "logo_url": "https://extension.com/logo.png", "send_types": [ "trigger", "acknowledge", "resolve", "delegate", "escalate", "unacknowledge", "assign" ], "url": "" } ], "limit": 25, "offset": 0, "more": false, "total": null } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } } }, "/extension_schemas/{id}": { "description": "Get details about one specific extension vendor.", "get": { "x-pd-requires-scope": "extension_schemas.read", "tags": [ "Extension Schemas" ], "operationId": "getExtensionSchema", "description": "Get details about one specific extension vendor.\n\nA PagerDuty extension vendor represents a specific type of outbound extension such as Generic Webhook, Slack, ServiceNow.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#extension-schemas)\n\nScoped OAuth requires: `extension_schemas.read`\n", "summary": "Get an extension vendor", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" } ], "responses": { "200": { "description": "The extension vendor requested", "content": { "application/json": { "schema": { "type": "object", "properties": { "extension_schema": { "$ref": "#/components/schemas/ExtensionSchema" } }, "required": [ "extension_schema" ] }, "examples": { "response": { "summary": "Response Example", "value": { "extension_schema": { "id": "PJFWPEP", "type": "extension_schema", "summary": "Generic Webhook", "self": "https://api.pagerduty.com/extension_schemas/PJFWPEP", "description": "Long description here", "guide_url": "https://developer.pagerduty.com", "icon_url": "https://extension.com/extension.png", "key": "generic_webhook", "label": "Generic Webhook", "logo_url": "https://extension.com/logo.png", "send_types": [ "trigger", "acknowledge", "resolve", "delegate", "escalate", "unacknowledge", "assign" ], "url": "" } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } } }, "/extensions": { "description": "List and create extensions.", "get": { "tags": [ "Extensions" ], "x-pd-requires-scope": "extensions.read", "operationId": "listExtensions", "description": "List existing extensions.\n\nExtensions are representations of Extension Schema objects that are attached to Services.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#extensions)\n\nScoped OAuth requires: `extensions.read`\n", "summary": "List extensions", "parameters": [ { "$ref": "#/components/parameters/offset_limit" }, { "$ref": "#/components/parameters/offset_offset" }, { "$ref": "#/components/parameters/offset_total" }, { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/query" }, { "$ref": "#/components/parameters/extension_object_id" }, { "$ref": "#/components/parameters/extension_schema_id" }, { "$ref": "#/components/parameters/include_extensions" } ], "responses": { "200": { "description": "A paginated array of extensions.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/Pagination" }, { "type": "object", "properties": { "extensions": { "type": "array", "items": { "$ref": "#/components/schemas/Extension" } } }, "required": [ "extensions" ] } ] }, "examples": { "response": { "summary": "Response Example", "value": { "extensions": [ { "id": "PPGPXHO", "self": "https://api.pagerduty.com/extensions/PPGPXHO", "endpoint_url": "https://example.com/receive_a_pagerduty_webhook", "name": "My Webhook", "summary": "My Webhook", "type": "extension", "extension_schema": { "id": "PJFWPEP", "type": "extension_schema_reference", "summary": "Generic Webhook", "self": "https://api.pagerduty.com/extension_schemas/PJFWPEP" }, "extension_objects": [ { "id": "PIJ90N7", "type": "service_reference", "summary": "My Application Service", "self": "https://api.pagerduty.com/services/PIJ90N7", "html_url": "https://subdomain.pagerduty.com/service-directory/PIJ90N7" } ] } ], "limit": 25, "offset": 0, "more": false, "total": null } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" } } }, "post": { "tags": [ "Extensions" ], "x-pd-requires-scope": "extensions.write", "operationId": "createExtension", "description": "Create a new Extension.\n\nExtensions are representations of Extension Schema objects that are attached to Services.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#extensions)\n\nScoped OAuth requires: `extensions.write`\n", "summary": "Create an extension", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "extension": { "$ref": "#/components/schemas/Extension" } }, "required": [ "extension" ] }, "examples": { "request": { "summary": "Request Example", "value": { "extension": { "endpoint_url": "https://example.com/receive_a_pagerduty_webhook", "name": "My Webhook", "extension_schema": { "id": "PJFWPEP", "type": "extension_schema_reference" }, "extension_objects": [ { "id": "PIJ90N7", "type": "service_reference" } ] } } }, "requestCustomHeaders": { "summary": "Request Example with Custom Headers", "value": { "extension": { "endpoint_url": "https://example.com/receive_a_pagerduty_webhook", "name": "My Webhook", "extension_schema": { "id": "PJFWPEP", "type": "extension_schema_reference" }, "extension_objects": [ { "id": "PIJ90N7", "type": "service_reference" } ], "config": { "headers": [ { "name": "Authorization", "value": "Token token=super_secret_token_value" } ] } } } } } } }, "description": "The extension to be created" }, "responses": { "201": { "description": "The extension that was created", "content": { "application/json": { "schema": { "type": "object", "properties": { "extension": { "$ref": "#/components/schemas/Extension" } }, "required": [ "extension" ] }, "examples": { "response": { "summary": "Response Example", "value": { "extension": { "id": "PPGPXHO", "self": "https://api.pagerduty.com/extensions/PPGPXHO", "endpoint_url": "https://example.com/receive_a_pagerduty_webhook", "name": "My Webhook", "summary": "My Webhook", "type": "extension", "extension_schema": { "id": "PJFWPEP", "type": "extension_schema_reference", "summary": "Generic Webhook", "self": "https://api.pagerduty.com/extension_schemas/PJFWPEP" }, "extension_objects": [ { "id": "PIJ90N7", "type": "service_reference", "summary": "My Application Service", "self": "https://api.pagerduty.com/services/PIJ90N7", "html_url": "https://subdomain.pagerduty.com/service-directory/PIJ90N7" } ] } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "402": { "$ref": "#/components/responses/PaymentRequired" }, "403": { "$ref": "#/components/responses/Forbidden" } }, "callbacks": { "webhookV2": { "endpoint_url": { "post": { "parameters": [], "tags": [ "Webhooks V2" ], "operationId": "webhookV2", "description": "Receive webhook indicating incident state has changed.", "summary": "Receive webhook", "security": [], "responses": { "200": { "description": "Your server implementation should return this if it successfuly received the webhook." } }, "requestBody": { "description": "Webhook.", "content": { "application/json": { "schema": { "type": "object", "properties": { "messages": { "type": "array", "description": "An array of webhook messages.", "items": { "$ref": "#/components/schemas/WebhookIncidentAction" } } } } } } } } } }, "webhookV1": { "endpoint_url": { "post": { "parameters": [], "tags": [ "Webhooks V1" ], "operationId": "webhookV1", "description": "Receive webhook indicating incident state has changed.", "summary": "Receive webhook", "security": [], "responses": { "200": { "description": "Your server implementation should return this if it successfuly received the webhook." } }, "requestBody": { "description": "Webhook.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebhooksV1Message" } } } } } } } } } }, "/extensions/{id}": { "description": "Manage an extension.", "get": { "tags": [ "Extensions" ], "x-pd-requires-scope": "extensions.read", "operationId": "getExtension", "description": "Get details about an existing extension.\n\nExtensions are representations of Extension Schema objects that are attached to Services.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#extensions)\n\nScoped OAuth requires: `extensions.read`\n", "summary": "Get an extension", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" }, { "$ref": "#/components/parameters/include_extensions_id" } ], "responses": { "200": { "description": "The extension that was requested.", "content": { "application/json": { "schema": { "type": "object", "properties": { "extension": { "$ref": "#/components/schemas/Extension" } }, "required": [ "extension" ] }, "examples": { "response": { "summary": "Response Example", "value": { "extension": { "id": "PPGPXHO", "self": "https://api.pagerduty.com/extensions/PPGPXHO", "endpoint_url": "https://example.com/receive_a_pagerduty_webhook", "name": "My Webhook", "summary": "My Webhook", "type": "extension", "extension_schema": { "id": "PJFWPEP", "type": "extension_schema_reference", "summary": "Generic Webhook", "self": "https://api.pagerduty.com/extension_schemas/PJFWPEP" }, "extension_objects": [ { "id": "PIJ90N7", "type": "service_reference", "summary": "My Application Service", "self": "https://api.pagerduty.com/services/PIJ90N7", "html_url": "https://subdomain.pagerduty.com/service-directory/PIJ90N7" } ], "temporarily_disabled": false } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" } } }, "delete": { "tags": [ "Extensions" ], "x-pd-requires-scope": "extensions.write", "operationId": "deleteExtension", "description": "Delete an existing extension.\n\nOnce the extension is deleted, it will not be accessible from the web UI and new incidents won't be able to be created for this extension.\n\nExtensions are representations of Extension Schema objects that are attached to Services.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#extensions)\n\nScoped OAuth requires: `extensions.write`\n", "summary": "Delete an extension", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" } ], "responses": { "204": { "description": "The extension was deleted successfully." }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" } } }, "put": { "tags": [ "Extensions" ], "x-pd-requires-scope": "extensions.write", "operationId": "updateExtension", "description": "Update an existing extension.\n\nExtensions are representations of Extension Schema objects that are attached to Services.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#extensions)\n\nScoped OAuth requires: `extensions.write`\n", "summary": "Update an extension", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "extension": { "$ref": "#/components/schemas/Extension" } }, "required": [ "extension" ] }, "examples": { "request": { "summary": "Request Example", "value": { "extension": { "endpoint_url": "https://example.com/receive_a_pagerduty_webhook", "name": "My Webhook", "extension_schema": { "id": "PJFWPEP", "type": "extension_schema_reference" }, "extension_objects": [ { "id": "PIJ90N7", "type": "service_reference" } ] } } }, "requestCustomHeaders": { "summary": "Request Example with Custom Headers", "value": { "extension": { "endpoint_url": "https://example.com/receive_a_pagerduty_webhook", "name": "My Webhook", "extension_schema": { "id": "PJFWPEP", "type": "extension_schema_reference" }, "extension_objects": [ { "id": "PIJ90N7", "type": "service_reference" } ], "config": { "headers": [ { "name": "Authorization", "value": "Token token=super_secret_token_value" } ] } } } } } } }, "description": "The extension to be updated." }, "responses": { "200": { "description": "The extension that was updated.", "content": { "application/json": { "schema": { "type": "object", "properties": { "extension": { "$ref": "#/components/schemas/Extension" } }, "required": [ "extension" ] }, "examples": { "response": { "summary": "Response Example", "value": { "extension": { "id": "PPGPXHO", "self": "https://api.pagerduty.com/extensions/PPGPXHO", "endpoint_url": "https://example.com/receive_a_pagerduty_webhook", "name": "My Webhook", "summary": "My Webhook", "type": "extension", "extension_schema": { "id": "PJFWPEP", "type": "extension_schema_reference", "summary": "Generic Webhook", "self": "https://api.pagerduty.com/extension_schemas/PJFWPEP" }, "extension_objects": [ { "id": "PIJ90N7", "type": "service_reference", "summary": "My Application Service", "self": "https://api.pagerduty.com/services/PIJ90N7", "html_url": "https://subdomain.pagerduty.com/service-directory/PIJ90N7" } ] } } } } } } }, "401": { "$ref": "#/components/responses/Unauthorized" }, "402": { "$ref": "#/components/responses/PaymentRequired" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" } } } }, "/extensions/{id}/enable": { "description": "Enable an extension.", "post": { "tags": [ "Extensions" ], "x-pd-requires-scope": "extensions.write", "operationId": "enableExtension", "description": "Enable an extension that is temporarily disabled. (This API does not require a request body.)\n\nExtensions are representations of Extension Schema objects that are attached to Services.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#extensions)\n\nScoped OAuth requires: `extensions.write`\n", "summary": "Enable an extension", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" } ], "responses": { "200": { "description": "The extension that was successfully enabled.", "content": { "application/json": { "schema": { "type": "object", "properties": { "extension": { "$ref": "#/components/schemas/Extension" } }, "required": [ "extension" ] }, "examples": { "response": { "summary": "Response Example", "value": { "extension": { "id": "PPGPXHO", "self": "https://api.pagerduty.com/extensions/PPGPXHO", "endpoint_url": "https://example.com/receive_a_pagerduty_webhook", "name": "My Webhook", "summary": "My Webhook", "type": "extension", "extension_schema": { "id": "PJFWPEP", "type": "extension_schema_reference", "summary": "Generic Webhook", "self": "https://api.pagerduty.com/extension_schemas/PJFWPEP" }, "extension_objects": [ { "id": "PIJ90N7", "type": "service_reference", "summary": "My Application Service", "self": "https://api.pagerduty.com/services/PIJ90N7", "html_url": "https://subdomain.pagerduty.com/service-directory/PIJ90N7" } ] } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" } } } }, "/incident_workflows": { "description": "Create, retrieve, or modify Incident Workflows", "get": { "x-pd-requires-scope": "incident_workflows.read", "tags": [ "Incident Workflows" ], "operationId": "listIncidentWorkflows", "description": "List existing Incident Workflows.\n\nThis is the best method to use to list all Incident Workflows in your account. If your use case requires listing Incident Workflows associated with a particular Service, you can use the \"List Triggers\" method to find Incident Workflows configured to start for Incidents in a given Service.\n\nAn Incident Workflow is a sequence of configurable Steps and associated Triggers that can execute automated Actions for a given Incident.\n\nScoped OAuth requires: `incident_workflows.read`\n", "summary": "List Incident Workflows", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/offset_limit" }, { "$ref": "#/components/parameters/offset_offset" }, { "$ref": "#/components/parameters/offset_total" }, { "$ref": "#/components/parameters/query" }, { "$ref": "#/components/parameters/include_incident_workflow_children" } ], "responses": { "200": { "description": "A paginated array of Incident Workflows.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/Pagination" }, { "type": "object", "properties": { "incident_workflows": { "type": "array", "items": { "$ref": "#/components/schemas/IncidentWorkflow" } } }, "required": [ "incident_workflows" ] } ] }, "examples": { "response": { "summary": "Response Example", "value": { "incident_workflows": [ { "id": "PSFEVL7", "name": "Example Incident Workflow", "description": "This Incident Workflow is an example", "type": "incident_workflow", "created_at": "2022-12-13T19:55:01.171Z", "self": "https://api.pagerduty.com/incident_workflows/PSFEVL7", "html_url": "https://pdt-flex-actions.pagerduty.com/flex-workflows/workflows/PSFEVL7" } ], "limit": 1, "offset": 0, "more": true } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "402": { "$ref": "#/components/responses/PaymentRequired" }, "403": { "$ref": "#/components/responses/Forbidden" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } }, "post": { "x-pd-requires-scope": "incident_workflows.write", "tags": [ "Incident Workflows" ], "operationId": "postIncidentWorkflow", "description": "Create a new Incident Workflow\n\nAn Incident Workflow is a sequence of configurable Steps and associated Triggers that can execute automated Actions for a given Incident.\n\nScoped OAuth requires: `incident_workflows.write`\n", "summary": "Create an Incident Workflow", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "incident_workflow": { "$ref": "#/components/schemas/IncidentWorkflow" } }, "required": [ "incident_workflow" ] }, "examples": { "request": { "summary": "Request Example", "value": { "incident_workflow": { "name": "Example Incident Workflow", "description": "This Incident Workflow is an example", "steps": [ { "name": "Send Status Update", "action_configuration": { "action_id": "pagerduty.com:incident-workflows:send-status-update:1", "inputs": [ { "name": "Message", "value": "Example status message sent on {{current_date}}" } ] } } ] } } } } } } }, "responses": { "201": { "description": "The new Incident Workflow", "content": { "application/json": { "schema": { "type": "object", "properties": { "incident_workflow": { "$ref": "#/components/schemas/IncidentWorkflow" } }, "required": [ "incident_workflow" ] }, "examples": { "response": { "summary": "Response Example", "value": { "incident_workflow": { "id": "PSFEVL7", "name": "Example Incident Workflow", "description": "This Incident Workflow is an example", "type": "incident_workflow", "created_at": "2022-12-13T19:55:01.171Z", "self": "https://api.pagerduty.com/incident_workflows/PSFEVL7", "html_url": "https://pdt-flex-actions.pagerduty.com/flex-workflows/workflows/PSFEVL7", "steps": [ { "id": "P4RG7YW", "type": "step", "name": "Send Status Update", "description": "Posts a status update to a given incident", "action_configuration": { "action_id": "pagerduty.com:incident-workflows:send-status-update:1", "description": "Posts a status update to a given incident", "inputs": [ { "name": "Message", "parameter_type": "text", "value": "Example status message sent on {{current_date}}" } ], "outputs": [ { "name": "Result", "reference_name": "result", "parameter_type": "text" }, { "name": "Result Summary", "reference_name": "result-summary", "parameter_type": "text" }, { "name": "Error", "reference_name": "error", "parameter_type": "text" } ] } } ] } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "402": { "$ref": "#/components/responses/PaymentRequired" }, "403": { "$ref": "#/components/responses/Forbidden" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } } }, "/incident_workflows/{id}": { "description": "Create, retrieve, modify, or delete Incident Workflows", "get": { "x-pd-requires-scope": "incident_workflows.read", "tags": [ "Incident Workflows" ], "operationId": "getIncidentWorkflow", "description": "Get an existing Incident Workflow\nAn Incident Workflow is a sequence of configurable Steps and associated Triggers that can execute automated Actions for a given Incident.\n\nScoped OAuth requires: `incident_workflows.read`\n", "summary": "Get an Incident Workflow", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" } ], "responses": { "201": { "description": "The Incident Workflow", "content": { "application/json": { "schema": { "type": "object", "properties": { "incident_workflow": { "$ref": "#/components/schemas/IncidentWorkflow" } }, "required": [ "incident_workflow" ] }, "examples": { "response": { "summary": "Response Example", "value": { "incident_workflow": { "id": "PSFEVL7", "name": "Example Incident Workflow", "description": "This Incident Workflow is an example", "type": "incident_workflow", "created_at": "2022-12-13T19:55:01.171Z", "self": "https://api.pagerduty.com/incident_workflows/PSFEVL7", "html_url": "https://pdt-flex-actions.pagerduty.com/flex-workflows/workflows/PSFEVL7", "steps": [ { "id": "P4RG7YW", "type": "step", "name": "Send Status Update", "description": "Posts a status update to a given incident", "action_configuration": { "action_id": "pagerduty.com:incident-workflows:send-status-update:1", "description": "Posts a status update to a given incident", "inputs": [ { "name": "Message", "parameter_type": "text", "value": "Example status message sent on {{current_date}}" } ], "outputs": [ { "name": "Result", "reference_name": "result", "parameter_type": "text" }, { "name": "Result Summary", "reference_name": "result-summary", "parameter_type": "text" }, { "name": "Error", "reference_name": "error", "parameter_type": "text" } ] } } ] } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "402": { "$ref": "#/components/responses/PaymentRequired" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } }, "delete": { "x-pd-requires-scope": "incident_workflows.write", "tags": [ "Incident Workflows" ], "operationId": "deleteIncidentWorkflow", "description": "Delete an existing Incident Workflow\n\nAn Incident Workflow is a sequence of configurable Steps and associated Triggers that can execute automated Actions for a given Incident.\n\nScoped OAuth requires: `incident_workflows.write`\n", "summary": "Delete an Incident Workflow", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" } ], "responses": { "200": { "description": "The Incident Workflow was deleted successfully" }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "402": { "$ref": "#/components/responses/PaymentRequired" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } }, "put": { "x-pd-requires-scope": "incident_workflows.write", "tags": [ "Incident Workflows" ], "operationId": "putIncidentWorkflow", "description": "Update an Incident Workflow\n\nAn Incident Workflow is a sequence of configurable Steps and associated Triggers that can execute automated Actions for a given Incident.\n\nScoped OAuth requires: `incident_workflows.write`\n", "summary": "Update an Incident Workflow", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "incident_workflow": { "$ref": "#/components/schemas/IncidentWorkflow" } }, "required": [ "incident_workflow" ] }, "examples": { "request": { "summary": "Request Example", "value": { "incident_workflow": { "name": "Example Incident Workflow", "description": "This Incident Workflow is an example", "steps": [ { "name": "Send Status Update", "action_configuration": { "action_id": "pagerduty.com:incident-workflows:send-status-update:1", "inputs": [ { "name": "Message", "value": "Example status message sent on {{current_date}}" } ] } } ] } } } } } } }, "responses": { "201": { "description": "The new Incident Workflow", "content": { "application/json": { "schema": { "type": "object", "properties": { "incident_workflow": { "$ref": "#/components/schemas/IncidentWorkflow" } }, "required": [ "incident_workflow" ] }, "examples": { "response": { "summary": "Response Example", "value": { "incident_workflow": { "id": "PSFEVL7", "name": "Example Incident Workflow", "description": "This Incident Workflow is an example", "type": "incident_workflow", "created_at": "2022-12-13T19:55:01.171Z", "self": "https://api.pagerduty.com/incident_workflows/PSFEVL7", "html_url": "https://pdt-flex-actions.pagerduty.com/flex-workflows/workflows/PSFEVL7", "steps": [ { "id": "P4RG7YW", "type": "step", "name": "Send Status Update", "description": "Posts a status update to a given incident", "action_configuration": { "action_id": "pagerduty.com:incident-workflows:send-status-update:1", "description": "Posts a status update to a given incident", "inputs": [ { "name": "Message", "parameter_type": "text", "value": "Example status message sent on {{current_date}}" } ], "outputs": [ { "name": "Result", "reference_name": "result", "parameter_type": "text" }, { "name": "Result Summary", "reference_name": "result-summary", "parameter_type": "text" }, { "name": "Error", "reference_name": "error", "parameter_type": "text" } ] } } ] } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "402": { "$ref": "#/components/responses/PaymentRequired" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } } }, "/incident_workflows/{id}/instances": { "description": "Start an Instance of an Incident Workflows", "post": { "x-pd-requires-scope": "incident_workflows:instances.write", "tags": [ "Incident Workflows" ], "operationId": "createIncidentWorkflowInstance", "description": "Start an Instance of an Incident Workflow. Sometimes referred to as \"triggering a workflow on an incident.\"\n\nAn Incident Workflow is a sequence of configurable Steps and associated Triggers that can execute automated Actions for a given Incident.\n\nScoped OAuth requires: `incident_workflows:instances.write`\n", "summary": "Start an Incident Workflow Instance", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "incident_workflow_instance": { "type": "object", "properties": { "incident": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "incident_reference" ] } }, "required": [ "id" ] } } } }, "required": [ "incident_workflow_instance" ] }, "examples": { "request": { "summary": "Request Example", "value": { "incident_workflow_instance": { "id": "P3SNKQS", "type": "incident_workflow_instance", "incident": { "id": "Q1R2DLCB21K7NP", "type": "incident_reference" } } } } } } } }, "responses": { "201": { "description": "The Incident Workflow Instance", "content": { "application/json": { "schema": { "type": "object", "properties": { "incident_workflow_instance": { "$ref": "#/components/schemas/IncidentWorkflowInstance" } }, "required": [ "incident_workflow_instance" ] }, "examples": { "response": { "summary": "Response Example", "value": { "incident_workflow_instance": { "id": "P3SNKQS", "type": "incident_workflow_instance", "incident": { "id": "Q1R2DLCB21K7NP", "type": "incident_reference", "summary": "[#1234] The server is on fire.", "self": "https://api.pagerduty.com/incidents/PT4KHLK", "html_url": "https://subdomain.pagerduty.com/incidents/PT4KHLK" } } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "402": { "$ref": "#/components/responses/PaymentRequired" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } } }, "/incident_workflows/actions": { "description": "Retrieve Incident Workflow Actions", "get": { "x-pd-requires-scope": "incident_workflows.read", "tags": [ "Incident Workflows" ], "operationId": "listIncidentWorkflowActions", "description": "List Incident Workflow Actions\n\nScoped OAuth requires: `incident_workflows.read`\n", "summary": "List Actions", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/cursor_limit" }, { "$ref": "#/components/parameters/cursor_cursor" }, { "$ref": "#/components/parameters/actions_filter_keyword" } ], "responses": { "200": { "description": "A paginated array of Incident Workflow Actions", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/CursorPagination" }, { "type": "object", "properties": { "more": { "type": "boolean", "description": "Indicates if there are additional records to return", "readOnly": true }, "actions": { "type": "array", "items": { "$ref": "#/components/schemas/IncidentWorkflowAction" } } } } ] }, "examples": { "response": { "summary": "Response Example", "value": { "actions": [ { "type": "action", "id": "pagerduty.com:test:sample-action:1", "domain_name": "pagerduty.com", "package_name": "test", "function_name": "sample-action", "version": 1, "name": "Test: Sample Action", "description": "A fake Action for documentation purposes", "action_type": "integration", "tags": [], "metadata": "{}", "search_keywords": [], "inputs": [ { "name": "Text Input", "description": "A text input", "type": "text", "default_value": "some text", "is_required": true, "is_hidden": false, "advanced": false, "metadata": "{}", "connection_type_id": "" }, { "name": "Int Input", "description": "An integer input", "type": "integer", "default_value": "1234", "is_required": false, "is_hidden": false, "advanced": false, "metadata": "{}", "connection_type_id": "" } ], "outputs": [ { "name": "Text Output", "description": "A text output", "type": "text" } ], "created_at": "2022-12-08T22:14:16.965Z", "created_by_user_id": "PNBURS9" } ], "limit": 1, "next_cursor": "N2E3YzkzNjMtYzBkMC00NjFmLTg1OTEtMGZjMjcwODUzODNl", "more": true } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "402": { "$ref": "#/components/responses/PaymentRequired" }, "403": { "$ref": "#/components/responses/Forbidden" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } } }, "/incident_workflows/actions/{id}": { "description": "Retrieve Incident Workflow Actions", "get": { "x-pd-requires-scope": "incident_workflows.read", "tags": [ "Incident Workflows" ], "operationId": "getIncidentWorkflowAction", "description": "Get an Incident Workflow Action\n\nScoped OAuth requires: `incident_workflows.read`\n", "summary": "Get an Action", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" } ], "responses": { "200": { "description": "An Incident Workflow Action", "content": { "application/json": { "schema": { "type": "object", "properties": { "action": { "$ref": "#/components/schemas/IncidentWorkflowAction" } } }, "examples": { "response": { "summary": "Response Example", "value": { "action": { "type": "action", "id": "pagerduty.com:test:sample-action:1", "domain_name": "pagerduty.com", "package_name": "test", "function_name": "sample-action", "version": 1, "name": "Test: Sample Action", "description": "A fake Action for documentation purposes", "action_type": "integration", "tags": [], "metadata": "{}", "search_keywords": [], "inputs": [ { "name": "Text Input", "description": "A text input", "type": "text", "default_value": "some text", "is_required": true, "is_hidden": false, "advanced": false, "metadata": "{}", "connection_type_id": "" }, { "name": "Int Input", "description": "An integer input", "type": "integer", "default_value": "1234", "is_required": false, "is_hidden": false, "advanced": false, "metadata": "{}", "connection_type_id": "" } ], "outputs": [ { "name": "Text Output", "description": "A text output", "type": "text" } ], "created_at": "2022-12-08T22:14:16.965Z", "created_by_user_id": "PNBURS9" } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "402": { "$ref": "#/components/responses/PaymentRequired" }, "403": { "$ref": "#/components/responses/Forbidden" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } } }, "/incident_workflows/triggers": { "description": "Create, retrieve, or modify Incident Workflow Triggers", "get": { "x-pd-requires-scope": "incident_workflows.read", "tags": [ "Incident Workflows" ], "operationId": "listIncidentWorkflowTriggers", "description": "List existing Incident Workflow Triggers\n\nScoped OAuth requires: `incident_workflows.read`\n", "summary": "List Triggers", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/triggers_filter_workflow_id" }, { "$ref": "#/components/parameters/triggers_filter_incident_id" }, { "$ref": "#/components/parameters/triggers_filter_service_id" }, { "$ref": "#/components/parameters/triggers_filter_trigger_type" }, { "$ref": "#/components/parameters/triggers_filter_workflow_name_contains" }, { "$ref": "#/components/parameters/triggers_sort_by" }, { "$ref": "#/components/parameters/cursor_limit" }, { "$ref": "#/components/parameters/cursor_cursor" } ], "responses": { "200": { "description": "A paginated array of Incident Workflow Triggers", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/CursorPagination" }, { "type": "object", "properties": { "more": { "type": "boolean", "description": "Indicates if there are additional records to return", "readOnly": true }, "triggers": { "type": "array", "items": { "$ref": "#/components/schemas/IncidentWorkflowTrigger" } } } } ] }, "examples": { "response": { "summary": "Response Example", "value": { "triggers": [ { "id": "4ad696eb-bb48-422a-8bd0-6efad6befa29", "type": "workflow_trigger", "trigger_type_name": "Conditional Trigger", "trigger_type": "conditional", "condition": "incident.priority matches 'P1'", "trigger_url": "https://api.pagerduty.com/incident_workflows/triggers/4ad696eb-bb48-422a-8bd0-6efad6befa29/start", "self": "https://api.pagerduty.com/incident_workflows/triggers/4ad696eb-bb48-422a-8bd0-6efad6befa29", "workflow_id": "PSFEVL7", "workflow_name": "Example Incident Workflow", "is_subscribed_to_all_services": true, "services": [], "workflow": { "id": "PSFEVL7", "name": "Example Incident Workflow", "description": "This Incident Workflow is an example", "type": "incident_workflow", "created_at": "2022-12-13T19:55:01.171Z", "self": "https://api.pagerduty.com/incident_workflows/PSFEVL7", "html_url": "https://pdt-flex-actions.pagerduty.com/flex-workflows/workflows/PSFEVL7" }, "permissions": { "restricted": false } } ], "limit": 1, "next_cursor": "N2E3YzkzNjMtYzBkMC00NjFmLTg1OTEtMGZjMjcwODUzODNl", "more": true } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "402": { "$ref": "#/components/responses/PaymentRequired" }, "403": { "$ref": "#/components/responses/Forbidden" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } }, "post": { "x-pd-requires-scope": "incident_workflows.write", "tags": [ "Incident Workflows" ], "operationId": "createIncidentWorkflowTrigger", "description": "Create new Incident Workflow Trigger\n\nScoped OAuth requires: `incident_workflows.write`\n", "summary": "Create a Trigger", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "trigger": { "$ref": "#/components/schemas/IncidentWorkflowTrigger" } }, "required": [ "trigger" ] }, "examples": { "request": { "summary": "Request Example", "value": { "trigger": { "trigger_type": "conditional", "workflow": { "id": "PSFEVL7" }, "services": [ { "id": "PIJ90N7" } ], "is_subscribed_to_all_services": false, "condition": "incident.priority matches 'P1'" } } } } } } }, "responses": { "201": { "description": "The newly created Incident Workflow Trigger", "content": { "application/json": { "schema": { "type": "object", "properties": { "trigger": { "$ref": "#/components/schemas/IncidentWorkflowTrigger" } }, "required": [ "trigger" ] }, "examples": { "response": { "summary": "Response Example", "value": { "trigger": { "id": "4ad696eb-bb48-422a-8bd0-6efad6befa29", "type": "workflow_trigger", "trigger_type_name": "Conditional Trigger", "trigger_type": "conditional", "condition": "incident.priority matches 'P1'", "trigger_url": "https://api.pagerduty.com/incident_workflows/triggers/4ad696eb-bb48-422a-8bd0-6efad6befa29/start", "self": "https://api.pagerduty.com/incident_workflows/triggers/4ad696eb-bb48-422a-8bd0-6efad6befa29", "workflow_id": "PSFEVL7", "workflow_name": "Example Incident Workflow", "is_subscribed_to_all_services": false, "services": [ { "id": "PIJ90N7", "summary": "My Application Service", "type": "service", "self": "https://api.pagerduty.com/services/PIJ90N7", "html_url": "https://pdt-circular.pagerduty.com/service-directory/P0544JX" } ], "workflow": { "id": "PSFEVL7", "name": "Example Incident Workflow", "description": "This Incident Workflow is an example", "type": "incident_workflow", "created_at": "2022-12-13T19:55:01.171Z", "self": "https://api.pagerduty.com/incident_workflows/PSFEVL7", "html_url": "https://mydomain.pagerduty.com/flex-workflows/workflows/PSFEVL7" } } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "402": { "$ref": "#/components/responses/PaymentRequired" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } } }, "/incident_workflows/triggers/{id}": { "description": "Create, retrieve, or modify Incident Workflow Triggers", "get": { "x-pd-requires-scope": "incident_workflows.read", "tags": [ "Incident Workflows" ], "operationId": "getIncidentWorkflowTrigger", "description": "Retrieve an existing Incident Workflows Trigger\n\nScoped OAuth requires: `incident_workflows.read`\n", "summary": "Get a Trigger", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" } ], "responses": { "200": { "description": "The Incident Workflows Trigger", "content": { "application/json": { "schema": { "type": "object", "properties": { "trigger": { "$ref": "#/components/schemas/IncidentWorkflowTrigger" } } }, "examples": { "response": { "summary": "Response Example", "value": { "trigger": { "id": "4ad696eb-bb48-422a-8bd0-6efad6befa29", "type": "workflow_trigger", "trigger_type_name": "Manual Trigger", "trigger_type": "manual", "trigger_url": "https://api.pagerduty.com/incident_workflows/triggers/4ad696eb-bb48-422a-8bd0-6efad6befa29/start", "self": "https://api.pagerduty.com/incident_workflows/triggers/4ad696eb-bb48-422a-8bd0-6efad6befa29", "workflow_id": "PSFEVL7", "workflow_name": "Example Incident Workflow", "is_subscribed_to_all_services": true, "services": [], "workflow": { "id": "PSFEVL7", "name": "Example Incident Workflow", "description": "This Incident Workflow is an example", "type": "incident_workflow", "created_at": "2022-12-13T19:55:01.171Z", "self": "https://api.pagerduty.com/incident_workflows/PSFEVL7", "html_url": "https://pdt-flex-actions.pagerduty.com/flex-workflows/workflows/PSFEVL7" }, "permissions": { "restricted": true, "team_id": "PUOEV7R" } } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "402": { "$ref": "#/components/responses/PaymentRequired" }, "403": { "$ref": "#/components/responses/Forbidden" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } }, "put": { "x-pd-requires-scope": "incident_workflows.write", "tags": [ "Incident Workflows" ], "operationId": "updateIncidentWorkflowTrigger", "description": "Update an existing Incident Workflow Trigger\n\nScoped OAuth requires: `incident_workflows.write`\n", "summary": "Update a Trigger", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "trigger": { "$ref": "#/components/schemas/IncidentWorkflowTrigger" } }, "required": [ "trigger" ] }, "examples": { "request": { "summary": "Request Example", "value": { "trigger": { "services": [ { "id": "PIJ90N7" } ], "is_subscribed_to_all_services": false, "condition": "incident.priority matches 'P1'" } } } } } } }, "responses": { "200": { "description": "The updated Incident Workflow Trigger", "content": { "application/json": { "schema": { "type": "object", "properties": { "trigger": { "$ref": "#/components/schemas/IncidentWorkflowTrigger" } }, "required": [ "trigger" ] }, "examples": { "response": { "summary": "Response Example", "value": { "trigger": { "id": "4ad696eb-bb48-422a-8bd0-6efad6befa29", "type": "workflow_trigger", "trigger_type_name": "Conditional Trigger", "trigger_type": "conditional", "condition": "incident.priority matches 'P1'", "trigger_url": "https://api.pagerduty.com/incident_workflows/triggers/4ad696eb-bb48-422a-8bd0-6efad6befa29/start", "self": "https://api.pagerduty.com/incident_workflows/triggers/4ad696eb-bb48-422a-8bd0-6efad6befa29", "workflow_id": "PSFEVL7", "workflow_name": "Example Incident Workflow", "is_subscribed_to_all_services": false, "services": [ { "id": "PIJ90N7", "summary": "My Application Service", "type": "service", "self": "https://api.pagerduty.com/services/PIJ90N7", "html_url": "https://pdt-circular.pagerduty.com/service-directory/P0544JX" } ], "workflow": { "id": "PSFEVL7", "name": "Example Incident Workflow", "description": "This Incident Workflow is an example", "type": "incident_workflow", "created_at": "2022-12-13T19:55:01.171Z", "self": "https://api.pagerduty.com/incident_workflows/PSFEVL7", "html_url": "https://mydomain.pagerduty.com/flex-workflows/workflows/PSFEVL7" } } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "402": { "$ref": "#/components/responses/PaymentRequired" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } }, "delete": { "x-pd-requires-scope": "incident_workflows.write", "tags": [ "Incident Workflows" ], "operationId": "deleteIncidentWorkflowTrigger", "description": "Delete an existing Incident Workflow Trigger\n\nScoped OAuth requires: `incident_workflows.write`\n", "summary": "Delete a Trigger", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" } ], "responses": { "204": { "description": "The Incident Workflow Trigger was deleted successfully." }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "402": { "$ref": "#/components/responses/PaymentRequired" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } } }, "/incident_workflows/triggers/{id}/services": { "description": "Manipulate Services attached to an Incident Workflow Trigger", "post": { "x-pd-requires-scope": "incident_workflows.write", "tags": [ "Incident Workflows" ], "operationId": "associateServiceToIncidentWorkflowTrigger", "description": "Associate a Service with an existing Incident Workflow Trigger\n\nScoped OAuth requires: `incident_workflows.write`\n", "summary": "Associate a Trigger and Service", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "service": { "type": "object", "properties": { "id": { "type": "string" } } } }, "required": [ "service" ] }, "examples": { "request": { "summary": "Request Example", "value": { "service": { "id": "PIJ90N7" } } } } } } }, "responses": { "201": { "description": "The updated Incident Workflow Trigger", "content": { "application/json": { "schema": { "type": "object", "properties": { "trigger": { "$ref": "#/components/schemas/IncidentWorkflowTrigger" } }, "required": [ "trigger" ] }, "examples": { "response": { "summary": "Response Example", "value": { "trigger": { "id": "4ad696eb-bb48-422a-8bd0-6efad6befa29", "type": "workflow_trigger", "trigger_type_name": "Conditional Trigger", "trigger_type": "conditional", "condition": "incident.priority matches 'P1'", "trigger_url": "https://api.pagerduty.com/incident_workflows/triggers/4ad696eb-bb48-422a-8bd0-6efad6befa29/start", "self": "https://api.pagerduty.com/incident_workflows/triggers/4ad696eb-bb48-422a-8bd0-6efad6befa29", "workflow_id": "PSFEVL7", "workflow_name": "Example Incident Workflow", "is_subscribed_to_all_services": false, "services": [ { "id": "PIJ90N7", "summary": "My Application Service", "type": "service", "self": "https://api.pagerduty.com/services/PIJ90N7", "html_url": "https://pdt-circular.pagerduty.com/service-directory/P0544JX" } ], "workflow": { "id": "PSFEVL7", "name": "Example Incident Workflow", "description": "This Incident Workflow is an example", "type": "incident_workflow", "created_at": "2022-12-13T19:55:01.171Z", "self": "https://api.pagerduty.com/incident_workflows/PSFEVL7", "html_url": "https://mydomain.pagerduty.com/flex-workflows/workflows/PSFEVL7" } } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "402": { "$ref": "#/components/responses/PaymentRequired" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } } }, "/incident_workflows/triggers/{trigger_id}/services/{service_id}": { "description": "Manipulate Services attached to an Incident Workflow Trigger", "delete": { "x-pd-requires-scope": "incident_workflows.write", "tags": [ "Incident Workflows" ], "operationId": "deleteServiceFromIncidentWorkflowTrigger", "description": "Remove a an existing Service from an Incident Workflow Trigger\n\nScoped OAuth requires: `incident_workflows.write`\n", "summary": "Dissociate a Trigger and Service", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/triggers_path_trigger_id" }, { "$ref": "#/components/parameters/triggers_path_service_id" } ], "responses": { "201": { "description": "The updated Incident Workflow Trigger", "content": { "application/json": { "schema": { "type": "object", "properties": { "trigger": { "$ref": "#/components/schemas/IncidentWorkflowTrigger" } }, "required": [ "trigger" ] }, "examples": { "response": { "summary": "Response Example", "value": { "trigger": { "id": "4ad696eb-bb48-422a-8bd0-6efad6befa29", "type": "workflow_trigger", "trigger_type_name": "Conditional Trigger", "trigger_type": "conditional", "condition": "incident.priority matches 'P1'", "trigger_url": "https://api.pagerduty.com/incident_workflows/triggers/4ad696eb-bb48-422a-8bd0-6efad6befa29/start", "self": "https://api.pagerduty.com/incident_workflows/triggers/4ad696eb-bb48-422a-8bd0-6efad6befa29", "workflow_id": "PSFEVL7", "workflow_name": "Example Incident Workflow", "is_subscribed_to_all_services": false, "services": [], "workflow": { "id": "PSFEVL7", "name": "Example Incident Workflow", "description": "This Incident Workflow is an example", "type": "incident_workflow", "created_at": "2022-12-13T19:55:01.171Z", "self": "https://api.pagerduty.com/incident_workflows/PSFEVL7", "html_url": "https://mydomain.pagerduty.com/flex-workflows/workflows/PSFEVL7" } } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "402": { "$ref": "#/components/responses/PaymentRequired" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } } }, "/incidents": { "description": "List and update incidents.", "get": { "x-pd-requires-scope": "incidents.read", "tags": [ "Incidents" ], "operationId": "listIncidents", "description": "List existing incidents.\n\nAn incident represents a problem or an issue that needs to be addressed and resolved.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#incidents)\n\nScoped OAuth requires: `incidents.read`\n", "summary": "List incidents", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/incident_list_limit" }, { "$ref": "#/components/parameters/offset_offset" }, { "$ref": "#/components/parameters/offset_total" }, { "$ref": "#/components/parameters/date_range" }, { "$ref": "#/components/parameters/incident_key" }, { "$ref": "#/components/parameters/incident_services" }, { "$ref": "#/components/parameters/team_ids" }, { "$ref": "#/components/parameters/incident_assigned_to_user" }, { "$ref": "#/components/parameters/incident_urgencies" }, { "$ref": "#/components/parameters/time_zone" }, { "$ref": "#/components/parameters/statuses_incidents" }, { "$ref": "#/components/parameters/sort_by_incidents" }, { "$ref": "#/components/parameters/include_incidents" }, { "$ref": "#/components/parameters/since_incidents" }, { "$ref": "#/components/parameters/until_incidents" } ], "responses": { "200": { "description": "A paginated array of incidents.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/Pagination" }, { "type": "object", "properties": { "incidents": { "type": "array", "items": { "$ref": "#/components/schemas/Incident" } } }, "required": [ "incidents" ] } ] }, "examples": { "response": { "summary": "Response Example", "value": { "incidents": [ { "id": "PT4KHLK", "type": "incident", "summary": "[#1234] The server is on fire.", "self": "https://api.pagerduty.com/incidents/PT4KHLK", "html_url": "https://subdomain.pagerduty.com/incidents/PT4KHLK", "incident_number": 1234, "title": "The server is on fire.", "created_at": "2015-10-06T21:30:42Z", "updated_at": "2015-10-06T21:40:23Z", "status": "resolved", "incident_key": "baf7cf21b1da41b4b0221008339ff357", "service": { "id": "PIJ90N7", "type": "service_reference", "summary": "My Mail Service", "self": "https://api.pagerduty.com/services/PIJ90N7", "html_url": "https://subdomain.pagerduty.com/service-directory/PIJ90N7" }, "assignments": [], "assigned_via": "escalation_policy", "last_status_change_at": "2015-10-06T21:38:23Z", "resolved_at": "2015-10-06T21:38:23Z", "first_trigger_log_entry": { "id": "Q02JTSNZWHSEKV", "type": "trigger_log_entry_reference", "summary": "Triggered through the API", "self": "https://api.pagerduty.com/log_entries/Q02JTSNZWHSEKV?incident_id=PT4KHLK", "html_url": "https://subdomain.pagerduty.com/incidents/PT4KHLK/log_entries/Q02JTSNZWHSEKV" }, "alert_counts": { "all": 2, "triggered": 0, "resolved": 2 }, "is_mergeable": true, "escalation_policy": { "id": "PT20YPA", "type": "escalation_policy_reference", "summary": "Another Escalation Policy", "self": "https://api.pagerduty.com/escalation_policies/PT20YPA", "html_url": "https://subdomain.pagerduty.com/escalation_policies/PT20YPA" }, "teams": [ { "id": "PQ9K7I8", "type": "team_reference", "summary": "Engineering", "self": "https://api.pagerduty.com/teams/PQ9K7I8", "html_url": "https://subdomain.pagerduty.com/teams/PQ9K7I8" } ], "pending_actions": [], "acknowledgements": [], "alert_grouping": { "grouping_type": "advanced", "started_at": "2015-10-06T21:30:42Z", "ended_at": null, "alert_grouping_active": true }, "last_status_change_by": { "id": "PXPGF42", "type": "user_reference", "summary": "Earline Greenholt", "self": "https://api.pagerduty.com/users/PXPGF42", "html_url": "https://subdomain.pagerduty.com/users/PXPGF42" }, "priority": { "id": "P53ZZH5", "type": "priority_reference", "summary": "P2", "self": "https://api.pagerduty.com/priorities/P53ZZH5" }, "resolve_reason": null, "conference_bridge": { "conference_number": "+1-415-555-1212,,,,1234#", "conference_url": "https://example.com/acb-123" }, "incidents_responders": [], "responder_requests": [], "urgency": "high" } ], "limit": 1, "offset": 0, "more": true } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "402": { "$ref": "#/components/responses/PaymentRequired" }, "403": { "$ref": "#/components/responses/Forbidden" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } }, "put": { "x-pd-requires-scope": "incidents.write", "x-pd-operation-limit": true, "tags": [ "Incidents" ], "operationId": "updateIncidents", "description": "Acknowledge, resolve, escalate or reassign one or more incidents.\n\nAn incident represents a problem or an issue that needs to be addressed and resolved.\n\nA maximum of 250 incidents may be updated at a time. If more than this number of incidents are given, the API will respond with status 413 (Request Entity Too Large).\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#incidents)\n\nScoped OAuth requires: `incidents.write`\n\nThis API operation has operation specific rate limits. See the [Rate Limits](https://developer.pagerduty.com/docs/72d3b724589e3-rest-api-rate-limits) page for more information.\n", "summary": "Manage incidents", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/offset_limit" }, { "$ref": "#/components/parameters/offset_offset" }, { "$ref": "#/components/parameters/offset_total" }, { "$ref": "#/components/parameters/from_header" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "incidents": { "type": "array", "description": "An array of incidents, including the parameters to update.", "items": { "properties": { "id": { "type": "string", "description": "The id of the incident to update." }, "type": { "type": "string", "description": "The incident type.", "enum": [ "incident", "incident_reference" ] }, "status": { "type": "string", "description": "The new status of the incident.", "enum": [ "resolved", "acknowledged" ] }, "resolution": { "type": "string", "description": "The resolution for this incident if status is set to resolved." }, "title": { "type": "string", "description": "A succinct description of the nature, symptoms, cause, or effect of the incident." }, "priority": { "$ref": "#/components/schemas/PriorityReference" }, "escalation_level": { "type": "integer", "description": "Escalate the incident to this level in the escalation policy." }, "assignments": { "type": "array", "description": "Assign the incident to these assignees.", "items": { "properties": { "assignee": { "$ref": "#/components/schemas/UserReference" } } } }, "escalation_policy": { "$ref": "#/components/schemas/EscalationPolicyReference" }, "conference_bridge": { "$ref": "#/components/schemas/ConferenceBridge" } }, "required": [ "id", "type" ] } } }, "required": [ "incidents" ] }, "examples": { "incidents": { "summary": "Request Example", "value": { "incidents": [ { "id": "PT4KHLK", "type": "incident_reference", "status": "acknowledged" }, { "id": "PQMF62U", "type": "incident_reference", "priority": { "id": "P53ZZH5", "type": "priority_reference" } }, { "id": "PPVZH9X", "type": "incident_reference", "status": "resolved" }, { "id": "P8JOGX7", "type": "incident_reference", "assignments": [ { "assignee": { "id": "PXPGF42", "type": "user_reference" } } ] } ] } } } } } }, "responses": { "200": { "description": "All of the updates succeeded.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/Pagination" }, { "type": "object", "properties": { "incidents": { "type": "array", "items": { "$ref": "#/components/schemas/Incident" } } }, "required": [ "incidents" ] } ] }, "examples": { "response": { "summary": "Response Example", "value": { "incidents": [ { "id": "PT4KHLK", "type": "incident", "summary": "[#1234] The server is on fire.", "self": "https://api.pagerduty.com/incidents/PT4KHLK", "html_url": "https://subdomain.pagerduty.com/incidents/PT4KHLK", "incident_number": 1234, "created_at": "2015-10-06T21:30:42Z", "updated_at": "2015-10-06T21:40:23Z", "status": "resolved", "title": "The server is on fire.", "alert_counts": { "all": 2, "triggered": 0, "resolved": 2 }, "pending_actions": [ { "type": "unacknowledge", "at": "2015-11-10T01:02:52Z" }, { "type": "resolve", "at": "2015-11-10T04:31:52Z" } ], "incident_key": "baf7cf21b1da41b4b0221008339ff357", "service": { "id": "PIJ90N7", "type": "service_reference", "summary": "My Mail Service", "self": "https://api.pagerduty.com/services/PIJ90N7", "html_url": "https://subdomain.pagerduty.com/service-directory/PIJ90N7" }, "assigned_via": "escalation_policy", "assignments": [ { "at": "2015-11-10T00:31:52Z", "assignee": { "id": "PXPGF42", "type": "user_reference", "summary": "Earline Greenholt", "self": "https://api.pagerduty.com/users/PXPGF42", "html_url": "https://subdomain.pagerduty.com/users/PXPGF42" } } ], "acknowledgements": [ { "at": "2015-11-10T00:32:52Z", "acknowledger": { "id": "PXPGF42", "type": "user_reference", "summary": "Earline Greenholt", "self": "https://api.pagerduty.com/users/PXPGF42", "html_url": "https://subdomain.pagerduty.com/users/PXPGF42" } } ], "resolved_at": "2015-10-06T21:38:23Z", "last_status_change_at": "2015-10-06T21:38:23Z", "last_status_change_by": { "id": "PXPGF42", "type": "user_reference", "summary": "Earline Greenholt", "self": "https://api.pagerduty.com/users/PXPGF42", "html_url": "https://subdomain.pagerduty.com/users/PXPGF42" }, "first_trigger_log_entry": { "id": "Q02JTSNZWHSEKV", "type": "trigger_log_entry_reference", "summary": "Triggered through the API", "self": "https://api.pagerduty.com/log_entries/Q02JTSNZWHSEKV?incident_id=PT4KHLK", "html_url": "https://subdomain.pagerduty.com/incidents/PT4KHLK/log_entries/Q02JTSNZWHSEKV" }, "escalation_policy": { "id": "PT20YPA", "type": "escalation_policy_reference", "summary": "Another Escalation Policy", "self": "https://api.pagerduty.com/escalation_policies/PT20YPA", "html_url": "https://subdomain.pagerduty.com/escalation_policies/PT20YPA" }, "teams": [ { "id": "PQ9K7I8", "type": "team_reference", "summary": "Engineering", "self": "https://api.pagerduty.com/teams/PQ9K7I8", "html_url": "https://subdomain.pagerduty.com/teams/PQ9K7I8" } ], "urgency": "high" } ] } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "413": { "$ref": "#/components/responses/RequestEntityTooLarge" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } }, "post": { "x-pd-requires-scope": "incidents.write", "x-pd-operation-limit": true, "tags": [ "Incidents" ], "operationId": "createIncident", "description": "Create an incident synchronously without a corresponding event from a monitoring service.\n\nAn incident represents a problem or an issue that needs to be addressed and resolved.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#incidents)\n\nScoped OAuth requires: `incidents.write`\n\nThis API operation has operation specific rate limits. See the [Rate Limits](https://developer.pagerduty.com/docs/72d3b724589e3-rest-api-rate-limits) page for more information.\n", "summary": "Create an Incident", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/from_header" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "incident": { "type": "object", "description": "Details of the incident to be created.", "properties": { "type": { "type": "string", "enum": [ "incident" ] }, "title": { "type": "string", "description": "A succinct description of the nature, symptoms, cause, or effect of the incident." }, "service": { "$ref": "#/components/schemas/ServiceReference" }, "priority": { "$ref": "#/components/schemas/PriorityReference" }, "urgency": { "type": "string", "description": "The urgency of the incident", "enum": [ "high", "low" ] }, "body": { "$ref": "#/components/schemas/IncidentBody" }, "incident_key": { "type": "string", "description": "A string which identifies the incident. Sending subsequent requests referencing the same service and with the same incident_key will result in those requests being rejected if an open incident matches that incident_key." }, "assignments": { "type": "array", "description": "Assign the incident to these assignees. Cannot be specified if an escalation policy is given.", "items": { "properties": { "assignee": { "$ref": "#/components/schemas/UserReference" } } } }, "escalation_policy": { "$ref": "#/components/schemas/EscalationPolicyReference" }, "conference_bridge": { "$ref": "#/components/schemas/ConferenceBridge" } }, "required": [ "type", "title", "service" ] } }, "required": [ "incident" ] }, "examples": { "request": { "summary": "Request Example", "value": { "incident": { "type": "incident", "title": "The server is on fire.", "service": { "id": "PWIXJZS", "type": "service_reference" }, "priority": { "id": "P53ZZH5", "type": "priority_reference" }, "urgency": "high", "incident_key": "baf7cf21b1da41b4b0221008339ff357", "body": { "type": "incident_body", "details": "A disk is getting full on this machine. You should investigate what is causing the disk to fill, and ensure that there is an automated process in place for ensuring data is rotated (eg. logs should have logrotate around them). If data is expected to stay on this disk forever, you should start planning to scale up to a larger disk." }, "escalation_policy": { "id": "PT20YPA", "type": "escalation_policy_reference" } } } } } } } }, "responses": { "201": { "description": "The incident object created.", "content": { "application/json": { "schema": { "type": "object", "properties": { "incident": { "$ref": "#/components/schemas/Incident" } }, "required": [ "incident" ] }, "examples": { "response": { "summary": "Response Example", "value": { "incident": { "id": "PT4KHLK", "type": "incident", "title": "The server is on fire.", "summary": "[#1234] The server is on fire.", "self": "https://api.pagerduty.com/incidents/PT4KHLK", "html_url": "https://subdomain.pagerduty.com/incidents/PT4KHLK", "incident_number": 1234, "created_at": "2015-10-06T21:30:42Z", "updated_at": "2015-10-06T21:40:23Z", "status": "triggered", "incident_key": "baf7cf21b1da41b4b0221008339ff357", "service": { "id": "PWIXJZS", "type": "service_reference", "summary": "My Mail Service", "self": "https://api.pagerduty.com/services/PWIXJZS", "html_url": "https://subdomain.pagerduty.com/service-directory/PWIXJZS" }, "priority": { "id": "P53ZZH5", "type": "priority_reference", "summary": "P2", "self": "https://api.pagerduty.com/priorities/P53ZZH5" }, "assigned_via": "escalation_policy", "assignments": [ { "at": "2015-11-10T00:31:52Z", "assignee": { "id": "PXPGF42", "type": "user_reference", "summary": "Earline Greenholt", "self": "https://api.pagerduty.com/users/PXPGF42", "html_url": "https://subdomain.pagerduty.com/users/PXPGF42" } } ], "resolved_at": null, "last_status_change_at": "2015-10-06T21:38:23Z", "last_status_change_by": { "id": "PXPGF42", "type": "user_reference", "summary": "Earline Greenholt", "self": "https://api.pagerduty.com/users/PXPGF42", "html_url": "https://subdomain.pagerduty.com/users/PXPGF42" }, "first_trigger_log_entry": { "id": "Q02JTSNZWHSEKV", "type": "trigger_log_entry_reference", "summary": "Triggered through the API", "self": "https://api.pagerduty.com/log_entries/Q02JTSNZWHSEKV?incident_id=PT4KHLK", "html_url": "https://subdomain.pagerduty.com/incidents/PT4KHLK/log_entries/Q02JTSNZWHSEKV" }, "escalation_policy": { "id": "PT20YPA", "type": "escalation_policy_reference", "summary": "Another Escalation Policy", "self": "https://api.pagerduty.com/escalation_policies/PT20YPA", "html_url": "https://subdomain.pagerduty.com/escalation_policies/PT20YPA" }, "teams": [ { "id": "PQ9K7I8", "type": "team_reference", "summary": "Engineering", "self": "https://api.pagerduty.com/teams/PQ9K7I8", "html_url": "https://subdomain.pagerduty.com/teams/PQ9K7I8" } ], "urgency": "high" } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } } }, "/incidents/{id}": { "description": "Get an incident.", "get": { "x-pd-requires-scope": "incidents.read", "tags": [ "Incidents" ], "operationId": "getIncident", "description": "Show detailed information about an incident. Accepts either an incident id, or an incident number.\n\nAn incident represents a problem or an issue that needs to be addressed and resolved.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#incidents)\n\nScoped OAuth requires: `incidents.read`\n", "summary": "Get an incident", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" }, { "$ref": "#/components/parameters/include_incident" } ], "responses": { "200": { "description": "The incident requested.", "content": { "application/json": { "schema": { "type": "object", "properties": { "incident": { "$ref": "#/components/schemas/Incident" } }, "required": [ "incident" ] }, "examples": { "response": { "summary": "Response Example", "value": { "incident": { "id": "PT4KHLK", "type": "incident", "summary": "[#1234] The server is on fire.", "self": "https://api.pagerduty.com/incidents/PT4KHLK", "html_url": "https://subdomain.pagerduty.com/incidents/PT4KHLK", "incident_number": 1234, "title": "The server is on fire.", "created_at": "2015-10-06T21:30:42Z", "updated_at": "2015-10-06T21:40:23Z", "status": "acknowledged", "incident_key": "baf7cf21b1da41b4b0221008339ff357", "service": { "id": "PIJ90N7", "type": "service_reference", "summary": "My Mail Service", "self": "https://api.pagerduty.com/services/PIJ90N7", "html_url": "https://subdomain.pagerduty.com/service-directory/PIJ90N7" }, "assignments": [ { "at": "2015-11-10T00:31:52Z", "assignee": { "id": "PXPGF42", "type": "user_reference", "summary": "Earline Greenholt", "self": "https://api.pagerduty.com/users/PXPGF42", "html_url": "https://subdomain.pagerduty.com/users/PXPGF42" } } ], "assigned_via": "escalation_policy", "last_status_change_at": "2015-10-06T21:38:23Z", "resolved_at": null, "first_trigger_log_entry": { "id": "Q02JTSNZWHSEKV", "type": "trigger_log_entry_reference", "summary": "Triggered through the API", "self": "https://api.pagerduty.com/log_entries/Q02JTSNZWHSEKV?incident_id=PT4KHLK", "html_url": "https://subdomain.pagerduty.com/incidents/PT4KHLK/log_entries/Q02JTSNZWHSEKV" }, "alert_counts": { "all": 2, "triggered": 1, "resolved": 1 }, "is_mergeable": true, "escalation_policy": { "id": "PT20YPA", "type": "escalation_policy_reference", "summary": "Another Escalation Policy", "self": "https://api.pagerduty.com/escalation_policies/PT20YPA", "html_url": "https://subdomain.pagerduty.com/escalation_policies/PT20YPA" }, "teams": [ { "id": "PQ9K7I8", "type": "team_reference", "summary": "Engineering", "self": "https://api.pagerduty.com/teams/PQ9K7I8", "html_url": "https://subdomain.pagerduty.com/teams/PQ9K7I8" } ], "pending_actions": [ { "type": "unacknowledge", "at": "2015-11-10T01:02:52Z" }, { "type": "resolve", "at": "2015-11-10T04:31:52Z" } ], "acknowledgements": [ { "at": "2015-11-10T00:32:52Z", "acknowledger": { "id": "PXPGF42", "type": "user_reference", "summary": "Earline Greenholt", "self": "https://api.pagerduty.com/users/PXPGF42", "html_url": "https://subdomain.pagerduty.com/users/PXPGF42" } } ], "alert_grouping": { "grouping_type": "advanced", "started_at": "2015-10-06T21:30:42Z", "ended_at": null, "alert_grouping_active": true }, "last_status_change_by": { "id": "PXPGF42", "type": "user_reference", "summary": "Earline Greenholt", "self": "https://api.pagerduty.com/users/PXPGF42", "html_url": "https://subdomain.pagerduty.com/users/PXPGF42" }, "priority": { "id": "P53ZZH5", "type": "priority_reference", "summary": "P2", "self": "https://api.pagerduty.com/priorities/P53ZZH5" }, "resolve_reason": null, "conference_bridge": { "conference_number": "+1-415-555-1212,,,,1234#", "conference_url": "https://example.com/acb-123" }, "incidents_responders": [ { "state": "pending", "user": { "id": "PL7A2O4", "type": "user_reference", "summary": "Lee Turner", "self": "https://api.pagerduty.com/users/PL7A2O4", "html_url": "https://subdomain.pagerduty.com/users/PL7A2O4", "avatar_url": "https://secure.gravatar.com/avatar/51c673f51f6b483b24c889bbafbd2a67.png?d=mm&r=PG" }, "incident": { "id": "PXP12GZ", "type": "incident_reference", "summary": "Ongoing Incident in Mailroom", "self": "https://api.pagerduty.com/incidents/PXP12GZ", "html_url": "https://subdomain.pagerduty.com/incidents/PXP12GZ" }, "updated_at": "2018-08-09T14:40:48-07:00", "message": "Please help with issue - join bridge at +1(234)-567-8910", "requester": { "id": "P09TT3C", "type": "user_reference", "summary": "Jane Doe", "self": "https://api.pagerduty.com/users/P09TT3C", "html_url": "https://subdomain.pagerduty.com/users/P09TT3C", "avatar_url": "https://secure.gravatar.com/avatar/1c747247b75acc1f724e2784c838b3f8.png?d=mm&r=PG" }, "requested_at": "2018-08-09T21:40:49Z" } ], "responder_requests": [ { "incident": { "id": "PXP12GZ", "type": "incident_reference", "summary": "Ongoing Incident in Mailroom", "self": "https://api.pagerduty.com/incidents/PXP12GZ", "html_url": "https://subdomain.pagerduty.com/incidents/PXP12GZ" }, "requester": { "id": "P09TT3C", "type": "user_reference", "summary": "Jane Doe", "self": "https://api.pagerduty.com/users/P09TT3C", "html_url": "https://subdomain.pagerduty.com/users/P09TT3C" }, "requested_at": "2018-08-16T14:55:17-07:00", "message": "Please help with issue - join bridge at +1(234)-567-8910", "responder_request_targets": [ { "responder_request_target": { "type": "user", "id": "PL7A2O4", "incidents_responders": [ { "state": "pending", "user": { "id": "PL7A2O4", "type": "user_reference", "summary": "Lee Turner", "self": "https://api.pagerduty.com/users/PL7A2O4", "html_url": "https://subdomain.pagerduty.com/users/PL7A2O4", "avatar_url": "https://secure.gravatar.com/avatar/51c673f51f6b483b24c889bbafbd2a67.png?d=mm&r=PG" }, "incident": { "id": "PXP12GZ", "type": "incident_reference", "summary": "Ongoing Incident in Mailroom", "self": "https://api.pagerduty.com/incidents/PXP12GZ", "html_url": "https://subdomain.pagerduty.com/incidents/PXP12GZ" }, "updated_at": "2018-08-09T14:40:48-07:00", "message": "Please help with issue - join bridge at +1(234)-567-8910", "requester": { "id": "P09TT3C", "type": "user_reference", "summary": "Jane Doe", "self": "https://api.pagerduty.com/users/P09TT3C", "html_url": "https://subdomain.pagerduty.com/users/P09TT3C", "avatar_url": "https://secure.gravatar.com/avatar/1c747247b75acc1f724e2784c838b3f8.png?d=mm&r=PG" }, "requested_at": "2018-08-09T21:40:49Z" } ] } } ] } ], "urgency": "high", "custom_fields": [ { "id": "PT4KHEE", "type": "field_value", "name": "environment", "display_name": "Runtime Environment", "description": "environment where incident occurred", "data_type": "string", "field_type": "single_value_fixed", "value": "production" } ] } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } }, "put": { "x-pd-requires-scope": "incidents.write", "tags": [ "Incidents" ], "operationId": "updateIncident", "description": "Acknowledge, resolve, escalate or reassign an incident.\n\nAn incident represents a problem or an issue that needs to be addressed and resolved.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#incidents)\n\nScoped OAuth requires: `incidents.write`\n", "summary": "Update an incident", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" }, { "$ref": "#/components/parameters/from_header" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "incident": { "type": "object", "description": "The parameters of the incident to update.", "properties": { "type": { "type": "string", "description": "The incident type.", "enum": [ "incident", "incident_reference" ] }, "status": { "type": "string", "description": "The new status of the incident.", "enum": [ "resolved", "acknowledged" ] }, "priority": { "$ref": "#/components/schemas/PriorityReference" }, "resolution": { "type": "string", "description": "The resolution for this incident if status is set to resolved." }, "title": { "type": "string", "description": "The new title of the incident." }, "escalation_level": { "type": "integer", "description": "Escalate the incident to this level in the escalation policy." }, "assignments": { "type": "array", "description": "Assign the incident to these assignees.", "items": { "properties": { "assignee": { "$ref": "#/components/schemas/UserReference" } } } }, "escalation_policy": { "$ref": "#/components/schemas/EscalationPolicyReference" }, "urgency": { "type": "string", "description": "The urgency of the incident.", "enum": [ "high", "low" ] }, "conference_bridge": { "$ref": "#/components/schemas/ConferenceBridge" } }, "required": [ "type" ] } }, "required": [ "incident" ] }, "examples": { "request": { "summary": "Request Example", "value": { "incident": { "type": "incident_reference", "status": "acknowledged" } } } } } } }, "responses": { "200": { "description": "The incident was updated.", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "properties": { "incident": { "$ref": "#/components/schemas/Incident" } }, "required": [ "incident" ] } ] }, "examples": { "response": { "summary": "Response Example", "value": { "incident": { "id": "PT4KHLK", "type": "incident", "summary": "[#1234] The server is on fire.", "self": "https://api.pagerduty.com/incidents/PT4KHLK", "html_url": "https://subdomain.pagerduty.com/incidents/PT4KHLK", "incident_number": 1234, "created_at": "2015-10-06T21:30:42Z", "updated_at": "2015-10-06T21:40:23Z", "status": "resolved", "title": "The server is on fire.", "pending_actions": [ { "type": "unacknowledge", "at": "2015-11-10T01:02:52Z" }, { "type": "resolve", "at": "2015-11-10T04:31:52Z" } ], "incident_key": "baf7cf21b1da41b4b0221008339ff357", "service": { "id": "PIJ90N7", "type": "service_reference", "summary": "My Mail Service", "self": "https://api.pagerduty.com/services/PIJ90N7", "html_url": "https://subdomain.pagerduty.com/service-directory/PIJ90N7" }, "priority": { "id": "P53ZZH5", "type": "priority_reference", "summary": "P2", "self": "https://api.pagerduty.com/priorities/P53ZZH5" }, "assigned_via": "escalation_policy", "assignments": [ { "at": "2015-11-10T00:31:52Z", "assignee": { "id": "PXPGF42", "type": "user_reference", "summary": "Earline Greenholt", "self": "https://api.pagerduty.com/users/PXPGF42", "html_url": "https://subdomain.pagerduty.com/users/PXPGF42" } } ], "acknowledgements": [ { "at": "2015-11-10T00:32:52Z", "acknowledger": { "id": "PXPGF42", "type": "user_reference", "summary": "Earline Greenholt", "self": "https://api.pagerduty.com/users/PXPGF42", "html_url": "https://subdomain.pagerduty.com/users/PXPGF42" } } ], "resolved_at": "2015-10-06T21:38:23Z", "last_status_change_at": "2015-10-06T21:38:23Z", "last_status_change_by": { "id": "PXPGF42", "type": "user_reference", "summary": "Earline Greenholt", "self": "https://api.pagerduty.com/users/PXPGF42", "html_url": "https://subdomain.pagerduty.com/users/PXPGF42" }, "first_trigger_log_entry": { "id": "Q02JTSNZWHSEKV", "type": "trigger_log_entry_reference", "summary": "Triggered through the API", "self": "https://api.pagerduty.com/log_entries/Q02JTSNZWHSEKV?incident_id=PT4KHLK", "html_url": "https://subdomain.pagerduty.com/incidents/PT4KHLK/log_entries/Q02JTSNZWHSEKV" }, "escalation_policy": { "id": "PT20YPA", "type": "escalation_policy_reference", "summary": "Another Escalation Policy", "self": "https://api.pagerduty.com/escalation_policies/PT20YPA", "html_url": "https://subdomain.pagerduty.com/escalation_policies/PT20YPA" }, "teams": [ { "id": "PQ9K7I8", "type": "team_reference", "summary": "Engineering", "self": "https://api.pagerduty.com/teams/PQ9K7I8", "html_url": "https://subdomain.pagerduty.com/teams/PQ9K7I8" } ], "urgency": "high" } } } } } } }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } } }, "/incidents/{id}/alerts": { "description": "List and update alerts.", "get": { "x-pd-requires-scope": "incidents.read", "tags": [ "Incidents" ], "operationId": "listIncidentAlerts", "description": "List alerts for the specified incident.\n\nAn incident represents a problem or an issue that needs to be addressed and resolved.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#incidents)\n\nScoped OAuth requires: `incidents.read`\n", "summary": "List alerts for an incident", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/offset_limit" }, { "$ref": "#/components/parameters/offset_offset" }, { "$ref": "#/components/parameters/offset_total" }, { "$ref": "#/components/parameters/id" }, { "$ref": "#/components/parameters/alert_key" }, { "$ref": "#/components/parameters/statuses_incident_alerts" }, { "$ref": "#/components/parameters/sort_by_incident_alerts" }, { "$ref": "#/components/parameters/include_incident_alerts" } ], "responses": { "200": { "description": "A paginated array of the incident's alerts.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/Pagination" }, { "type": "object", "properties": { "alerts": { "type": "array", "items": { "$ref": "#/components/schemas/Alert" } } }, "required": [ "alerts" ] } ] }, "examples": { "response": { "summary": "Response Example", "value": { "alerts": [ { "id": "PT4KHLK", "type": "alert", "summary": "The server is on fire.", "self": "https://api.pagerduty.com/incidents/PT4KHLK/alerts/PXPGF42", "html_url": "https://subdomain.pagerduty.com/alerts/PXPGF42", "created_at": "2015-10-06T21:30:42Z", "status": "resolved", "alert_key": "baf7cf21b1da41b4b0221008339ff357", "service": { "id": "PIJ90N7", "type": "service_reference", "summary": "My Mail Service", "self": "https://api.pagerduty.com/services/PIJ90N7", "html_url": "https://subdomain.pagerduty.com/service-directory/PIJ90N7" }, "body": { "type": "alert_body", "contexts": [ { "type": "link" } ], "details": { "customKey": "Server is on fire!", "customKey2": "Other stuff!" } }, "incident": { "id": "PT4KHLK", "type": "incident_reference" }, "suppressed": false, "severity": "critical", "integration": { "id": "PQ12345", "type": "generic_email_inbound_integration_reference", "summary": "Email Integration", "self": "https://api.pagerduty.com/services/PIJ90N7/integrations/PQ12345", "html_url": "https://subdomain.pagerduty.com/services/PIJ90N7/integrations/PQ12345" } } ], "limit": 1, "offset": 0, "more": true } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } }, "put": { "x-pd-requires-scope": "incidents.write", "tags": [ "Incidents" ], "operationId": "updateIncidentAlerts", "description": "Resolve multiple alerts or associate them with different incidents.\n\nAn incident represents a problem or an issue that needs to be addressed and resolved. An alert represents a digital signal that was emitted to PagerDuty by the monitoring systems that detected or identified the issue.\n\nA maximum of 500 alerts may be updated at a time. If more than this number of alerts are given, the API will respond with status 413 (Request Entity Too Large).\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#incidents)\n\nScoped OAuth requires: `incidents.write`\n", "summary": "Manage alerts", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/offset_limit" }, { "$ref": "#/components/parameters/offset_offset" }, { "$ref": "#/components/parameters/offset_total" }, { "$ref": "#/components/parameters/id" }, { "$ref": "#/components/parameters/from_header" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "alerts": { "type": "array", "description": "An array of alerts, including the parameters to update for each alert.", "items": { "$ref": "#/components/schemas/Alert" } } }, "required": [ "alerts" ] }, "examples": { "request": { "summary": "Request Example", "value": { "alerts": [ { "id": "PPVZH9X", "type": "alert", "status": "resolved" }, { "id": "P8JOGX7", "type": "alert", "incident": { "id": "PPVZH9X", "type": "incident_reference" } } ] } } } } } }, "responses": { "200": { "description": "All of the updates succeeded.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/Pagination" }, { "type": "object", "properties": { "alerts": { "type": "array", "items": { "$ref": "#/components/schemas/Alert" } } }, "required": [ "alerts" ] } ] }, "examples": { "response": { "summary": "Response Example", "value": { "alerts": [ { "id": "PT4KHLK", "type": "alert", "summary": "The server is on fire.", "self": "https://api.pagerduty.com/incidents/PT4KHLK/alerts/PXPGF42", "html_url": "https://subdomain.pagerduty.com/alerts/PXPGF42", "created_at": "2015-10-06T21:30:42Z", "status": "resolved", "alert_key": "baf7cf21b1da41b4b0221008339ff357", "service": { "id": "PIJ90N7", "type": "service_reference", "summary": "My Mail Service", "self": "https://api.pagerduty.com/services/PIJ90N7", "html_url": "https://subdomain.pagerduty.com/service-directory/PIJ90N7" }, "body": { "type": "alert_body", "contexts": [ { "type": "link" } ], "details": { "customKey": "Server is on fire!", "customKey2": "Other stuff!" } }, "incident": { "id": "PPVZH9X", "type": "incident_reference" }, "suppressed": false, "severity": "critical" } ], "limit": 1, "offset": 0, "more": true } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "413": { "$ref": "#/components/responses/RequestEntityTooLarge" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } } }, "/incidents/{id}/alerts/{alert_id}": { "description": "Get an alert.", "get": { "x-pd-requires-scope": "incidents.read", "tags": [ "Incidents" ], "operationId": "getIncidentAlert", "description": "Show detailed information about an alert. Accepts an alert id.\n\nAn incident represents a problem or an issue that needs to be addressed and resolved.\n\nWhen a service sends an event to PagerDuty, an alert and corresponding incident is triggered in PagerDuty.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#incidents)\n\nScoped OAuth requires: `incidents.read`\n", "summary": "Get an alert", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" }, { "$ref": "#/components/parameters/alert_id" } ], "responses": { "200": { "description": "The alert requested.", "content": { "application/json": { "schema": { "type": "object", "properties": { "alert": { "$ref": "#/components/schemas/Alert" } }, "required": [ "alert" ] }, "examples": { "response": { "summary": "Response Example", "value": { "alert": { "id": "PT4KHLK", "type": "alert", "summary": "The server is on fire.", "self": "https://api.pagerduty.com/incident/PT4KHLX/alerts/PT4KHLK", "html_url": "https://subdomain.pagerduty.com/alerts/PT4KHLK", "created_at": "2015-10-06T21:30:42Z", "status": "resolved", "alert_key": "baf7cf21b1da41b4b0221008339ff357", "service": { "id": "PIJ90N7", "type": "service_reference", "summary": "My Mail Service", "self": "https://api.pagerduty.com/services/PIJ90N7", "html_url": "https://subdomain.pagerduty.com/service-directory/PIJ90N7" }, "incident": { "id": "PT4KHLX", "type": "incident_reference", "summary": "[#1234] The server is on fire.", "self": "https://api.pagerduty.com/incidents/PT4KHLX", "html_url": "https://subdomain.pagerduty.com/incidents/PT4KHLX" }, "suppressed": false, "severity": "critical", "integration": { "id": "PQ12345", "type": "generic_email_inbound_integration_reference", "summary": "Email Integration", "self": "https://api.pagerduty.com/services/PIJ90N7/integrations/PQ12345", "html_url": "https://subdomain.pagerduty.com/services/PIJ90N7/integrations/PQ12345" } } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } }, "put": { "x-pd-requires-scope": "incidents.write", "tags": [ "Incidents" ], "operationId": "updateIncidentAlert", "description": "Resolve an alert or associate an alert with a new parent incident.\n\nAn incident represents a problem or an issue that needs to be addressed and resolved.\n\nWhen a service sends an event to PagerDuty, an alert and corresponding incident is triggered in PagerDuty.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#incidents)\n\nScoped OAuth requires: `incidents.write`\n", "summary": "Update an alert", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" }, { "$ref": "#/components/parameters/alert_id" }, { "$ref": "#/components/parameters/from_header" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "alert": { "$ref": "#/components/schemas/Alert" } }, "required": [ "alert" ] }, "examples": { "request": { "summary": "Request Example", "value": { "alert": { "type": "alert", "status": "resolved", "incident": { "id": "PEYSGVF", "type": "incident_reference" }, "body": { "type": "alert_body", "contexts": [ { "type": "link" } ], "details": { "customKey": "Server is on fire!", "customKey2": "Other stuff!" } } } } } } } }, "description": "The parameters of the alert to update." }, "responses": { "200": { "description": "The alert that was updated.", "content": { "application/json": { "schema": { "type": "object", "properties": { "alert": { "$ref": "#/components/schemas/Alert" } }, "required": [ "alert" ] }, "examples": { "request": { "summary": "Request Example", "value": { "alert": { "type": "alert", "status": "resolved", "incident": { "id": "PEYSGVF", "type": "incident_reference" }, "body": { "type": "alert_body", "contexts": [ { "type": "link" } ], "details": { "customKey": "Server is on fire!", "customKey2": "Other stuff!" } } } } } } } } }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } } }, "/incidents/{id}/business_services/{business_service_id}/impacts": { "put": { "x-pd-requires-scope": "incidents.write", "summary": "Manually change an Incident's Impact on a Business Service.", "tags": [ "Incidents" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "description": "", "type": "object", "properties": { "relation": { "type": "string", "enum": [ "impacted", "not_impacted" ] } } }, "examples": { "response": { "summary": "Response Example", "value": { "relation": "impacted" } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "422": { "$ref": "#/components/responses/UnprocessableEntity" }, "429": { "$ref": "#/components/responses/TooManyRequests" } }, "operationId": "putIncidentManualBusinessServiceAssociation", "description": "Change Impact of an Incident on a Business Service.\nScoped OAuth requires: `incidents.write`\n", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/id" }, { "$ref": "#/components/parameters/business_service_id" }, { "$ref": "#/components/parameters/early_access_bis" } ], "requestBody": { "content": { "application/json": { "schema": { "description": "", "type": "object", "properties": { "relation": { "type": "string", "enum": [ "impacted", "not_impacted" ] } }, "required": [ "relation" ] } } }, "description": "The `impacted` relation will cause the Business Service and any Services that it supports to become impacted by this incident.\n\nThe `not_impacted` relation will remove the Incident's Impact from the specified Business Service.\n\nThe effect of adding or removing Impact to a Business Service in this way will also change the propagation of Impact to other Services supported by that Business Service." } } }, "/incidents/{id}/business_services/impacts": { "get": { "x-pd-requires-scope": "incidents.read", "summary": "List Business Services impacted by the given Incident", "tags": [ "Incidents" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/CursorPagination" }, { "type": "object", "properties": { "services": { "type": "array", "items": { "$ref": "#/components/schemas/Impact" } } } } ] }, "examples": { "response": { "summary": "Response Example", "value": { "limit": 100, "next_cursor": null, "services": [ { "id": "PD1234", "name": "Web API", "type": "business_service", "status": "impacted" }, { "id": "PF9KMXH", "name": "Analytics Backend", "type": "business_service", "status": "impacted" } ] } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "422": { "$ref": "#/components/responses/UnprocessableEntity" }, "429": { "$ref": "#/components/responses/TooManyRequests" } }, "operationId": "getIncidentImpactedBusinessServices", "description": "Retrieve a list of Business Services that are being impacted by the given Incident.\nScoped OAuth requires: `incidents.read`\n", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/id" }, { "$ref": "#/components/parameters/early_access_bis" } ] } }, "/incidents/{id}/custom_fields/values": { "description": "Retrieve and update incident custom fields.", "get": { "tags": [ "Incidents" ], "x-pd-requires-scope": "incidents.read", "operationId": "getIncidentFieldValues", "description": "Get custom field values for an incident.\n\n\n\nScoped OAuth requires: `incidents.read`\n", "summary": "Get Custom Field Values", "parameters": [ { "$ref": "#/components/parameters/id" } ], "responses": { "200": { "description": "The list of custom field values.", "content": { "application/json": { "schema": { "type": "object", "properties": { "custom_fields": { "type": "array", "items": { "$ref": "#/components/schemas/CustomFieldsFieldValue" } } }, "required": [ "custom_fields" ] }, "examples": { "response1": { "summary": "Response Example", "value": { "custom_fields": [ { "id": "PT4KHEE", "type": "field_value", "name": "environment", "display_name": "Runtime Environment", "description": "environment where incident occurred", "data_type": "string", "field_type": "single_value_fixed", "value": "production" } ] } }, "response2": { "summary": "Response Example", "value": { "custom_fields": [ { "id": "PT4KHEE", "type": "field_value", "name": "environment", "display_name": "Runtime Environment", "description": "environment where incident occurred", "data_type": "string", "field_type": "multi_value_fixed", "value": [ "production", "staging" ] } ] } } } } } }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalServerError" } } }, "put": { "tags": [ "Incidents" ], "x-pd-requires-scope": "incidents.write", "operationId": "setIncidentFieldValues", "description": "Set custom field values for an incident.\n\nScoped OAuth requires: `incidents.write`\n", "summary": "Update Custom Field Values", "parameters": [ { "$ref": "#/components/parameters/id" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "custom_fields": { "type": "array", "title": "Array of Custom Field Values", "items": { "$ref": "#/components/schemas/CustomFieldsEditableFieldValue" } } }, "required": [ "custom_fields" ] }, "examples": { "request1": { "summary": "Request Example", "value": { "custom_fields": [ { "name": "environment", "value": "production" } ] } }, "request2": { "summary": "Request Example", "value": { "custom_fields": [ { "id": "PT4KHEE", "value": "production" } ] } }, "request3": { "summary": "Request Example", "value": { "custom_fields": [ { "id": "PT4KHEE", "value": [ "production", "staging" ] } ] } } } } } }, "responses": { "201": { "description": "Custom field values were updated.", "content": { "application/json": { "schema": { "type": "object", "properties": { "custom_fields": { "type": "array", "items": { "$ref": "#/components/schemas/CustomFieldsFieldValue" } } }, "required": [ "custom_fields" ] }, "examples": { "response1": { "summary": "Response Example", "value": { "custom_fields": [ { "id": "PT4KHEE", "type": "field_value", "name": "environment", "display_name": "Runtime Environment", "description": "environment where incident occurred", "data_type": "string", "field_type": "single_value_fixed", "value": "production" } ] } }, "response2": { "summary": "Response Example", "value": { "custom_fields": [ { "id": "PT4KHEE", "type": "field_value", "name": "environment", "display_name": "Runtime Environment", "description": "environment where incident occurred", "data_type": "string", "field_type": "single_value_fixed", "value": "production" } ] } }, "response3": { "summary": "Response Example", "value": { "custom_fields": [ { "id": "PT4KHEE", "type": "field_value", "name": "environment", "display_name": "Runtime Environment", "description": "environment where incident occurred", "data_type": "string", "field_type": "multi_value_fixed", "value": [ "production", "staging" ] } ] } } } } } }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalServerError" } } } }, "/incidents/{id}/log_entries": { "description": "List incident log entries for an incident.", "get": { "x-pd-requires-scope": "incidents.read", "tags": [ "Incidents" ], "operationId": "listIncidentLogEntries", "description": "List log entries for the specified incident.\n\nAn incident represents a problem or an issue that needs to be addressed and resolved.\n\nA Log Entry are a record of all events on your account.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#incidents)\n\nScoped OAuth requires: `incidents.read`\n", "summary": "List log entries for an incident", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/offset_limit" }, { "$ref": "#/components/parameters/offset_offset" }, { "$ref": "#/components/parameters/offset_total" }, { "$ref": "#/components/parameters/id" }, { "$ref": "#/components/parameters/time_zone" }, { "$ref": "#/components/parameters/since" }, { "$ref": "#/components/parameters/until" }, { "$ref": "#/components/parameters/log_entry_is_overview" }, { "$ref": "#/components/parameters/include_log_entry" } ], "responses": { "200": { "description": "A paginated array of the incident's log entries.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/Pagination" }, { "type": "object", "properties": { "log_entries": { "type": "array", "items": { "oneOf": [ { "$ref": "#/components/schemas/AcknowledgeLogEntry" }, { "$ref": "#/components/schemas/AnnotateLogEntry" }, { "$ref": "#/components/schemas/AssignLogEntry" }, { "$ref": "#/components/schemas/DelegateLogEntry" }, { "$ref": "#/components/schemas/EscalateLogEntry" }, { "$ref": "#/components/schemas/ExhaustEscalationPathLogEntry" }, { "$ref": "#/components/schemas/NotifyLogEntry" }, { "$ref": "#/components/schemas/ReachAckLimitLogEntry" }, { "$ref": "#/components/schemas/ReachTriggerLimitLogEntry" }, { "$ref": "#/components/schemas/RepeatEscalationPathLogEntry" }, { "$ref": "#/components/schemas/ResolveLogEntry" }, { "$ref": "#/components/schemas/SnoozeLogEntry" }, { "$ref": "#/components/schemas/TriggerLogEntry" }, { "$ref": "#/components/schemas/UnacknowledgeLogEntry" }, { "$ref": "#/components/schemas/UrgencyChangeLogEntry" } ] } } }, "required": [ "log_entries" ] } ] }, "examples": { "response": { "summary": "Response Example", "value": { "log_entries": [ { "id": "Q02JTSNZWHSEKV", "type": "trigger_log_entry", "summary": "Triggered through the API", "self": "https://api.pagerduty.com/log_entries/Q02JTSNZWHSEKV?incident_id=PT4KHLK", "html_url": "https://subdomain.pagerduty.com/incidents/PT4KHLK/log_entries/Q02JTSNZWHSEKV", "created_at": "2015-11-07T00:14:20Z", "agent": { "id": "PIJ90N7", "type": "service_reference", "summary": "My Mail Service", "self": "https://api.pagerduty.com/services/PIJ90N7", "html_url": "https://subdomain.pagerduty.com/service-directory/PIJ90N7" }, "channel": { "type": "api" }, "incident": { "id": "PT4KHLK", "type": "incident_reference", "summary": "[#1234] The server is on fire.", "self": "https://api.pagerduty.com/incidents/PT4KHLK", "html_url": "https://subdomain.pagerduty.com/incidents/PT4KHLK" }, "teams": [ { "id": "PQ9K7I8", "type": "team_reference", "summary": "Engineering", "self": "https://api.pagerduty.com/teams/PQ9K7I8", "html_url": "https://subdomain.pagerduty.com/teams/PQ9K7I8" } ], "contexts": [], "event_details": { "description": "Tasks::SFDCValidator - PD_Data__c - duplicates" } } ] } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } } }, "/incidents/{id}/merge": { "description": "\"Merge\" an array of incidents into a target incident. After the merge is performed the target incident will contain the source incidents's alerts, and the source incidents will be resolved.", "put": { "tags": [ "Incidents" ], "x-pd-requires-scope": "incidents.write", "operationId": "mergeIncidents", "description": "Merge a list of source incidents into this incident.\n\nAn incident represents a problem or an issue that needs to be addressed and resolved.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#incidents)\n\nScoped OAuth requires: `incidents.write`\n", "summary": "Merge incidents", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" }, { "$ref": "#/components/parameters/from_header" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "source_incidents": { "type": "array", "description": "The source incidents that will be merged into the target incident and resolved.", "items": { "$ref": "#/components/schemas/IncidentReference" } } }, "required": [ "source_incidents" ] }, "examples": { "request": { "summary": "Request Example", "value": { "source_incidents": [ { "id": "P8JOGX7", "type": "incident_reference" }, { "id": "PPVZH9X", "type": "incident_reference" } ] } } } } } }, "responses": { "200": { "description": "The target incident, which now contains all the alerts from the source incident.", "content": { "application/json": { "schema": { "type": "object", "properties": { "incident": { "$ref": "#/components/schemas/IncidentReference" } }, "required": [ "incident" ] }, "examples": { "response": { "summary": "Response Example", "value": { "incident": { "id": "PT4KHLK", "type": "incident_reference", "summary": "[#1234] The server is on fire.", "self": "https://api.pagerduty.com/incidents/PT4KHLK", "html_url": "https://subdomain.pagerduty.com/incidents/PT4KHLK" } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } } }, "/incidents/{id}/notes": { "description": "List and create incident notes.", "get": { "x-pd-requires-scope": "incidents.read", "tags": [ "Incidents" ], "operationId": "listIncidentNotes", "description": "List existing notes for the specified incident.\n\nAn incident represents a problem or an issue that needs to be addressed and resolved.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#incidents)\n\nScoped OAuth requires: `incidents.read`\n", "summary": "List notes for an incident", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" } ], "responses": { "200": { "description": "An array of notes.", "content": { "application/json": { "schema": { "type": "object", "properties": { "notes": { "type": "array", "items": { "$ref": "#/components/schemas/IncidentNote" } } }, "required": [ "notes" ] }, "examples": { "response": { "summary": "Response Example", "value": { "notes": [ { "id": "PWL7QXS", "user": { "id": "PXPGF42", "type": "user_reference", "summary": "Earline Greenholt", "self": "https://api.pagerduty.com/users/PXPGF42", "html_url": "https://subdomain.pagerduty.com/users/PXPGF42" }, "channel": { "summary": "The PagerDuty website or APIs" }, "content": "Firefighters are on the scene.", "created_at": "2013-03-06T15:28:51-05:00" }, { "id": "PCQC25", "user": { "id": "PXPGF42", "type": "bot_user_reference", "summary": "A Global Event Rule", "self": "https://api.pagerduty.com/users/PXPGF42", "html_url": "https://subdomain.pagerduty.com/event-rules/global/0e84de00-9511-4380-9f4f-a7b568bb49a0/rules/14e56445-ebab-4dd0-ba9d-fc28a41b7e7b" }, "channel": { "id": "14e56445-ebab-4dd0-ba9d-fc28a41b7e7b", "type": "event_rule_reference", "summary": "A Global Event Rule", "self": "https://api.pagerduty.com/rulesets/0e84de00-9511-4380-9f4f-a7b568bb49a0/rules/14e56445-ebab-4dd0-ba9d-fc28a41b7e7b", "html_url": "https://subdomain.pagerduty.com/event-rules/global/0e84de00-9511-4380-9f4f-a7b568bb49a0/rules/14e56445-ebab-4dd0-ba9d-fc28a41b7e7b" }, "content": "Initial alert information indicates a 1-alarm fire", "created_at": "2013-03-06T15:28:42-05:00" } ] } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } }, "post": { "tags": [ "Incidents" ], "x-pd-requires-scope": "incidents.write", "operationId": "createIncidentNote", "description": "Create a new note for the specified incident.\n\nAn incident represents a problem or an issue that needs to be addressed and resolved.\n\nA maximum of 2000 notes can be added to an incident.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#incidents)\n\nScoped OAuth requires: `incidents.write`\n", "summary": "Create a note on an incident", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" }, { "$ref": "#/components/parameters/from_header" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "note": { "type": "object", "properties": { "content": { "type": "string", "description": "The note content" } }, "required": [ "content" ] } }, "required": [ "note" ] }, "examples": { "request": { "summary": "Request Example", "value": { "note": { "content": "Firefighters are on the scene." } } } } } } }, "responses": { "200": { "description": "The new note.", "content": { "application/json": { "schema": { "type": "object", "properties": { "note": { "$ref": "#/components/schemas/IncidentNote" } }, "required": [ "note" ] }, "examples": { "response": { "summary": "Response Example", "value": { "note": { "id": "PWL7QXS", "user": { "id": "PXPGF42", "type": "user_reference", "summary": "Earline Greenholt", "self": "https://api.pagerduty.com/users/PXPGF42", "html_url": "https://subdomain.pagerduty.com/users/PXPGF42" }, "channel": { "summary": "The PagerDuty website or APIs" }, "content": "Firefighters are on the scene.", "created_at": "2013-03-06T15:28:51-05:00" } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } } }, "/incidents/{id}/outlier_incident": { "description": "Get Outlier Incident", "get": { "x-pd-requires-scope": "incidents.read", "tags": [ "Incidents" ], "operationId": "getOutlierIncident", "description": "Gets Outlier Incident information for a given Incident on its Service.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#outlier-incident)\n\nScoped OAuth requires: `incidents.read`\n", "summary": "Get Outlier Incident", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" }, { "$ref": "#/components/parameters/since" }, { "$ref": "#/components/parameters/additional_details" } ], "responses": { "200": { "description": "Outlier Incident information calculated over the same Service as the given Incident.", "content": { "application/json": { "schema": { "description": "", "type": "object", "properties": { "outlier_incident": { "type": "object", "description": "Outlier Incident information calculated over the same Service as the given Incident.", "properties": { "incident": { "$ref": "#/components/schemas/Incident" }, "incident_template": { "type": "object", "properties": { "id": { "type": "string", "readOnly": true }, "cluster_id": { "type": "string", "readOnly": true, "description": "The cluster the Incident Template pattern belongs to" }, "mined_text": { "type": "string", "readOnly": true, "description": "The Incident Template mined pattern text" } } } } } } }, "examples": { "response": { "summary": "Response Example", "value": { "outlier_incident": { "incident": { "id": "PR2P3RW", "created_at": "2020-11-18T13:08:14Z", "self": "https://api.pagerduty.com/incidents/PR2P3RW", "title": "[LINUX]Used disk space is more than 5 GB on volume /var/log : PROBLEM for ce51323", "occurrence": { "count": 10, "frequency": 0.04, "category": "rare", "since": "2020-09-23T13:08:14Z", "until": "2021-01-18T13:08:14Z" } }, "incident_template": { "id": "PX3P1PX", "cluster_id": "P2B3X5", "mined_text": "[LINUX]Used disk space is more than on volume <*> : PROBLEM for <*>" } } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" }, "500": { "$ref": "#/components/responses/InternalServerError" } } } }, "/incidents/{id}/past_incidents": { "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" } ], "get": { "x-pd-requires-scope": "incidents.read", "summary": "Get Past Incidents", "tags": [ "Incidents" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "description": "", "type": "object", "properties": { "past_incidents": { "type": "array", "description": "Aggregate of past incidents", "items": { "type": "object", "properties": { "incident": { "type": "object", "description": "Incident model reference", "properties": { "id": { "type": "string", "description": "The globally unique identifier of the incident" }, "created_at": { "type": "string", "description": "The date/time the incident was first triggered" }, "self": { "type": "string", "description": "The URL at which the object is accessible" }, "title": { "type": "string", "description": "The description of the nature, symptoms, cause, or effect of the incident" } } }, "score": { "type": "number", "description": "The computed similarity score associated with the incident and parent incident " } } } }, "total": { "type": "number", "description": "The total number of Past Incidents if the total parameter was set in the request" }, "limit": { "type": "number", "description": "The maximum number of Incidents requested" } } }, "examples": { "response": { "summary": "Response Example", "value": { "past_incidents": [ { "incident": { "id": "PFBE9I2", "created_at": "2020-11-04T16:08:15Z", "self": "https://api.pagerduty.com/incidents/PFBE9I2", "title": "Things are so broken!" }, "score": 46.8249 }, { "incident": { "id": "P1J6V6M", "created_at": "2020-10-22T17:18:14Z", "self": "https://api.pagerduty.com/incidents/P1J6V6M", "title": "Things are so broken!" }, "score": 46.8249 }, { "incident": { "id": "P6HPX5N", "created_at": "2020-10-06T22:01:13Z", "self": "https://api.pagerduty.com/incidents/P6HPX5N", "title": "You forgot to feed the cat!" }, "score": 0 } ], "total": 3, "limit": 5 } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalServerError" } }, "operationId": "getPastIncidents", "parameters": [ { "$ref": "#/components/parameters/past_incidents_limit" }, { "$ref": "#/components/parameters/past_incidents_total" } ], "description": "Past Incidents returns Incidents within the past 6 months that have similar metadata and were generated on the same Service as the parent Incident. By default, 5 Past Incidents are returned. Note: This feature is currently available as part of the Event Intelligence package or Digital Operations plan only.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#past_incidents)\n\nScoped OAuth requires: `incidents.read`\n" } }, "/incidents/{id}/related_change_events": { "description": "List change events related to an incident.", "get": { "x-pd-requires-scope": "incidents.read", "tags": [ "Change Events" ], "operationId": "listIncidentRelatedChangeEvents", "description": "List related Change Events for an Incident, as well as the reason these changes are correlated with the incident.\n\nChange events represent service changes such as deploys, build completion, and configuration changes, providing information that is critical during incident triage or hypercare. For more information on change events, see [Change Events](https://support.pagerduty.com/docs/change-events).\n\nThe Change Correlation feature provides incident responders with recent change events that are most relevant to that incident. Change Correlation informs the responder why a particular change event was surfaced and correlated to an incident based on three key factors which include time, related service, or intelligence (machine learning).\n\nScoped OAuth requires: `incidents.read`\n", "summary": "List related Change Events for an Incident", "parameters": [ { "$ref": "#/components/parameters/id" }, { "$ref": "#/components/parameters/offset_limit" }, { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" } ], "responses": { "200": { "description": "The array of Change Events returned by the query.", "content": { "application/json": { "schema": { "type": "object", "properties": { "change_events": { "type": "array", "items": { "allOf": [ { "$ref": "#/components/schemas/ChangeEvent" }, { "type": "object", "properties": { "correlation_reason": { "type": "object", "properties": { "reason": { "type": "string", "enum": [ "most_recent", "related_service", "intelligent" ], "readOnly": true, "description": "The reason a change event was determined to be related to the given incident." } } } } } ] } } } }, "examples": { "response": { "summary": "Response Example", "value": { "change_events": [ { "summary": "Build Success - Increase snapshot create timeout to 30 seconds", "id": "01BBYA6PEVW6A852BUO6QYUE7O", "timestamp": "2020-07-17T08:42:58Z", "type": "change_event", "source": "acme-build-pipeline-tool-default-i-9999", "integration": { "id": "PEYSGVF", "type": "inbound_integration_reference" }, "services": [ { "id": "PEYSGRV", "type": "service_reference" } ], "custom_details": { "build_state": "passed", "build_number": "2", "run_time": "1236s" }, "links": [ { "href": "https://acme.pagerduty.dev/build/2", "text": "View more details in Acme!" } ], "correlation_reason": { "reason": "most_recent" } }, { "summary": "Build Success - Increase snapshot create timeout to 15 seconds", "id": "01BBYA6PDIXPL8KO1HPIUL9CZN", "timestamp": "2020-07-17T07:42:58Z", "type": "change_event", "source": "acme-build-pipeline-tool-default-i-9999", "integration": { "id": "PEYSGVF", "type": "inbound_integration_reference" }, "services": [ { "id": "PEYSGRV", "type": "service_reference" } ], "custom_details": { "build_state": "passed", "build_number": "1", "run_time": "1233s" }, "links": [ { "href": "https://acme.pagerduty.dev/build/1", "text": "View more details in Acme!" } ], "correlation_reason": { "reason": "related_service" } } ], "limit": null, "offset": null, "total": null, "more": false } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" } } } }, "/incidents/{id}/related_incidents": { "description": "Get Related Incidents", "get": { "x-pd-requires-scope": "incidents.read", "tags": [ "Incidents" ], "operationId": "getRelatedIncidents", "description": "Returns the 20 most recent Related Incidents that are impacting other Responders and Services. Note: This feature is currently available as part of the Event Intelligence package or Digital Operations plan only.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#related_incidents)\n\nScoped OAuth requires: `incidents.read`\n", "summary": "Get Related Incidents", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" }, { "$ref": "#/components/parameters/additional_details" } ], "responses": { "200": { "description": "A list of Related Incidents and their relationships.", "content": { "application/json": { "schema": { "description": "", "type": "object", "properties": { "related_incidents": { "type": "array", "description": "A list of Related Incidents and their relationships.", "items": { "properties": { "incident": { "$ref": "#/components/schemas/Incident" }, "relationships": { "type": "array", "description": "A list of reasons for why the Incident is considered related.", "items": { "properties": { "type": { "type": "string", "description": "The type of relationship. A relationship outlines the reason why two Incidents are considered related.", "enum": [ "machine_learning_inferred", "service_dependency" ] }, "metadata": { "anyOf": [ { "$ref": "#/components/schemas/RelatedIncidentMachineLearningRelationship" }, { "$ref": "#/components/schemas/RelatedIncidentServiceDependencyRelationship" } ] } } } } } } } } }, "examples": { "response": { "summary": "Response Example", "value": { "related_incidents": [ { "incident": { "id": "PR2P3RW", "created_at": "2020-11-18T13:08:14Z", "self": "https://api.pagerduty.com/incidents/PR2P3RW", "title": "The server is on fire." }, "relationships": [ { "type": "machine_learning_inferred", "metadata": { "grouping_classification": "similar_contents", "user_feedback": { "positive_feedback_count": 12, "negative_feedback_count": 3 } } }, { "type": "service_dependency", "metadata": { "dependent_services": { "id": "P1L1YEE", "type": "business_service_reference", "self": "https://api.pagerduty.com/business_services/P1L1YEE" }, "supporting_services": { "id": "PNGCNV2", "type": "technical_service_reference", "self": "https://api.pagerduty.com/services/PNGCNV2" } } } ] } ] } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" }, "500": { "$ref": "#/components/responses/InternalServerError" } } } }, "/incidents/{id}/responder_requests": { "description": "Add responders to an incident.", "post": { "x-pd-requires-scope": "incidents.write", "tags": [ "Incidents" ], "operationId": "createIncidentResponderRequest", "description": "Send a new responder request for the specified incident.\n\nAn incident represents a problem or an issue that needs to be addressed and resolved.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#incidents)\n\nScoped OAuth requires: `incidents.write`\n", "summary": "Create a responder request for an incident", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" }, { "$ref": "#/components/parameters/from_header" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "requester_id": { "type": "string", "description": "The user id of the requester." }, "message": { "type": "string", "description": "The message sent with the responder request." }, "responder_request_targets": { "description": "The array of targets the responder request is sent to.", "items": { "$ref": "#/components/schemas/ResponderRequestTargetReference" } } }, "required": [ "requester_id", "message", "responder_request_targets" ] }, "examples": { "request": { "summary": "Request Example", "value": { "requester_id": "PL1JMK5", "message": "Please help with issue - join bridge at +1(234)-567-8910", "responder_request_targets": [ { "responder_request_target": { "id": "PJ25ZYX", "type": "user_reference" } } ] } } } } } }, "responses": { "200": { "description": "The new responder request for the given incident.", "content": { "application/json": { "schema": { "type": "object", "properties": { "responder_request": { "$ref": "#/components/schemas/ResponderRequest" } }, "required": [ "responder_request" ] }, "examples": { "response": { "summary": "Response Example", "value": { "responder_request": { "incident": { "id": "PXP12GZ", "type": "incident_reference", "summary": "Ongoing Incident in Mailroom", "self": "https://api.pagerduty.com/incidents/PXP12GZ", "html_url": "https://subdomain.pagerduty.com/incidents/PXP12GZ" }, "requester": { "id": "P09TT3C", "type": "user_reference", "summary": "Jane Doe", "self": "https://api.pagerduty.com/users/P09TT3C", "html_url": "https://subdomain.pagerduty.com/users/P09TT3C" }, "requested_at": "2018-08-16T14:55:17-07:00", "message": "Please help with issue - join bridge at +1(234)-567-8910", "responder_request_targets": [ { "responder_request_target": { "type": "user", "id": "PL7A2O4", "incidents_responders": [ { "state": "pending", "user": { "id": "PL7A2O4", "type": "user_reference", "summary": "Lee Turner", "self": "https://api.pagerduty.com/users/PL7A2O4", "html_url": "https://subdomain.pagerduty.com/users/PL7A2O4", "avatar_url": "https://secure.gravatar.com/avatar/51c673f51f6b483b24c889bbafbd2a67.png?d=mm&r=PG" }, "incident": { "id": "PXP12GZ", "type": "incident_reference", "summary": "Ongoing Incident in Mailroom", "self": "https://api.pagerduty.com/incidents/PXP12GZ", "html_url": "https://subdomain.pagerduty.com/incidents/PXP12GZ" }, "updated_at": "2018-08-09T14:40:48-07:00", "message": "Please help with issue - join bridge at +1(234)-567-8910", "requester": { "id": "P09TT3C", "type": "user_reference", "summary": "Jane Doe", "self": "https://api.pagerduty.com/users/P09TT3C", "html_url": "https://subdomain.pagerduty.com/users/P09TT3C", "avatar_url": "https://secure.gravatar.com/avatar/1c747247b75acc1f724e2784c838b3f8.png?d=mm&r=PG" }, "requested_at": "2018-08-09T21:40:49Z" } ] } } ] } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } } }, "/incidents/{id}/snooze": { "description": "\"Snooze\" an incident. This suspends the acknowledgement timeout and auto-resolution for a given amount of time.", "post": { "tags": [ "Incidents" ], "x-pd-requires-scope": "incidents.write", "operationId": "createIncidentSnooze", "description": "Snooze an incident.\n\nAn incident represents a problem or an issue that needs to be addressed and resolved.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#incidents)\n\nScoped OAuth requires: `incidents.write`\n", "summary": "Snooze an incident", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" }, { "$ref": "#/components/parameters/from_header" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "duration": { "type": "integer", "description": "The number of seconds to snooze the incident for. After this number of seconds has elapsed, the incident will return to the \"triggered\" state.", "minimum": 1, "maximum": 604800 } }, "required": [ "duration" ] }, "examples": { "request": { "summary": "Request Example", "value": { "duration": 3600 } } } } } }, "responses": { "201": { "description": "The incident that was successfully snoozed.", "content": { "application/json": { "schema": { "type": "object", "properties": { "incident": { "$ref": "#/components/schemas/Incident" } }, "required": [ "incident" ] }, "examples": { "response": { "summary": "Response Example", "value": { "incident": { "id": "PT4KHLK", "type": "incident", "summary": "[#1234] The server is on fire.", "self": "https://api.pagerduty.com/incidents/PT4KHLK", "html_url": "https://subdomain.pagerduty.com/incidents/PT4KHLK", "incident_number": 1234, "created_at": "2015-10-06T21:30:42Z", "updated_at": "2015-10-06T21:40:23Z", "status": "resolved", "pending_actions": [ { "type": "unacknowledge", "at": "2015-11-10T01:02:52Z" }, { "type": "resolve", "at": "2015-11-10T04:31:52Z" } ], "incident_key": "baf7cf21b1da41b4b0221008339ff357", "service": { "id": "PIJ90N7", "type": "service_reference", "summary": "My Mail Service", "self": "https://api.pagerduty.com/services/PIJ90N7", "html_url": "https://subdomain.pagerduty.com/service-directory/PIJ90N7" }, "assigned_via": "escalation_policy", "assignments": [ { "at": "2015-11-10T00:31:52Z", "assignee": { "id": "PXPGF42", "type": "user_reference", "summary": "Earline Greenholt", "self": "https://api.pagerduty.com/users/PXPGF42", "html_url": "https://subdomain.pagerduty.com/users/PXPGF42" } } ], "acknowledgements": [ { "at": "2015-11-10T00:32:52Z", "acknowledger": { "id": "PXPGF42", "type": "user_reference", "summary": "Earline Greenholt", "self": "https://api.pagerduty.com/users/PXPGF42", "html_url": "https://subdomain.pagerduty.com/users/PXPGF42" } } ], "resolved_at": "2015-10-06T21:38:23Z", "last_status_change_at": "2015-10-06T21:38:23Z", "last_status_change_by": { "id": "PXPGF42", "type": "user_reference", "summary": "Earline Greenholt", "self": "https://api.pagerduty.com/users/PXPGF42", "html_url": "https://subdomain.pagerduty.com/users/PXPGF42" }, "first_trigger_log_entry": { "id": "Q02JTSNZWHSEKV", "type": "trigger_log_entry_reference", "summary": "Triggered through the API", "self": "https://api.pagerduty.com/log_entries/Q02JTSNZWHSEKV?incident_id=PT4KHLK", "html_url": "https://subdomain.pagerduty.com/incidents/PT4KHLK/log_entries/Q02JTSNZWHSEKV" }, "escalation_policy": { "id": "PT20YPA", "type": "escalation_policy_reference", "summary": "Another Escalation Policy", "self": "https://api.pagerduty.com/escalation_policies/PT20YPA", "html_url": "https://subdomain.pagerduty.com/escalation_policies/PT20YPA" }, "teams": [ { "id": "PQ9K7I8", "type": "team_reference", "summary": "Engineering", "self": "https://api.pagerduty.com/teams/PQ9K7I8", "html_url": "https://subdomain.pagerduty.com/teams/PQ9K7I8" } ], "urgency": "high" } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } } }, "/incidents/{id}/status_updates": { "description": "Create incident status updates.", "post": { "x-pd-requires-scope": "incidents.write", "tags": [ "Incidents" ], "operationId": "createIncidentStatusUpdate", "description": "Create a new status update for the specified incident. Optionally pass `subject` and `html_message` properties in the request body to override the email notification that gets sent.\n\nAn incident represents a problem or an issue that needs to be addressed and resolved.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#incidents)\n\nScoped OAuth requires: `incidents.write`\n", "summary": "Create a status update on an incident", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" }, { "$ref": "#/components/parameters/from_header" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "description": "The message to be posted as a status update." }, "subject": { "type": "string", "description": "The subject to be sent for the custom html email status update. Required if sending custom html email." }, "html_message": { "type": "string", "description": "The html content to be sent for the custom html email status update. Required if sending custom html email." } }, "required": [ "message" ] }, "examples": { "request": { "summary": "Request Example", "value": { "message": "The server fire is spreading.", "subject": "Server Fire Update", "html_message": "

Server is still on fire

" } } } } } }, "responses": { "200": { "description": "The new status update for the specified incident.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status_update": { "$ref": "#/components/schemas/StatusUpdate" } }, "required": [ "status_update" ] }, "examples": { "response": { "summary": "Response Example", "value": { "status_update": { "id": "PWL7QXS", "message": "The server fire is spreading.", "sender": { "id": "PXPGF42", "type": "user_reference", "summary": "Earline Greenholt", "self": "https://api.pagerduty.com/users/PXPGF42", "html_url": "https://subdomain.pagerduty.com/users/PXPGF42" }, "created_at": "2013-03-06T15:28:51-05:00", "html_message": "

Server is still on fire

", "subject": "Server Fire Update" } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } } }, "/incidents/{id}/status_updates/subscribers": { "get": { "x-pd-requires-scope": "subscribers.read", "summary": "List Notification Subscribers", "tags": [ "Incidents" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/Pagination" }, { "type": "object", "properties": { "subscribers": { "type": "array", "items": { "$ref": "#/components/schemas/NotificationSubscriberWithContext" } } } }, { "type": "object", "properties": { "account_id": { "type": "string", "description": "The ID of the account belonging to the subscriber entity" } } } ] }, "examples": { "response": { "summary": "Response Example", "value": { "limit": 100, "more": false, "offset": 0, "subscribers": [ { "subscriber_id": "PD1234", "subscriber_type": "user", "has_indirect_subscription": false, "subscribed_via": null }, { "subscriber_id": "PD1234", "subscriber_type": "team", "has_indirect_subscription": true, "subscribed_via": [ { "id": "PD1234", "type": "business_service" } ] } ], "account_id": "PD1234", "total": 2 } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "422": { "$ref": "#/components/responses/UnprocessableEntity" }, "429": { "$ref": "#/components/responses/TooManyRequests" } }, "operationId": "getIncidentNotificationSubscribers", "description": "Retrieve a list of Notification Subscribers on the Incident.\n\n\n> Users must be added through `POST /incident/{id}/status_updates/subscribers` to be returned from this endpoint.\nScoped OAuth requires: `subscribers.read`\n", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/id" } ] }, "post": { "x-pd-requires-scope": "subscribers.write", "summary": "Add Notification Subscribers", "operationId": "createIncidentNotificationSubscribers", "tags": [ "Incidents" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "subscriptions": { "type": "array", "items": { "$ref": "#/components/schemas/NotificationSubscriptionWithContext" } } } }, "examples": { "response": { "summary": "Response Example", "value": { "subscriptions": [ { "account_id": "PD1234", "subscribable_id": "PD1234", "subscribable_type": "incident", "subscriber_id": "PD1234", "subscriber_type": "user", "result": "success" }, { "account_id": "PD1234", "subscribable_id": "PD1234", "subscribable_type": "incident", "subscriber_id": "PD1234", "subscriber_type": "team", "result": "duplicate" }, { "account_id": "PD1234", "subscribable_id": "PD1235", "subscribable_type": "incident", "subscriber_id": "PD1234", "subscriber_type": "team", "result": "unauthorized" } ] } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "422": { "$ref": "#/components/responses/UnprocessableEntity" } }, "description": "Subscribe the given entities to Incident Status Update Notifications.\n\nScoped OAuth requires: `subscribers.write`\n", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/id" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "subscribers": { "type": "array", "uniqueItems": true, "minItems": 1, "items": { "$ref": "#/components/schemas/NotificationSubscriber" } } }, "required": [ "subscribers" ] }, "examples": { "request": { "summary": "Request Example", "value": { "subscribers": [ { "subscriber_id": "PD1234", "subscriber_type": "team" }, { "subscriber_id": "PD1235", "subscriber_type": "team" }, { "subscriber_id": "PD1234", "subscriber_type": "user" } ] } } } } }, "description": "The entities to subscribe." } } }, "/incidents/{id}/status_updates/unsubscribe": { "post": { "x-pd-requires-scope": "subscribers.write", "summary": "Remove Notification Subscriber", "tags": [ "Incidents" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "deleted_count": { "type": "number" }, "unauthorized_count": { "type": "number" }, "non_existent_count": { "type": "number" } }, "required": [ "deleted_count", "unauthorized_count", "non_existent_count" ] }, "examples": { "response": { "summary": "Response Example", "value": { "deleted_count": 1, "unauthorized_count": 1, "non_existent_count": 0 } } } } } }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "422": { "$ref": "#/components/responses/UnprocessableEntity" } }, "operationId": "removeIncidentNotificationSubscribers", "description": "Unsubscribes the matching Subscribers from Incident Status Update Notifications.\n\nScoped OAuth requires: `subscribers.write`\n", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/id" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "subscribers": { "type": "array", "uniqueItems": true, "minItems": 1, "items": { "$ref": "#/components/schemas/NotificationSubscriber" } } }, "required": [ "subscribers" ] }, "examples": { "request": { "summary": "Request Example", "value": { "subscribers": [ { "subscriber_id": "PD1234", "subscriber_type": "team" }, { "subscriber_id": "PD1234", "subscriber_type": "user" } ] } } } } }, "description": "The entities to unsubscribe." } } }, "/incidents/count": { "description": "Get a count of incidents matching a set of criteria such as service, status, and time. Counts may be fetched per status." }, "/incidents/custom_fields": { "description": "Create and list Fields on Incidents", "post": { "tags": [ "Custom Fields" ], "x-pd-requires-scope": "custom_fields.write", "operationId": "createCustomFieldsField", "description": "Create a new Field, along with the Field Options if provided. An account may have up to 10 Fields.\n\nScoped OAuth requires: `custom_fields.write`\n", "summary": "Create a Field", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "field": { "$ref": "#/components/schemas/CustomFieldsFieldWithOptions" } }, "required": [ "field" ] }, "examples": { "request1": { "summary": "Example: With field_options and single-value", "value": { "field": { "data_type": "string", "name": "environment", "display_name": "Environment", "description": "The environment that the issue occurred in", "field_type": "single_value_fixed", "default_value": "production", "field_options": [ { "data": { "data_type": "string", "value": "production" } }, { "data": { "data_type": "string", "value": "staging" } } ] } } }, "request2": { "summary": "Example: With field_options and multi-value", "value": { "field": { "data_type": "string", "name": "environment", "display_name": "Environment", "description": "The environment that the issue occurred in", "field_type": "multi_value_fixed", "default_value": [ "production", "staging" ], "field_options": [ { "data": { "data_type": "string", "value": "production" } }, { "data": { "data_type": "string", "value": "staging" } } ] } } }, "request3": { "summary": "Example: Without field_options", "value": { "field": { "data_type": "string", "name": "environment", "display_name": "Environment", "description": "The environment that the issue occurred in", "field_type": "single_value", "default_value": "production" } } } } } } }, "responses": { "201": { "description": "The field object created, along with the Field Options if provided.", "content": { "application/json": { "schema": { "type": "object", "properties": { "field": { "$ref": "#/components/schemas/CustomFieldsFieldWithOptions" } }, "required": [ "field" ] }, "examples": { "response1": { "summary": "Example: With field_options and single-value", "value": { "field": { "id": "P5IYCNZ", "type": "field", "summary": "environment", "self": "https://api.pagerduty.com/incidents/custom_fields/P5IYCNZ", "data_type": "string", "name": "environment", "display_name": "Environment", "field_type": "single_value_fixed", "description": "The environment that the issue occurred in", "created_at": "2021-06-01T21:30:42Z", "updated_at": "2021-06-01T21:30:42Z", "default_value": "staging", "field_options": [ { "id": "PT4KHEE", "type": "field_option", "data": { "data_type": "string", "value": "production" }, "created_at": "2021-06-01T21:30:42Z", "updated_at": "2021-06-01T21:30:42Z" }, { "id": "P5IYCNZ", "type": "field_option", "data": { "data_type": "string", "value": "staging" }, "created_at": "2021-06-01T21:30:42Z", "updated_at": "2021-06-01T21:30:42Z" } ] } } }, "response2": { "summary": "Example: With field_options and multi-value", "value": { "field": { "id": "P5IYCNZ", "type": "field", "summary": "environment", "self": "https://api.pagerduty.com/incidents/custom_fields/P5IYCNZ", "data_type": "string", "name": "environment", "display_name": "Environment", "field_type": "multi_value_fixed", "description": "The environment that the issue occurred in", "created_at": "2021-06-01T21:30:42Z", "updated_at": "2021-06-01T21:30:42Z", "default_value": [ "production", "staging" ], "field_options": [ { "id": "PT4KHEE", "type": "field_option", "data": { "data_type": "string", "value": "production" }, "created_at": "2021-06-01T21:30:42Z", "updated_at": "2021-06-01T21:30:42Z" }, { "id": "P5IYCNZ", "type": "field_option", "data": { "data_type": "string", "value": "staging" }, "created_at": "2021-06-01T21:30:42Z", "updated_at": "2021-06-01T21:30:42Z" } ] } } }, "response3": { "summary": "Example: Without field_options", "value": { "field": { "id": "P5IYCNZ", "type": "field", "summary": "environment", "self": "https://api.pagerduty.com/incidents/custom_fields/P5IYCNZ", "data_type": "string", "field_type": "single_value", "name": "environment", "display_name": "Environment", "description": "The environment that the issue occurred in", "default_value": "production", "created_at": "2021-06-01T21:30:42Z", "updated_at": "2021-06-01T21:30:42Z" } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "403": { "$ref": "#/components/responses/Forbidden" }, "500": { "$ref": "#/components/responses/InternalServerError" } } }, "get": { "tags": [ "Custom Fields" ], "x-pd-requires-scope": "custom_fields.read", "operationId": "listCustomFieldsFields", "description": "List fields.\n\nScoped OAuth requires: `custom_fields.read`\n", "summary": "List Fields", "parameters": [ { "$ref": "#/components/parameters/include_customfields_field" } ], "responses": { "200": { "description": "A list of fields.", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "properties": { "fields": { "type": "array", "items": { "$ref": "#/components/schemas/CustomFieldsFieldWithOptions" } } }, "required": [ "fields" ] } ] }, "examples": { "response": { "summary": "Response Example", "value": { "fields": [ { "id": "P5IYCNZ", "type": "field", "summary": "environment", "self": "https://api.pagerduty.com/incidents/custom_fields/P5IYCNZ", "data_type": "string", "name": "environment", "display_name": "Environment", "description": "The environment that the issue occurred in", "field_type": "single_value_fixed", "created_at": "2021-06-01T21:30:42Z", "updated_at": "2021-06-01T21:30:42Z", "default_value": null, "field_options": [ { "id": "PT4KHEE", "type": "field_option", "data": { "data_type": "string", "value": "abc" }, "created_at": "2021-06-01T21:30:42Z", "updated_at": "2021-06-01T21:30:42Z" } ] } ] } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "500": { "$ref": "#/components/responses/InternalServerError" } } } }, "/incidents/custom_fields/{field_id}": { "description": "Get, update and delete a field.", "get": { "tags": [ "Custom Fields" ], "x-pd-requires-scope": "custom_fields.read", "operationId": "getCustomFieldsField", "description": "Show detailed information about a field.\n\nScoped OAuth requires: `custom_fields.read`\n", "summary": "Get a Field", "parameters": [ { "$ref": "#/components/parameters/field_id" }, { "$ref": "#/components/parameters/include_customfields_field" } ], "responses": { "200": { "description": "The field requested.", "content": { "application/json": { "schema": { "type": "object", "properties": { "field": { "$ref": "#/components/schemas/CustomFieldsFieldWithOptions" } }, "required": [ "field" ] }, "examples": { "response1": { "summary": "Example: No query parameters", "value": { "field": { "id": "P5IYCNZ", "type": "field", "summary": "environment", "self": "https://api.pagerduty.com/incidents/custom_fields/P5IYCNZ", "data_type": "string", "name": "environment", "display_name": "Environment", "description": "The environment that the issue occurred in", "field_type": "multi_value", "default_value": null, "created_at": "2021-06-01T21:30:42Z", "updated_at": "2021-06-01T21:30:42Z" } } }, "response2": { "summary": "Example: Using include[]=field_options", "value": { "field": { "id": "P5IYCNZ", "type": "field", "summary": "environment", "self": "https://api.pagerduty.com/incidents/custom_fields/P5IYCNZ", "data_type": "string", "name": "environment", "display_name": "Environment", "description": "The environment that the issue occurred in", "field_type": "single_value_fixed", "created_at": "2021-06-01T21:30:42Z", "updated_at": "2021-06-01T21:30:42Z", "default_value": null, "field_options": [ { "id": "PT4KHEE", "type": "field_option", "data": { "data_type": "string", "value": "production" }, "created_at": "2021-06-01T21:30:42Z", "updated_at": "2021-06-01T21:30:42Z" }, { "id": "P5IYCNZ", "type": "field_option", "data": { "data_type": "string", "value": "staging" }, "created_at": "2021-06-01T21:30:42Z", "updated_at": "2021-06-01T21:30:42Z" } ] } } } } } } }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalServerError" } } }, "put": { "tags": [ "Custom Fields" ], "x-pd-requires-scope": "custom_fields.write", "operationId": "updateCustomFieldsField", "description": "Update a field.\n\nScoped OAuth requires: `custom_fields.write`\n", "summary": "Update a Field", "parameters": [ { "$ref": "#/components/parameters/field_id" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "field": { "$ref": "#/components/schemas/CustomFieldsEditableField" } }, "required": [ "field" ] }, "examples": { "request": { "summary": "Request Example", "value": { "field": { "display_name": "New Display Name!", "description": "New description!" } } } } } } }, "responses": { "200": { "description": "The field object updated.", "content": { "application/json": { "schema": { "type": "object", "properties": { "field": { "$ref": "#/components/schemas/CustomFieldsField" } }, "required": [ "field" ] }, "examples": { "response": { "summary": "Response Example", "value": { "field": { "id": "P5IYCNZ", "type": "field", "summary": "old_name", "self": "https://api.pagerduty.com/incidents/custom_fields/P5IYCNZ", "data_type": "string", "name": "old_name", "display_name": "New Display Name!", "description": "New description!", "field_type": "single_value", "default_value": null, "created_at": "2021-06-01T21:30:42Z", "updated_at": "2021-06-01T21:30:42Z" } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalServerError" } } }, "delete": { "tags": [ "Custom Fields" ], "x-pd-requires-scope": "custom_fields.write", "operationId": "deleteCustomFieldsField", "description": "Delete a Field. Fields may not be deleted if they are used by a Field Schema.\n\nScoped OAuth requires: `custom_fields.write`\n", "summary": "Delete a Field", "parameters": [ { "$ref": "#/components/parameters/field_id" } ], "responses": { "204": { "description": "The field was deleted successfully." }, "400": { "$ref": "#/components/responses/ArgumentError" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalServerError" } } } }, "/incidents/custom_fields/{field_id}/field_options": { "description": "Create new option for the given field_options (e.g., enum) field and list all options for the given field.", "post": { "tags": [ "Custom Fields" ], "x-pd-requires-scope": "custom_fields.write", "operationId": "createCustomFieldsFieldOption", "description": "Create a new Field Option. Field Options may only be created for Fields that have `field_options`. A Field may have no more than 10 enabled options.\n\nScoped OAuth requires: `custom_fields.write`\n", "summary": "Create a Field Option", "parameters": [ { "$ref": "#/components/parameters/field_id" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "field_option": { "$ref": "#/components/schemas/CustomFieldsFieldOption" } }, "required": [ "field_option" ] }, "examples": { "request": { "summary": "Request Example", "value": { "field_option": { "data": { "data_type": "string", "value": "production" } } } } } } } }, "responses": { "201": { "description": "The field option created.", "content": { "application/json": { "schema": { "type": "object", "properties": { "field_option": { "$ref": "#/components/schemas/CustomFieldsFieldOption" } }, "required": [ "field_option" ] }, "examples": { "response": { "summary": "Response Example", "value": { "field_option": { "id": "PQ9K7I8", "type": "field_option", "data": { "data_type": "string", "value": "production" }, "created_at": "2021-06-01T21:30:42Z", "updated_at": "2021-06-01T21:30:42Z" } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalServerError" } } }, "get": { "tags": [ "Custom Fields" ], "x-pd-requires-scope": "custom_fields.read", "operationId": "listCustomFieldsFieldOptions", "description": "List all enabled Field Options for a Field.\n\nScoped OAuth requires: `custom_fields.read`\n", "summary": "List Field Options", "parameters": [ { "$ref": "#/components/parameters/field_id" } ], "responses": { "200": { "description": "A list of field options.", "content": { "application/json": { "schema": { "type": "object", "properties": { "field_options": { "type": "array", "items": { "$ref": "#/components/schemas/CustomFieldsFieldOption" } } }, "required": [ "field_options" ] }, "examples": { "response": { "summary": "Response Example", "value": { "field_options": [ { "id": "PQ9K7I8", "type": "field_option", "data": { "data_type": "string", "value": "production" }, "created_at": "2021-06-01T21:30:42Z", "updated_at": "2021-06-01T21:30:42Z" } ] } } } } } }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalServerError" } } } }, "/incidents/custom_fields/{field_id}/field_options/{field_option_id}": { "description": "Update field option.", "put": { "tags": [ "Custom Fields" ], "x-pd-requires-scope": "custom_fields.write", "operationId": "updateCustomFieldsFieldOption", "description": "Update Field Option for a Field.\n\nScoped OAuth requires: `custom_fields.write`\n", "summary": "Update a Field Option", "parameters": [ { "$ref": "#/components/parameters/field_id" }, { "$ref": "#/components/parameters/field_option_id" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "field_option": { "$ref": "#/components/schemas/CustomFieldsEditableFieldOption" } }, "required": [ "field_option" ] }, "examples": { "request": { "summary": "Request Example", "value": { "field_option": { "data": { "data_type": "string", "value": "prod" } } } } } } } }, "responses": { "200": { "description": "The field option object updated.", "content": { "application/json": { "schema": { "type": "object", "properties": { "field_option": { "$ref": "#/components/schemas/CustomFieldsFieldOption" } }, "required": [ "field_option" ] }, "examples": { "response": { "summary": "Response Example", "value": { "field_option": { "id": "PQ9K7I8", "type": "field_option", "data": { "data_type": "string", "value": "prod" }, "created_at": "2021-06-01T21:30:42Z", "updated_at": "2021-06-01T21:30:42Z" } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalServerError" } } }, "delete": { "tags": [ "Custom Fields" ], "x-pd-requires-scope": "custom_fields.write", "operationId": "deleteCustomFieldsFieldOption", "description": "Delete a Field Option.\n\nScoped OAuth requires: `custom_fields.write`\n", "summary": "Delete a Field Option", "parameters": [ { "$ref": "#/components/parameters/field_id" }, { "$ref": "#/components/parameters/field_option_id" } ], "responses": { "204": { "description": "The field option was deleted successfully." }, "400": { "$ref": "#/components/responses/ArgumentError" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalServerError" } } } }, "/license_allocations": { "description": "The Licenses allocated to Users within your Account", "get": { "x-pd-requires-scope": "licenses.read", "tags": [ "Licenses" ], "operationId": "listLicenseAllocations", "description": "List the Licenses allocated to Users within your Account\n\nScoped OAuth requires: `licenses.read`\n", "summary": "List License Allocations", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/offset_limit" }, { "$ref": "#/components/parameters/offset_offset" } ], "responses": { "200": { "description": "License allocations to Users within your Account", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "properties": { "license_allocations": { "type": "array", "items": { "type": "object", "required": [ "user", "license", "allocated_at" ], "properties": { "user": { "$ref": "#/components/schemas/UserReference" }, "license": { "$ref": "#/components/schemas/LicenseWithCounts/allOf/0" }, "allocated_at": { "type": "string", "description": "Indicates the date and time the License was allocated to the User", "format": "date-time" } } } } } }, { "$ref": "#/components/schemas/Pagination" } ] }, "examples": { "response": { "summary": "Response Example", "value": { "license_allocations": [ { "license": { "id": "PIP248G", "name": "Business (Full User)", "description": "Event Intelligence", "valid_roles": [ "owner", "admin", "user", "limited_user", "observer", "restricted_access" ], "role_group": "FullUser", "summary": "Business (Full User)", "type": "license", "self": null, "html_url": null }, "user": { "id": "PIP248H", "type": "user_reference" }, "allocated_at": "2021-06-01T00:00:00-05:00" } ], "offset": 0, "limit": 1, "more": false, "total": 2 } } } } } }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" } } } }, "/licenses": { "description": "The Licenses associated with your Account", "get": { "x-pd-requires-scope": "licenses.read", "tags": [ "Licenses" ], "operationId": "listLicenses", "description": "List the Licenses associated with your Account\n\nScoped OAuth requires: `licenses.read`\n", "summary": "List Licenses", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" } ], "responses": { "200": { "description": "Licenses associated with your Account", "content": { "application/json": { "schema": { "type": "object", "properties": { "licenses": { "type": "array", "items": { "$ref": "#/components/schemas/LicenseWithCounts" } } } }, "examples": { "response": { "summary": "Example Response", "value": { "licenses": [ { "id": "PIP248G", "name": "Business (Full User)", "description": "Event Intelligence", "current_value": 234, "allocations_available": 4766, "valid_roles": [ "owner", "admin", "user", "limited_user", "observer", "restricted_access" ], "role_group": "FullUser", "summary": "Business (Full User)", "type": "license", "self": null, "html_url": null }, { "id": "PTHH1SQ", "name": "Business (Full User)", "description": "", "current_value": 0, "allocations_available": 4766, "valid_roles": [ "owner", "admin", "user", "limited_user", "observer", "restricted_access" ], "role_group": "FullUser", "summary": "Business (Full User)", "type": "license", "self": null, "html_url": null }, { "id": "PQ8W0D0", "name": "Business (Stakeholder)", "description": "", "current_value": 48, "allocations_available": 4952, "valid_roles": [ "read_only_user", "read_only_limited_user" ], "role_group": "Stakeholder", "summary": "Business (Stakeholder)", "type": "license", "self": null, "html_url": null } ] } } } } } }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" } } } }, "/log_entries": { "description": "List all of the log entries across your account. These can be filtered (for instance, by time or by team), and the results will be paginated.", "get": { "x-pd-requires-scope": "incidents.read", "tags": [ "Log Entries" ], "operationId": "listLogEntries", "description": "List all of the incident log entries across the entire account.\n\nA log of all the events that happen to an Incident, and these are exposed as Log Entries.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#log-entries)\n\nScoped OAuth requires: `incidents.read`\n", "summary": "List log entries", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/offset_limit" }, { "$ref": "#/components/parameters/offset_offset" }, { "$ref": "#/components/parameters/offset_total" }, { "$ref": "#/components/parameters/time_zone" }, { "$ref": "#/components/parameters/since" }, { "$ref": "#/components/parameters/until" }, { "$ref": "#/components/parameters/log_entry_is_overview" }, { "$ref": "#/components/parameters/include_log_entry" }, { "$ref": "#/components/parameters/team_ids" } ], "responses": { "200": { "description": "A paginated array of log entries.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/Pagination" }, { "type": "object", "properties": { "log_entries": { "type": "array", "items": { "oneOf": [ { "$ref": "#/components/schemas/AcknowledgeLogEntry" }, { "$ref": "#/components/schemas/AnnotateLogEntry" }, { "$ref": "#/components/schemas/AssignLogEntry" }, { "$ref": "#/components/schemas/DelegateLogEntry" }, { "$ref": "#/components/schemas/EscalateLogEntry" }, { "$ref": "#/components/schemas/ExhaustEscalationPathLogEntry" }, { "$ref": "#/components/schemas/NotifyLogEntry" }, { "$ref": "#/components/schemas/ReachAckLimitLogEntry" }, { "$ref": "#/components/schemas/ReachTriggerLimitLogEntry" }, { "$ref": "#/components/schemas/RepeatEscalationPathLogEntry" }, { "$ref": "#/components/schemas/ResolveLogEntry" }, { "$ref": "#/components/schemas/SnoozeLogEntry" }, { "$ref": "#/components/schemas/TriggerLogEntry" }, { "$ref": "#/components/schemas/UnacknowledgeLogEntry" }, { "$ref": "#/components/schemas/UrgencyChangeLogEntry" } ] } } }, "required": [ "log_entries" ] } ] }, "examples": { "response": { "summary": "Response Example", "value": { "log_entries": [ { "id": "Q02JTSNZWHSEKV", "type": "trigger_log_entry", "summary": "Triggered through the API", "self": "https://api.pagerduty.com/log_entries/Q02JTSNZWHSEKV?incident_id=PT4KHLK", "html_url": "https://subdomain.pagerduty.com/incidents/PT4KHLK/log_entries/Q02JTSNZWHSEKV", "created_at": "2015-11-07T00:14:20Z", "agent": { "id": "PIJ90N7", "type": "service_reference", "summary": "My Mail Service", "self": "https://api.pagerduty.com/services/PIJ90N7", "html_url": "https://subdomain.pagerduty.com/service-directory/PIJ90N7" }, "channel": { "type": "api" }, "incident": { "id": "PT4KHLK", "type": "incident_reference", "summary": "[#1234] The server is on fire.", "self": "https://api.pagerduty.com/incidents/PT4KHLK", "html_url": "https://subdomain.pagerduty.com/incidents/PT4KHLK" }, "teams": [ { "id": "PQ9K7I8", "type": "team_reference", "summary": "Engineering", "self": "https://api.pagerduty.com/teams/PQ9K7I8", "html_url": "https://subdomain.pagerduty.com/teams/PQ9K7I8" } ], "contexts": [], "event_details": { "description": "Tasks::SFDCValidator - PD_Data__c - duplicates" } } ], "limit": 1, "offset": 0, "more": true } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } } }, "/log_entries/{id}": { "description": "Get a single log entry by ID.", "get": { "x-pd-requires-scope": "incidents.read", "tags": [ "Log Entries" ], "operationId": "getLogEntry", "description": "Get details for a specific incident log entry. This method provides additional information you can use to get at raw event data.\n\nA log of all the events that happen to an Incident, and these are exposed as Log Entries.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#log-entries)\n\nScoped OAuth requires: `incidents.read`\n", "summary": "Get a log entry", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/time_zone" }, { "$ref": "#/components/parameters/id" }, { "$ref": "#/components/parameters/include_log_entry" } ], "responses": { "200": { "description": "A single log entry.", "content": { "application/json": { "schema": { "type": "object", "properties": { "log_entry": { "oneOf": [ { "$ref": "#/components/schemas/AcknowledgeLogEntry" }, { "$ref": "#/components/schemas/AnnotateLogEntry" }, { "$ref": "#/components/schemas/AssignLogEntry" }, { "$ref": "#/components/schemas/DelegateLogEntry" }, { "$ref": "#/components/schemas/EscalateLogEntry" }, { "$ref": "#/components/schemas/ExhaustEscalationPathLogEntry" }, { "$ref": "#/components/schemas/NotifyLogEntry" }, { "$ref": "#/components/schemas/ReachAckLimitLogEntry" }, { "$ref": "#/components/schemas/ReachTriggerLimitLogEntry" }, { "$ref": "#/components/schemas/RepeatEscalationPathLogEntry" }, { "$ref": "#/components/schemas/ResolveLogEntry" }, { "$ref": "#/components/schemas/SnoozeLogEntry" }, { "$ref": "#/components/schemas/TriggerLogEntry" }, { "$ref": "#/components/schemas/UnacknowledgeLogEntry" }, { "$ref": "#/components/schemas/UrgencyChangeLogEntry" } ] } }, "required": [ "log_entry" ] }, "examples": { "response": { "summary": "Response Example", "value": { "log_entry": { "id": "Q02JTSNZWHSEKV", "type": "trigger_log_entry", "summary": "Triggered through the API", "self": "https://api.pagerduty.com/log_entries/Q02JTSNZWHSEKV?incident_id=PT4KHLK", "html_url": "https://subdomain.pagerduty.com/incidents/PT4KHLK/log_entries/Q02JTSNZWHSEKV", "created_at": "2015-11-07T00:14:20Z", "agent": { "id": "PIJ90N7", "type": "service_reference", "summary": "My Mail Service", "self": "https://api.pagerduty.com/services/PIJ90N7", "html_url": "https://subdomain.pagerduty.com/service-directory/PIJ90N7" }, "channel": { "type": "api" }, "incident": { "id": "PT4KHLK", "type": "incident_reference", "summary": "[#1234] The server is on fire.", "self": "https://api.pagerduty.com/incidents/PT4KHLK", "html_url": "https://subdomain.pagerduty.com/incidents/PT4KHLK" }, "teams": [ { "id": "PQ9K7I8", "type": "team_reference", "summary": "Engineering", "self": "https://api.pagerduty.com/teams/PQ9K7I8", "html_url": "https://subdomain.pagerduty.com/teams/PQ9K7I8" } ], "contexts": [], "event_details": { "description": "Tasks::SFDCValidator - PD_Data__c - duplicates" } } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } } }, "/log_entries/{id}/channel": { "description": "Log entry channel information.", "put": { "x-pd-requires-scope": "incidents.write", "tags": [ "Log Entries" ], "operationId": "updateLogEntryChannel", "description": "Update an existing incident log entry channel.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#log-entries)\n\nScoped OAuth requires: `incidents.write`\n", "summary": "Update log entry channel information.", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" }, { "$ref": "#/components/parameters/from_header" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "channel": { "type": "object", "description": "The parameters to update.", "properties": { "details": { "type": "string", "description": "New channel details" }, "type": { "type": "string", "description": "Channel type. Cannot be changed and must match the present value.", "enum": [ "web_trigger", "mobile" ] } }, "required": [ "type", "details" ] } }, "required": [ "channel" ] }, "examples": { "request": { "summary": "Request Example", "value": { "channel": { "type": "web_trigger", "details": "New channel details" } } } } } }, "description": "The log entry channel to be updated." }, "responses": { "202": { "description": "The channel information modification was accepted." }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } } }, "/maintenance_windows": { "description": "List and create maintenance windows.", "get": { "x-pd-requires-scope": "services.read", "tags": [ "Maintenance Windows" ], "operationId": "listMaintenanceWindows", "description": "List existing maintenance windows, optionally filtered by service and/or team, or whether they are from the past, present or future.\n\nA Maintenance Window is used to temporarily disable one or more Services for a set period of time.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#maintenance-windows)\n\nScoped OAuth requires: `services.read`\n", "summary": "List maintenance windows", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/query" }, { "$ref": "#/components/parameters/offset_limit" }, { "$ref": "#/components/parameters/offset_offset" }, { "$ref": "#/components/parameters/offset_total" }, { "$ref": "#/components/parameters/team_ids" }, { "$ref": "#/components/parameters/services" }, { "$ref": "#/components/parameters/include_maintenance_window" }, { "$ref": "#/components/parameters/filter_maintenance_windows" } ], "responses": { "200": { "description": "A paginated array of maintenance windows.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/Pagination" }, { "type": "object", "properties": { "maintenance_windows": { "type": "array", "items": { "$ref": "#/components/schemas/MaintenanceWindow" } } }, "required": [ "maintenance_windows" ] } ] }, "examples": { "response": { "summary": "Response Example", "value": { "maintenance_windows": [ { "id": "PW98YIO", "type": "maintenance_window", "summary": "Immanentizing the eschaton", "self": "https://api.pagerduty.com/maintenance_windows/PW98YIO", "html_url": "https://subdomain.pagerduty.com/service-directory/maintenance-windows/PW98YIO", "sequence_number": 1, "start_time": "2015-11-09T20:00:00-05:00", "end_time": "2015-11-09T22:00:00-05:00", "description": "Immanentizing the eschaton", "services": [ { "id": "PIJ90N7", "type": "service_reference", "summary": "My Mail Service", "self": "https://api.pagerduty.com/services/PIJ90N7", "html_url": "https://subdomain.pagerduty.com/service-directory/PIJ90N7" } ], "teams": [ { "id": "PQ9K7I8", "type": "team_reference", "summary": "Engineering", "self": "https://api.pagerduty.com/teams/PQ9K7I8", "html_url": "https://subdomain.pagerduty.com/teams/PQ9K7I8" } ], "created_by": { "id": "PXPGF42", "type": "user_reference", "summary": "Earline Greenholt", "self": "https://api.pagerduty.com/users/PXPGF42", "html_url": "https://subdomain.pagerduty.com/users/PXPGF42" } } ], "limit": 25, "offset": 0, "more": false, "total": null } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } }, "post": { "x-pd-requires-scope": "services.write", "tags": [ "Maintenance Windows" ], "operationId": "createMaintenanceWindow", "description": "Create a new maintenance window for the specified services. No new incidents will be created for a service that is in maintenance.\n\nA Maintenance Window is used to temporarily disable one or more Services for a set period of time.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#maintenance-windows)\n\nScoped OAuth requires: `services.write`\n", "summary": "Create a maintenance window", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/from_header" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "maintenance_window": { "$ref": "#/components/schemas/MaintenanceWindow" } }, "required": [ "maintenance_window" ] }, "examples": { "request": { "summary": "Request Example", "value": { "maintenance_window": { "type": "maintenance_window", "start_time": "2015-11-09T20:00:00-05:00", "end_time": "2015-11-09T22:00:00-05:00", "description": "Immanentizing the eschaton", "services": [ { "id": "PIJ90N7", "type": "service_reference" } ] } } } } } }, "description": "The maintenance window object." }, "responses": { "201": { "description": "The maintenance window that was created.", "content": { "application/json": { "schema": { "type": "object", "properties": { "maintenance_window": { "$ref": "#/components/schemas/MaintenanceWindow" } }, "required": [ "maintenance_window" ] }, "examples": { "response": { "summary": "Response Example", "value": { "maintenance_window": { "id": "PW98YIO", "type": "maintenance_window", "summary": "Immanentizing the eschaton", "self": "https://api.pagerduty.com/maintenance_windows/PW98YIO", "html_url": "https://subdomain.pagerduty.com/service-directory/maintenance-windows/PW98YIO", "sequence_number": 1, "start_time": "2015-11-09T20:00:00-05:00", "end_time": "2015-11-09T22:00:00-05:00", "description": "Immanentizing the eschaton", "services": [ { "id": "PIJ90N7", "type": "service_reference", "summary": "My Mail Service", "self": "https://api.pagerduty.com/services/PIJ90N7", "html_url": "https://subdomain.pagerduty.com/service-directory/PIJ90N7" } ], "teams": [ { "id": "PQ9K7I8", "type": "team_reference", "summary": "Engineering", "self": "https://api.pagerduty.com/teams/PQ9K7I8", "html_url": "https://subdomain.pagerduty.com/teams/PQ9K7I8" } ], "created_by": { "id": "PXPGF42", "type": "user_reference", "summary": "Earline Greenholt", "self": "https://api.pagerduty.com/users/PXPGF42", "html_url": "https://subdomain.pagerduty.com/users/PXPGF42" } } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } } }, "/maintenance_windows/{id}": { "description": "Manage a maintenance window.", "get": { "x-pd-requires-scope": "services.read", "tags": [ "Maintenance Windows" ], "operationId": "getMaintenanceWindow", "description": "Get an existing maintenance window.\n\nA Maintenance Window is used to temporarily disable one or more Services for a set period of time.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#maintenance-windows)\n\nScoped OAuth requires: `services.read`\n", "summary": "Get a maintenance window", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" }, { "$ref": "#/components/parameters/include_maintenance_window" } ], "responses": { "200": { "description": "The maintenance window that was updated.", "content": { "application/json": { "schema": { "type": "object", "properties": { "maintenance_window": { "$ref": "#/components/schemas/MaintenanceWindow" } }, "required": [ "maintenance_window" ] }, "examples": { "response": { "summary": "Response Example", "value": { "maintenance_window": { "id": "PW98YIO", "type": "maintenance_window", "summary": "Immanentizing the eschaton", "self": "https://api.pagerduty.com/maintenance_windows/PW98YIO", "html_url": "https://subdomain.pagerduty.com/service-directory/maintenance-windows/PW98YIO", "sequence_number": 1, "start_time": "2015-11-09T20:00:00-05:00", "end_time": "2015-11-09T22:00:00-05:00", "description": "Immanentizing the eschaton", "services": [ { "id": "PIJ90N7", "type": "service_reference", "summary": "My Mail Service", "self": "https://api.pagerduty.com/services/PIJ90N7", "html_url": "https://subdomain.pagerduty.com/service-directory/PIJ90N7" } ], "teams": [ { "id": "PQ9K7I8", "type": "team_reference", "summary": "Engineering", "self": "https://api.pagerduty.com/teams/PQ9K7I8", "html_url": "https://subdomain.pagerduty.com/teams/PQ9K7I8" } ], "created_by": { "id": "PXPGF42", "type": "user_reference", "summary": "Earline Greenholt", "self": "https://api.pagerduty.com/users/PXPGF42", "html_url": "https://subdomain.pagerduty.com/users/PXPGF42" } } } } } } } }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } }, "delete": { "x-pd-requires-scope": "services.write", "tags": [ "Maintenance Windows" ], "operationId": "deleteMaintenanceWindow", "description": "Delete an existing maintenance window if it's in the future, or end it if it's currently on-going. If the maintenance window has already ended it cannot be deleted.\n\nA Maintenance Window is used to temporarily disable one or more Services for a set period of time.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#maintenance-windows)\n\nScoped OAuth requires: `services.write`\n", "summary": "Delete or end a maintenance window", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" } ], "responses": { "204": { "description": "The maintenance window was deleted successfully." }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "405": { "description": "The maintenance window can't be deleted because it has already ended." }, "429": { "$ref": "#/components/responses/TooManyRequests" } } }, "put": { "x-pd-requires-scope": "services.write", "tags": [ "Maintenance Windows" ], "operationId": "updateMaintenanceWindow", "description": "Update an existing maintenance window.\n\nA Maintenance Window is used to temporarily disable one or more Services for a set period of time.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#maintenance-windows)\n\nScoped OAuth requires: `services.write`\n", "summary": "Update a maintenance window", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "maintenance_window": { "$ref": "#/components/schemas/MaintenanceWindow" } }, "required": [ "maintenance_window" ] }, "examples": { "request": { "summary": "Request Example", "value": { "maintenance_window": { "type": "maintenance_window", "start_time": "2015-11-09T20:00:00-05:00", "end_time": "2015-11-09T22:00:00-05:00", "description": "Immanentizing the eschaton", "services": [ { "id": "PIJ90N7", "type": "service_reference" } ] } } } } } }, "description": "The maintenance window to be updated." }, "responses": { "200": { "description": "The maintenance window that was updated.", "content": { "application/json": { "schema": { "type": "object", "properties": { "maintenance_window": { "$ref": "#/components/schemas/MaintenanceWindow" } }, "required": [ "maintenance_window" ] }, "examples": { "response": { "summary": "Response Example", "value": { "maintenance_window": { "id": "PW98YIO", "type": "maintenance_window", "summary": "Immanentizing the eschaton", "self": "https://api.pagerduty.com/maintenance_windows/PW98YIO", "html_url": "https://subdomain.pagerduty.com/service-directory/maintenance-windows/PW98YIO", "sequence_number": 1, "start_time": "2015-11-09T20:00:00-05:00", "end_time": "2015-11-09T22:00:00-05:00", "description": "Immanentizing the eschaton", "services": [ { "id": "PIJ90N7", "type": "service_reference", "summary": "My Mail Service", "self": "https://api.pagerduty.com/services/PIJ90N7", "html_url": "https://subdomain.pagerduty.com/service-directory/PIJ90N7" } ], "teams": [ { "id": "PQ9K7I8", "type": "team_reference", "summary": "Engineering", "self": "https://api.pagerduty.com/teams/PQ9K7I8", "html_url": "https://subdomain.pagerduty.com/teams/PQ9K7I8" } ], "created_by": { "id": "PXPGF42", "type": "user_reference", "summary": "Earline Greenholt", "self": "https://api.pagerduty.com/users/PXPGF42", "html_url": "https://subdomain.pagerduty.com/users/PXPGF42" } } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } } }, "/notifications": { "description": "List notifications that have been delivered to responders.", "get": { "x-pd-requires-scope": "users:notifications.read", "tags": [ "Notifications" ], "operationId": "listNotifications", "description": "List notifications for a given time range, optionally filtered by type (sms_notification, email_notification, phone_notification, or push_notification).\n\nA Notification is created when an Incident is triggered or escalated.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#notifications)\n\nScoped OAuth requires: `users:notifications.read`\n", "summary": "List notifications", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/offset_limit" }, { "$ref": "#/components/parameters/offset_offset" }, { "$ref": "#/components/parameters/offset_total" }, { "$ref": "#/components/parameters/time_zone" }, { "$ref": "#/components/parameters/since_notifications" }, { "$ref": "#/components/parameters/until_notifications" }, { "$ref": "#/components/parameters/filter_notifications" }, { "$ref": "#/components/parameters/include_notifications" } ], "responses": { "200": { "description": "A paginated array of notifications.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/Pagination" }, { "type": "object", "properties": { "notifications": { "type": "array", "items": { "$ref": "#/components/schemas/Notification" } } }, "required": [ "notifications" ] } ] }, "examples": { "response": { "summary": "Response Example", "value": { "notifications": [ { "id": "PWL7QXS", "type": "phone_notification", "started_at": "2013-03-06T15:28:51-05:00", "address": "+15555551234", "user": { "id": "PT23IWX", "type": "user_reference", "summary": "Tim Wright", "self": "https://api.pagerduty.com/users/PT23IWX", "html_url": "https://subdomain.pagerduty.com/users/PT23IWX" } }, { "id": "PKN7NBH", "type": "push_notification", "started_at": "2013-03-06T15:28:51-05:00", "user": { "id": "PT23IWX", "type": "user_reference", "summary": "Tim Wright", "self": "https://api.pagerduty.com/users/PT23IWX", "html_url": "https://subdomain.pagerduty.com/users/PT23IWX" } } ], "limit": 100, "offset": 0, "more": false, "total": null } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } } }, "/oncalls": { "description": "List all of the on-call entries within a given time range for a given set of users, escalation policies, and/or schedules. Each on-call entry includes:\n\n- the date/time period for the on-call entry;\n- the escalation policy, rule, and level;\n- the schedule, if the rule targeted a schedule and not a user; and,\n- the user on call for the escalation policy rule during that time.\n", "get": { "tags": [ "On-Calls" ], "x-pd-requires-scope": "oncalls.read", "x-pd-operation-limit": true, "operationId": "listOnCalls", "description": "List the on-call entries during a given time range.\n\nAn on-call represents a contiguous unit of time for which a User will be on call for a given Escalation Policy and Escalation Rules.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#on-calls)\n\nScoped OAuth requires: `oncalls.read`\n\nThis API operation has operation specific rate limits. See the [Rate Limits](https://developer.pagerduty.com/docs/72d3b724589e3-rest-api-rate-limits) page for more information.\n", "summary": "List all of the on-calls", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/time_zone" }, { "$ref": "#/components/parameters/offset_limit" }, { "$ref": "#/components/parameters/offset_offset" }, { "$ref": "#/components/parameters/offset_total" }, { "$ref": "#/components/parameters/include_oncalls" }, { "$ref": "#/components/parameters/user_ids_oncalls" }, { "$ref": "#/components/parameters/escalation_policy_ids_oncalls" }, { "$ref": "#/components/parameters/schedule_ids_oncalls" }, { "$ref": "#/components/parameters/since_oncalls" }, { "$ref": "#/components/parameters/until_oncalls" }, { "$ref": "#/components/parameters/earliest_oncalls" } ], "responses": { "200": { "description": "A paginated array of on-call objects.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/Pagination" }, { "type": "object", "properties": { "oncalls": { "type": "array", "items": { "$ref": "#/components/schemas/Oncall" } } }, "required": [ "oncalls" ] } ] }, "examples": { "response": { "summary": "Response Example", "value": { "oncalls": [ { "user": { "id": "PT23IWX", "type": "user_reference", "summary": "Tim Wright", "self": "https://api.pagerduty.com/users/PT23IWX", "html_url": "https://subdomain.pagerduty.com/users/PT23IWX" }, "schedule": { "id": "PI7DH85", "type": "schedule_reference", "summary": "Daily Engineering Rotation", "self": "https://api.pagerduty.com/schedules/PI7DH85", "html_url": "https://subdomain.pagerduty.com/schedules/PI7DH85" }, "escalation_policy": { "id": "PT20YPA", "type": "escalation_policy_reference", "summary": "Engineering Escalation Policy", "self": "https://api.pagerduty.com/escalation_policies/PT20YPA", "html_url": "https://subdomain.pagerduty.com/escalation_policies/PT20YPA" }, "escalation_level": 2, "start": "2015-03-06T15:28:51-05:00", "end": "2015-03-07T15:28:51-05:00" } ], "limit": 25, "offset": 0, "more": false, "total": null } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } } }, "/paused_incident_reports/alerts": { "description": "Get reporting on Alerts for paused Incident usage", "get": { "x-pd-requires-scope": "incidents.read", "tags": [ "Paused Incident Reports" ], "operationId": "getPausedIncidentReportAlerts", "description": "Returns the 5 most recent alerts that were triggered after being paused and the 5 most recent alerts that were resolved after being paused for a given reporting period (maximum 6 months lookback period). Note: This feature is currently available as part of the Event Intelligence package or Digital Operations plan only.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#paused-incident-reports)\n\nScoped OAuth requires: `incidents.read`\n", "summary": "Get Paused Incident Reporting on Alerts", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/since" }, { "$ref": "#/components/parameters/until" }, { "$ref": "#/components/parameters/paused_incident_reports_service_id" }, { "$ref": "#/components/parameters/paused_incident_reports_suspended_by" } ], "responses": { "200": { "description": "Paused Incident Reporting on Alerts for the Account or scoped to a Service.", "content": { "application/json": { "schema": { "description": "", "type": "object", "properties": { "paused_incident_reporting_alerts": { "type": "object", "description": "A list of the 5 most recent paused Alerts that weere triggered and 5 most recent Alerts that were reesolved before being triggerd.", "properties": { "since": { "type": "string", "description": "The start of the date range over which the report data is represented." }, "until": { "type": "string", "description": "The end of the date range over which the report data is represented." }, "triggered_after_pause_alerts": { "type": "array", "description": "An array of Alerts that were triggered after being paused.", "items": { "properties": { "id": { "type": "string", "description": "The Alert ID" }, "service_id": { "type": "string", "description": "The Alert's Service ID" }, "created_at": { "type": "string", "description": "The date/time the Alert was created" } } } }, "resolved_after_pause_alerts": { "type": "array", "description": "An array of Alerts that were resolved after being paused.", "items": { "properties": { "id": { "type": "string", "description": "The Alert ID" }, "service_id": { "type": "string", "description": "The Alert's Service ID" }, "created_at": { "type": "string", "description": "The date/time the Alert was created" } } } } } } } }, "examples": { "response": { "summary": "Response Example", "value": { "paused_incident_reporting_counts": { "since": "2021-06-01TT13:08:14Z", "until": "2021-08-01T13:08:14Z", "triggered_after_pause_alerts": [ { "id": "PR2P3RW", "service_id": "PPSCXAN", "created_at": "2020-10-18T12:01:11Z" } ], "resolved_after_pause_alerts": [ { "id": "PS2R1RZ", "service_id": "PRS12XW", "created_at": "2020-10-17T02:02:10Z" }, { "id": "PS1S1SX", "service_id": "PRS12XW", "created_at": "2020-10-16T15:02:19Z" } ] } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" }, "500": { "$ref": "#/components/responses/InternalServerError" } } } }, "/paused_incident_reports/counts": { "description": "Get reporting on counts for paused Incident usage", "get": { "x-pd-requires-scope": "incidents.read", "tags": [ "Paused Incident Reports" ], "operationId": "getPausedIncidentReportCounts", "description": "Returns reporting counts for paused Incident usage for a given reporting period (maximum 6 months lookback period). Note: This feature is currently available as part of the Event Intelligence package or Digital Operations plan only.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#paused-incident-reports)\n\nScoped OAuth requires: `incidents.read`\n", "summary": "Get Paused Incident Reporting counts", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/since" }, { "$ref": "#/components/parameters/until" }, { "$ref": "#/components/parameters/paused_incident_reports_service_id" }, { "$ref": "#/components/parameters/paused_incident_reports_suspended_by" } ], "responses": { "200": { "description": "Paused Incident Reporting counts for the Account or scoped to a Service.", "content": { "application/json": { "schema": { "description": "", "type": "object", "properties": { "paused_incident_reporting_counts": { "type": "object", "description": "A representation of Alerts that were paused, triggered after pause, and resolved after pause.", "properties": { "since": { "type": "string", "description": "The start of the date range over which the report data is represented." }, "until": { "type": "string", "description": "The end of the date range over which the report data is represented." }, "paused_count": { "type": "number", "description": "The total number of paused Alerts for the Account or Servce." }, "triggered_after_pause_count": { "type": "number", "description": "The total number of paused Alerts for the Account or Service that were triggerd after being paused (non-transient Alerts)." }, "resolved_after_pause_count": { "type": "number", "description": "The total number of paused Alerts for the Account or Service that were resolved after being paused and not triggered (transient Alerts)." } } } } }, "examples": { "response": { "summary": "Response Example", "value": { "paused_incident_reporting_counts": { "since": "2021-06-01TT13:08:14Z", "until": "2021-08-01T13:08:14Z", "paused_count": 50, "triggered_after_pause_count": 12, "resolved_after_pause_count": 38 } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" }, "500": { "$ref": "#/components/responses/InternalServerError" } } } }, "/priorities": { "description": "List priorities.", "get": { "tags": [ "Priorities" ], "x-pd-requires-scope": "priorities.read", "operationId": "listPriorities", "description": "List existing priorities, in order (most to least severe).\n\nA priority is a label representing the importance and impact of an incident. This feature is only available on Standard and Enterprise plans.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#priorities)\n\nScoped OAuth requires: `priorities.read`\n", "summary": "List priorities", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/offset_limit" }, { "$ref": "#/components/parameters/offset_offset" }, { "$ref": "#/components/parameters/offset_total" } ], "responses": { "200": { "description": "A paginated array of priorities.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/Pagination" }, { "type": "object", "properties": { "priorities": { "type": "array", "items": { "$ref": "#/components/schemas/Priority" } } }, "required": [ "priorities" ] } ] }, "examples": { "response": { "summary": "Response Example", "value": { "priorities": [ { "id": "PSLWBL8", "type": "priority", "summary": "P1", "self": "https://api.pagerduty.com/priorities/PSLWBL8", "name": "P1", "description": "Critical issue that warrants public notification and liaison with executive teams" }, { "id": "P53ZZH5", "type": "priority", "summary": "P2", "self": "https://api.pagerduty.com/priorities/P53ZZH5", "name": "P2", "description": "Critical system issue actively impacting many customers' ability to use the product" }, { "id": "PGE9YCZ", "type": "priority", "summary": "P3", "self": "https://api.pagerduty.com/priorities/PGE9YCZ", "name": "P3", "description": "Stability or minor customer-impacting issues that require immediate attention from service owners" }, { "id": "PVJPWYW", "type": "priority", "summary": "P4", "self": "https://api.pagerduty.com/priorities/PVJPWYW", "name": "P4", "description": "Minor issues requiring action, but not affecting customer ability to use the product" }, { "id": "P81SUUT", "type": "priority", "summary": "P5", "self": "https://api.pagerduty.com/priorities/P81SUUT", "name": "P5", "description": "Cosmetic issues or bugs, not affecting customer ability to use the product" } ], "limit": 25, "offset": 0, "more": false, "total": null } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "402": { "$ref": "#/components/responses/PaymentRequired" }, "403": { "$ref": "#/components/responses/Forbidden" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } } }, "/response_plays": { "description": "List and create response plays.", "get": { "x-pd-requires-scope": "response_plays.read", "deprecated": true, "tags": [ "Response Plays" ], "operationId": "listResponsePlays", "description": "List all of the existing Response Plays.\n\nResponse Plays allow you to create packages of Incident Actions that can be applied during an Incident's life cycle.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#response-plays)\n\nWhen using a Global API token, the `From` header is required.\n\nScoped OAuth requires: `response_plays.read`\n", "summary": "List Response Plays", "parameters": [ { "$ref": "#/components/parameters/query" }, { "$ref": "#/components/parameters/filter_for_manual_run" }, { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/optional_from_header" } ], "responses": { "200": { "description": "The array of Response Plays returned by the query.", "content": { "application/json": { "schema": { "type": "object", "properties": { "response_plays": { "type": "array", "items": { "$ref": "#/components/schemas/ResponsePlay" } } } }, "examples": { "response": { "summary": "Response Example", "value": { "response_plays": [ { "type": "response_play", "team": null, "summary": "An Existing Response Play For Responders", "self": "https://api.pagerduty.com/response_plays/15b4b27e-2448-adf9-c5a5-85382304ff37", "name": "An Existing Response Play For Responders", "id": "15b4b27e-2448-adf9-c5a5-85382304ff37", "html_url": null, "description": "A Response Play that adds responders." }, { "type": "response_play", "team": null, "summary": "An Existing Response Play For Subscribers", "self": "https://api.pagerduty.com/response_plays/15b4b27e-2771-abe5-t6m9-81234304ff37", "name": "An Existing Response Play For Subscribers", "id": "15b4b27e-2771-abe5-t6m9-81234304ff37", "html_url": null, "description": "A Response Play that adds subscribers." } ], "limit": null, "offset": null, "total": 2, "more": false } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" } } }, "post": { "deprecated": true, "x-pd-requires-scope": "response_plays.write", "tags": [ "Response Plays" ], "operationId": "createResponsePlay", "description": "Creates a new Response Plays.\n\nResponse Plays allow you to create packages of Incident Actions that can be applied during an Incident's life cycle.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#response-plays)\n\nScoped OAuth requires: `response_plays.write`\n", "summary": "Create a Response Play", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/from_header" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "response_play": { "$ref": "#/components/schemas/ResponsePlay" } }, "required": [ "response_play" ] }, "examples": { "Example1": { "summary": "Create a Response Play which adds a Escalation Policy and User to an incident when the response play is run", "value": { "response_play": { "type": "response_play", "team": null, "name": "Standard NOC-EP", "description": "A Response Play to add NOC EP on Run", "subscribers": [], "subscribers_message": null, "responders": [ { "type": "user_reference", "id": "PROW72A", "summary": "our team stakeholder" }, { "type": "escalation_policy_reference", "id": "P12TU3X", "summary": "Network Center Escalation Policy" } ], "responders_message": "NOC-EP", "runnability": "services" } } }, "Example2": { "summary": "Add a static conference url to an incident when the response play is run", "value": { "response_play": { "type": "response_play", "name": "Basic Fixed URL", "description": "preset conference url", "runnability": "services", "conference_url": "https://my.conference.com/our_team/123" } } } } } }, "description": "The Response Play to be created." }, "responses": { "201": { "description": "The Response Play that was created.", "content": { "application/json": { "schema": { "type": "object", "properties": { "response_play": { "$ref": "#/components/schemas/ResponsePlay" } } }, "examples": { "response": { "summary": "Response Example", "value": { "response_play": { "type": "response_play", "team": null, "summary": "A New Response Play", "subscribers_message": "Please view the attached incident.", "subscribers": [ { "type": "user_reference", "summary": null, "self": "https://api.pagerduty.com/users/PSEJLIN", "id": "PSEJLIN", "html_url": null }, { "type": "team_reference", "summary": null, "self": "https://api.pagerduty.com/teams/P12TU3X", "id": "P12TU3X", "html_url": null } ], "self": "https://api.pagerduty.com/response_plays/15b4b27e-2448-adf9-c5a5-85382304ff37", "runnability": "services", "responders_message": "We need executive attention on this incident.", "responders": [ { "type": "user_reference", "summary": null, "self": "https://api.pagerduty.com/users/PZOW51A", "id": "PZOW51A", "html_url": null } ], "name": "A New Response Play", "id": "15b4b27e-2448-adf9-c5a5-85382304ff37", "html_url": null, "description": "A Response Play that adds subscribers and responders", "conference_url": null, "conference_number": null } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" } } } }, "/response_plays/{id}": { "description": "Manage a Response Play.", "get": { "deprecated": true, "x-pd-requires-scope": "response_plays.read", "tags": [ "Response Plays" ], "operationId": "getResponsePlay", "description": "Get details about an existing Response Play.\n\nResponse Plays allow you to create packages of Incident Actions that can be applied during an Incident's life cycle.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#response-plays)\n\nWhen using a Global API token, the `From` header is required.\nScoped OAuth requires: `response_plays.read`\n", "summary": "Get a Response Play", "parameters": [ { "$ref": "#/components/parameters/id" }, { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/optional_from_header" } ], "responses": { "200": { "description": "The Response Play requested.", "content": { "application/json": { "schema": { "type": "object", "properties": { "response_play": { "$ref": "#/components/schemas/ResponsePlay" } } }, "examples": { "response": { "summary": "Response Example", "value": { "response_play": { "type": "response_play", "team": null, "summary": "Email Service Response Play", "subscribers_message": null, "subscribers": null, "self": "https://api.pagerduty.com/response_plays/15b4b27e-2448-adf9-c5a5-85382304ff37", "runnability": "services", "responders_message": null, "responders": [ { "type": "escalation_policy_reference", "summary": null, "self": "https://api.pagerduty.com/escalation_policies/PZOW51A", "id": "PZOW51A", "html_url": null } ], "name": "Email Service Response Play", "id": "15b4b27e-2448-adf9-c5a5-85382304ff37", "html_url": null, "description": null, "conference_url": null, "conference_number": null } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" } } }, "put": { "deprecated": true, "x-pd-requires-scope": "response_plays.write", "tags": [ "Response Plays" ], "operationId": "updateResponsePlay", "description": "Updates an existing Response Play.\n\nResponse Plays allow you to create packages of Incident Actions that can be applied during an Incident's life cycle.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#response-plays)\n\nScoped OAuth requires: `response_plays.write`\n", "summary": "Update a Response Play", "parameters": [ { "$ref": "#/components/parameters/id" }, { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/from_header" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "response_play": { "$ref": "#/components/schemas/ResponsePlay" } }, "required": [ "response_play" ] }, "examples": { "request": { "summary": "Request Example", "value": { "response_play": { "type": "response_play", "team": null, "summary": "Test Response Play", "subscribers_message": "Please view the attached incident.", "subscribers": [ { "type": "user_reference", "id": "PFS9QZZ" } ], "self": "https://api.pagerduty.com/response_plays/153d9e1f-9008-ee4e-fa70-0d70cdf92f27", "runnability": "responders", "responders_message": null, "responders": [], "name": "Test Response Play", "id": "153d9e1f-9008-ee4e-fa70-0d70cdf92f27", "html_url": null, "description": "An updated description of this Response Play.", "conference_url": null, "conference_number": null } } } } } }, "description": "The Response Play to be updated." }, "responses": { "200": { "description": "The Response Play that was updated.", "content": { "application/json": { "schema": { "type": "object", "properties": { "response_play": { "$ref": "#/components/schemas/ResponsePlay" } } }, "examples": { "response": { "summary": "Response Example", "value": { "response_play": { "type": "response_play", "team": null, "summary": "Test Response Play", "subscribers_message": "Please view the attached incident.", "subscribers": [ { "type": "user_reference", "summary": null, "self": "https://api.pagerduty.com/users/PFS9QZZ", "id": "PFS9QZZ", "html_url": null } ], "self": "https://api.pagerduty.com/response_plays/153d9e1f-9008-ee4e-fa70-0d70cdf92f27", "runnability": "services", "responders_message": null, "responders": [], "name": "Test Response Play", "id": "153d9e1f-9008-ee4e-fa70-0d70cdf92f27", "html_url": null, "description": null, "conference_url": null, "conference_number": null } } } } } } }, "401": { "$ref": "#/components/responses/Unauthorized" }, "402": { "$ref": "#/components/responses/PaymentRequired" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" } } }, "delete": { "deprecated": true, "x-pd-requires-scope": "response_plays.write", "tags": [ "Response Plays" ], "operationId": "deleteResponsePlay", "description": "Delete an existing Response Play. Once the Response Play is deleted, the action cannot be undone.\n\nWARNING: When the Response Play is deleted, it is also removed from any Services that were using it.\n\nResponse Plays allow you to create packages of Incident Actions that can be applied to an Incident.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#response-plays)\n\nScoped OAuth requires: `response_plays.write`\n", "summary": "Delete a Response Play", "parameters": [ { "$ref": "#/components/parameters/id" }, { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/from_header" } ], "responses": { "204": { "description": "The Response Play was deleted successfully." }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" } } } }, "/response_plays/{response_play_id}/run": { "description": "Run response plays.", "post": { "x-pd-requires-scope": "response_plays.write", "deprecated": true, "tags": [ "Response Plays" ], "operationId": "runResponsePlay", "description": "Run a specified response play on a given incident.\n\nResponse Plays are a package of Incident Actions that can be applied during an Incident's life cycle.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#response-plays)\n\nScoped OAuth requires: `response_plays.write`\n", "summary": "Run a response play", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/response_play_id" }, { "$ref": "#/components/parameters/from_header" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "incident": { "$ref": "#/components/schemas/IncidentReference" } }, "required": [ "incident" ] }, "examples": { "request": { "summary": "Request Example", "value": { "incident": { "id": "PWL7QXS", "type": "incident_reference" } } } } } } }, "responses": { "200": { "description": "Informs the user if the response play has been run successfully.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" } }, "required": [ "status" ] }, "examples": { "response": { "summary": "Response Example", "value": { "status": "ok" } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "403": { "$ref": "#/components/responses/Forbidden" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } } }, "/rulesets": { "description": "Create, list, update and delete Rulesets.", "get": { "x-pd-requires-scope": "event_rules.read", "tags": [ "Rulesets" ], "operationId": "listRulesets", "description": "List all Rulesets\n\n> ### End-of-life\n> Rulesets and Event Rules will end-of-life soon. We highly recommend that you [migrate to Event Orchestration](https://support.pagerduty.com/docs/migrate-to-event-orchestration) as soon as possible so you can take advantage of the new functionality, such as improved UI, rule creation, APIs and Terraform support, advanced conditions, and rule nesting.\n\nRulesets allow you to route events to an endpoint and create collections of Event Rules, which define sets of actions to take based on event content.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#rulesets)\n\nScoped OAuth requires: `event_rules.read`\n", "summary": "List Rulesets", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/offset_limit" }, { "$ref": "#/components/parameters/offset_offset" }, { "$ref": "#/components/parameters/offset_total" } ], "responses": { "200": { "description": "A paginated array of Ruleset objects.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/Pagination" }, { "type": "object", "properties": { "rulesets": { "type": "array", "items": { "$ref": "#/components/schemas/Ruleset" } } } } ] }, "examples": { "response": { "summary": "Response Example", "value": { "rulesets": [ { "id": "0e84de00-9511-4380-9f4f-a7b568bb49a0", "name": "MySQL Clusters", "type": "global", "routing_keys": [ "R0212P1QXGEIQE2NMTQ7L7WXD00DWHIN" ], "self": "https://api.pagerduty.com/rulesets/0e84de00-9511-4380-9f4f-a7b568bb49a0", "created_at": "2019-12-24T21:18:52Z", "creator": { "type": "user_reference", "self": "https://api.pagerduty.com/users/PABO808", "id": "PABO808" }, "updated_at": "2019-12-25T14:54:23Z", "updater": { "type": "user_reference", "self": "https://api.pagerduty.com/users/PABO808", "id": "PABO808" }, "team": { "type": "team_reference", "self": "https://api.pagerduty.com/teams/P3ZQXDF", "id": "P3ZQXDF" } } ], "limit": 25, "offset": 0, "more": false, "total": null } } } } } }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" } } }, "post": { "x-pd-requires-scope": "event_rules.write", "tags": [ "Rulesets" ], "operationId": "createRuleset", "description": "Create a new Ruleset.\n\n> ### End-of-life\n> Rulesets and Event Rules will end-of-life soon. We highly recommend that you [migrate to Event Orchestration](https://support.pagerduty.com/docs/migrate-to-event-orchestration) as soon as possible so you can take advantage of the new functionality, such as improved UI, rule creation, APIs and Terraform support, advanced conditions, and rule nesting.\n\nRulesets allow you to route events to an endpoint and create collections of Event Rules, which define sets of actions to take based on event content.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#rulesets)\n\nScoped OAuth requires: `event_rules.write`\n", "summary": "Create a Ruleset", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "ruleset": { "allOf": [ { "$ref": "#/components/schemas/Ruleset" }, { "type": "object", "required": [ "name" ] } ] } }, "required": [ "ruleset" ] }, "examples": { "request": { "summary": "Request Example", "value": { "ruleset": { "name": "MySQL Clusters", "team": { "id": "PWL7QXS", "type": "team_reference" } } } } } } } }, "responses": { "201": { "description": "The Ruleset that was created.", "content": { "application/json": { "schema": { "type": "object", "properties": { "ruleset": { "$ref": "#/components/schemas/Ruleset" } } }, "examples": { "response": { "summary": "Response Example", "value": { "rulesets": { "id": "0e84de00-9511-4380-9f4f-a7b568bb49a0", "name": "MySQL Clusters", "type": "global", "routing_keys": [ "R0212P1QXGEIQE2NMTQ7L7WXD00DWHIN" ], "self": "https://api.pagerduty.com/rulesets/0e84de00-9511-4380-9f4f-a7b568bb49a0", "created_at": "2019-12-24T21:18:52Z", "creator": { "type": "user_reference", "self": "https://api.pagerduty.com/users/PABO808", "id": "PABO808" }, "updated_at": "2019-12-25T14:54:23Z", "updater": { "type": "user_reference", "self": "https://api.pagerduty.com/users/PABO808", "id": "PABO808" }, "team": { "type": "team_reference", "self": "https://api.pagerduty.com/teams/P3ZQXDF", "id": "P3ZQXDF" } } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" } } } }, "/rulesets/{id}": { "description": "Manage Rulesets.", "get": { "x-pd-requires-scope": "event_rules.read", "tags": [ "Rulesets" ], "operationId": "getRuleset", "description": "Get a Ruleset.\n\n> ### End-of-life\n> Rulesets and Event Rules will end-of-life soon. We highly recommend that you [migrate to Event Orchestration](https://support.pagerduty.com/docs/migrate-to-event-orchestration) as soon as possible so you can take advantage of the new functionality, such as improved UI, rule creation, APIs and Terraform support, advanced conditions, and rule nesting.\n\nRulesets allow you to route events to an endpoint and create collections of Event Rules, which define sets of actions to take based on event content.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#rulesets)\n\nScoped OAuth requires: `event_rules.read`\n", "summary": "Get a Ruleset", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" } ], "responses": { "200": { "description": "The Ruleset object.", "content": { "application/json": { "schema": { "type": "object", "properties": { "ruleset": { "$ref": "#/components/schemas/Ruleset" } } }, "examples": { "response": { "summary": "Response Example", "value": { "ruleset": { "id": "0e84de00-9511-4380-9f4f-a7b568bb49a0", "name": "MySQL Clusters", "type": "global", "routing_keys": [ "R0212P1QXGEIQE2NMTQ7L7WXD00DWHIN" ], "self": "https://api.pagerduty.com/rulesets/0e84de00-9511-4380-9f4f-a7b568bb49a0", "created_at": "2019-12-24T21:18:52Z", "creator": { "type": "user_reference", "self": "https://api.pagerduty.com/users/PABO808", "id": "PABO808" }, "updated_at": "2019-12-25T14:54:23Z", "updater": { "type": "user_reference", "self": "https://api.pagerduty.com/users/PABO808", "id": "PABO808" }, "team": { "type": "team_reference", "self": "https://api.pagerduty.com/teams/P3ZQXDF", "id": "P3ZQXDF" } } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" } } }, "put": { "x-pd-requires-scope": "event_rules.write", "tags": [ "Rulesets" ], "operationId": "updateRuleset", "description": "Update a Ruleset.\n\n> ### End-of-life\n> Rulesets and Event Rules will end-of-life soon. We highly recommend that you [migrate to Event Orchestration](https://support.pagerduty.com/docs/migrate-to-event-orchestration) as soon as possible so you can take advantage of the new functionality, such as improved UI, rule creation, APIs and Terraform support, advanced conditions, and rule nesting.\n\nRulesets allow you to route events to an endpoint and create collections of Event Rules, which define sets of actions to take based on event content.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#rulesets)\n\nScoped OAuth requires: `event_rules.write`\n", "summary": "Update a Ruleset", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "ruleset": { "$ref": "#/components/schemas/Ruleset" } }, "required": [ "ruleset" ] }, "examples": { "change_name": { "summary": "Example: Change name", "value": { "ruleset": { "name": "MySQL Clusters" } } }, "change_team": { "summary": "Example: Change team", "value": { "ruleset": { "team": { "id": "PWL7QXS", "type": "team_reference" } } } } } } } }, "responses": { "200": { "description": "The Ruleset that was updated.", "content": { "application/json": { "schema": { "type": "object", "properties": { "ruleset": { "$ref": "#/components/schemas/Ruleset" } } }, "examples": { "response": { "summary": "Response Example", "value": { "rulesets": { "id": "0e84de00-9511-4380-9f4f-a7b568bb49a0", "name": "MySQL Clusters", "type": "global", "routing_keys": [ "R0212P1QXGEIQE2NMTQ7L7WXD00DWHIN" ], "self": "https://api.pagerduty.com/rulesets/0e84de00-9511-4380-9f4f-a7b568bb49a0", "created_at": "2019-12-24T21:18:52Z", "creator": { "type": "user_reference", "self": "https://api.pagerduty.com/users/PABO808", "id": "PABO808" }, "updated_at": "2019-12-25T14:54:23Z", "updater": { "type": "user_reference", "self": "https://api.pagerduty.com/users/PABO808", "id": "PABO808" }, "team": { "type": "team_reference", "self": "https://api.pagerduty.com/teams/P3ZQXDF", "id": "P3ZQXDF" } } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "405": { "$ref": "#/components/responses/NotAllowed" }, "409": { "$ref": "#/components/responses/Conflict" } } }, "delete": { "x-pd-requires-scope": "event_rules.write", "tags": [ "Rulesets" ], "operationId": "deleteRuleset", "description": "Delete a Ruleset.\n\n> ### End-of-life\n> Rulesets and Event Rules will end-of-life soon. We highly recommend that you [migrate to Event Orchestration](https://support.pagerduty.com/docs/migrate-to-event-orchestration) as soon as possible so you can take advantage of the new functionality, such as improved UI, rule creation, APIs and Terraform support, advanced conditions, and rule nesting.\n\nRulesets allow you to route events to an endpoint and create collections of Event Rules, which define sets of actions to take based on event content.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#rulesets)\n\nScoped OAuth requires: `event_rules.write`\n", "summary": "Delete a Ruleset", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" } ], "responses": { "204": { "description": "The Ruleset was deleted successfully." }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "405": { "$ref": "#/components/responses/NotAllowed" }, "409": { "$ref": "#/components/responses/Conflict" } } } }, "/rulesets/{id}/rules": { "description": "Create, list, update and delete Event Rules.", "get": { "x-pd-requires-scope": "event_rules.read", "tags": [ "Rulesets" ], "operationId": "listRulesetEventRules", "description": "List all Event Rules on a Ruleset.\n\n> ### End-of-life\n> Rulesets and Event Rules will end-of-life soon. We highly recommend that you [migrate to Event Orchestration](https://support.pagerduty.com/docs/migrate-to-event-orchestration) as soon as possible so you can take advantage of the new functionality, such as improved UI, rule creation, APIs and Terraform support, advanced conditions, and rule nesting.\n\nRulesets allow you to route events to an endpoint and create collections of Event Rules, which define sets of actions to take based on event content.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#rulesets)\n\nNote: Create and Update on rules will accept 'description' or 'summary' interchangeably as an extraction action target. Get and List on rules will always return 'summary' as the target. If you are expecting 'description' please change your automation code to expect 'summary' instead.\n\nScoped OAuth requires: `event_rules.read`\n", "summary": "List Event Rules", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/offset_limit" }, { "$ref": "#/components/parameters/offset_offset" }, { "$ref": "#/components/parameters/offset_total" }, { "$ref": "#/components/parameters/id" } ], "responses": { "200": { "description": "A paginated array of Event Rule objects.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/Pagination" }, { "type": "object", "properties": { "rules": { "type": "array", "description": "The paginated list of rules of the Ruleset.", "items": { "$ref": "#/components/schemas/EventRule" } } } } ] }, "examples": { "response": { "summary": "Response Example", "value": { "rules": [ { "id": "14e56445-ebab-4dd0-ba9d-fc28a41b7e7b", "position": 0, "disabled": false, "catch_all": false, "self": "https://api.pagerduty.com/rulesets/0e84de00-9511-4380-9f4f-a7b568bb49a0/rules/14e56445-ebab-4dd0-ba9d-fc28a41b7e7b", "conditions": { "operator": "and", "subconditions": [ { "operator": "contains", "parameters": { "value": "mysql", "path": "details.host" } } ] }, "time_frame": { "active_between": { "start_time": 1577880000000, "end_time": 1580558400000 } }, "actions": { "annotate": { "value": "This incident was created by a Global Event Rule" }, "route": { "value": "PI2KBWI" }, "priority": { "value": "PCMUB6F" }, "severity": { "value": "warning" }, "extractions": [ { "target": "dedup_key", "source": "details.error_summary", "regex": "Host (.*) is experiencing errors" } ] } }, { "id": "0d819a5a-b714-4bae-9333-dc73ea0daefb", "position": 1, "disabled": false, "catch_all": true, "self": "https://api.pagerduty.com/rulesets/0e84de00-9511-4380-9f4f-a7b568bb49a0/rules/0d819a5a-b714-4bae-9333-dc73ea0daefb", "actions": { "suppress": { "value": true }, "severity": null, "route": null, "priority": null, "extractions": [], "event_action": null, "annotate": null } } ], "limit": 25, "offset": 0, "more": false, "total": null } } } } } }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" } } }, "post": { "x-pd-requires-scope": "event_rules.write", "tags": [ "Rulesets" ], "operationId": "createRulesetEventRule", "description": "Create a new Event Rule.\n\n> ### End-of-life\n> Rulesets and Event Rules will end-of-life soon. We highly recommend that you [migrate to Event Orchestration](https://support.pagerduty.com/docs/migrate-to-event-orchestration) as soon as possible so you can take advantage of the new functionality, such as improved UI, rule creation, APIs and Terraform support, advanced conditions, and rule nesting.\n\nRulesets allow you to route events to an endpoint and create collections of Event Rules, which define sets of actions to take based on event content.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#rulesets)\n\nNote: Create and Update on rules will accept 'description' or 'summary' interchangeably as an extraction action target. Get and List on rules will always return 'summary' as the target. If you are expecting 'description' please change your automation code to expect 'summary' instead.\n\nScoped OAuth requires: `event_rules.write`\n", "summary": "Create an Event Rule", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "rule": { "$ref": "#/components/schemas/EventRule" } }, "required": [ "rule" ] }, "examples": { "request": { "summary": "Request Example", "value": { "rule": { "id": "14e56445-ebab-4dd0-ba9d-fc28a41b7e7b", "position": 0, "disabled": false, "catch_all": false, "conditions": { "operator": "and", "subconditions": [ { "operator": "contains", "parameters": { "value": "mysql", "path": "details.host" } } ] }, "time_frame": { "active_between": { "start_time": 1577880000000, "end_time": 1580558400000 } }, "actions": { "annotate": { "value": "This incident was created by a Global Event Rule" }, "route": { "value": "PI2KBWI" }, "priority": { "value": "PCMUB6F" }, "severity": { "value": "warning" }, "extractions": [ { "target": "dedup_key", "source": "details.error_summary", "regex": "Host (.*) is experiencing errors" } ] } } } } } } } }, "responses": { "201": { "description": "The Event Rule that was created.", "content": { "application/json": { "schema": { "type": "object", "properties": { "rule": { "$ref": "#/components/schemas/EventRule" } } }, "examples": { "response": { "summary": "Response Example", "value": { "ruleset": { "id": "14e56445-ebab-4dd0-ba9d-fc28a41b7e7b", "position": 0, "disabled": false, "catch_all": false, "self": "https://api.pagerduty.com/rulesets/0e84de00-9511-4380-9f4f-a7b568bb49a0/rules/14e56445-ebab-4dd0-ba9d-fc28a41b7e7b", "conditions": { "operator": "and", "subconditions": [ { "operator": "contains", "parameters": { "value": "mysql", "path": "details.host" } } ] }, "time_frame": { "active_between": { "start_time": 1577880000000, "end_time": 1580558400000 } }, "actions": { "annotate": { "value": "This incident was created by a Global Event Rule" }, "route": { "value": "PI2KBWI" }, "priority": { "value": "PCMUB6F" }, "severity": { "value": "warning" }, "extractions": [ { "target": "dedup_key", "source": "details.error_summary", "regex": "Host (.*) is experiencing errors" } ] } } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" } } } }, "/rulesets/{id}/rules/{rule_id}": { "description": "Manage Event Rules.", "get": { "x-pd-requires-scope": "event_rules.read", "tags": [ "Rulesets" ], "operationId": "getRulesetEventRule", "description": "Get an Event Rule.\n\n> ### End-of-life\n> Rulesets and Event Rules will end-of-life soon. We highly recommend that you [migrate to Event Orchestration](https://support.pagerduty.com/docs/migrate-to-event-orchestration) as soon as possible so you can take advantage of the new functionality, such as improved UI, rule creation, APIs and Terraform support, advanced conditions, and rule nesting.\n\nRulesets allow you to route events to an endpoint and create collections of Event Rules, which define sets of actions to take based on event content.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#rulesets)\n\nNote: Create and Update on rules will accept 'description' or 'summary' interchangeably as an extraction action target. Get and List on rules will always return 'summary' as the target. If you are expecting 'description' please change your automation code to expect 'summary' instead.\n\nScoped OAuth requires: `event_rules.read`\n", "summary": "Get an Event Rule", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" }, { "$ref": "#/components/parameters/rule_id" } ], "responses": { "200": { "description": "The Event Rule object.", "content": { "application/json": { "schema": { "type": "object", "properties": { "rule": { "$ref": "#/components/schemas/EventRule" } } }, "examples": { "response": { "summary": "Response Example", "value": { "rule": { "id": "14e56445-ebab-4dd0-ba9d-fc28a41b7e7b", "position": 0, "disabled": false, "catch_all": false, "self": "https://api.pagerduty.com/rulesets/0e84de00-9511-4380-9f4f-a7b568bb49a0/rules/14e56445-ebab-4dd0-ba9d-fc28a41b7e7b", "conditions": { "operator": "and", "subconditions": [ { "operator": "contains", "parameters": { "value": "mysql", "path": "details.host" } } ] }, "time_frame": { "active_between": { "start_time": 1577880000000, "end_time": 1580558400000 } }, "actions": { "annotate": { "value": "This incident was created by a Global Event Rule" }, "route": { "value": "PI2KBWI" }, "priority": { "value": "PCMUB6F" }, "severity": { "value": "warning" }, "extractions": [ { "target": "dedup_key", "template": "{{error_level}} error on host {{host}}" } ] }, "variables": [ { "name": "error_level", "type": "regex", "parameters": { "value": ".*error level is (\\w+)\\.", "path": "payload.summary" } }, { "name": "host", "type": "regex", "parameters": { "value": "(.*)-USW2", "path": "payload.host.human_name" } } ] } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" } } }, "put": { "x-pd-requires-scope": "event_rules.write", "tags": [ "Rulesets" ], "operationId": "updateRulesetEventRule", "summary": "Update an Event Rule", "description": "Update an Event Rule. Note that the endpoint supports partial updates, so any number of the writable fields can be provided.\n\n> ### End-of-life\n> Rulesets and Event Rules will end-of-life soon. We highly recommend that you [migrate to Event Orchestration](https://support.pagerduty.com/docs/migrate-to-event-orchestration) as soon as possible so you can take advantage of the new functionality, such as improved UI, rule creation, APIs and Terraform support, advanced conditions, and rule nesting.\n\nRulesets allow you to route events to an endpoint and create collections of Event Rules, which define sets of actions to take based on event content.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#rulesets)\n\nNote: Create and Update on rules will accept 'description' or 'summary' interchangeably as an extraction action target. Get and List on rules will always return 'summary' as the target. If you are expecting 'description' please change your automation code to expect 'summary' instead.\n\nScoped OAuth requires: `event_rules.write`\n", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" }, { "$ref": "#/components/parameters/rule_id" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "rule": { "$ref": "#/components/schemas/EventRule" }, "rule_id": { "description": "The id of the Event Rule to update.", "type": "string" } }, "required": [ "rule_id" ] }, "examples": { "suppress_action": { "summary": "Example: Enable suppress action", "value": { "rule_id": "7123bdd1-74e8-4aa7-aa38-4a9ebe123456", "rule": { "actions": { "suppress": { "value": true } } } } }, "disable_rule": { "summary": "Example: Disable rule", "value": { "rule_id": "7123bdd1-74e8-4aa7-aa38-4a9ebe123456", "rule": { "disabled": true, "actions": { "suppress": { "value": true } } } } } } } } }, "responses": { "200": { "description": "The Event Rule that was updated.", "content": { "application/json": { "schema": { "type": "object", "properties": { "rule": { "$ref": "#/components/schemas/EventRule" } } }, "examples": { "response": { "summary": "Response Example", "value": { "rule": { "id": "14e56445-ebab-4dd0-ba9d-fc28a41b7e7b", "position": 0, "disabled": false, "catch_all": false, "self": "https://api.pagerduty.com/rulesets/0e84de00-9511-4380-9f4f-a7b568bb49a0/rules/14e56445-ebab-4dd0-ba9d-fc28a41b7e7b", "conditions": { "operator": "and", "subconditions": [ { "operator": "contains", "parameters": { "value": "mysql", "path": "details.host" } } ] }, "time_frame": { "active_between": { "start_time": 1577880000000, "end_time": 1580558400000 } }, "actions": { "annotate": { "value": "This incident was created by a Global Event Rule" }, "route": { "value": "PI2KBWI" }, "priority": { "value": "PCMUB6F" }, "severity": { "value": "warning" }, "extractions": [ { "target": "dedup_key", "source": "details.error_summary", "regex": "Host (.*) is experiencing errors" } ] } } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "405": { "$ref": "#/components/responses/NotAllowed" }, "409": { "$ref": "#/components/responses/Conflict" } } }, "delete": { "x-pd-requires-scope": "event_rules.write", "tags": [ "Rulesets" ], "operationId": "deleteRulesetEventRule", "description": "Delete an Event Rule.\n\n> ### End-of-life\n> Rulesets and Event Rules will end-of-life soon. We highly recommend that you [migrate to Event Orchestration](https://support.pagerduty.com/docs/migrate-to-event-orchestration) as soon as possible so you can take advantage of the new functionality, such as improved UI, rule creation, APIs and Terraform support, advanced conditions, and rule nesting.\n\nRulesets allow you to route events to an endpoint and create collections of Event Rules, which define sets of actions to take based on event content.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#rulesets)\n\nScoped OAuth requires: `event_rules.write`\n", "summary": "Delete an Event Rule", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" }, { "$ref": "#/components/parameters/rule_id" } ], "responses": { "204": { "description": "The Event Rule was deleted successfully." }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "405": { "$ref": "#/components/responses/NotAllowed" }, "409": { "$ref": "#/components/responses/Conflict" } } } }, "/schedules": { "description": "List and create on-call schedules.", "get": { "tags": [ "Schedules" ], "x-pd-requires-scope": "schedules.read", "operationId": "listSchedules", "description": "List the on-call schedules.\n\nA Schedule determines the time periods that users are On-Call.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#schedules)\n\nScoped OAuth requires: `schedules.read`\n", "summary": "List schedules", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/offset_limit" }, { "$ref": "#/components/parameters/offset_offset" }, { "$ref": "#/components/parameters/offset_total" }, { "$ref": "#/components/parameters/query" }, { "$ref": "#/components/parameters/include_schedules" }, { "$ref": "#/components/parameters/schedule_list_time_zone" } ], "responses": { "200": { "description": "A paginated array of schedule objects.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/Pagination" }, { "type": "object", "properties": { "schedules": { "type": "array", "items": { "$ref": "#/components/schemas/Schedule" } } }, "required": [ "schedules" ] } ] }, "examples": { "Basic Example": { "value": { "schedules": [ { "id": "PI7DH85", "type": "schedule", "summary": "Daily Engineering Rotation", "self": "https://api.pagerduty.com/schedules/PI7DH85", "html_url": "https://subdomain.pagerduty.com/schedules/PI7DH85", "name": "Daily Engineering Rotation", "time_zone": "America/New_York", "description": "Rotation schedule for engineering", "escalation_policies": [ { "id": "PT20YPA", "type": "escalation_policy_reference", "summary": "Another Escalation Policy", "self": "https://api.pagerduty.com/escalation_policies/PT20YPA", "html_url": "https://subdomain.pagerduty.com/escalation_policies/PT20YPA" } ], "users": [ { "id": "PEYSGVF", "type": "user_reference", "summary": "PagerDuty Admin", "self": "https://api.pagerduty.com/users/PEYSGVF", "html_url": "https://subdomain.pagerduty.com/users/PEYSGVF" } ] } ], "limit": 100, "offset": 0, "more": false, "total": null } }, "With Schedule Layers": { "summary": "With Schedule Layers Included", "value": { "schedules": [ { "id": "PI7DH85", "type": "schedule", "summary": "Daily Engineering Rotation", "self": "https://api.pagerduty.com/schedules/PI7DH85", "html_url": "https://subdomain.pagerduty.com/schedules/PI7DH85", "name": "Daily Engineering Rotation", "time_zone": "America/New_York", "description": "Rotation schedule for engineering", "escalation_policies": [ { "id": "PT20YPA", "type": "escalation_policy_reference", "summary": "Another Escalation Policy", "self": "https://api.pagerduty.com/escalation_policies/PT20YPA", "html_url": "https://subdomain.pagerduty.com/escalation_policies/PT20YPA" } ], "users": [ { "id": "PEYSGVF", "type": "user_reference", "summary": "PagerDuty Admin", "self": "https://api.pagerduty.com/users/PEYSGVF", "html_url": "https://subdomain.pagerduty.com/users/PEYSGVF" } ], "schedule_layers": [ { "name": "Night Shift", "start": "2015-11-06T20:00:00-05:00", "end": "2016-11-06T20:00:00-05:00", "rotation_virtual_start": "2015-11-06T20:00:00-05:00", "rotation_turn_length_seconds": 86400, "users": [ { "user": { "id": "PEYSGVF", "type": "user_reference", "summary": "PagerDuty Admin", "self": "https://api.pagerduty.com/users/PEYSGVF", "html_url": "https://subdomain.pagerduty.com/users/PEYSGVF" } } ], "restrictions": [ { "type": "daily_restriction", "start_time_of_day": "08:00:00", "duration_seconds": 32400 } ] } ] } ], "limit": 100, "offset": 0, "more": false, "total": null } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } }, "post": { "tags": [ "Schedules" ], "x-pd-requires-scope": "schedules.write", "operationId": "createSchedule", "description": "Create a new on-call schedule.\n\nA Schedule determines the time periods that users are On-Call.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#schedules)\n\nScoped OAuth requires: `schedules.write`\n", "summary": "Create a schedule", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/schedule_overflow" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "schedule": { "$ref": "#/components/schemas/Schedule" } }, "required": [ "schedule" ] }, "examples": { "request": { "summary": "Request Example", "value": { "schedule": { "name": "Daily Engineering Rotation", "type": "schedule", "time_zone": "America/New_York", "description": "Rotation schedule for engineering", "schedule_layers": [ { "name": "Night Shift", "start": "2015-11-06T20:00:00-05:00", "rotation_virtual_start": "2015-11-06T20:00:00-05:00", "rotation_turn_length_seconds": 86400, "users": [ { "user": { "id": "PXPGF42", "type": "user_reference" } } ], "restrictions": [ { "type": "daily_restriction", "start_time_of_day": "08:00:00", "duration_seconds": 32400 } ] } ] } } } } } }, "description": "The schedule to be created." }, "responses": { "201": { "description": "The schedule object created.", "content": { "application/json": { "schema": { "type": "object", "properties": { "schedule": { "$ref": "#/components/schemas/Schedule" } }, "required": [ "schedule" ] }, "examples": { "response": { "summary": "Response Example", "value": { "schedule": { "id": "PI7DH85", "type": "schedule", "summary": "Daily Engineering Rotation", "self": "https://api.pagerduty.com/schedules/PI7DH85", "html_url": "https://subdomain.pagerduty.com/schedules/PI7DH85", "name": "Daily Engineering Rotation", "time_zone": "America/New_York", "description": "Rotation schedule for engineering", "escalation_policies": [ { "id": "PT20YPA", "type": "escalation_policy_reference", "summary": "Another Escalation Policy", "self": "https://api.pagerduty.com/escalation_policies/PT20YPA", "html_url": "https://subdomain.pagerduty.com/escalation_policies/PT20YPA" } ], "users": [ { "id": "PEYSGVF", "type": "user_reference", "summary": "PagerDuty Admin", "self": "https://api.pagerduty.com/users/PEYSGVF", "html_url": "https://subdomain.pagerduty.com/users/PEYSGVF" } ], "teams": [], "schedule_layers": [ { "name": "Layer 1", "rendered_schedule_entries": [], "id": "PG68P1M", "start": "2015-11-06T20:00:00-05:00", "rotation_virtual_start": "2015-11-06T20:00:00-05:00", "rotation_turn_length_seconds": 86400, "users": [ { "user": { "id": "PEYSGVF", "type": "user_reference", "summary": "PagerDuty Admin", "self": "https://api.pagerduty.com/users/PEYSGVF", "html_url": "https://subdomain.pagerduty.com/users/PEYSGVF" } } ], "restrictions": [ { "type": "daily_restriction", "start_time_of_day": "08:00:00", "duration_seconds": 32400 } ] } ], "overrides_subschedule": { "name": "Overrides", "rendered_schedule_entries": [] }, "final_schedule": { "name": "Final Schedule", "rendered_schedule_entries": [] } } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } } }, "/schedules/{id}": { "description": "Manage an on-call schedule.", "get": { "tags": [ "Schedules" ], "x-pd-requires-scope": "schedules.read", "operationId": "getSchedule", "description": "Show detailed information about a schedule, including entries for each layer.\nScoped OAuth requires: `schedules.read`\n", "summary": "Get a schedule", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/schedule_time_zone" }, { "$ref": "#/components/parameters/schedule_since" }, { "$ref": "#/components/parameters/schedule_until" }, { "$ref": "#/components/parameters/schedule_overflow" }, { "$ref": "#/components/parameters/id" } ], "responses": { "200": { "description": "The schedule object.", "content": { "application/json": { "schema": { "type": "object", "properties": { "schedule": { "$ref": "#/components/schemas/Schedule" } }, "required": [ "schedule" ] }, "examples": { "response": { "summary": "Response Example", "value": { "schedule": { "id": "PI7DH85", "type": "schedule", "summary": "Daily Engineering Rotation", "self": "https://api.pagerduty.com/schedules/PI7DH85", "html_url": "https://subdomain.pagerduty.com/schedules/PI7DH85", "name": "Daily Engineering Rotation", "time_zone": "America/New_York", "description": "Rotation schedule for engineering", "escalation_policies": [ { "id": "PT20YPA", "type": "escalation_policy_reference", "summary": "Another Escalation Policy", "self": "https://api.pagerduty.com/escalation_policies/PT20YPA", "html_url": "https://subdomain.pagerduty.com/escalation_policies/PT20YPA" } ], "users": [ { "id": "PXPGF42", "type": "user_reference", "summary": "Regina Phalange", "self": "https://api.pagerduty.com/users/PXPGF42", "html_url": "https://subdomain.pagerduty.com/users/PXPGF42" } ], "teams": [ { "id": "PQ9K7I8", "type": "team_reference", "summary": "Engineering", "self": "https://api.pagerduty.com/teams/PQ9K7I8", "html_url": "https://subdomain.pagerduty.com/teams/PQ9K7I8" } ], "schedule_layers": [ { "name": "Layer 1", "rendered_schedule_entries": [ { "start": "2015-11-09T08:00:00-05:00", "end": "2015-11-09T17:00:00-05:00", "user": { "id": "PXPGF42", "type": "user_reference", "summary": "Regina Phalange", "self": "https://api.pagerduty.com/users/PXPGF42", "html_url": "https://subdomain.pagerduty.com/users/PXPGF42" } } ], "rendered_coverage_percentage": 37.5, "id": "PG68P1M", "start": "2015-11-06T21:00:00-05:00", "rotation_virtual_start": "2015-11-06T20:00:00-05:00", "rotation_turn_length_seconds": 86400, "users": [ { "user": { "id": "PXPGF42", "type": "user_reference", "summary": "Regina Phalange", "self": "https://api.pagerduty.com/users/PXPGF42", "html_url": "https://subdomain.pagerduty.com/users/PXPGF42" } } ], "restrictions": [ { "type": "daily_restriction", "start_time_of_day": "08:00:00", "duration_seconds": 32400 } ] } ], "overrides_subschedule": { "name": "Overrides", "rendered_schedule_entries": [], "rendered_coverage_percentage": 0 }, "final_schedule": { "name": "Final Schedule", "rendered_schedule_entries": [ { "start": "2015-11-10T08:00:00-05:00", "end": "2015-11-10T17:00:00-05:00", "user": { "id": "PXPGF42", "type": "user_reference", "summary": "Regina Phalange", "self": "https://api.pagerduty.com/users/PXPGF42", "html_url": "https://subdomain.pagerduty.com/users/PXPGF42" } } ], "rendered_coverage_percentage": 37.5 } } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } }, "delete": { "tags": [ "Schedules" ], "x-pd-requires-scope": "schedules.write", "operationId": "deleteSchedule", "description": "Delete an on-call schedule.\n\nA Schedule determines the time periods that users are On-Call.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#schedules)\n\nScoped OAuth requires: `schedules.write`\n", "summary": "Delete a schedule", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" } ], "responses": { "204": { "description": "The schedule was deleted successfully." }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } }, "put": { "tags": [ "Schedules" ], "x-pd-requires-scope": "schedules.write", "operationId": "updateSchedule", "description": "Update an existing on-call schedule.\n\nA Schedule determines the time periods that users are On-Call.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#schedules)\n\nScoped OAuth requires: `schedules.write`\n", "summary": "Update a schedule", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" }, { "$ref": "#/components/parameters/schedule_overflow" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "schedule": { "$ref": "#/components/schemas/Schedule" } }, "required": [ "schedule" ] }, "examples": { "request": { "summary": "Request Example", "value": { "schedule": { "name": "Daily Engineering Rotation", "type": "schedule", "time_zone": "America/New_York", "description": "Rotation schedule for engineering", "schedule_layers": [ { "name": "Night Shift", "start": "2015-11-06T20:00:00-05:00", "end": "2016-11-06T20:00:00-05:00", "rotation_virtual_start": "2015-11-06T20:00:00-05:00", "rotation_turn_length_seconds": 86400, "users": [ { "user": { "id": "PXPGF42", "type": "user_reference" } } ], "restrictions": [ { "type": "daily_restriction", "start_time_of_day": "08:00:00", "duration_seconds": 32400 } ] } ] } } } } } }, "description": "The schedule to be updated." }, "responses": { "200": { "description": "The updated schedule.", "content": { "application/json": { "schema": { "type": "object", "properties": { "schedule": { "$ref": "#/components/schemas/Schedule" } }, "required": [ "schedule" ] }, "examples": { "response": { "summary": "Response Example", "value": { "schedule": { "id": "PI7DH85", "type": "schedule", "summary": "Daily Engineering Rotation", "self": "https://api.pagerduty.com/schedules/PI7DH85", "html_url": "https://subdomain.pagerduty.com/schedules/PI7DH85", "name": "Daily Engineering Rotation", "time_zone": "America/New_York", "description": "Rotation schedule for engineering", "escalation_policies": [ { "id": "PT20YPA", "type": "escalation_policy_reference", "summary": "Another Escalation Policy", "self": "https://api.pagerduty.com/escalation_policies/PT20YPA", "html_url": "https://subdomain.pagerduty.com/escalation_policies/PT20YPA" } ], "users": [ { "id": "PXPGF42", "type": "user_reference", "summary": "Regina Phalange", "self": "https://api.pagerduty.com/users/PXPGF42", "html_url": "https://subdomain.pagerduty.com/users/PXPGF42" } ], "teams": [ { "id": "PQ9K7I8", "type": "team_reference", "summary": "Engineering", "self": "https://api.pagerduty.com/teams/PQ9K7I8", "html_url": "https://subdomain.pagerduty.com/teams/PQ9K7I8" } ], "schedule_layers": [ { "name": "Layer 1", "rendered_schedule_entries": [], "id": "PG68P1M", "start": "2015-11-06T20:00:00-05:00", "rotation_virtual_start": "2015-11-06T20:00:00-05:00", "rotation_turn_length_seconds": 86400, "users": [ { "user": { "id": "PXPGF42", "type": "user_reference", "summary": "Regina Phalange", "self": "https://api.pagerduty.com/users/PXPGF42", "html_url": "https://subdomain.pagerduty.com/users/PXPGF42" } } ], "restrictions": [ { "type": "daily_restriction", "start_time_of_day": "08:00:00", "duration_seconds": 32400 } ] } ], "overrides_subschedule": { "name": "Overrides", "rendered_schedule_entries": [] }, "final_schedule": { "name": "Final Schedule", "rendered_schedule_entries": [] } } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } } }, "/schedules/{id}/audit/records": { "description": "List audit records of changes made to the schedule.", "get": { "x-pd-requires-scope": "audit_records.read", "tags": [ "Schedules" ], "operationId": "listSchedulesAuditRecords", "summary": "List audit records for a schedule", "description": "The returned records are sorted by the `execution_time` from newest to oldest.\n\nSee [`Cursor-based pagination`](https://developer.pagerduty.com/docs/rest-api-v2/pagination/) for instructions on how to paginate through the result set.\n\nFor more information see the [Audit API Document](https://developer.pagerduty.com/docs/rest-api-v2/audit-records-api/).\n\nScoped OAuth requires: `audit_records.read`\n", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" }, { "$ref": "#/components/parameters/cursor_limit" }, { "$ref": "#/components/parameters/cursor_cursor" }, { "$ref": "#/components/parameters/audit_since" }, { "$ref": "#/components/parameters/audit_until" } ], "responses": { "200": { "description": "Records matching the query criteria.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuditRecordResponseSchema" }, "examples": { "response": { "$ref": "#/components/examples/AuditRecordScheduleResponse" } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "402": { "$ref": "#/components/responses/PaymentRequired" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" }, "500": { "$ref": "#/components/responses/InternalServerError" } } } }, "/schedules/{id}/overrides": { "description": "List and create schedule overrides.", "get": { "tags": [ "Schedules" ], "x-pd-requires-scope": "schedules.read", "operationId": "listScheduleOverrides", "description": "List overrides for a given time range.\n\nA Schedule determines the time periods that users are On-Call.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#schedules)\n\nScoped OAuth requires: `schedules.read`\n", "summary": "List overrides", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" }, { "$ref": "#/components/parameters/since_schedules" }, { "$ref": "#/components/parameters/until_schedules" }, { "$ref": "#/components/parameters/editable_schedules" }, { "$ref": "#/components/parameters/overflow_schedules" } ], "responses": { "201": { "description": "The collection of override objects returned by the query.", "content": { "application/json": { "schema": { "type": "object", "properties": { "overrides": { "type": "array", "items": { "$ref": "#/components/schemas/Override" } } }, "required": [ "overrides" ] }, "examples": { "response": { "summary": "Response Example", "value": { "overrides": [ { "id": "PQ47DCP", "start": "2012-07-01T00:00:00-04:00", "end": "2012-07-02T00:00:00-04:00", "user": { "id": "PEYSGVF", "type": "user_reference", "summary": "Aurelio Rice", "self": "https://api.pagerduty.com/users/PEYSGVF", "html_url": "https://subdomain.pagerduty.com/users/PEYSGVF" } } ] } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } }, "post": { "tags": [ "Schedules" ], "x-pd-requires-scope": "schedules.write", "operationId": "createScheduleOverride", "description": "Create one or more overrides, each for a specific user covering a specified time range. If you create an override on top of an existing override, the last created override will have priority.\n\nA Schedule determines the time periods that users are On-Call.\n\nNote: An older implementation of this endpoint only supported creating a single ocverride per request. That functionality is still supported, but deprecated and may be removed in the future.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#schedules)\n\nScoped OAuth requires: `schedules.write`\n", "summary": "Create one or more overrides", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" } ], "requestBody": { "content": { "application/json": { "schema": { "description": "", "type": "object", "properties": { "overrides": { "type": "array", "items": { "$ref": "#/components/schemas/Override" } } } }, "examples": { "request": { "summary": "Request Example", "value": { "overrides": [ { "start": "2012-07-01T00:00:00-04:00", "end": "2012-07-02T00:00:00-04:00", "user": { "id": "PEYSGVA", "type": "user_reference" }, "time_zone": "UTC" }, { "start": "2012-07-03T00:00:00-04:00", "end": "2012-07-04T00:00:00-04:00", "user": { "id": "PEYSGVF", "type": "user_reference" }, "time_zone": "UTC" } ] } } } } }, "description": "The overrides to be created", "required": true }, "responses": { "201": { "description": "A list of overrides requested and a status code indicating whether they were created or rejected", "content": { "application/json": { "schema": { "type": "array", "description": "", "minItems": 1, "uniqueItems": true, "items": { "type": "object", "properties": { "status": { "type": "number", "description": "HTTP Status Code reflecting the result of creating this specific override, e.g. 201 for success, 400 for invalid parameters." }, "errors": { "type": "array", "description": "If present, an array of strings representing human-readable explanations for errors found.", "items": { "type": "string" } }, "override": { "$ref": "#/components/schemas/Override" } }, "required": [ "override" ] } }, "examples": { "response": { "summary": "Response Example", "value": [ { "status": 201, "override": { "start": "2021-03-09T05:00:00Z", "end": "2021-03-09T17:00:00Z", "user": { "id": "P37CSDJ", "type": "user_reference", "summary": "Scott", "self": "https://api.pd-staging.com/users/P37CSDJ", "html_url": "https://pdt-braythwayt.pd-staging.com/users/P37CSDJ" }, "id": "Q3X6MJ1LUKD6QW" } }, { "status": 201, "override": { "start": "2021-03-10T05:00:00Z", "end": "2021-03-10T17:00:00Z", "user": { "id": "P37CSDJ", "type": "user_reference", "summary": "Scott", "self": "https://api.pd-staging.com/users/P37CSDJ", "html_url": "https://pdt-braythwayt.pd-staging.com/users/P37CSDJ" }, "id": "Q37A85CJZP1DTT" } }, { "status": 400, "errors": [ "Override must end after its start" ], "override": { "start": "2021-03-11T05:00:00Z", "end": "2021-03-11T05:00:00Z", "user": { "id": "P37CSDJ", "type": "user_reference", "summary": "Scott", "self": "https://api.pd-staging.com/users/P37CSDJ", "html_url": "https://pdt-braythwayt.pd-staging.com/users/P37CSDJ" } } } ] } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } } }, "/schedules/{id}/overrides/{override_id}": { "description": "Delete a schedule override.", "delete": { "tags": [ "Schedules" ], "x-pd-requires-scope": "schedules.write", "operationId": "deleteScheduleOverride", "description": "Remove an override.\n\nYou cannot remove a past override.\n\nIf the override start time is before the current time, but the end time is after the current time, the override will be truncated to the current time.\n\nIf the override is truncated, the status code will be 200 OK, as opposed to a 204 No Content for a successful delete.\n\nA Schedule determines the time periods that users are On-Call.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#schedules)\n\nScoped OAuth requires: `schedules.write`\n", "summary": "Delete an override", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" }, { "$ref": "#/components/parameters/schedule_override_id" } ], "responses": { "200": { "description": "The override was truncated." }, "204": { "description": "The override was deleted successfully." }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } } }, "/schedules/{id}/users": { "description": "List the users on call for a given schedule.", "get": { "tags": [ "Schedules" ], "x-pd-requires-scope": "users.read", "operationId": "listScheduleUsers", "description": "List all of the users on call in a given schedule for a given time range.\n\nA Schedule determines the time periods that users are On-Call.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#schedules)\n\nScoped OAuth requires: `users.read`\n", "summary": "List users on call.", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" }, { "$ref": "#/components/parameters/since" }, { "$ref": "#/components/parameters/until" } ], "responses": { "200": { "description": "The users on the given schedule.", "content": { "application/json": { "schema": { "type": "object", "properties": { "users": { "type": "array", "readOnly": true, "items": { "$ref": "#/components/schemas/User" } } }, "required": [ "users" ] }, "examples": { "response": { "summary": "Response Example", "value": { "users": [ { "id": "PAM4FGS", "type": "user", "summary": "Kyler Kuhn", "self": "https://api.pagerduty.com/users/PAM4FGS", "html_url": "https://subdomain.pagerduty.com/users/PAM4FGS", "name": "Kyler Kuhn", "email": "126_dvm_kyler_kuhn@beahan.name", "time_zone": "Asia/Hong_Kong", "color": "red", "role": "admin", "avatar_url": "https://secure.gravatar.com/avatar/47857d059adacf9a41dc4030c2e14b0a.png?d=mm&r=PG", "description": "Engineer based in HK", "invitation_sent": false, "contact_methods": [ { "id": "PVMGSML", "type": "email_contact_method_reference", "summary": "Work", "self": "https://api.pagerduty.com/users/PAM4FGS/contact_methods/PVMGSMLL" } ], "notification_rules": [ { "id": "P8GRWKZ", "type": "assignment_notification_rule_reference", "summary": "Default", "self": "https://api.pagerduty.com/users/PAM4FGS/notification_rules/P8GRWKZ", "html_url": null } ], "job_title": "Senior Engineer", "teams": [ { "id": "PQ9K7I8", "type": "team_reference", "summary": "Engineering", "self": "https://api.pagerduty.com/teams/PQ9K7I8", "html_url": "https://subdomain.pagerduty.com/teams/PQ9K7I8" } ] }, { "id": "PXPGF42", "type": "user", "summary": "Earline Greenholt", "self": "https://api.pagerduty.com/users/PXPGF42", "html_url": "https://subdomain.pagerduty.com/users/PXPGF42", "name": "Earline Greenholt", "email": "125.greenholt.earline@graham.name", "time_zone": "America/Lima", "color": "green", "role": "admin", "avatar_url": "https://secure.gravatar.com/avatar/a8b714a39626f2444ee05990b078995f.png?d=mm&r=PG", "description": "I'm the boss", "invitation_sent": false, "contact_methods": [ { "id": "PTDVERC", "type": "email_contact_method_reference", "summary": "Default", "self": "https://api.pagerduty.com/users/PXPGF42/contact_methods/PTDVERC" } ], "notification_rules": [ { "id": "P8GRWKK", "type": "assignment_notification_rule_reference", "summary": "Default", "self": "https://api.pagerduty.com/users/PXPGF42/notification_rules/P8GRWKK", "html_url": null } ], "job_title": "Director of Engineering", "teams": [ { "id": "PQ9K7I8", "type": "team_reference", "summary": "Engineering", "self": "https://api.pagerduty.com/teams/PQ9K7I8", "html_url": "https://subdomain.pagerduty.com/teams/PQ9K7I8" } ] } ] } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } } }, "/schedules/preview": { "description": "Preview what an on-call schedule would look like without saving it. This works the same as the update or create actions, except that the result is not persisted. Preview optionally takes two additional arguments, since and until, delimiting the span of the preview.", "post": { "tags": [ "Schedules" ], "x-pd-requires-scope": "schedules.write", "operationId": "createSchedulePreview", "description": "Preview what an on-call schedule would look like without saving it.\n\nA Schedule determines the time periods that users are On-Call.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#schedules)\n\nScoped OAuth requires: `schedules.write`\n", "summary": "Preview a schedule", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/since" }, { "$ref": "#/components/parameters/until" }, { "$ref": "#/components/parameters/schedule_overflow" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "schedule": { "$ref": "#/components/schemas/Schedule" } }, "required": [ "schedule" ] }, "examples": { "request": { "summary": "Request Example", "value": { "schedule": { "name": "Daily Engineering Rotation", "type": "schedule", "time_zone": "America/New_York", "description": "Rotation schedule for engineering", "schedule_layers": [ { "name": "Night Shift", "start": "2015-11-06T20:00:00-05:00", "end": "2016-11-06T20:00:00-05:00", "rotation_virtual_start": "2015-11-06T20:00:00-05:00", "rotation_turn_length_seconds": 86400, "users": [ { "user": { "id": "PXPGF42", "type": "user_reference" } } ], "restrictions": [ { "type": "daily_restriction", "start_time_of_day": "08:00:00", "duration_seconds": 32400 } ] } ] } } } } } }, "description": "The schedule to be previewed." }, "responses": { "200": { "description": "What the schedule will look like if posted.", "content": { "application/json": { "schema": { "type": "object", "properties": { "schedule": { "$ref": "#/components/schemas/Schedule" } }, "required": [ "schedule" ] }, "examples": { "response": { "summary": "Response Example", "value": { "schedule": { "id": "PI7DH85", "type": "schedule", "summary": "Daily Engineering Rotation", "self": "https://api.pagerduty.com/schedules/PI7DH85", "html_url": "https://subdomain.pagerduty.com/schedules/PI7DH85", "name": "Daily Engineering Rotation", "time_zone": "America/New_York", "description": "Rotation schedule for engineering", "escalation_policies": [], "users": [ { "id": "PXPGF42", "type": "user_reference", "summary": "Regina Phalange", "self": "https://api.pagerduty.com/users/PXPGF42", "html_url": "https://subdomain.pagerduty.com/users/PXPGF42" } ], "teams": [ { "id": "PQ9K7I8", "type": "team_reference", "summary": "Engineering", "self": "https://api.pagerduty.com/teams/PQ9K7I8", "html_url": "https://subdomain.pagerduty.com/teams/PQ9K7I8" } ], "schedule_layers": [ { "name": "Layer 1", "rendered_schedule_entries": [], "id": "PG68P1M", "start": "2015-11-06T20:00:00-05:00", "rotation_virtual_start": "2015-11-06T20:00:00-05:00", "rotation_turn_length_seconds": 86400, "users": [ { "user": { "id": "PXPGF42", "type": "user_reference", "summary": "Regina Phalange", "self": "https://api.pagerduty.com/users/PXPGF42", "html_url": "https://subdomain.pagerduty.com/users/PXPGF42" } } ], "restrictions": [ { "type": "daily_restriction", "start_time_of_day": "08:00:00", "duration_seconds": 32400 } ] } ], "overrides_subschedule": { "name": "Overrides", "rendered_schedule_entries": [] }, "final_schedule": { "name": "Final Schedule", "rendered_schedule_entries": [] } } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } } }, "/service_dependencies/associate": { "description": "Associate dependencies of services.", "post": { "x-pd-requires-scope": "services.write", "tags": [ "Service Dependencies" ], "operationId": "createServiceDependency", "summary": "Associate service dependencies", "description": "Create new dependencies between two services.\n\nBusiness services model capabilities that span multiple technical services and that may be owned by several different teams.\n\nA service can have a maximum of 2,000 dependencies with a depth limit of 100. If the limit is reached, the API will respond with an error.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#business-services)\n\nScoped OAuth requires: `services.write`\n", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "relationships": { "type": "array", "description": "List of all service dependencies to be created.", "items": { "type": "object", "properties": { "supporting_service": { "type": "object", "description": "The reference to the service that supports the dependent service.", "properties": { "id": { "type": "string" }, "type": { "type": "string" } } }, "dependent_service": { "type": "object", "description": "The reference to the service that is dependent on the supporting service.", "properties": { "id": { "type": "string" }, "type": { "type": "string" } } } } } } } }, "examples": { "request": { "summary": "Request Example", "value": { "relationships": [ { "supporting_service": { "id": "P7AD56", "type": "service" }, "dependent_service": { "id": "P99DJ6", "type": "business_service" } }, { "supporting_service": { "id": "DT93K1", "type": "business_service" }, "dependent_service": { "id": "RS34D9", "type": "service" } } ] } } } } } }, "responses": { "200": { "description": "An array of service relationships that were successfully associated.", "content": { "application/json": { "schema": { "type": "object", "properties": { "relationships": { "type": "array", "description": "List of all the technical service's dependencies", "items": { "type": "object", "properties": { "supporting_service": { "type": "object", "description": "The reference to the service that supports the technical service.", "properties": { "id": { "type": "string" }, "type": { "type": "string" } } }, "dependent_service": { "type": "object", "description": "The reference to the service that is dependent on the technical service.", "properties": { "id": { "type": "string" }, "type": { "type": "string" } } }, "id": { "type": "string" }, "type": { "type": "string" } } } } } }, "examples": { "relationships": { "summary": "Response Example", "value": { "relationships": [ { "supporting_service": { "id": "P7AD56", "type": "technical_service_reference" }, "dependent_service": { "id": "P99DJ6", "type": "business_service_reference" }, "id": "DQVP7E6G0E8AC3NR", "type": "service_dependency" }, { "supporting_service": { "id": "DT93K1", "type": "business_service_reference" }, "dependent_service": { "id": "RS34D9", "type": "technical_service_reference" }, "id": "D3PG0QVACE87RNE6", "type": "service_dependency" } ] } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" } } } }, "/service_dependencies/business_services/{id}": { "description": "Get the dependencies of a given Business Service.", "get": { "x-pd-requires-scope": "services.read", "tags": [ "Service Dependencies" ], "operationId": "getBusinessServiceServiceDependencies", "summary": "Get Business Service dependencies", "description": "Get all immediate dependencies of any Business Service.\n\nBusiness Services model capabilities that span multiple technical services and that may be owned by several different teams.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#business-services)\n\nScoped OAuth requires: `services.read`\n", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" } ], "responses": { "200": { "description": "An array of service relationships.", "content": { "application/json": { "schema": { "type": "object", "properties": { "relationships": { "type": "array", "description": "List of all the Business Service's dependencies.", "items": { "type": "object", "properties": { "supporting_service": { "type": "object", "description": "The reference to the service that supports the Business Service.", "properties": { "id": { "type": "string" }, "type": { "type": "string" } } }, "dependent_service": { "type": "object", "description": "The reference to the service that is dependent on the Business Service.", "properties": { "id": { "type": "string" }, "type": { "type": "string" } } }, "id": { "type": "string" }, "type": { "type": "string" } } } } } }, "examples": { "relationships": { "summary": "Response Example", "value": { "relationships": [ { "supporting_service": { "id": "P7AD56", "type": "technical_service_reference" }, "dependent_service": { "id": "P99DJ6", "type": "business_service_reference" }, "id": "DQVP7E6G0E8AC3NR", "type": "service_dependency" }, { "supporting_service": { "id": "P99DJ6", "type": "business_service_reference" }, "dependent_service": { "id": "RS34D9", "type": "business_service_reference" }, "id": "D3PG0QVACE87RNE6", "type": "service_dependency" } ] } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" } } } }, "/service_dependencies/disassociate": { "description": "Disassociate dependencies of services.", "post": { "x-pd-requires-scope": "services.write", "tags": [ "Service Dependencies" ], "operationId": "deleteServiceDependency", "summary": "Disassociate service dependencies", "description": "Disassociate dependencies between two services.\n\nBusiness services model capabilities that span multiple technical services and that may be owned by several different teams.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#business-services)\n\nScoped OAuth requires: `services.write`\n", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "relationships": { "type": "array", "description": "List of all service dependencies to be deleted.", "items": { "type": "object", "properties": { "supporting_service": { "type": "object", "description": "The reference to the service that supports the dependent service.", "properties": { "id": { "type": "string" }, "type": { "type": "string" } } }, "dependent_service": { "type": "object", "description": "The reference to the service that is dependent on the supporting service.", "properties": { "id": { "type": "string" }, "type": { "type": "string" } } } } } } } }, "examples": { "request": { "summary": "Request Example", "value": { "relationships": [ { "supporting_service": { "id": "P7AD56", "type": "service" }, "dependent_service": { "id": "P99DJ6", "type": "business_service" } }, { "supporting_service": { "id": "DT93K1", "type": "business_service" }, "dependent_service": { "id": "RS34D9", "type": "service" } } ] } } } } } }, "responses": { "200": { "description": "An array of service relationships that were successfully disassociated.", "content": { "application/json": { "schema": { "type": "object", "properties": { "relationships": { "type": "array", "description": "List of all the technical service's dependencies", "items": { "type": "object", "properties": { "supporting_service": { "type": "object", "description": "The reference to the service that supports the technical service.", "properties": { "id": { "type": "string" }, "type": { "type": "string" } } }, "dependent_service": { "type": "object", "description": "The reference to the service that is dependent on the technical service.", "properties": { "id": { "type": "string" }, "type": { "type": "string" } } }, "id": { "type": "string" }, "type": { "type": "string" } } } } } }, "examples": { "relationships": { "summary": "Example Response", "value": { "relationships": [ { "supporting_service": { "id": "P7AD56", "type": "technical_service_reference" }, "dependent_service": { "id": "P99DJ6", "type": "business_service_reference" }, "id": "DQVP7E6G0E8AC3NR", "type": "service_dependency" }, { "supporting_service": { "id": "DT93K1", "type": "business_service_reference" }, "dependent_service": { "id": "RS34D9", "type": "technical_service_reference" }, "id": "D3PG0QVACE87RNE6", "type": "service_dependency" } ] } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" } } } }, "/service_dependencies/technical_services/{id}": { "description": "Get the dependencies of a given technical service.", "get": { "x-pd-requires-scope": "services.read", "tags": [ "Service Dependencies" ], "operationId": "getTechnicalServiceServiceDependencies", "summary": "Get technical service dependencies", "description": "Get all immediate dependencies of any technical service.\nTechnical services are also known as `services`.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#services)\n\nScoped OAuth requires: `services.read`\n", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" } ], "responses": { "200": { "description": "An array of service relationships.", "content": { "application/json": { "schema": { "type": "object", "properties": { "relationships": { "type": "array", "description": "List of all the technical service's dependencies", "items": { "type": "object", "properties": { "supporting_service": { "type": "object", "description": "The reference to the service that supports the technical service.", "properties": { "id": { "type": "string" }, "type": { "type": "string" } } }, "dependent_service": { "type": "object", "description": "The reference to the service that is dependent on the technical service.", "properties": { "id": { "type": "string" }, "type": { "type": "string" } } }, "id": { "type": "string" }, "type": { "type": "string" } } } } } }, "examples": { "relationships": { "summary": "Response Example", "value": { "relationships": [ { "supporting_service": { "id": "P7AD56", "type": "technical_service_reference" }, "dependent_service": { "id": "P99DJ6", "type": "business_service_reference" }, "id": "DQVP7E6G0E8AC3NR", "type": "service_dependency" }, { "supporting_service": { "id": "R87DK4", "type": "technical_service_reference" }, "dependent_service": { "id": "P7AD56", "type": "technical_service_reference" }, "id": "D3PG0QVACE87RNE6", "type": "service_dependency" } ] } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" } } } }, "/services": { "description": "List and create services.", "get": { "tags": [ "Services" ], "operationId": "listServices", "x-pd-requires-scope": "services.read", "description": "List existing Services.\n\nA service may represent an application, component, or team you wish to open incidents against.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#services)\n\nScoped OAuth requires: `services.read`\n", "summary": "List services", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/query" }, { "$ref": "#/components/parameters/offset_limit" }, { "$ref": "#/components/parameters/offset_offset" }, { "$ref": "#/components/parameters/offset_total" }, { "$ref": "#/components/parameters/team_ids" }, { "$ref": "#/components/parameters/time_zone" }, { "$ref": "#/components/parameters/sort_by_service" }, { "$ref": "#/components/parameters/include_services" } ], "responses": { "200": { "description": "A paginated array of services.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/Pagination" }, { "type": "object", "properties": { "services": { "type": "array", "items": { "$ref": "#/components/schemas/Service" } } }, "required": [ "services" ] } ] }, "examples": { "response": { "summary": "Response Example", "value": { "services": [ { "id": "PIJ90N7", "summary": "My Application Service", "type": "service", "self": "https://api.pagerduty.com/services/PIJ90N7", "html_url": "https://subdomain.pagerduty.com/service-directory/PIJ90N7", "name": "My Application Service", "auto_resolve_timeout": 14400, "acknowledgement_timeout": 600, "created_at": "2015-11-06T11:12:51-05:00", "status": "active", "alert_creation": "create_alerts_and_incidents", "alert_grouping_parameters": { "type": "intelligent" }, "integrations": [ { "id": "PQ12345", "type": "generic_email_inbound_integration_reference", "summary": "Email Integration", "self": "https://api.pagerduty.com/services/PIJ90N7/integrations/PQ12345", "html_url": "https://subdomain.pagerduty.com/services/PIJ90N7/integrations/PQ12345" } ], "escalation_policy": { "id": "PT20YPA", "type": "escalation_policy_reference", "summary": "Another Escalation Policy", "self": "https://api.pagerduty.com/escalation_policies/PT20YPA", "html_url": "https://subdomain.pagerduty.com/escalation_policies/PT20YPA" }, "teams": [ { "id": "PQ9K7I8", "type": "team_reference", "summary": "Engineering", "self": "https://api.pagerduty.com/teams/PQ9K7I8", "html_url": "https://subdomain.pagerduty.com/teams/PQ9K7I8" } ], "incident_urgency_rule": { "type": "use_support_hours", "during_support_hours": { "type": "constant", "urgency": "high" }, "outside_support_hours": { "type": "constant", "urgency": "low" } }, "support_hours": { "type": "fixed_time_per_day", "time_zone": "America/Lima", "start_time": "09:00:00", "end_time": "17:00:00", "days_of_week": [ 1, 2, 3, 4, 5 ] }, "scheduled_actions": [ { "type": "urgency_change", "at": { "type": "named_time", "name": "support_hours_start" }, "to_urgency": "high" } ], "auto_pause_notifications_parameters": { "enabled": true, "timeout": 300 } } ], "limit": 25, "offset": 0, "more": false, "total": null } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" } } }, "post": { "x-pd-requires-scope": "services.write", "tags": [ "Services" ], "operationId": "createService", "description": "Create a new service.\n\nIf `status` is included in the request, it must have a value of `active` when creating a new service. If a different status is required, make a second request to update the service.\n\nA service may represent an application, component, or team you wish to open incidents against.\n\nThere is a limit of 25,000 services per account. If the limit is reached, the API will respond with an error. There is also a limit of 100,000 open Incidents per Service. If the limit is reached and `auto_resolve_timeout` is disabled (set to 0 or null), the `auto_resolve_timeout` property will automatically be set to 84600 (1 day).\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#services)\n\nScoped OAuth requires: `services.write`\n", "summary": "Create a service", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "service": { "$ref": "#/components/schemas/Service" } }, "required": [ "service" ] }, "examples": { "request": { "summary": "Request Example", "value": { "service": { "type": "service", "name": "My Web App", "description": "My cool web application that does things.", "auto_resolve_timeout": 14400, "acknowledgement_timeout": 600, "status": "active", "escalation_policy": { "id": "PWIP6CQ", "type": "escalation_policy_reference" }, "incident_urgency_rule": { "type": "use_support_hours", "during_support_hours": { "type": "constant", "urgency": "high" }, "outside_support_hours": { "type": "constant", "urgency": "low" } }, "support_hours": { "type": "fixed_time_per_day", "time_zone": "America/Lima", "start_time": "09:00:00", "end_time": "17:00:00", "days_of_week": [ 1, 2, 3, 4, 5 ] }, "scheduled_actions": [ { "type": "urgency_change", "at": { "type": "named_time", "name": "support_hours_start" }, "to_urgency": "high" } ], "alert_creation": "create_alerts_and_incidents", "alert_grouping_parameters": { "type": "time", "config": { "timeout": 2 } }, "auto_pause_notifications_parameters": { "enabled": true, "timeout": 300 } } } } } } }, "description": "The service to be created" }, "responses": { "201": { "description": "The service that was created", "content": { "application/json": { "schema": { "type": "object", "properties": { "service": { "$ref": "#/components/schemas/Service" } }, "required": [ "service" ] }, "examples": { "response": { "summary": "Response Example", "value": { "service": { "id": "PIJ90N7", "summary": "My Application Service", "type": "service", "self": "https://api.pagerduty.com/services/PIJ90N7", "html_url": "https://subdomain.pagerduty.com/service-directory/PIJ90N7", "name": "My Application Service", "auto_resolve_timeout": 14400, "acknowledgement_timeout": 600, "created_at": "2015-11-06T11:12:51-05:00", "status": "active", "alert_creation": "create_alerts_and_incidents", "integrations": [ { "id": "PQ12345", "type": "generic_email_inbound_integration_reference", "summary": "Email Integration", "self": "https://api.pagerduty.com/services/PIJ90N7/integrations/PQ12345", "html_url": "https://subdomain.pagerduty.com/services/PIJ90N7/integrations/PQ12345" } ], "escalation_policy": { "id": "PT20YPA", "type": "escalation_policy_reference", "summary": "Another Escalation Policy", "self": "https://api.pagerduty.com/escalation_policies/PT20YPA", "html_url": "https://subdomain.pagerduty.com/escalation_policies/PT20YPA" }, "teams": [ { "id": "PQ9K7I8", "type": "team_reference", "summary": "Engineering", "self": "https://api.pagerduty.com/teams/PQ9K7I8", "html_url": "https://subdomain.pagerduty.com/teams/PQ9K7I8" } ], "incident_urgency_rule": { "type": "use_support_hours", "during_support_hours": { "type": "constant", "urgency": "high" }, "outside_support_hours": { "type": "constant", "urgency": "low" } }, "support_hours": { "type": "fixed_time_per_day", "time_zone": "America/Lima", "start_time": "09:00:00", "end_time": "17:00:00", "days_of_week": [ 1, 2, 3, 4, 5 ] }, "scheduled_actions": [ { "type": "urgency_change", "at": { "type": "named_time", "name": "support_hours_start" }, "to_urgency": "high" } ], "auto_pause_notifications_parameters": { "enabled": true, "timeout": 300 } } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "402": { "$ref": "#/components/responses/PaymentRequired" }, "403": { "$ref": "#/components/responses/Forbidden" } } } }, "/services/{id}": { "description": "Manage a service.", "get": { "tags": [ "Services" ], "operationId": "getService", "x-pd-requires-scope": "services.read", "description": "Get details about an existing service.\n\nA service may represent an application, component, or team you wish to open incidents against.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#services)\n\nScoped OAuth requires: `services.read`\n", "summary": "Get a service", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" }, { "$ref": "#/components/parameters/include_services_id" } ], "responses": { "200": { "description": "The service requested.", "content": { "application/json": { "schema": { "type": "object", "properties": { "service": { "$ref": "#/components/schemas/Service" } }, "required": [ "service" ] }, "examples": { "response": { "summary": "Response Example", "value": { "service": { "id": "PIJ90N7", "type": "service", "summary": "My Application Service", "self": "https://api.pagerduty.com/services/PIJ90N7", "html_url": "https://subdomain.pagerduty.com/service-directory/PIJ90N7", "name": "My Application Service", "auto_resolve_timeout": 14400, "acknowledgement_timeout": 600, "created_at": "2015-11-06T11:12:51-05:00", "status": "active", "alert_creation": "create_alerts_and_incidents", "integrations": [ { "id": "PQ12345", "type": "generic_email_inbound_integration_reference", "summary": "Email Integration", "self": "https://api.pagerduty.com/services/PIJ90N7/integrations/PQ12345", "html_url": "https://subdomain.pagerduty.com/services/PIJ90N7/integrations/PQ12345" } ], "escalation_policy": { "id": "PT20YPA", "type": "escalation_policy_reference", "summary": "Another Escalation Policy", "self": "https://api.pagerduty.com/escalation_policies/PT20YPA", "html_url": "https://subdomain.pagerduty.com/escalation_policies/PT20YPA" }, "teams": [ { "id": "PQ9K7I8", "type": "team_reference", "summary": "Engineering", "self": "https://api.pagerduty.com/teams/PQ9K7I8", "html_url": "https://subdomain.pagerduty.com/teams/PQ9K7I8" } ], "incident_urgency_rule": { "type": "use_support_hours", "during_support_hours": { "type": "constant", "urgency": "high" }, "outside_support_hours": { "type": "constant", "urgency": "low" } }, "support_hours": { "type": "fixed_time_per_day", "time_zone": "America/Lima", "start_time": "09:00:00", "end_time": "17:00:00", "days_of_week": [ 1, 2, 3, 4, 5 ] }, "scheduled_actions": [ { "type": "urgency_change", "at": { "type": "named_time", "name": "support_hours_start" }, "to_urgency": "high" } ], "auto_pause_notifications_parameters": { "enabled": true, "timeout": 300 } } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" } } }, "delete": { "x-pd-requires-scope": "services.write", "tags": [ "Services" ], "operationId": "deleteService", "description": "Delete an existing service.\n\nOnce the service is deleted, it will not be accessible from the web UI and new incidents won't be able to be created for this service.\n\nA service may represent an application, component, or team you wish to open incidents against.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#services)\n\nScoped OAuth requires: `services.write`\n", "summary": "Delete a service", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" } ], "responses": { "204": { "description": "The service was deleted successfully." }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" } } }, "put": { "x-pd-requires-scope": "services.write", "tags": [ "Services" ], "description": "Update an existing service.\n\nA service may represent an application, component, or team you wish to open incidents against.\n\nThere is a limit of 100,000 open Incidents per Service. If the limit is reached and you disable `auto_resolve_timeout` (set to 0 or null), the API will respond with an error.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#services)\n\nScoped OAuth requires: `services.write`\n", "summary": "Update a service", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" } ], "operationId": "updateService", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "service": { "$ref": "#/components/schemas/Service" } }, "required": [ "service" ] }, "examples": { "request": { "summary": "Request Example", "value": { "service": { "type": "service", "name": "My Web App", "description": "My cool web application that does things.", "auto_resolve_timeout": 14400, "acknowledgement_timeout": 600, "status": "active", "escalation_policy": { "id": "PWIP6CQ", "type": "escalation_policy_reference" }, "incident_urgency_rule": { "type": "use_support_hours", "during_support_hours": { "type": "constant", "urgency": "high" }, "outside_support_hours": { "type": "constant", "urgency": "low" } }, "support_hours": { "type": "fixed_time_per_day", "time_zone": "America/Lima", "start_time": "09:00:00", "end_time": "17:00:00", "days_of_week": [ 1, 2, 3, 4, 5 ] }, "scheduled_actions": [ { "type": "urgency_change", "at": { "type": "named_time", "name": "support_hours_start" }, "to_urgency": "high" } ], "alert_creation": "create_alerts_and_incidents", "alert_grouping_parameters": { "type": "time", "config": { "timeout": 2 } }, "auto_pause_notifications_parameters": { "enabled": true, "timeout": 300 } } } } } } }, "description": "The service to be updated." }, "responses": { "200": { "description": "The service that was updated.", "content": { "application/json": { "schema": { "type": "object", "properties": { "service": { "$ref": "#/components/schemas/Service" } }, "required": [ "service" ] }, "examples": { "response": { "summary": "Response Example", "value": { "service": { "id": "PIJ90N7", "type": "service", "summary": "My Application Service", "self": "https://api.pagerduty.com/services/PIJ90N7", "html_url": "https://subdomain.pagerduty.com/service-directory/PIJ90N7", "name": "My Application Service", "auto_resolve_timeout": 14400, "acknowledgement_timeout": 600, "created_at": "2015-11-06T11:12:51-05:00", "status": "active", "alert_creation": "create_alerts_and_incidents", "alert_grouping_parameters": { "type": "time", "config": { "timeout": 2 } }, "integrations": [ { "id": "PQ12345", "type": "generic_email_inbound_integration_reference", "summary": "Email Integration", "self": "https://api.pagerduty.com/services/PIJ90N7/integrations/PQ12345", "html_url": "https://subdomain.pagerduty.com/services/PIJ90N7/integrations/PQ12345" } ], "escalation_policy": { "id": "PT20YPA", "type": "escalation_policy_reference", "summary": "Another Escalation Policy", "self": "https://api.pagerduty.com/escalation_policies/PT20YPA", "html_url": "https://subdomain.pagerduty.com/escalation_policies/PT20YPA" }, "teams": [ { "id": "PQ9K7I8", "type": "team_reference", "summary": "Engineering", "self": "https://api.pagerduty.com/teams/PQ9K7I8", "html_url": "https://subdomain.pagerduty.com/teams/PQ9K7I8" } ], "incident_urgency_rule": { "type": "use_support_hours", "during_support_hours": { "type": "constant", "urgency": "high" }, "outside_support_hours": { "type": "constant", "urgency": "low" } }, "support_hours": { "type": "fixed_time_per_day", "time_zone": "America/Lima", "start_time": "09:00:00", "end_time": "17:00:00", "days_of_week": [ 1, 2, 3, 4, 5 ] }, "scheduled_actions": [ { "type": "urgency_change", "at": { "type": "named_time", "name": "support_hours_start" }, "to_urgency": "high" } ], "auto_pause_notifications_parameters": { "enabled": true, "timeout": 300 } } } } } } } }, "401": { "$ref": "#/components/responses/Unauthorized" }, "402": { "$ref": "#/components/responses/PaymentRequired" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" } } } }, "/services/{id}/audit/records": { "description": "List audit records for a service.", "get": { "x-pd-requires-scope": "audit_records.read", "tags": [ "Services" ], "operationId": "listServiceAuditRecords", "summary": "List audit records for a service", "description": "The returned records are sorted by the `execution_time` from newest to oldest.\n\nSee [`Cursor-based pagination`](https://developer.pagerduty.com/docs/rest-api-v2/pagination/) for instructions on how to paginate through the result set.\n\nFor more information see the [Audit API Document](https://developer.pagerduty.com/docs/rest-api-v2/audit-records-api/).\n\nScoped OAuth requires: `audit_records.read`\n", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" }, { "$ref": "#/components/parameters/cursor_limit" }, { "$ref": "#/components/parameters/cursor_cursor" }, { "$ref": "#/components/parameters/audit_since" }, { "$ref": "#/components/parameters/audit_until" } ], "responses": { "200": { "description": "Records matching the query criteria.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuditRecordResponseSchema" }, "examples": { "response": { "$ref": "#/components/examples/AuditRecordServiceResponse" } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "402": { "$ref": "#/components/responses/PaymentRequired" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" }, "500": { "$ref": "#/components/responses/InternalServerError" } } } }, "/services/{id}/change_events": { "description": "List change events for a service.", "get": { "x-pd-requires-scope": "services.read", "tags": [ "Change Events" ], "operationId": "listServiceChangeEvents", "description": "List all of the existing Change Events for a service.\n\nScoped OAuth requires: `services.read`\n", "summary": "List Change Events for a service", "parameters": [ { "$ref": "#/components/parameters/id" }, { "$ref": "#/components/parameters/change_since" }, { "$ref": "#/components/parameters/change_until" }, { "$ref": "#/components/parameters/offset_limit" }, { "$ref": "#/components/parameters/offset_offset" }, { "$ref": "#/components/parameters/offset_total" }, { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/team_ids" }, { "$ref": "#/components/parameters/integration_ids" } ], "responses": { "200": { "description": "The array of Change Events returned by the query.", "content": { "application/json": { "schema": { "type": "object", "properties": { "change_events": { "type": "array", "items": { "$ref": "#/components/schemas/ChangeEvent" } } } }, "examples": { "response": { "summary": "Response Example", "value": { "change_events": [ { "summary": "Build Success - Increase snapshot create timeout to 30 seconds", "id": "01BBYA6PEVW6A852BUO6QYUE7O", "timestamp": "2020-07-17T08:42:58Z", "type": "change_event", "source": "acme-build-pipeline-tool-default-i-9999", "integration": { "id": "PEYSGVF", "type": "inbound_integration_reference" }, "services": [ { "id": "PEYSGRV", "type": "service_reference" } ], "custom_details": { "build_state": "passed", "build_number": "2", "run_time": "1236s" }, "links": [ { "href": "https://acme.pagerduty.dev/build/2", "text": "View more details in Acme!" } ] }, { "summary": "Build Success - Increase snapshot create timeout to 15 seconds", "id": "01BBYA6PDIXPL8KO1HPIUL9CZN", "timestamp": "2020-07-17T07:42:58Z", "type": "change_event", "source": "acme-build-pipeline-tool-default-i-9999", "integration": { "id": "PEYSGVF", "type": "inbound_integration_reference" }, "services": [ { "id": "PEYSGRV", "type": "service_reference" } ], "custom_details": { "build_state": "passed", "build_number": "1", "run_time": "1233s" }, "links": [ { "href": "https://acme.pagerduty.dev/build/1", "text": "View more details in Acme!" } ] } ], "limit": null, "offset": null, "total": null, "more": false } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" } } } }, "/services/{id}/integrations": { "description": "Create integrations belonging to a service.", "post": { "x-pd-requires-scope": "services.write", "tags": [ "Services" ], "operationId": "createServiceIntegration", "summary": "Create a new integration", "description": "Create a new integration belonging to a Service.\n\nA service may represent an application, component, or team you wish to open incidents against.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#services)\n\nScoped OAuth requires: `services.write`\n", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "integration": { "$ref": "#/components/schemas/Integration" } }, "required": [ "integration" ] }, "examples": { "email_integration": { "summary": "Request Example for Email Integration", "value": { "integration": { "type": "generic_email_inbound_integration", "name": "Email", "service": { "id": "PQL78HM", "type": "service_reference" }, "integration_email": "my-email-based-integration@subdomain.pagerduty.com", "vendor": { "type": "vendor_reference", "id": "PZD94QK" } } } }, "email_integration_with_filters": { "summary": "Email Integration With Filters", "value": { "integration": { "type": "generic_email_inbound_integration", "name": "Email with Filters", "integration_email": "your-service@subdomain.pd-staging.com", "email_incident_creation": "on_new_email_subject", "email_filter_mode": "or-rules-email", "email_parsers": [ { "action": "trigger", "match_predicate": { "type": "any", "matcher": "this thing", "part": "body", "children": [] }, "value_extractors": [ { "type": "entire", "part": "body", "value_name": "incident_key" } ] } ], "email_parsing_fallback": "discard", "email_filters": [ { "subject_mode": "match", "subject_regex": "alert", "body_mode": "match", "body_regex": "alert", "from_email_mode": "match", "from_email_regex": "alert" } ] } } }, "events_v2_integration": { "summary": "Request Example for Events v2 Integration", "value": { "integration": { "type": "events_api_v2_inbound_integration", "name": "Events V2", "service": { "id": "PQL78HM", "type": "service_reference" } } } } } } }, "description": "The integration to be created" }, "responses": { "201": { "description": "The integration that was created.", "content": { "application/json": { "schema": { "type": "object", "properties": { "integration": { "$ref": "#/components/schemas/Integration" } }, "required": [ "integration" ] }, "examples": { "response": { "summary": "Response Example", "value": { "integration": { "id": "PE1U9CH", "type": "generic_email_inbound_integration", "summary": "Email", "self": "https://api.pagerduty.com/services/PQL78HM/integrations/PE1U9CH", "html_url": "https://subdomain.pagerduty.com/services/PQL78HM/integrations/PE1U9CH", "name": "Email", "service": { "id": "PQL78HM", "type": "service_reference", "summary": "My Email-Based Integration", "self": "https://api.pagerduty.com/services/PQL78HM", "html_url": "https://subdomain.pagerduty.com/service-directory/PQL78HM" }, "created_at": "2015-10-14T13:33:02-07:00", "integration_email": "my-email-based-integration@subdomain.pagerduty.com" } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } } }, "/services/{id}/integrations/{integration_id}": { "description": "View or update integrations belonging to a service.", "put": { "x-pd-requires-scope": "services.write", "tags": [ "Services" ], "operationId": "updateServiceIntegration", "summary": "Update an existing integration", "description": "Update an integration belonging to a Service.\n\nA service may represent an application, component, or team you wish to open incidents against.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#services)\n\nScoped OAuth requires: `services.write`\n", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" }, { "$ref": "#/components/parameters/integration_id" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "integration": { "$ref": "#/components/schemas/Integration" } }, "required": [ "integration" ] }, "examples": { "request": { "summary": "Request Example", "value": { "integration": { "type": "generic_email_inbound_integration", "name": "Email", "service": { "id": "PQL78HM", "type": "service_reference", "summary": "My Email-Based Integration", "self": "https://api.pagerduty.com/services/PQL78HM", "html_url": "https://subdomain.pagerduty.com/service-directory/PQL78HM" }, "integration_email": "my-email-based-integration@subdomain.pagerduty.com", "vendor": { "type": "vendor_reference", "id": "PZD94QK" } } } } } } }, "description": "The integration to be updated" }, "responses": { "200": { "description": "The integration that was updated.", "content": { "application/json": { "schema": { "type": "object", "properties": { "integration": { "$ref": "#/components/schemas/Integration" } }, "required": [ "integration" ] }, "examples": { "response": { "summary": "Response Example", "value": { "integration": { "id": "PE1U9CH", "type": "generic_email_inbound_integration", "summary": "Email", "self": "https://api.pagerduty.com/services/PQL78HM/integrations/PE1U9CH", "html_url": "https://subdomain.pagerduty.com/services/PQL78HM/integrations/PE1U9CH", "name": "Email", "service": { "id": "PQL78HM", "type": "service_reference", "summary": "My Email-Based Integration", "self": "https://api.pagerduty.com/services/PQL78HM", "html_url": "https://subdomain.pagerduty.com/service-directory/PQL78HM" }, "created_at": "2015-10-14T13:33:02-07:00", "integration_email": "my-email-based-integration@subdomain.pagerduty.com" } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } }, "get": { "x-pd-requires-scope": "services.read", "tags": [ "Services" ], "operationId": "getServiceIntegration", "summary": "View an integration", "description": "Get details about an integration belonging to a service.\n\nA service may represent an application, component, or team you wish to open incidents against.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#services)\n\nScoped OAuth requires: `services.read`\n", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" }, { "$ref": "#/components/parameters/integration_id" }, { "$ref": "#/components/parameters/include_services_integrations" } ], "responses": { "200": { "description": "The integration that was requested.", "content": { "application/json": { "schema": { "type": "object", "properties": { "integration": { "$ref": "#/components/schemas/Integration" } }, "required": [ "integration" ] }, "examples": { "response": { "summary": "Response Example", "value": { "integration": { "id": "PE1U9CH", "type": "generic_email_inbound_integration", "summary": "Email", "self": "https://api.pagerduty.com/services/PQL78HM/integrations/PE1U9CH", "html_url": "https://subdomain.pagerduty.com/services/PQL78HM/integrations/PE1U9CH", "name": "Email", "service": { "id": "PQL78HM", "type": "service_reference", "summary": "My Email-Based Integration", "self": "https://api.pagerduty.com/services/PQL78HM", "html_url": "https://subdomain.pagerduty.com/service-directory/PQL78HM" }, "created_at": "2015-10-14T13:33:02-07:00", "vendor": { "id": "P8JX75F", "type": "vendor_reference", "summary": "Autotask", "self": "https://api.pagerduty.com/vendors/P8JX75F" }, "integration_email": "my-email-based-integration@subdomain.pagerduty.com" } } } } } } }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } } }, "/services/{id}/rules": { "get": { "x-pd-requires-scope": "services.read", "tags": [ "Services" ], "operationId": "listServiceEventRules", "description": "List Event Rules on a Service.\n\n> ### End-of-life\n> Rulesets and Event Rules will end-of-life soon. We highly recommend that you [migrate to Event Orchestration](https://support.pagerduty.com/docs/migrate-to-event-orchestration) as soon as possible so you can take advantage of the new functionality, such as improved UI, rule creation, APIs and Terraform support, advanced conditions, and rule nesting.\n\nScoped OAuth requires: `services.read`\n", "summary": "List Service's Event Rules", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/offset_limit" }, { "$ref": "#/components/parameters/offset_offset" }, { "$ref": "#/components/parameters/offset_total" }, { "$ref": "#/components/parameters/id" }, { "$ref": "#/components/parameters/include_ruleset_migrated_metadata" } ], "responses": { "200": { "description": "A paginated array of Event Rule objects.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/Pagination" }, { "type": "object", "properties": { "migrated_at": { "type": "string", "format": "date-time", "description": "The date/time the service's Event Rules were converted to a Service Orchestration. This property is only included if the `migrated_metadata` query parameter is provided.", "readOnly": true }, "migrated_by": { "type": "object", "description": "Reference to the user that converted the service's Event Rules to a Service Orchestration. This property is only included if the `migrated_metadata` query parameter is provided.", "properties": { "id": { "type": "string", "readOnly": true }, "type": { "type": "string", "description": "A string that determines the schema of the object. This must be the standard name for the entity, suffixed by `_reference` if the object is a reference.", "readOnly": true }, "self": { "type": "string", "format": "url", "description": "The API show URL at which the object is accessible", "readOnly": true } }, "readOnly": true }, "migrated_status": { "type": "string", "description": "The status indicating whether the service's Event Rules were successfully converted to a Service Orchestration. This property is only included if the `migrated_metadata` query parameter is provided.", "enum": [ "completed" ], "readOnly": true }, "migrated_to": { "type": "object", "description": "Reference to the Service Orchestration that the service's Event Rules were converted to. This property is only included if the `migrated_metadata` query parameter is provided.", "properties": { "id": { "type": "string", "readOnly": true }, "type": { "type": "string", "description": "A string that determines the schema of the object. This must be the standard name for the entity, suffixed by `_reference` if the object is a reference.", "readOnly": true }, "self": { "type": "string", "format": "url", "description": "The API show URL at which the object is accessible", "readOnly": true } }, "readOnly": true }, "migrated_via": { "type": "string", "description": "Indicates whether the conversion was performed via the PagerDuty API or PagerDuty website. This property is only included if the `migrated_metadata` query parameter is provided.", "enum": [ "API", "UI" ], "readOnly": true } } }, { "type": "object", "properties": { "rules": { "type": "array", "description": "The paginated list of Event Rules of the Service.", "items": { "$ref": "#/components/schemas/ServiceEventRule" } } } } ] }, "examples": { "response": { "summary": "Response Example", "value": { "rules": [ { "id": "14e56445-ebab-4dd0-ba9d-fc28a41b7e7b", "position": 0, "disabled": false, "self": "https://api.pagerduty.com/service-directory/PI2KBWI/rules/14e56445-ebab-4dd0-ba9d-fc28a41b7e7b", "conditions": { "operator": "and", "subconditions": [ { "operator": "contains", "parameters": { "value": "mysql", "path": "class" } } ] }, "time_frame": { "active_between": { "start_time": 1577880000000, "end_time": 1580558400000 } }, "actions": { "severity": { "value": "info" }, "extractions": [ { "target": "dedup_key", "template": "{{error_level}} error on host {{host}}" } ] }, "variables": [ { "name": "error_level", "type": "regex", "parameters": { "value": ".*error level is (\\w+)\\.", "path": "summary" } }, { "name": "host", "type": "regex", "parameters": { "value": "(.*)-USW2", "path": "source" } } ] } ], "limit": 25, "migrated_at": "2023-06-14T13:51:31Z", "migrated_by": { "id": "P8B9WR8", "self": "https://api.pagerduty.com/users/P8B9WR8", "type": "user_reference" }, "migrated_status": "completed", "migrated_to": { "id": "PI2KBWI", "self": "https://api.pagerduty.com/event_orchestrations/services/PI2KBWI", "type": "event_orchestration_reference" }, "migrated_via": "API", "offset": 0, "more": false, "total": null } } } } } }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" } } }, "post": { "x-pd-requires-scope": "services.write", "tags": [ "Services" ], "operationId": "createServiceEventRule", "description": "Create a new Event Rule on a Service.\n\n> ### End-of-life\n> Rulesets and Event Rules will end-of-life soon. We highly recommend that you [migrate to Event Orchestration](https://support.pagerduty.com/docs/migrate-to-event-orchestration) as soon as possible so you can take advantage of the new functionality, such as improved UI, rule creation, APIs and Terraform support, advanced conditions, and rule nesting.\n\nScoped OAuth requires: `services.write`\n", "summary": "Create an Event Rule on a Service", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "rule": { "$ref": "#/components/schemas/ServiceEventRule" } }, "required": [ "rule" ] }, "examples": { "request": { "summary": "Request Example", "value": { "rule": { "id": "14e56445-ebab-4dd0-ba9d-fc28a41b7e7b", "position": 0, "disabled": false, "conditions": { "operator": "and", "subconditions": [ { "operator": "contains", "parameters": { "value": "mysql", "path": "class" } } ] }, "time_frame": { "active_between": { "start_time": 1577880000000, "end_time": 1580558400000 } }, "actions": { "annotate": { "value": "This incident was modified by an Event Rule" }, "priority": { "value": "PCMUB6F" }, "severity": { "value": "warning" }, "extractions": [ { "target": "dedup_key", "source": "custom_details.error_summary", "regex": "Host (.*) is experiencing errors" } ] } } } } } } } }, "responses": { "201": { "description": "The Event Rule that was created.", "content": { "application/json": { "schema": { "type": "object", "properties": { "rule": { "$ref": "#/components/schemas/ServiceEventRule" } } }, "examples": { "response": { "summary": "Response Example", "value": { "ruleset": { "id": "14e56445-ebab-4dd0-ba9d-fc28a41b7e7b", "position": 0, "disabled": false, "self": "https://api.pagerduty.com/services/PI2KBWI/rules/14e56445-ebab-4dd0-ba9d-fc28a41b7e7b", "conditions": { "operator": "and", "subconditions": [ { "operator": "contains", "parameters": { "value": "mysql", "path": "class" } } ] }, "time_frame": { "active_between": { "start_time": 1577880000000, "end_time": 1580558400000 } }, "actions": { "annotate": { "value": "This incident was modified by an Event Rule" }, "priority": { "value": "PCMUB6F" }, "severity": { "value": "warning" }, "extractions": [ { "target": "dedup_key", "source": "custom_details.error_summary", "regex": "Host (.*) is experiencing errors" } ] } } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" } } } }, "/services/{id}/rules/convert": { "description": "Convert a Service's Event Rules into Event Orchestration Rules", "post": { "x-pd-requires-scope": "services.write", "tags": [ "Services" ], "operationId": "convertServiceEventRulesToEventOrchestration", "summary": "Convert a Service's Event Rules into Event Orchestration Rules", "description": "Convert this Service's Event Rules into functionally equivalent Event Orchestration Rules.\n\nSending a request to this API endpoint has several effects:\n\n1. Automatically creates Event Orchestration Rules for this Service that will behave identically as this Service's currently configured Event Rules.\n2. Makes all existing Event Rules for this Service read-only. All future updates need to be made via the newly created Event Orchestration rules.\n\nSending a request to this API endpoint will **not** change how future events will be processed. If past events for this Service have been evaluated via Event Rules then new events sent to this Service will also continue to be evaluated via the (now read-only) Event Rules. To change this Service so that new events start being evaluated via the newly created Event Orchestration Rules use the [Update the Service Orchestration active status for a Service API](https://developer.pagerduty.com/api-reference/855659be83d9e-update-the-service-orchestration-active-status-for-a-service).\n\n> ### End-of-life\n> Event Rules will end-of-life soon. We highly recommend that you use this API to [migrate to Event Orchestration](https://support.pagerduty.com/docs/migrate-to-event-orchestration) as soon as possible so you can take advantage of the new functionality, such as improved UI, rule creation, APIs and Terraform support, advanced conditions, and rule nesting.\n\nScoped OAuth requires: `services.write`\n", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" } ], "responses": { "200": { "description": "The Event Orchestration Rules were successfully created", "content": { "application/json": { "schema": { "type": "object", "properties": { "convert_status": { "type": "string", "readOnly": true, "description": "Did PagerDuty successfully create equivalent Event Orchestration rules" }, "converted_to": { "type": "string", "format": "url", "readOnly": true, "description": "the API URL at which the newly created Event Orchestration rules are accessible" } } }, "examples": { "response": { "summary": "Response Example", "value": { "convert_status": "completed", "converted_to": "https://api.pagerduty.com/event_orchestrations/service/PC2D9ML" } } } } } }, "400": { "description": "Could not create equivalent Event Orchestration Rules based on the Service's current Event Rules", "content": { "application/json": { "schema": { "type": "object", "readOnly": true, "properties": { "error": { "type": "object", "readOnly": true, "properties": { "message": { "type": "string", "readOnly": true, "description": "Error message string" }, "errors": { "type": "array", "readOnly": true, "items": { "type": "object", "readOnly": true, "description": "Convertion error Details", "properties": { "rule_id": { "type": "string", "readOnly": true, "description": "The ID of the Service Event Rule that couldn't be successfully converted." }, "position": { "type": "integer", "readOnly": true, "description": "The position of the Service Event Rule that couldn't be successfully converted." }, "messages": { "type": "array", "readOnly": true, "description": "Human friendly explanations of why this Event Rule couldn't be converted into an equivalent Event Orchestration Rule.", "items": { "type": "string", "readOnly": true } } } } } } } } }, "examples": { "response": { "summary": "Response Example", "value": { "error": { "message": "Unable to convert given Ruleset to an Event Orchestration", "errors": [ { "rule_id": "693cdcd1-ecfd-4064-a834-5cb28a74c060", "position": 0, "messages": [ "Unable to convert a rule that has a `time_frame` with both `active_between` and `scheduled_weekly` settings." ] }, { "rule_id": "9f6896c0-b435-401f-b25f-62e145d9ccf4", "position": 5, "messages": [ "Unable to convert `actions.extractions`; Should have a most 25 extractions but this rule has 42 extractions." ] } ] } } } } } } }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "405": { "$ref": "#/components/responses/NotAllowed" }, "409": { "$ref": "#/components/responses/Conflict" } } } }, "/services/{id}/rules/{rule_id}": { "get": { "x-pd-requires-scope": "services.read", "tags": [ "Services" ], "operationId": "getServiceEventRule", "description": "Get an Event Rule from a Service.\n\n> ### End-of-life\n> Rulesets and Event Rules will end-of-life soon. We highly recommend that you [migrate to Event Orchestration](https://support.pagerduty.com/docs/migrate-to-event-orchestration) as soon as possible so you can take advantage of the new functionality, such as improved UI, rule creation, APIs and Terraform support, advanced conditions, and rule nesting.\n\nScoped OAuth requires: `services.read`\n", "summary": "Get an Event Rule from a Service", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" }, { "$ref": "#/components/parameters/rule_id" } ], "responses": { "200": { "description": "The Event Rule object.", "content": { "application/json": { "schema": { "type": "object", "properties": { "rule": { "$ref": "#/components/schemas/ServiceEventRule" } } }, "examples": { "response": { "summary": "Response Example", "value": { "rule": { "id": "14e56445-ebab-4dd0-ba9d-fc28a41b7e7b", "position": 0, "disabled": false, "self": "https://api.pagerduty.com/services/PI2KBWI/rules/14e56445-ebab-4dd0-ba9d-fc28a41b7e7b", "conditions": { "operator": "and", "subconditions": [ { "operator": "contains", "parameters": { "value": "mysql", "path": "class" } } ] }, "time_frame": { "active_between": { "start_time": 1577880000000, "end_time": 1580558400000 } }, "actions": { "annotate": { "value": "This incident was modified by an Event Rule" }, "priority": { "value": "PCMUB6F" }, "severity": { "value": "warning" }, "extractions": [ { "target": "dedup_key", "source": "custom_details.error_summary", "regex": "Host (.*) is experiencing errors" } ] } } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" } } }, "put": { "x-pd-requires-scope": "services.write", "tags": [ "Services" ], "operationId": "updateServiceEventRule", "summary": "Update an Event Rule on a Service", "description": "Update an Event Rule on a Service. Note that the endpoint supports partial updates, so any number of the writable fields can be provided.\n\n> ### End-of-life\n> Rulesets and Event Rules will end-of-life soon. We highly recommend that you [migrate to Event Orchestration](https://support.pagerduty.com/docs/migrate-to-event-orchestration) as soon as possible so you can take advantage of the new functionality, such as improved UI, rule creation, APIs and Terraform support, advanced conditions, and rule nesting.\n\nScoped OAuth requires: `services.write`\n", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" }, { "$ref": "#/components/parameters/rule_id" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "rule": { "$ref": "#/components/schemas/ServiceEventRule" }, "rule_id": { "description": "The id of the Event Rule to update on the Service.", "type": "string" } }, "required": [ "rule_id" ] }, "examples": { "suppress_action": { "summary": "Example: Enable suppress action", "value": { "rule_id": "7123bdd1-74e8-4aa7-aa38-4a9ebe123456", "rule": { "actions": { "suppress": { "value": true } } } } }, "disable_rule": { "summary": "Example: Disable rule", "value": { "rule_id": "7123bdd1-74e8-4aa7-aa38-4a9ebe123456", "rule": { "disabled": true } } } } } } }, "responses": { "200": { "description": "The Event Rule that was updated.", "content": { "application/json": { "schema": { "type": "object", "properties": { "rule": { "$ref": "#/components/schemas/ServiceEventRule" } } }, "examples": { "response": { "summary": "Response Example", "value": { "rule": { "id": "14e56445-ebab-4dd0-ba9d-fc28a41b7e7b", "position": 0, "disabled": false, "self": "https://api.pagerduty.com/services/PI2KBWI/rules/14e56445-ebab-4dd0-ba9d-fc28a41b7e7b", "conditions": { "operator": "and", "subconditions": [ { "operator": "contains", "parameters": { "value": "mysql", "path": "class" } } ] }, "time_frame": { "active_between": { "start_time": 1577880000000, "end_time": 1580558400000 } }, "actions": { "annotate": { "value": "This incident was modified by an Event Rule" }, "priority": { "value": "PCMUB6F" }, "severity": { "value": "warning" }, "extractions": [ { "target": "dedup_key", "source": "custom_details.error_summary", "regex": "Host (.*) is experiencing errors" } ] } } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "405": { "$ref": "#/components/responses/NotAllowed" }, "409": { "$ref": "#/components/responses/Conflict" } } }, "delete": { "x-pd-requires-scope": "services.write", "tags": [ "Services" ], "operationId": "deleteServiceEventRule", "description": "Delete an Event Rule from a Service.\n\n> ### End-of-life\n> Rulesets and Event Rules will end-of-life soon. We highly recommend that you [migrate to Event Orchestration](https://support.pagerduty.com/docs/migrate-to-event-orchestration) as soon as possible so you can take advantage of the new functionality, such as improved UI, rule creation, APIs and Terraform support, advanced conditions, and rule nesting.\n\nScoped OAuth requires: `services.write`\n", "summary": "Delete an Event Rule from a Service", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" }, { "$ref": "#/components/parameters/rule_id" } ], "responses": { "204": { "description": "The Event Rule was deleted successfully." }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "405": { "$ref": "#/components/responses/NotAllowed" }, "409": { "$ref": "#/components/responses/Conflict" } } } }, "/standards": { "get": { "x-pd-requires-scope": "standards.read", "tags": [ "Standards" ], "operationId": "listStandards", "summary": "List Standards", "description": "Get all standards of an account.\n\nScoped OAuth requires: `standards.read`\n", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/active_standard" }, { "$ref": "#/components/parameters/query_resource_type_standard" } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "properties": { "standards": { "type": "array", "items": { "$ref": "#/components/schemas/Standard" } } } } ] }, "examples": { "response": { "summary": "Response Example", "value": { "standards": [ { "active": true, "description": "A description provides critical context about what a service represents or is used for to inform team members and responders. The description should be kept concise and understandable by those without deep knowledge of the service.", "exclusions": [], "id": "01CXX38Q0U8XKHO4LNKXUJTBFG", "inclusions": [ { "type": "technical_service_reference", "id": "P0CPWBO" } ], "name": "Service has a description", "resource_type": "technical_service", "type": "has_technical_service_description" }, { "active": true, "description": "Ensure that no incident goes unaddressed, even if the on-call responder on the first level of the escalation policy is unavailable.", "exclusions": [], "id": "01CXX38Q0Y8D9IYFAEDCH5F53L", "inclusions": [], "name": "Service has an escalation policy with 2 or more unique levels", "resource_type": "technical_service", "type": "minimum_escalation_policy_rule_depth" }, { "active": true, "description": "Extensions or add-ons streamline incident response and communication processes by connecting PagerDuty services to other tools that matter to your incident management workflow.", "exclusions": [], "id": "01CXX38Q11T19P0K1GFKHUZJ35", "inclusions": [], "name": "Service has an extension or add-on (e.g. Slack, etc.)", "resource_type": "technical_service", "type": "minimum_outbound_integrations" } ] } } } } } }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } } }, "/standards/{id}": { "put": { "x-pd-requires-scope": "standards.write", "tags": [ "Standards" ], "summary": "Update a standard", "operationId": "updateStandard", "description": "Updates a standard\n\nScoped OAuth requires: `standards.write`\n", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id_standard" } ], "requestBody": { "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "properties": { "active": { "type": "boolean" }, "values": { "type": "object", "properties": { "regex": { "type": "string" } } }, "description": { "type": "string" }, "inclusions": { "type": "array", "items": { "$ref": "#/components/schemas/StandardInclusionExclusion" } }, "exclusions": { "type": "array", "items": { "$ref": "#/components/schemas/StandardInclusionExclusion" } } } } ] }, "examples": { "request": { "summary": "Request Example", "value": { "active": false } } } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Standard" }, "examples": { "response": { "summary": "Response Example", "value": { "active": false, "description": "A description provides critical context about what a service represents or is used for to inform team members and responders. The description should be kept concise and understandable by those without deep knowledge of the service.", "exclusions": [], "id": "01CXX38Q0U8XKHO4LNKXUJTBFG", "inclusions": [], "name": "Service has a description", "resource_type": "technical_service", "type": "has_technical_service_description" } } } } } }, "400": { "$ref": "#/components/responses/UnprocessableEntity" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } } }, "/standards/scores/{resource_type}": { "get": { "x-pd-requires-scope": "standards.read", "tags": [ "Standards" ], "summary": "List resources' standards scores", "operationId": "listResourceStandardsManyServices", "description": "List standards applied to a set of resources\n\nScoped OAuth requires: `standards.read`\n", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/resource_ids_standard" }, { "$ref": "#/components/parameters/resource_type_standard" } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "properties": { "resources": { "type": "array", "items": { "$ref": "#/components/schemas/StandardApplied" } } } } ] }, "examples": { "response": { "summary": "Response Example", "value": { "resources": [ { "resource_id": "P0CPWBO", "resource_type": "technical_service", "score": { "passing": 1, "total": 1 }, "standards": [ { "active": true, "description": "A description provides critical context about what a service represents or is used for to inform team members and responders. The description should be kept concise and understandable by those without deep knowledge of the service.", "id": "01CXX38Q0U8XKHO4LNKXUJTBFG", "pass": true, "name": "Service has a description", "type": "has_technical_service_description" } ] } ] } } } } } }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } } }, "/standards/scores/{resource_type}/{id}": { "get": { "x-pd-requires-scope": "standards.read", "tags": [ "Standards" ], "summary": "List a resource's standards scores", "operationId": "listResourceStandards", "description": "List standards applied to a specific resource\n\nScoped OAuth requires: `standards.read`\n", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/resource_id_standard" }, { "$ref": "#/components/parameters/resource_type_standard" } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardApplied" }, "examples": { "response": { "summary": "Response Example", "value": { "resource_id": "P0CPWBO", "resource_type": "technical_service", "score": { "passing": 1, "total": 1 }, "standards": [ { "active": true, "description": "A description provides critical context about what a service represents or is used for to inform team members and responders. The description should be kept concise and understandable by those without deep knowledge of the service.", "id": "01CXX38Q0U8XKHO4LNKXUJTBFG", "pass": true, "name": "Service has a description", "type": "has_technical_service_description" } ] } } } } } }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } } }, "/status_dashboards": { "get": { "x-pd-requires-scope": "status_dashboards.read", "tags": [ "Status Dashboards" ], "operationId": "listStatusDashboards", "description": "Get all your account's custom Status Dashboard views.\n\nScoped OAuth requires: `status_dashboards.read`\n", "summary": "List Status Dashboards", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/CursorPagination" }, { "type": "object", "properties": { "status_dashboards": { "type": "array", "items": { "$ref": "#/components/schemas/StatusDashboard" } } } } ] }, "examples": { "response": { "summary": "Response Example", "value": { "limit": 100, "next_cursor": null, "status_dashboards": [ { "id": "PFCVPS0", "url_slug": "analytics-api", "name": "Analytics API" } ] } } } } } }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "429": { "$ref": "#/components/responses/TooManyRequests" } }, "parameters": [ { "$ref": "#/components/parameters/header_Accept" } ] } }, "/status_dashboards/{id}": { "get": { "x-pd-requires-scope": "status_dashboards.read", "tags": [ "Status Dashboards" ], "operationId": "getStatusDashboardById", "description": "Get a Status Dashboard by its PagerDuty `id`.\n\nScoped OAuth requires: `status_dashboards.read`\n", "summary": "Get a single Status Dashboard by `id`", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "status_dashboard": { "$ref": "#/components/schemas/StatusDashboard" } } }, "examples": { "response": { "summary": "Response Example", "value": { "status_dashboard": { "id": "PFCVPS0", "url_slug": "analytics-api", "name": "Analytics API" } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "422": { "$ref": "#/components/responses/UnprocessableEntity" }, "429": { "$ref": "#/components/responses/TooManyRequests" } }, "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/id" } ] } }, "/status_dashboards/{id}/service_impacts": { "get": { "x-pd-requires-scope": "status_dashboards.read", "tags": [ "Status Dashboards" ], "operationId": "getStatusDashboardServiceImpactsById", "description": "Get impacted Business Services for a Status Dashboard by `id`\n\nThis endpoint does not return an exhaustive list of Business Services but rather provides access to the most impacted on the specified Status Dashboard up to the limit of 200.\n\nThe returned Business Services are sorted first by Impact, secondarily by most recently impacted, and finally by name.\n\nTo get Impact information about a specific Business Service on the Status Dashboard that does not appear in the Impact-sorted response, use the `ids[]` parameter on the `/business_services/impacts` endpoint.\n\nScoped OAuth requires: `status_dashboards.read`\n", "summary": "Get impacted Business Services for a Status Dashboard by `id`.", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/LiveListResponse" }, { "type": "object", "properties": { "services": { "type": "array", "items": { "$ref": "#/components/schemas/Impact" } } } }, { "type": "object", "properties": { "additional_fields": { "type": "object", "properties": { "total_impacted_count": { "type": "integer" } } } } } ] }, "examples": { "response": { "summary": "Response Example", "value": { "limit": 100, "more": false, "services": [ { "id": "PD1234", "name": "Web API", "type": "business_service", "status": "impacted", "additional_fields": { "highest_impacting_priority": { "id": "PQOMK4S", "order": 128 } } }, { "id": "PF9KMXH", "name": "Analytics Backend", "type": "business_service", "status": "not_impacted", "additional_fields": { "highest_impacting_priority": null } } ], "additional_fields": { "total_impacted_count": 1 } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "422": { "$ref": "#/components/responses/UnprocessableEntity" }, "429": { "$ref": "#/components/responses/TooManyRequests" } }, "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/id" }, { "$ref": "#/components/parameters/impacts_additional_fields" } ] } }, "/status_dashboards/url_slugs/{url_slug}": { "get": { "x-pd-requires-scope": "status_dashboards.read", "tags": [ "Status Dashboards" ], "operationId": "getStatusDashboardByUrlSlug", "description": "Get a Status Dashboard by its PagerDuty `url_slug`. A `url_slug` is a human-readable reference\nfor a custom Status Dashboard that may be created or changed in the UI. It will generally be a `dash-separated-string-like-this`.\n\nScoped OAuth requires: `status_dashboards.read`\n", "summary": "Get a single Status Dashboard by `url_slug`", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "status_dashboard": { "$ref": "#/components/schemas/StatusDashboard" } } }, "examples": { "response": { "summary": "Response Example", "value": { "status_dashboard": { "id": "PFCVPS0", "url_slug": "analytics-api", "name": "Analytics API" } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "422": { "$ref": "#/components/responses/UnprocessableEntity" }, "429": { "$ref": "#/components/responses/TooManyRequests" } }, "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/url_slug" } ] } }, "/status_dashboards/url_slugs/{url_slug}/service_impacts": { "get": { "x-pd-requires-scope": "status_dashboards.read", "tags": [ "Status Dashboards" ], "operationId": "getStatusDashboardServiceImpactsByUrlSlug", "description": "Get Business Service Impacts for the Business Services on a Status Dashboard by its `url_slug`. A `url_slug` is a human-readable reference\nfor a custom Status Dashboard that may be created or changed in the UI. It will generally be a `dash-separated-string-like-this`.\n\nThis endpoint does not return an exhaustive list of Business Services but rather provides access to the most impacted on the Status Dashboard up to the limit of 200.\n\nThe returned Business Services are sorted first by Impact, secondarily by most recently impacted, and finally by name.\n\nTo get impact information about a specific Business Service on the Status Dashboard that does not appear in the Impact-sored response, use the `ids[]` parameter on the `/business_services/impacts` endpoint.\n\nScoped OAuth requires: `status_dashboards.read`\n", "summary": "Get impacted Business Services for a Status Dashboard by `url_slug`", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/LiveListResponse" }, { "type": "object", "properties": { "services": { "type": "array", "items": { "$ref": "#/components/schemas/Impact" } } } }, { "type": "object", "properties": { "additional_fields": { "type": "object", "properties": { "total_impacted_count": { "type": "integer" } } } } } ] }, "examples": { "response": { "summary": "Response Example", "value": { "limit": 100, "more": false, "services": [ { "id": "PD1234", "name": "Web API", "type": "business_service", "status": "impacted", "additional_fields": { "highest_impacting_priority": { "id": "PQOMK4S", "order": 128 } } }, { "id": "PF9KMXH", "name": "Analytics Backend", "type": "business_service", "status": "not_impacted", "additional_fields": { "highest_impacting_priority": null } } ], "additional_fields": { "total_impacted_count": 1 } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "422": { "$ref": "#/components/responses/UnprocessableEntity" }, "429": { "$ref": "#/components/responses/TooManyRequests" } }, "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/url_slug" }, { "$ref": "#/components/parameters/impacts_additional_fields" } ] } }, "/status_pages": { "get": { "x-pd-requires-scope": "status_pages.read", "tags": [ "Status Pages" ], "operationId": "listStatusPages", "description": "List Status Pages.\n\nScoped OAuth requires: `status_pages.read`\n", "summary": "List Status Pages", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/status_page_type" } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/Pagination" }, { "type": "object", "properties": { "status_pages": { "type": "array", "items": { "$ref": "#/components/schemas/StatusPage" } } } } ] }, "examples": { "response": { "summary": "Response Example", "value": { "limit": 25, "more": false, "offset": 0, "status_pages": [ { "id": "PT4KHLK", "name": "My brand Status Page", "published_at": "2017-09-13T10:11:12.000Z", "status_page_type": "private", "type": "status_page", "url": "https://status.mybrand.example" } ] } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } } }, "/status_pages/{id}/impacts": { "get": { "x-pd-requires-scope": "status_pages.read", "tags": [ "Status Pages" ], "operationId": "listStatusPageImpacts", "description": "List Impacts for a Status Page by Status Page ID.\n\nScoped OAuth requires: `status_pages.read`\n", "summary": "List Status Page Impacts", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/id" }, { "$ref": "#/components/parameters/status_page_impact_post_type" } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/Pagination" }, { "type": "object", "properties": { "impacts": { "type": "array", "items": { "$ref": "#/components/schemas/StatusPageImpact" } } } } ] }, "examples": { "response": { "summary": "Response Example", "value": { "impacts": [ { "description": "operational", "id": "PIJ90N7", "post_type": "incident", "self": "https://api.pagerduty.com/status_pages/PQ8W0D0/impacts/PIJ90N7", "status_page": { "id": "PQ8W0D0", "type": "status_page" }, "type": "status_page_impact" }, { "description": "partial outage", "id": "PF9KMXH", "post_type": "incident", "self": "https://api.pagerduty.com/status_pages/PQ8W0D0/impacts/PF9KMXH", "status_page": { "id": "PQ8W0D0", "type": "status_page" }, "type": "status_page_impact" }, { "description": "outage", "id": "PBAZLIU", "post_type": "incident", "self": "https://api.pagerduty.com/status_pages/PQ8W0D0/impacts/PBAZLIU", "status_page": { "id": "PQ8W0D0", "type": "status_page" }, "type": "status_page_impact" } ], "limit": 25, "more": false, "offset": 0 } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } } }, "/status_pages/{id}/impacts/{impact_id}": { "get": { "x-pd-requires-scope": "status_pages.read", "tags": [ "Status Pages" ], "operationId": "getStatusPageImpact", "description": "Get an Impact for a Status Page by Status Page ID and Impact ID.\n\nScoped OAuth requires: `status_pages.read`\n", "summary": "Get a Status Page Impact", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/id" }, { "$ref": "#/components/parameters/status_page_impact_id" } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "impact": { "$ref": "#/components/schemas/StatusPageImpact" } } }, "examples": { "response": { "summary": "Response Example", "value": { "impact": { "description": "operational", "id": "PIJ90N7", "post_type": "incident", "self": "https://api.pagerduty.com/status_pages/PQ8W0D0/impacts/PIJ90N7", "status_page": { "id": "PQ8W0D0", "type": "status_page" }, "type": "status_page_impact" } } } } } } }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } } }, "/status_pages/{id}/services": { "get": { "x-pd-requires-scope": "status_pages.read", "tags": [ "Status Pages" ], "operationId": "listStatusPageServices", "description": "List Services for a Status Page by Status Page ID.\n\nScoped OAuth requires: `status_pages.read`\n", "summary": "List Status Page Services", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/id" } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/Pagination" }, { "type": "object", "properties": { "services": { "type": "array", "items": { "$ref": "#/components/schemas/StatusPageService" } } } } ] }, "examples": { "response": { "summary": "Response Example", "value": { "limit": 25, "more": false, "offset": 0, "services": [ { "business_service": { "id": "P32NFFO", "self": "https://api.pagerduty.com/business_services/P32NFFO", "type": "business_service" }, "id": "PEYSGVF", "name": "Events API (US)", "status_page": { "id": "PIJ90N7", "type": "status_page" }, "type": "status_page_service" } ], "total": 1 } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } } }, "/status_pages/{id}/services/{service_id}": { "get": { "x-pd-requires-scope": "status_pages.read", "tags": [ "Status Pages" ], "operationId": "getStatusPageService", "description": "Get a Service for a Status Page by Status Page ID and Service ID.\n\nScoped OAuth requires: `status_pages.read`\n", "summary": "Get a Status Page Service", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/id" }, { "$ref": "#/components/parameters/status_page_service_id" } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "service": { "$ref": "#/components/schemas/StatusPageService" } } }, "examples": { "response": { "summary": "Response Example", "value": { "service": { "business_service": { "id": "P32NFFO", "self": "https://api.pagerduty.com/business_services/P32NFFO", "type": "business_service" }, "id": "PEYSGVF", "name": "Events API (US)", "status_page": { "id": "PIJ90N7", "type": "status_page" }, "type": "status_page_service" } } } } } } }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } } }, "/status_pages/{id}/severities": { "get": { "x-pd-requires-scope": "status_pages.read", "tags": [ "Status Pages" ], "operationId": "listStatusPageSeverities", "description": "List Severities for a Status Page by Status Page ID.\n\nScoped OAuth requires: `status_pages.read`\n", "summary": "List Status Page Severities", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/id" }, { "$ref": "#/components/parameters/status_page_severity_post_type" } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/Pagination" }, { "type": "object", "properties": { "severities": { "type": "array", "items": { "$ref": "#/components/schemas/StatusPageSeverity" } } } } ] }, "examples": { "response": { "summary": "Response Example", "value": { "limit": 25, "more": false, "offset": 0, "severities": [ { "description": "all good", "id": "PIJ90N7", "post_type": "incident", "self": "https://api.pagerduty.com/status_pages/PQ8W0D0/severities/PIJ90N7", "status_page": { "id": "PQ8W0D0", "type": "status_page" }, "type": "status_page_severity" }, { "description": "minor", "id": "PF9KMXH", "post_type": "incident", "self": "https://api.pagerduty.com/status_pages/PQ8W0D0/severities/PF9KMXH", "status_page": { "id": "PQ8W0D0", "type": "status_page" }, "type": "status_page_severity" }, { "description": "major", "id": "PBAZLIU", "post_type": "incident", "self": "https://api.pagerduty.com/status_pages/PQ8W0D0/severities/PBAZLIU", "status_page": { "id": "PQ8W0D0", "type": "status_page" }, "type": "status_page_severity" } ], "total": 3 } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } } }, "/status_pages/{id}/severities/{severity_id}": { "get": { "x-pd-requires-scope": "status_pages.read", "tags": [ "Status Pages" ], "operationId": "getStatusPageSeverity", "description": "Get a Severity for a Status Page by Status Page ID and Severity ID.\n\nScoped OAuth requires: `status_pages.read`\n", "summary": "Get a Status Page Severity", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/id" }, { "$ref": "#/components/parameters/status_page_severity_id" } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "severity": { "$ref": "#/components/schemas/StatusPageSeverity" } } }, "examples": { "response": { "summary": "Response Example", "value": { "severity": { "description": "all good", "id": "PIJ90N7", "post_type": "incident", "status_page": { "id": "PQ8W0D0", "type": "status_page" }, "type": "status_page_severity" } } } } } } }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } } }, "/status_pages/{id}/statuses": { "get": { "x-pd-requires-scope": "status_pages.read", "tags": [ "Status Pages" ], "operationId": "listStatusPageStatuses", "description": "List Statuses for a Status Page by Status Page ID.\n\nScoped OAuth requires: `status_pages.read`\n", "summary": "List Status Page Statuses", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/id" }, { "$ref": "#/components/parameters/status_page_status_post_type" } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/Pagination" }, { "type": "object", "properties": { "statuses": { "type": "array", "items": { "$ref": "#/components/schemas/StatusPageStatus" } } } } ] }, "examples": { "response": { "summary": "Response Example", "value": { "limit": 25, "more": false, "offset": 0, "statuses": [ { "description": "investigating", "id": "PIJ90N7", "post_type": "incident", "self": "https://api.pagerduty.com/status_pages/PQ8W0D0/statuses/PIJ90N7", "status_page": { "id": "PQ8W0D0", "type": "status_page" }, "type": "status_page_status" }, { "description": "detected", "id": "PF9KMXH", "post_type": "incident", "self": "https://api.pagerduty.com/status_pages/PQ8W0D0/statuses/PF9KMXH", "status_page": { "id": "PQ8W0D0", "type": "status_page" }, "type": "status_page_status" }, { "description": "resolved", "id": "PF9KMXH", "post_type": "incident", "self": "https://api.pagerduty.com/status_pages/PQ8W0D0/statuses/PF9KMXH", "status_page": { "id": "PQ8W0D0", "type": "status_page" }, "type": "status_page_status" } ], "total": 3 } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } } }, "/status_pages/{id}/statuses/{status_id}": { "get": { "x-pd-requires-scope": "status_pages.read", "tags": [ "Status Pages" ], "operationId": "getStatusPageStatus", "description": "Get a Status for a Status Page by Status Page ID and Status ID.\n\nScoped OAuth requires: `status_pages.read`\n", "summary": "Get a Status Page Status", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/id" }, { "$ref": "#/components/parameters/status_page_status_id" } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "$ref": "#/components/schemas/StatusPageStatus" } } }, "examples": { "response": { "summary": "Response Example", "value": { "status": { "description": "investigating", "id": "PIJ90N7", "post_type": "incident", "self": "https://api.pagerduty.com/status_pages/PQ8W0D0/statuses/PIJ90N7", "status_page": { "id": "PQ8W0D0", "type": "status_page" }, "type": "status_page_status" } } } } } } }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } } }, "/status_pages/{id}/posts": { "get": { "x-pd-requires-scope": "status_pages.read", "tags": [ "Status Pages" ], "operationId": "listStatusPagePosts", "description": "List Posts for a Status Page by Status Page ID.\n\nScoped OAuth requires: `status_pages.read`\n", "summary": "List Status Page Posts", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/id" }, { "$ref": "#/components/parameters/status_page_post_type" }, { "$ref": "#/components/parameters/status_page_post_reviewed_status" }, { "$ref": "#/components/parameters/status_page_post_status" } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/Pagination" }, { "type": "object", "properties": { "posts": { "type": "array", "items": { "$ref": "#/components/schemas/StatusPagePost" } } } } ] }, "examples": { "response": { "summary": "Response Example", "value": { "limit": 25, "more": false, "offset": 0, "posts": [ { "ends_at": "2023-12-12T11:00:00.000Z", "id": "PIJ90N7", "post_type": "maintenance", "postmortem": { "id": "PWZ0PTR", "self": "https://api.pagerduty.com/status_pages/PR5LMML/posts/PIJ90N7/postmortem", "type": "status_page_postmortem" }, "self": "https://api.pagerduty.com/status_pages/PR5LMML/posts/PIJ90N7", "starts_at": "2023-12-12T11:00:00.000Z", "status_page": { "id": "PR5LMML", "type": "status_page" }, "title": "maintenance window for database upgrade", "type": "status_page_post", "updates": [ { "id": "P7HUBBZ", "self": "https://api.pagerduty.com/status_pages/PR5LMML/posts/PIJ90N7/post_updates/P7HUBBZ", "type": "status_page_post_update" } ] } ], "total": 3 } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } }, "post": { "x-pd-requires-scope": "status_pages.write", "tags": [ "Status Pages" ], "operationId": "createStatusPagePost", "description": "Create a Post for a Status Page by Status Page ID.\n\nScoped OAuth requires: `status_pages.write`\n", "summary": "Create a Status Page Post", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/id" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "post": { "$ref": "#/components/schemas/StatusPagePostPostRequest" } }, "required": [ "post" ] }, "example": { "post": { "ends_at": "2023-12-12T11:00:00.000Z", "post_type": "maintenance", "starts_at": "2023-12-12T11:00:00.000Z", "status_page": { "id": "PR5LMML", "type": "status_page" }, "title": "maintenance window for database upgrade", "type": "status_page_post", "updates": [ { "impacted_services": [ { "impact": { "id": "PY5OM08", "type": "status_page_impact" }, "service": { "id": "PYHMEI3", "type": "status_page_service" } } ], "message": "

Message

", "update_frequency_ms": null, "notify_subscribers": false, "severity": { "id": "PY5OM08", "type": "status_page_severity" }, "status": { "id": "P0400H4", "type": "status_page_status" }, "type": "status_page_post_update" } ] } } } } }, "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "properties": { "post": { "$ref": "#/components/schemas/StatusPagePost" } } }, "example": { "post": { "ends_at": "2023-12-12T11:00:00.000Z", "id": "PIJ90N7", "post_type": "maintenance", "postmortem": { "id": "PWZ0PTR", "self": "https://api.pagerduty.com/status_pages/PR5LMML/posts/PIJ90N7/postmortem", "type": "status_page_postmortem" }, "self": "https://api.pagerduty.com/status_pages/PR5LMML/posts/PIJ90N7", "starts_at": "2023-12-12T11:00:00.000Z", "status_page": { "id": "PR5LMML", "type": "status_page" }, "title": "maintenance window for database upgrade", "type": "status_page_post", "updates": [ { "id": "P7HUBBZ", "self": "https://api.pagerduty.com/status_pages/PR5LMML/posts/PIJ90N7/post_updates/P7HUBBZ", "type": "status_page_post_update" } ] } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } } }, "/status_pages/{id}/posts/{post_id}": { "get": { "x-pd-requires-scope": "status_pages.read", "tags": [ "Status Pages" ], "operationId": "getStatusPagePost", "description": "Get a Post for a Status Page by Status Page ID and Post ID.\n\nScoped OAuth requires: `status_pages.read`\n", "summary": "Get a Status Page Post", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/id" }, { "$ref": "#/components/parameters/status_page_post_id" }, { "$ref": "#/components/parameters/status_page_post_include" } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "post": { "$ref": "#/components/schemas/StatusPagePost" } } }, "examples": { "response": { "summary": "Response Example", "value": { "post": { "ends_at": "2023-12-12T11:00:00.000Z", "id": "PIJ90N7", "post_type": "maintenance", "postmortem": { "id": "PWZ0PTR", "self": "https://api.pagerduty.com/status_pages/PR5LMML/posts/PIJ90N7/postmortem", "type": "status_page_postmortem" }, "self": "https://api.pagerduty.com/status_pages/PR5LMML/posts/PIJ90N7", "starts_at": "2023-12-12T11:00:00.000Z", "status_page": { "id": "PR5LMML", "type": "status_page" }, "title": "maintenance window for database upgrade", "type": "status_page_post", "updates": [ { "id": "P7HUBBZ", "self": "https://api.pagerduty.com/status_pages/PR5LMML/posts/PIJ90N7/post_updates/P7HUBBZ", "type": "status_page_post_update" } ] } } } } } } }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } }, "put": { "x-pd-requires-scope": "status_pages.write", "tags": [ "Status Pages" ], "operationId": "updateStatusPagePost", "description": "Update a Post for a Status Page by Status Page ID.\n\nScoped OAuth requires: `status_pages.write`\n", "summary": "Update a Status Page Post", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/id" }, { "$ref": "#/components/parameters/status_page_post_id" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "post": { "$ref": "#/components/schemas/StatusPagePostPutRequest" } }, "required": [ "post" ] }, "example": { "post": { "ends_at": "2023-12-12T11:00:00.000Z", "post_type": "maintenance", "starts_at": "2023-12-12T11:00:00.000Z", "status_page": { "id": "PR5LMML", "type": "status_page" }, "title": "maintenance window for database upgrade", "type": "status_page_post" } } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "post": { "$ref": "#/components/schemas/StatusPagePost" } } }, "examples": { "response": { "summary": "Response Example", "value": { "post": { "ends_at": "2023-12-12T11:00:00.000Z", "post_type": "maintenance", "starts_at": "2023-12-12T11:00:00.000Z", "status_page": { "id": "PR5LMML", "type": "status_page" }, "title": "maintenance window for database upgrade", "type": "status_page_post", "updates": [ { "impacted_services": [ { "impact": { "id": "PY5OM08", "type": "status_page_impact" }, "service": { "id": "PYHMEI3", "type": "status_page_service" } } ], "message": "

Message

", "update_frequency_ms": null, "notify_subscribers": false, "severity": { "id": "PY5OM08", "type": "status_page_severity" }, "status": { "id": "P0400H4", "type": "status_page_status" }, "type": "status_page_post_update" } ] } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } }, "delete": { "x-pd-requires-scope": "status_pages.write", "tags": [ "Status Pages" ], "operationId": "deleteStatusPagePost", "description": "Delete a Post for a Status Page by Status Page ID and Post ID.\n\nScoped OAuth requires: `status_pages.write`\n", "summary": "Delete a Status Page Post", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/id" }, { "$ref": "#/components/parameters/status_page_post_id" } ], "responses": { "204": { "description": "No Content" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } } }, "/status_pages/{id}/posts/{post_id}/post_updates": { "get": { "x-pd-requires-scope": "status_pages.read", "tags": [ "Status Pages" ], "operationId": "listStatusPagePostUpdates", "description": "List Post Updates for a Status Page by Status Page ID and Post ID.\n\nScoped OAuth requires: `status_pages.read`\n", "summary": "List Status Page Post Updates", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/id" }, { "$ref": "#/components/parameters/status_page_post_id" }, { "$ref": "#/components/parameters/status_page_post_update_reviewed_status" } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/Pagination" }, { "type": "object", "properties": { "post_updates": { "type": "array", "items": { "$ref": "#/components/schemas/StatusPagePostUpdate" } } } } ] }, "examples": { "response": { "summary": "Response Example", "value": { "limit": 25, "more": false, "offset": 0, "post_updates": [ { "id": "PXSOCH0", "impacted_services": [ { "impact": { "id": "PY5OM08", "self": "https://api.pagerduty.com/status_pages/PR5LMML/impacts/PY5OM08", "type": "status_page_impact" }, "service": { "id": "PYHMEI3", "self": "https://api.pagerduty.com/status_pages/PR5LMML/services/PYHMEI3", "type": "status_page_service" } } ], "message": "

We will be undergoing schedule maitenance at this date and time

", "notify_subscribers": false, "post": { "id": "P6F2CJ3", "self": "https://api.pagerduty.com/status_pages/PR5LMML/posts/P6F2CJ3", "type": "status_page_post" }, "reported_at": "2023-12-12T10:08:19.000Z", "reviewed_status": "approved", "self": "https://api.pagerduty.com/status_pages/PR5LMML/posts/P6F2CJ3/post_updates/PXSOCH0", "severity": { "id": "PY5OM08", "self": "https://api.pagerduty.com/status_pages/PR5LMML/severities/PY5OM08", "type": "status_page_severity" }, "status": { "id": "P0400H4", "self": "https://api.pagerduty.com/status_pages/PR5LMML/statuses/P0400H4", "type": "status_page_status" }, "type": "status_page_post_update" } ], "total": 1 } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } }, "post": { "x-pd-requires-scope": "status_pages.write", "tags": [ "Status Pages" ], "operationId": "createStatusPagePostUpdate", "description": "Create a Post Update for a Post by Post ID.\n\nScoped OAuth requires: `status_pages.write`\n", "summary": "Create a Status Page Post Update", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/id" }, { "$ref": "#/components/parameters/status_page_post_id" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "post_update": { "$ref": "#/components/schemas/StatusPagePostUpdateRequest" } }, "required": [ "post_update" ] }, "example": { "post_update": { "impacted_services": [ { "impact": { "id": "PY5OM08", "type": "status_page_impact" }, "service": { "id": "PYHMEI3", "type": "status_page_service" } } ], "message": "

Message

", "notify_subscribers": false, "post": { "id": "P6F2CJ3", "type": "status_page_post" }, "severity": { "id": "PY5OM08", "type": "status_page_severity" }, "status": { "id": "P0400H4", "type": "status_page_status" }, "type": "status_page_post_update" } } } } }, "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "properties": { "post_update": { "$ref": "#/components/schemas/StatusPagePostUpdate" } } }, "example": { "post_update": { "id": "PXSOCH0", "impacted_services": [ { "impact": { "id": "PY5OM08", "self": "https://api.pagerduty.com/status_pages/PR5LMML/impacts/PY5OM08", "type": "status_page_impact" }, "service": { "id": "PYHMEI3", "self": "https://api.pagerduty.com/status_pages/PR5LMML/services/PYHMEI3", "type": "status_page_service" } } ], "message": "

We will be undergoing schedule maitenance at this date and time

", "notify_subscribers": false, "post": { "id": "P6F2CJ3", "self": "https://api.pagerduty.com/status_pages/PR5LMML/posts/P6F2CJ3", "type": "status_page_post" }, "reported_at": "2023-12-12T10:08:19.000Z", "self": "https://api.pagerduty.com/status_pages/PR5LMML/posts/P6F2CJ3/post_updates/PXSOCH0", "severity": { "id": "P6F2CJ4", "self": "https://api.pagerduty.com/status_pages/PR5LMML/severities/P6F2CJ4", "type": "status_page_severity" }, "status": { "id": "P6F2CJ3", "self": "https://api.pagerduty.com/status_pages/PR5LMML/statuses/P6F2CJ3", "type": "status_page_status" }, "type": "status_page_post_update", "update_frequency_ms": 300000 } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } } }, "/status_pages/{id}/posts/{post_id}/post_updates/{post_update_id}": { "get": { "x-pd-requires-scope": "status_pages.read", "tags": [ "Status Pages" ], "operationId": "getPostUpdate", "description": "Get a Post Update for a Post by Post ID and Post Update ID.\n\nScoped OAuth requires: `status_pages.read`\n", "summary": "Get a Status Page Post Update", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/id" }, { "$ref": "#/components/parameters/status_page_post_id" }, { "$ref": "#/components/parameters/status_page_post_update_id" } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "post_update": { "$ref": "#/components/schemas/StatusPagePostUpdate" } } }, "examples": { "response": { "summary": "Response Example", "value": { "post_update": { "id": "PXSOCH0", "impacted_services": [ { "impact": { "id": "PY5OM08", "self": "https://api.pagerduty.com/status_pages/PR5LMML/impacts/PY5OM08", "type": "status_page_impact" }, "service": { "id": "PYHMEI3", "self": "https://api.pagerduty.com/status_pages/PR5LMML/services/PYHMEI3", "type": "status_page_service" } } ], "message": "

We will be undergoing schedule maitenance at this date and time

", "notify_subscribers": false, "post": { "id": "P6F2CJ3", "self": "https://api.pagerduty.com/status_pages/PR5LMML/posts/P6F2CJ3", "type": "status_page_post" }, "reported_at": "2023-12-12T10:08:19.000Z", "self": "https://api.pagerduty.com/status_pages/PR5LMML/posts/P6F2CJ3/post_updates/PXSOCH0", "severity": { "id": "P6F2CJ4", "self": "https://api.pagerduty.com/status_pages/PR5LMML/severities/P6F2CJ4", "type": "status_page_severity" }, "status": { "id": "P6F2CJ3", "self": "https://api.pagerduty.com/status_pages/PR5LMML/statuses/P6F2CJ3", "type": "status_page_status" }, "type": "status_page_post_update", "update_frequency_ms": 300000 } } } } } } }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } }, "put": { "x-pd-requires-scope": "status_pages.write", "tags": [ "Status Pages" ], "operationId": "updateStatusPagePostUpdate", "description": "Update a Post Update for a Post by Post ID and Post Update ID.\n\nScoped OAuth requires: `status_pages.write`\n", "summary": "Update a Status Page Post Update", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/id" }, { "$ref": "#/components/parameters/status_page_post_id" }, { "$ref": "#/components/parameters/status_page_post_update_id" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "post_update": { "$ref": "#/components/schemas/StatusPagePostUpdateRequest" } }, "required": [ "post_update" ] }, "example": { "post_update": { "impacted_services": [ { "impact": { "id": "PY5OM08", "type": "status_page_impact" }, "service": { "id": "PYHMEI3", "type": "status_page_service" } } ], "message": "

Message

", "notify_subscribers": false, "post": { "id": "P6F2CJ3", "type": "status_page_post" }, "severity": { "id": "PY5OM08", "type": "status_page_severity" }, "status": { "id": "P0400H4", "type": "status_page_status" }, "type": "status_page_post_update" } } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "post_update": { "$ref": "#/components/schemas/StatusPagePostUpdate" } } }, "examples": { "response": { "summary": "Response Example", "value": { "post_update": { "id": "PXSOCH0", "impacted_services": [ { "impact": { "id": "PY5OM08", "self": "https://api.pagerduty.com/status_pages/PR5LMML/impacts/PY5OM08", "type": "status_page_impact" }, "service": { "id": "PYHMEI3", "self": "https://api.pagerduty.com/status_pages/PR5LMML/services/PYHMEI3", "type": "status_page_service" } } ], "message": "

We will be undergoing schedule maitenance at this date and time

", "notify_subscribers": false, "post": { "id": "P6F2CJ3", "self": "https://api.pagerduty.com/status_pages/PR5LMML/posts/P6F2CJ3", "type": "status_page_post" }, "reported_at": "2023-12-12T10:08:19.000Z", "self": "https://api.pagerduty.com/status_pages/PR5LMML/posts/P6F2CJ3/post_updates/PXSOCH0", "severity": { "id": "P6F2CJ4", "self": "https://api.pagerduty.com/status_pages/PR5LMML/severities/P6F2CJ4", "type": "status_page_severity" }, "status": { "id": "P6F2CJ3", "self": "https://api.pagerduty.com/status_pages/PR5LMML/statuses/P6F2CJ3", "type": "status_page_status" }, "type": "status_page_post_update", "update_frequency_ms": 300000 } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } }, "delete": { "x-pd-requires-scope": "status_pages.write", "tags": [ "Status Pages" ], "operationId": "deleteStatusPagePostUpdate", "description": "Delete a Post Update for a Post by Post ID and Post Update ID.\n\nScoped OAuth requires: `status_pages.write`\n", "summary": "Delete a Status Page Post Update", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/id" }, { "$ref": "#/components/parameters/status_page_post_id" }, { "$ref": "#/components/parameters/status_page_post_update_id" } ], "responses": { "204": { "description": "No Content" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } } }, "/status_pages/{id}/posts/{post_id}/postmortem": { "get": { "x-pd-requires-scope": "status_pages.read", "tags": [ "Status Pages" ], "operationId": "getPostmortem", "description": "Get a Postmortem for a Post by Post ID.\n\nScoped OAuth requires: `status_pages.read`\n", "summary": "Get a Post Postmortem", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/id" }, { "$ref": "#/components/parameters/status_page_post_id" } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "postmortem": { "$ref": "#/components/schemas/StatusPagePostmortem" } } }, "examples": { "response": { "summary": "Response Example", "value": { "postmortem": { "id": "PIJ90N7", "message": "

Something wrong happened and this is a postmortem.

", "notify_subscribers": true, "post": { "id": "P6F2CJ3", "self": "https://api.pagerduty.com/status_pages/PR5LMML/posts/P6F2CJ3", "type": "status_page_post" }, "reported_at": "2023-09-13T10:34:04.000Z", "self": "https://api.pagerduty.com/status_pages/PR5LMML/posts/P6F2CJ3/postmortem", "type": "status_page_post_postmortem" } } } } } } }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } }, "post": { "x-pd-requires-scope": "status_pages.write", "tags": [ "Status Pages" ], "operationId": "createStatusPagePostmortem", "description": "Create a Postmortem for a Post by Post ID.\n\nScoped OAuth requires: `status_pages.write`\n", "summary": "Create a Post Postmortem", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/id" }, { "$ref": "#/components/parameters/status_page_post_id" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "postmortem": { "$ref": "#/components/schemas/StatusPagePostmortemRequest" } }, "required": [ "post_update" ] }, "example": { "postmortem": { "message": "

Something wrong happened and this is a postmortem.

", "notify_subscribers": true, "post": { "id": "P6F2CJ3", "self": "https://api.pagerduty.com/status_pages/PR5LMML/posts/P6F2CJ3", "type": "status_page_post" }, "type": "status_page_post_postmortem" } } } } }, "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "properties": { "postmortem": { "$ref": "#/components/schemas/StatusPagePostmortem" } } }, "example": { "postmortem": { "id": "PIJ90N7", "message": "

Something wrong happened and this is a postmortem.

", "notify_subscribers": true, "post": { "id": "P6F2CJ3", "self": "https://api.pagerduty.com/status_pages/PR5LMML/posts/P6F2CJ3", "type": "status_page_post" }, "reported_at": "2023-09-13T10:34:04.000Z", "self": "https://api.pagerduty.com/status_pages/PR5LMML/posts/P6F2CJ3/postmortem", "type": "status_page_post_postmortem" } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } }, "put": { "x-pd-requires-scope": "status_pages.write", "tags": [ "Status Pages" ], "operationId": "updateStatusPagePostmortem", "description": "Update a Postmortem for a Post by Post ID.\n\nScoped OAuth requires: `status_pages.write`\n", "summary": "Update a Post Postmortem", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/id" }, { "$ref": "#/components/parameters/status_page_post_id" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "postmortem": { "$ref": "#/components/schemas/StatusPagePostmortemRequest" } }, "required": [ "postmortem" ] }, "example": { "postmortem": { "message": "

Something wrong happened and this is a postmortem.

", "notify_subscribers": true, "post": { "id": "P6F2CJ3", "self": "https://api.pagerduty.com/status_pages/PR5LMML/posts/P6F2CJ3", "type": "status_page_post" }, "type": "status_page_post_postmortem" } } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "postmortem": { "$ref": "#/components/schemas/StatusPagePostmortem" } } }, "examples": { "response": { "summary": "Response Example", "value": { "postmortem": { "id": "PIJ90N7", "message": "

Something wrong happened and this is a postmortem.

", "notify_subscribers": true, "post": { "id": "P6F2CJ3", "self": "https://api.pagerduty.com/status_pages/PR5LMML/posts/P6F2CJ3", "type": "status_page_post" }, "reported_at": "2023-09-13T10:34:04.000Z", "self": "https://api.pagerduty.com/status_pages/PR5LMML/posts/P6F2CJ3/postmortem", "type": "status_page_post_postmortem" } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } }, "delete": { "x-pd-requires-scope": "status_pages.write", "tags": [ "Status Pages" ], "operationId": "deleteStatusPagePostmortem", "description": "Delete a Postmortem for a Post by Post ID.\n\nScoped OAuth requires: `status_pages.write`\n", "summary": "Delete a Post Postmortem", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/id" }, { "$ref": "#/components/parameters/status_page_post_id" } ], "responses": { "204": { "description": "No Content" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } } }, "/status_pages/{id}/subscriptions": { "get": { "x-pd-requires-scope": "status_pages.read", "tags": [ "Status Pages" ], "operationId": "listStatusPageSubscriptions", "description": "List Subscriptions for a Status Page by Status Page ID.\n\nScoped OAuth requires: `status_pages.read`\n", "summary": "List Status Page Subscriptions", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/id" }, { "$ref": "#/components/parameters/status_page_subscription_status" }, { "$ref": "#/components/parameters/status_page_subscription_channel" } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/Pagination" }, { "type": "object", "properties": { "subscriptions": { "type": "array", "items": { "$ref": "#/components/schemas/StatusPageSubscription" } } } } ] }, "examples": { "response": { "summary": "Response Example", "value": { "limit": 25, "more": false, "offset": 0, "subscriptions": [ { "channel": "email", "contact": "address@email.example", "id": "PWZ0PTR", "self": "https://api.pagerduty.com/status_pages/PIJ90N7/subscriptions/PWZ0PTR", "status": "active", "status_page": { "id": "PIJ90N7", "type": "status_page" }, "subscribable_object": { "id": "PIJ90N7", "type": "status_page" }, "type": "status_page_susbcription" } ], "total": 1 } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } }, "post": { "x-pd-requires-scope": "status_pages.write", "tags": [ "Status Pages" ], "operationId": "createStatusPageSubscription", "description": "Create a Subscription for a Status Page by Status Page ID.\n\nScoped OAuth requires: `status_pages.write`\n", "summary": "Create a Status Page Subscription", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/id" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "subscription": { "type": "object", "title": "StatusPageSubscriptionRequest", "description": "Request schema for creating a StatusPageSubscription.", "properties": { "channel": { "description": "The channel of the Subscription.", "enum": [ "webhook", "email" ], "nullable": false, "title": "SubscriptionChannel", "type": "string" }, "contact": { "description": "The subscriber's contact - email address or webhook URL.", "type": "string", "nullable": false }, "status_page": { "description": "Status Page", "nullable": false, "properties": { "id": { "description": "The id of the status page.", "type": "string" }, "type": { "description": "A string that determines the schema of the object.", "type": "string" } }, "required": [ "id" ], "type": "object" }, "subscribable_object": { "type": "object", "title": "SubscribableObject", "description": "The subscribed entity for a given subscription.", "properties": { "id": { "description": "The ID of the subscribed entity for a given subscription.", "type": "string", "nullable": false }, "type": { "description": "The type of the subscribed entity for a given subscription.", "enum": [ "status_page", "status_page_service", "status_page_post" ], "type": "string", "nullable": false } } }, "type": { "description": "A string that determines the schema of the object.", "type": "string" } }, "required": [ "channel", "contact", "subscribable_object", "status_page", "type" ] } }, "required": [ "subscription" ] }, "example": { "subscription": { "channel": "email", "contact": "joe@email.example", "status_page": { "id": "PIJ90N7", "type": "status_page" }, "subscribable_object": { "id": "PSX4LJI", "type": "status_page_service" }, "type": "status_page_subscription" } } } } }, "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "properties": { "subscription": { "$ref": "#/components/schemas/StatusPageSubscription" } } }, "example": { "subscription": { "channel": "email", "contact": "address@email.example", "id": "PWZ0PTR", "self": "https://api.pagerduty.com/status_pages/PIJ90N7/subscriptions/PWZ0PTR", "status": "active", "status_page": { "id": "PIJ90N7", "type": "status_page" }, "subscribable_object": { "id": "PSX4LJI", "type": "status_page_service" }, "type": "status_page_subscription" } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } } }, "/status_pages/{id}/subscriptions/{subscription_id}": { "get": { "x-pd-requires-scope": "status_pages.read", "tags": [ "Status Pages" ], "operationId": "getStatusPageSubscription", "description": "Get a Subscription for a Status Page by Status Page ID and Subscription ID.\n\nScoped OAuth requires: `status_pages.read`\n", "summary": "Get a Status Page Subscription", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/id" }, { "$ref": "#/components/parameters/status_page_subscription_id" } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "subscription": { "$ref": "#/components/schemas/StatusPageSubscription" } } }, "examples": { "response": { "summary": "Response Example", "value": { "subscription": { "channel": "email", "contact": "address@email.example", "id": "PWZ0PTR", "self": "https://api.pagerduty.com/status_pages/PIJ90N7/subscriptions/PWZ0PTR", "status": "active", "status_page": { "id": "PIJ90N7", "type": "status_page" }, "subscribable_object": { "id": "PSX4LJI", "type": "status_page_service" }, "type": "status_page_subscription" } } } } } } }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } }, "delete": { "x-pd-requires-scope": "status_pages.write", "tags": [ "Status Pages" ], "operationId": "deleteStatusPageSubscription", "description": "Delete a Subscription for a Status Page by Status Page ID and Subscription ID.\n\nScoped OAuth requires: `status_pages.write`\n", "summary": "Delete a Status Page Subscription", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/id" }, { "$ref": "#/components/parameters/status_page_subscription_id" } ], "responses": { "204": { "description": "No Content" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } } }, "/tags": { "get": { "x-pd-requires-scope": "tags.read", "tags": [ "Tags" ], "operationId": "listTags", "description": "List all of your account's tags.\n\nA Tag is applied to Escalation Policies, Teams or Users and can be used to filter them.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#tags)\n\nScoped OAuth requires: `tags.read`\n", "summary": "List tags", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/offset_limit" }, { "$ref": "#/components/parameters/offset_offset" }, { "$ref": "#/components/parameters/offset_total" }, { "$ref": "#/components/parameters/tag_query" } ], "responses": { "200": { "description": "An array of tags names.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/Pagination" }, { "type": "object", "properties": { "tags": { "type": "array", "items": { "$ref": "#/components/schemas/Tag" } } }, "required": [ "tags" ] } ] }, "examples": { "response": { "summary": "Response Example", "value": { "tags": [ { "type": "tag", "summary": "Batman", "self": "https://api.pagerduty.com/tags/P5IYCNZ", "label": "Batman", "id": "P5IYCNZ", "html_url": null } ], "limit": 100, "offset": 0, "total": 1, "more": false } } } } } }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } }, "post": { "x-pd-requires-scope": "tags.write", "tags": [ "Tags" ], "operationId": "createTags", "description": "Create a Tag.\n\nA Tag is applied to Escalation Policies, Teams or Users and can be used to filter them.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#tags)\n\nScoped OAuth requires: `tags.write`\n", "summary": "Create a tag", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "tag": { "$ref": "#/components/schemas/Tag" } }, "required": [ "tag" ] }, "examples": { "request": { "summary": "Request Example", "value": { "tag": { "type": "tag", "label": "Batman" } } } } } } }, "responses": { "201": { "description": "The tag that was created.", "content": { "application/json": { "schema": { "type": "object", "properties": { "tag": { "$ref": "#/components/schemas/Tag" } }, "required": [ "tag" ] }, "examples": { "response": { "summary": "Response Example", "value": { "tag": { "type": "tag", "summary": "Batman", "self": "https://api.pagerduty.com/tags/P5IYCNZ", "label": "Batman", "id": "P5IYCNZ", "html_url": null } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } } }, "/tags/{id}": { "get": { "x-pd-requires-scope": "tags.read", "tags": [ "Tags" ], "operationId": "getTag", "description": "Get details about an existing Tag.\n\nA Tag is applied to Escalation Policies, Teams or Users and can be used to filter them.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#tags)\n\nScoped OAuth requires: `tags.read`\n", "summary": "Get a tag", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" } ], "responses": { "200": { "description": "The tag requested.", "content": { "application/json": { "schema": { "type": "object", "properties": { "tag": { "$ref": "#/components/schemas/Tag" } }, "required": [ "tag" ] }, "examples": { "response": { "summary": "Response Example", "value": { "tag": { "type": "tag", "summary": "Batman", "self": "https://api.pagerduty.com/tags/P5IYCNZ", "label": "Batman", "id": "P5IYCNZ", "html_url": null } } } } } } }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } }, "delete": { "x-pd-requires-scope": "tags.write", "tags": [ "Tags" ], "operationId": "deleteTag", "description": "Remove an existing Tag.\n\nA Tag is applied to Escalation Policies, Teams or Users and can be used to filter them.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#tags)\n\nScoped OAuth requires: `tags.write`\n", "summary": "Delete a tag", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" } ], "responses": { "204": { "description": "The tag was deleted successfully." }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } } }, "/tags/{id}/{entity_type}": { "get": { "x-pd-requires-scope": "tags.read", "tags": [ "Tags" ], "operationId": "getTagsByEntityType", "description": "Get related Users, Teams or Escalation Policies for the Tag.\n\nA Tag is applied to Escalation Policies, Teams or Users and can be used to filter them.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#tags)\n\nScoped OAuth requires: `tags.read`\n", "summary": "Get connected entities", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/offset_limit" }, { "$ref": "#/components/parameters/offset_offset" }, { "$ref": "#/components/parameters/offset_total" }, { "$ref": "#/components/parameters/id" }, { "$ref": "#/components/parameters/entity_type" } ], "responses": { "200": { "description": "An array of connected entities.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/Pagination" }, { "type": "object", "properties": { "users": { "type": "array", "items": { "$ref": "#/components/schemas/EntityReference" } }, "teams": { "type": "array", "items": { "$ref": "#/components/schemas/EntityReference" } }, "escalation_policies": { "type": "array", "items": { "$ref": "#/components/schemas/EntityReference" } } } } ] }, "examples": { "response": { "summary": "Response Example", "value": { "users": [ { "id": "PXPGF42", "type": "user_reference" }, { "id": "PAM4FGS", "type": "user_reference" } ], "limit": 100, "offset": 0, "total": 2, "more": false } } } } } }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } } }, "/teams": { "description": "List or create teams.", "post": { "x-pd-requires-scope": "teams.write", "tags": [ "Teams" ], "operationId": "createTeam", "description": "Create a new Team.\n\nA team is a collection of Users and Escalation Policies that represent a group of people within an organization.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#teams)\n\nScoped OAuth requires: `teams.write`\n", "summary": "Create a team", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "team": { "$ref": "#/components/schemas/Team" } }, "required": [ "team" ] }, "examples": { "request": { "summary": "Request Example", "value": { "team": { "type": "team", "name": "Engineering", "description": "The engineering team" } } } } } }, "description": "The team to be created." }, "responses": { "201": { "description": "The team that was created.", "content": { "application/json": { "schema": { "type": "object", "properties": { "team": { "$ref": "#/components/schemas/Team" } }, "required": [ "team" ] }, "examples": { "response": { "summary": "Response Example", "value": { "team": { "id": "PQ9K7I8", "type": "team", "summary": "Engineering", "self": "https://api.pagerduty.com/teams/PQ9K7I8", "html_url": "https://subdomain.pagerduty.com/teams/PQ9K7I8", "name": "Engineering", "description": "All engineering", "base_role": "observer" } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "402": { "$ref": "#/components/responses/PaymentRequired" }, "403": { "$ref": "#/components/responses/Forbidden" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } }, "get": { "x-pd-requires-scope": "teams.read", "tags": [ "Teams" ], "operationId": "listTeams", "description": "List teams of your PagerDuty account, optionally filtered by a search query.\n\nA team is a collection of Users and Escalation Policies that represent a group of people within an organization.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#teams)\n\nScoped OAuth requires: `teams.read`\n", "summary": "List teams", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/offset_limit" }, { "$ref": "#/components/parameters/offset_offset" }, { "$ref": "#/components/parameters/offset_total" }, { "$ref": "#/components/parameters/query" } ], "responses": { "200": { "description": "A paginated array of teams.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/Pagination" }, { "type": "object", "properties": { "teams": { "type": "array", "items": { "$ref": "#/components/schemas/Team" } } }, "required": [ "teams" ] } ] }, "examples": { "response": { "summary": "Response Example", "value": { "teams": [ { "id": "PQ9K7I8", "type": "team", "summary": "Engineering", "self": "https://api.pagerduty.com/teams/PQ9K7I8", "html_url": "https://subdomain.pagerduty.com/teams/PQ9K7I8", "name": "Engineering", "description": "All engineering" } ], "limit": 100, "offset": 0, "more": false, "total": null } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "402": { "$ref": "#/components/responses/PaymentRequired" }, "403": { "$ref": "#/components/responses/Forbidden" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } } }, "/teams/{id}": { "description": "Manage a team.", "get": { "x-pd-requires-scope": "teams.read", "tags": [ "Teams" ], "operationId": "getTeam", "description": "Get details about an existing team.\n\nA team is a collection of Users and Escalation Policies that represent a group of people within an organization.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#teams)\n\nScoped OAuth requires: `teams.read`\n", "summary": "Get a team", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" }, { "$ref": "#/components/parameters/include_teams" } ], "responses": { "200": { "description": "The team requested.", "content": { "application/json": { "schema": { "type": "object", "properties": { "team": { "$ref": "#/components/schemas/Team" } }, "required": [ "team" ] }, "examples": { "response": { "summary": "Response Example", "value": { "team": { "id": "PQ9K7I8", "type": "team", "summary": "Engineering", "self": "https://api.pagerduty.com/teams/PQ9K7I8", "html_url": "https://subdomain.pagerduty.com/teams/PQ9K7I8", "name": "Engineering", "description": "All engineering", "default_role": "observer" } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "402": { "$ref": "#/components/responses/PaymentRequired" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } }, "delete": { "x-pd-requires-scope": "teams.write", "tags": [ "Teams" ], "operationId": "deleteTeam", "description": "Remove an existing team.\n\nSucceeds only if the team has no associated Escalation Policies, Services, Schedules and Subteams.\n\nAll associated unresovled incidents will be reassigned to another team (if specified) or will loose team association, thus becoming account-level (with visibility implications).\n\nNote that the incidents reassignment process is asynchronous and has no guarantee to complete before the API call return.\n\nA team is a collection of Users and Escalation Policies that represent a group of people within an organization.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#teams)\n\nScoped OAuth requires: `teams.write`\n", "summary": "Delete a team", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/reassignment_team" }, { "$ref": "#/components/parameters/id" } ], "responses": { "204": { "description": "The team was deleted successfully." }, "401": { "$ref": "#/components/responses/Unauthorized" }, "402": { "$ref": "#/components/responses/PaymentRequired" }, "403": { "$ref": "#/components/responses/Forbidden" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } }, "put": { "x-pd-requires-scope": "teams.write", "tags": [ "Teams" ], "operationId": "updateTeam", "description": "Update an existing team.\n\nA team is a collection of Users and Escalation Policies that represent a group of people within an organization.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#teams)\n\nScoped OAuth requires: `teams.write`\n", "summary": "Update a team", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "team": { "$ref": "#/components/schemas/Team" } }, "required": [ "team" ] }, "examples": { "request": { "summary": "Request Example", "value": { "team": { "type": "team", "name": "Engineering", "description": "The engineering team" } } } } } }, "description": "The team to be updated." }, "responses": { "200": { "description": "The team that was updated.", "content": { "application/json": { "schema": { "type": "object", "properties": { "team": { "$ref": "#/components/schemas/Team" } }, "required": [ "team" ] }, "examples": { "response": { "summary": "Response Example", "value": { "team": { "id": "PQ9K7I8", "type": "team", "summary": "Engineering", "self": "https://api.pagerduty.com/teams/PQ9K7I8", "html_url": "https://subdomain.pagerduty.com/teams/PQ9K7I8", "name": "Engineering", "description": "All engineering", "default_role": "observer" } } } } } } }, "401": { "$ref": "#/components/responses/Unauthorized" }, "402": { "$ref": "#/components/responses/PaymentRequired" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } } }, "/teams/{id}/audit/records": { "description": "List audit records of changes made to the team.", "get": { "x-pd-requires-scope": "audit_records.read", "tags": [ "Teams" ], "operationId": "listTeamsAuditRecords", "summary": "List audit records for a team", "description": "The returned records are sorted by the `execution_time` from newest to oldest.\n\nSee [`Cursor-based pagination`](https://developer.pagerduty.com/docs/rest-api-v2/pagination/) for instructions on how to paginate through the result set.\n\nFor more information see the [Audit API Document](https://developer.pagerduty.com/docs/rest-api-v2/audit-records-api/).\n\nScoped OAuth requires: `audit_records.read`\n", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" }, { "$ref": "#/components/parameters/cursor_limit" }, { "$ref": "#/components/parameters/cursor_cursor" }, { "$ref": "#/components/parameters/audit_since" }, { "$ref": "#/components/parameters/audit_until" } ], "responses": { "200": { "description": "Records matching the query criteria.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuditRecordResponseSchema" }, "examples": { "response": { "$ref": "#/components/examples/AuditRecordTeamResponse" } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "402": { "$ref": "#/components/responses/PaymentRequired" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" }, "500": { "$ref": "#/components/responses/InternalServerError" } } } }, "/teams/{id}/escalation_policies/{escalation_policy_id}": { "description": "Manage an escalation policy for a team.", "delete": { "tags": [ "Teams" ], "x-pd-requires-scope": "teams.write", "operationId": "deleteTeamEscalationPolicy", "description": "Remove an escalation policy from a team.\n\nA team is a collection of Users and Escalation Policies that represent a group of people within an organization.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#teams)\n\nScoped OAuth requires: `teams.write`\n", "summary": "Remove an escalation policy from a team", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" }, { "$ref": "#/components/parameters/team_escalation_policy_id" } ], "responses": { "204": { "description": "The escalation policy was removed from the team." }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "402": { "$ref": "#/components/responses/PaymentRequired" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } }, "put": { "tags": [ "Teams" ], "x-pd-requires-scope": "teams.write", "operationId": "updateTeamEscalationPolicy", "description": "Add an escalation policy to a team.\n\nA team is a collection of Users and Escalation Policies that represent a group of people within an organization.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#teams)\n\nScoped OAuth requires: `teams.write`\n", "summary": "Add an escalation policy to a team", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" }, { "$ref": "#/components/parameters/team_escalation_policy_id" } ], "responses": { "204": { "description": "The escalation policy was added to the team." }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "402": { "$ref": "#/components/responses/PaymentRequired" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } } }, "/teams/{id}/members": { "description": "List information about members within a team.", "get": { "x-pd-requires-scope": "teams.read", "tags": [ "Teams" ], "operationId": "listTeamUsers", "description": "Get information about members on a team.\n\nA team is a collection of Users and Escalation Policies that represent a group of people within an organization.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#teams)\n\nScoped OAuth requires: `teams.read`\n", "summary": "List members of a team", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/offset_limit" }, { "$ref": "#/components/parameters/offset_offset" }, { "$ref": "#/components/parameters/offset_total" }, { "$ref": "#/components/parameters/id" }, { "$ref": "#/components/parameters/include_teams_members" } ], "responses": { "200": { "description": "A paginated array of users within the requested team.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/Pagination" }, { "type": "object", "properties": { "members": { "type": "array", "uniqueItems": false, "items": { "type": "object", "properties": { "user": { "$ref": "#/components/schemas/UserReference" }, "role": { "type": "string" } } } } } } ] }, "examples": { "response": { "summary": "Response Example", "value": { "members": [ { "user": { "id": "P0XJYI9", "type": "user_reference", "summary": "Jane Doe", "self": "https://api.pagerduty.com/users/P0XJYI9", "html_url": "https://subdomain.pagerduty.com/users/P0XJYI9" }, "role": "manager" } ], "limit": 100, "offset": 0, "more": false, "total": null } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } } }, "/teams/{id}/notification_subscriptions": { "get": { "x-pd-requires-scope": "subscribers.read", "summary": "List Team Notification Subscriptions", "tags": [ "Teams" ], "operationId": "getTeamNotificationSubscriptions", "description": "Retrieve a list of Notification Subscriptions the given Team has.\n\n\n> Teams must be added through `POST /teams/{id}/notification_subscriptions` to be returned from this endpoint.\n\nScoped OAuth requires: `subscribers.read`\n", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/id" } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/Pagination" }, { "type": "object", "properties": { "subscriptions": { "type": "array", "items": { "type": "object", "properties": { "subscription": { "$ref": "#/components/schemas/NotificationSubscription" }, "subscribable_name": { "type": "string", "nullable": true, "description": "The name of the subscribable" } } } } }, "required": [ "subscriptions" ] } ] }, "examples": { "response": { "summary": "Response Example", "value": { "subscriptions": [ { "subscription": { "subscriber_id": "PD1234", "subscriber_type": "team", "subscribable_id": "PD1234", "subscribable_type": "incident", "subscribable_name": null, "account_id": "PD1234" } }, { "subscription": { "subscriber_id": "PD1234", "subscriber_type": "team", "subscribable_id": "PD1234", "subscribable_type": "business_service", "subscribable_name": "Online Payment", "account_id": "PD1234" } } ], "limit": 2, "offset": 0, "total": 1000, "more": true } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } }, "post": { "x-pd-requires-scope": "subscribers.write", "summary": "Create Team Notification Subscriptions", "tags": [ "Teams" ], "operationId": "createTeamNotificationSubscriptions", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "subscriptions": { "type": "array", "items": { "$ref": "#/components/schemas/NotificationSubscriptionWithContext" } } } }, "examples": { "response": { "summary": "Response Example", "value": { "subscriptions": [ { "account_id": "PD1234", "subscribable_id": "PD1234", "subscribable_type": "incident", "subscriber_id": "PD1234", "subscriber_type": "team", "result": "success" }, { "account_id": "PD1234", "subscribable_id": "PD1234", "subscribable_type": "business_service", "subscriber_id": "PD1234", "subscriber_type": "team", "result": "duplicate" }, { "account_id": "PD1234", "subscribable_id": "PD1235", "subscribable_type": "business_service", "subscriber_id": "PD1234", "subscriber_type": "team", "result": "unauthorized" } ] } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "422": { "$ref": "#/components/responses/UnprocessableEntity" } }, "description": "Create new Notification Subscriptions for the given Team.\n\nScoped OAuth requires: `subscribers.write`\n", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/id" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "subscribables": { "type": "array", "uniqueItems": true, "minItems": 1, "items": { "$ref": "#/components/schemas/NotificationSubscribable" } } }, "required": [ "subscribables" ] }, "examples": { "request": { "summary": "Request Example", "value": { "subscribables": [ { "subscribable_type": "incident", "subscribable_id": "PD1234" }, { "subscribable_type": "business_service", "subscribable_id": "PD1234" }, { "subscribable_type": "business_service", "subscribable_id": "PD1235" } ] } } } } }, "description": "The entities to subscribe to." } } }, "/teams/{id}/notification_subscriptions/unsubscribe": { "summary": "Remove Team Notification Subscriptions", "post": { "x-pd-requires-scope": "subscribers.write", "tags": [ "Teams" ], "operationId": "removeTeamNotificationSubscriptions", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "deleted_count": { "type": "number" }, "unauthorized_count": { "type": "number" }, "non_existent_count": { "type": "number" } }, "required": [ "deleted_count", "unauthorized_count", "non_existent_count" ] }, "examples": { "response": { "summary": "Response Example", "value": { "deleted_count": 1, "unauthorized_count": 1, "non_existent_count": 0 } } } } } }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "422": { "$ref": "#/components/responses/UnprocessableEntity" } }, "description": "Unsubscribe the given Team from Notifications on the matching Subscribable entities.\n\nScoped OAuth requires: `subscribers.write`\n", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/id" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "subscribables": { "type": "array", "uniqueItems": true, "minItems": 1, "items": { "$ref": "#/components/schemas/NotificationSubscribable" } } }, "required": [ "subscribables" ] }, "examples": { "request": { "summary": "Response Example", "value": { "subscribables": [ { "subscribable_type": "incident", "subscribable_id": "PD1234" }, { "subscribable_type": "business_service", "subscribable_id": "PD1234" } ] } } } } }, "description": "The entities to unsubscribe from." } } }, "/teams/{id}/users/{user_id}": { "description": "Manage team memberships.", "delete": { "x-pd-requires-scope": "teams.write", "tags": [ "Teams" ], "operationId": "deleteTeamUser", "description": "Remove a user from a team.\n\nA team is a collection of Users and Escalation Policies that represent a group of people within an organization.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#teams)\n\nScoped OAuth requires: `teams.write`\n", "summary": "Remove a user from a team", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" }, { "$ref": "#/components/parameters/team_user_id" } ], "responses": { "204": { "description": "The user was removed to the team." }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "402": { "$ref": "#/components/responses/PaymentRequired" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } }, "put": { "x-pd-requires-scope": "teams.write", "tags": [ "Teams" ], "operationId": "updateTeamUser", "description": "Add a user to a team. Attempting to add a user with the `read_only_user` role will return a 400 error.\n\nA team is a collection of Users and Escalation Policies that represent a group of people within an organization.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#teams)\n\nScoped OAuth requires: `teams.write`\n", "summary": "Add a user to a team", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" }, { "$ref": "#/components/parameters/team_user_id" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "role": { "type": "string", "description": "The role of the user on the team.", "enum": [ "observer", "responder", "manager" ] } } }, "examples": { "role": { "summary": "Request Example", "value": { "role": "observer" } } } } }, "description": "The role of the user on the team." }, "responses": { "204": { "description": "The user was added to the team." }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "402": { "$ref": "#/components/responses/PaymentRequired" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } } }, "/templates": { "description": "List and Create Templates", "get": { "x-pd-requires-scope": "templates.read", "tags": [ "Templates" ], "operationId": "getTemplates", "description": "Get a list of all the template on an account\n\nScoped OAuth requires: `templates.read`\n", "summary": "List templates", "parameters": [ { "$ref": "#/components/parameters/offset_limit" }, { "$ref": "#/components/parameters/offset_offset" }, { "$ref": "#/components/parameters/offset_total" }, { "$ref": "#/components/parameters/template_query" }, { "$ref": "#/components/parameters/template_type" }, { "$ref": "#/components/parameters/sort_by_template" } ], "responses": { "200": { "description": "A paginated array of templates.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/Pagination" }, { "type": "object", "properties": { "templates": { "type": "array", "items": { "$ref": "#/components/schemas/Template" } } }, "required": [ "templates" ] } ] }, "examples": { "response": { "summary": "Response Example", "value": { "limit": 25, "more": false, "offset": 0, "templates": [ { "created_at": "2022-12-30T16:00:00Z", "created_by": { "id": "PDZR4CN", "self": "https://api.pagerduty.com/users/PDZR4CN", "type": "user_reference" }, "description": "Sample template description", "id": "PBZUP2B", "name": "Sample Template 160", "self": "https://api.pagerduty.com/templates/PBZUP2B", "template_type": "status_update", "type": "template", "updated_at": "2022-12-30T16:00:00Z", "updated_by": { "id": "PGY287N", "self": "https://api.pagerduty.com/users/PGY287N", "type": "user_reference" } } ], "total": null } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "402": { "$ref": "#/components/responses/PaymentRequired" }, "403": { "$ref": "#/components/responses/Forbidden" }, "500": { "$ref": "#/components/responses/InternalServerError" } } }, "post": { "x-pd-requires-scope": "templates.write", "tags": [ "Templates" ], "operationId": "createTemplate", "description": "Create a new template\n\nScoped OAuth requires: `templates.write`\n", "summary": "Create a template", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "template": { "$ref": "#/components/schemas/EditableTemplate" } }, "required": [ "template" ] }, "examples": { "request": { "summary": "Request Example", "value": { "template": { "description": "Sample template description", "templated_fields": { "email_body": "

sample
", "email_subject": "Sample email Subject", "message": "Sample SMS message" }, "name": "Sample Template", "template_type": "status_update" } } } } } }, "required": true }, "responses": { "201": { "description": "Template successfully created", "content": { "application/json": { "x-type": true, "schema": { "type": "object", "properties": { "template": { "$ref": "#/components/schemas/Template" } }, "required": [ "template" ] }, "examples": { "response": { "summary": "Response Example", "value": { "template": { "created_at": "2022-08-19T13:46:22Z", "created_by": { "id": "PF9KMXH", "self": "https://api.pagerduty.com/users/PF9KMXH", "type": "user_reference" }, "description": "Sample template description", "templated_fields": { "email_body": "
sample
", "email_subject": "Sample email Subject", "message": "Sample SMS message" }, "id": "PCCR863", "name": "Sample Template", "self": "https://api.pagerduty.com/templates/PCCR863", "template_type": "status_update", "type": "template", "updated_at": "2022-08-19T13:46:22Z", "updated_by": { "id": "PF9KMXH", "self": "https://api.pagerduty.com/users/PF9KMXH", "type": "user_reference" } } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "402": { "$ref": "#/components/responses/PaymentRequired" }, "403": { "$ref": "#/components/responses/Forbidden" }, "500": { "$ref": "#/components/responses/InternalServerError" } } } }, "/templates/{id}": { "description": "Update and Delete Templates", "get": { "x-pd-requires-scope": "templates.read", "tags": [ "Templates" ], "operationId": "getTemplate", "description": "Get a single template on the account\n\nScoped OAuth requires: `templates.read`\n", "summary": "Get a template", "parameters": [ { "$ref": "#/components/parameters/id" } ], "responses": { "200": { "description": "Successful operation", "content": { "application/json": { "schema": { "type": "object", "properties": { "template": { "$ref": "#/components/schemas/Template" } }, "required": [ "template" ] }, "examples": { "response": { "summary": "Response Example", "value": { "template": { "created_at": "2022-12-30T16:00:00Z", "created_by": { "id": "PDZR4CN", "self": "https://api.pagerduty.com/users/PDZR4CN", "type": "user_reference" }, "description": "Sample template description", "templated_fields": { "email_body": "
sample
", "email_subject": "Sample email Subject", "message": "Sample template message" }, "id": "PBZUP2B", "name": "Sample Template 160", "self": "https://api.pagerduty.com/templates/PBZUP2B", "template_type": "status_update", "type": "template", "updated_at": "2022-12-30T16:00:00Z", "updated_by": { "id": "PGY287N", "self": "https://api.pagerduty.com/users/PGY287N", "type": "user_reference" } } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "402": { "$ref": "#/components/responses/PaymentRequired" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalServerError" } } }, "put": { "x-pd-requires-scope": "templates.write", "tags": [ "Templates" ], "operationId": "updateTemplate", "description": "Update an existing template\n\nScoped OAuth requires: `templates.write`\n", "summary": "Update a template", "parameters": [ { "$ref": "#/components/parameters/id" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "template": { "$ref": "#/components/schemas/EditableTemplate" } }, "required": [ "template" ] }, "examples": { "request": { "summary": "Request Example", "value": { "template": { "description": "Sample template description", "templated_fields": { "email_body": "
sample
", "email_subject": "Sample email Subject", "message": "Sample SMS message" }, "name": "Sample Template", "template_type": "status_update" } } } } } }, "required": true }, "responses": { "200": { "description": "Successful operation", "content": { "application/json": { "schema": { "type": "object", "properties": { "template": { "$ref": "#/components/schemas/Template" } }, "required": [ "template" ] }, "examples": { "response": { "summary": "Response Example", "value": { "template": { "created_at": "2022-08-19T13:46:22Z", "created_by": { "id": "PF9KMXH", "self": "https://api.pagerduty.com/users/PF9KMXH", "type": "user_reference" }, "description": "Sample template description", "templated_fields": { "email_body": "
sample
", "email_subject": "Sample email Subject", "message": "Sample SMS message" }, "id": "PCCR863", "name": "Sample Template", "self": "https://api.pagerduty.com/templates/PCCR863", "template_type": "status_update", "type": "template", "updated_at": "2022-08-19T13:46:22Z", "updated_by": { "id": "PF9KMXH", "self": "https://api.pagerduty.com/users/PF9KMXH", "type": "user_reference" } } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "402": { "$ref": "#/components/responses/PaymentRequired" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalServerError" } } }, "delete": { "x-pd-requires-scope": "templates.write", "tags": [ "Templates" ], "operationId": "deleteTemplate", "description": "Delete a specific of templates on the account\n\nScoped OAuth requires: `templates.write`\n", "summary": "Delete a template", "parameters": [ { "$ref": "#/components/parameters/id" } ], "responses": { "204": { "description": "Successful operation" }, "400": { "$ref": "#/components/responses/ArgumentError" }, "402": { "$ref": "#/components/responses/PaymentRequired" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalServerError" } } } }, "/templates/{id}/render": { "post": { "x-pd-requires-scope": "templates.read", "tags": [ "Templates" ], "operationId": "renderTemplate", "summary": "Render a template", "description": "Render a template. This endpoint has a variable request body depending on the template type. For the `status_update` template type, the caller will provide the incident id, and a status update message.\n\nScoped OAuth requires: `templates.read`\n", "parameters": [ { "$ref": "#/components/parameters/id" } ], "requestBody": { "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/StatusUpdateTemplateInput" } ] }, "examples": { "request": { "summary": "Request Example", "value": { "incident_id": "QT4KHLK034QWE34", "status_update": { "message": "Status update message" } } } } } }, "required": true }, "responses": { "200": { "description": "Successful operation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RenderedTemplate" }, "examples": { "response": { "value": { "templated_fields": { "email_subject": "Update: Status update message", "email_body": "
Status update message
", "message": "Update: Status update message" }, "warnings": [ { "email_body": [ "{{incident.bad_value}} does not exist." ] } ], "errors": [] } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "402": { "$ref": "#/components/responses/PaymentRequired" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalServerError" } } } }, "/templates/fields": { "get": { "x-pd-requires-scope": "templates.read", "tags": [ "Templates" ], "operationId": "getTemplateFields", "description": "Get a list of fields that can be used on the account templates.\n\nScoped OAuth requires: `templates.read`\n", "summary": "List template fields", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" } ], "responses": { "200": { "description": "An array of template fields.", "content": { "application/json": { "schema": { "type": "object", "properties": { "fields": { "type": "array", "items": { "title": "Field", "type": "object", "properties": { "data_type": { "type": "string", "description": "The kind of data the template field is allowed to contain.", "enum": [ "boolean", "integer", "float", "string", "datetime", "url" ] }, "default_value": { "type": "string", "description": "The default value of the template field.", "nullable": true }, "description": { "type": "string", "description": "A short description of the template field.", "nullable": true }, "domain_name": { "type": "object", "properties": { "order": { "type": "integer" }, "summary": { "type": "string" } } }, "example": { "type": "string", "description": "An example value for the template field.", "nullable": true }, "keyword": { "type": "string", "nullable": true }, "summary": { "type": "string", "description": "A short summary of the template field." }, "type": { "type": "string", "description": "The type of template field.", "enum": [ "standard_field", "custom_field" ] } } } } }, "required": [ "fields" ] }, "examples": { "response": { "summary": "Response Example", "value": { "fields": [ { "data_type": "datetime", "default_value": null, "description": "The time the incident was created.", "domain": { "order": 1, "summary": "Incident" }, "example": "2023-11-22T07:12:50Z", "keyword": null, "summary": "incident.created_at", "type": "standard_field" }, { "data_type": "string", "default_value": null, "description": "The name of the escalation policy attached to the service that the incident is on", "domain": { "order": 1, "summary": "Incident" }, "example": "Another Escalation Policy", "keyword": "name", "summary": "incident.escalation_policy.summary", "type": "standard_field" }, { "data_type": "string", "default_value": "default value", "description": "An account defined custom field", "domain": { "order": 1, "summary": "Incident" }, "example": null, "keyword": null, "summary": "incident.custom_field", "type": "custom_field" } ] } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "402": { "$ref": "#/components/responses/PaymentRequired" }, "403": { "$ref": "#/components/responses/Forbidden" }, "500": { "$ref": "#/components/responses/InternalServerError" } } } }, "/users": { "description": "List and create users.", "get": { "x-pd-requires-scope": "users.read", "tags": [ "Users" ], "operationId": "listUsers", "description": "List users of your PagerDuty account, optionally filtered by a search query.\n\nUsers are members of a PagerDuty account that have the ability to interact with Incidents and other data on the account.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#users)\n\nScoped OAuth requires: `users.read`\n", "summary": "List users", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/query" }, { "$ref": "#/components/parameters/team_ids" }, { "$ref": "#/components/parameters/offset_limit" }, { "$ref": "#/components/parameters/offset_offset" }, { "$ref": "#/components/parameters/offset_total" }, { "$ref": "#/components/parameters/include_user" } ], "responses": { "200": { "description": "A paginated array of users.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/Pagination" }, { "type": "object", "properties": { "users": { "type": "array", "items": { "$ref": "#/components/schemas/User" } } }, "required": [ "users" ] } ] }, "examples": { "response": { "summary": "Response Example", "value": { "users": [ { "id": "PXPGF42", "type": "user", "summary": "Earline Greenholt", "self": "https://api.pagerduty.com/users/PXPGF42", "html_url": "https://subdomain.pagerduty.com/users/PXPGF42", "name": "Earline Greenholt", "email": "125.greenholt.earline@graham.name", "time_zone": "America/Lima", "color": "green", "role": "admin", "avatar_url": "https://secure.gravatar.com/avatar/a8b714a39626f2444ee05990b078995f.png?d=mm&r=PG", "description": "I'm the boss", "invitation_sent": false, "contact_methods": [ { "id": "PTDVERC", "type": "email_contact_method_reference", "summary": "Default", "self": "https://api.pagerduty.com/users/PXPGF42/contact_methods/PTDVERC" } ], "notification_rules": [ { "id": "P8GRWKK", "type": "assignment_notification_rule_reference", "summary": "Default", "self": "https://api.pagerduty.com/users/PXPGF42/notification_rules/P8GRWKK", "html_url": null } ], "job_title": "Director of Engineering", "teams": [ { "id": "PQ9K7I8", "type": "team_reference", "summary": "Engineering", "self": "https://api.pagerduty.com/teams/PQ9K7I8", "html_url": "https://subdomain.pagerduty.com/teams/PQ9K7I8" } ] }, { "id": "PAM4FGS", "type": "user", "summary": "Kyler Kuhn", "self": "https://api.pagerduty.com/users/PAM4FGS", "html_url": "https://subdomain.pagerduty.com/users/PAM4FGS", "name": "Kyler Kuhn", "email": "126_dvm_kyler_kuhn@beahan.name", "time_zone": "Asia/Hong_Kong", "color": "red", "role": "admin", "avatar_url": "https://secure.gravatar.com/avatar/47857d059adacf9a41dc4030c2e14b0a.png?d=mm&r=PG", "description": "Actually, I am the boss", "invitation_sent": false, "contact_methods": [ { "id": "PVMGSML", "type": "email_contact_method_reference", "summary": "Work", "self": "https://api.pagerduty.com/users/PAM4FGS/contact_methods/PVMGSMLL" } ], "notification_rules": [ { "id": "P8GRWKK", "type": "assignment_notification_rule_reference", "summary": "Default", "self": "https://api.pagerduty.com/users/PXPGF42/notification_rules/P8GRWKK", "html_url": null } ], "job_title": "Senior Engineer", "teams": [ { "id": "PQ9K7I8", "type": "team_reference", "summary": "Engineering", "self": "https://api.pagerduty.com/teams/PQ9K7I8", "html_url": "https://subdomain.pagerduty.com/teams/PQ9K7I8" } ] } ], "limit": 25, "offset": 0, "more": false, "total": null } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } }, "post": { "x-pd-requires-scope": "users.write", "tags": [ "Users" ], "operationId": "createUser", "description": "Create a new user.\n\nUsers are members of a PagerDuty account that have the ability to interact with Incidents and other data on the account.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#users)\n\nScoped OAuth requires: `users.write`\n", "summary": "Create a user", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/from_header" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "user": { "allOf": [ { "$ref": "#/components/schemas/User" }, { "properties": { "license": { "allOf": [ { "description": "The License assigned to the User" }, { "$ref": "#/components/schemas/LicenseReference" } ] } } } ] } }, "required": [ "user" ] }, "examples": { "request": { "summary": "Request Example", "value": { "user": { "type": "user", "name": "Earline Greenholt", "email": "125.greenholt.earline@graham.name", "time_zone": "America/Lima", "color": "green", "role": "admin", "job_title": "Director of Engineering", "avatar_url": "https://secure.gravatar.com/avatar/1d1a39d4635208d5664082a6c654a73f.png?d=mm&r=PG", "description": "I'm the boss", "license": { "id": "PTDVERC", "type": "license_reference" } } } } } } }, "description": "The user to be created." }, "responses": { "201": { "description": "The user that was created.", "content": { "application/json": { "schema": { "type": "object", "properties": { "user": { "$ref": "#/components/schemas/User" } }, "required": [ "user" ] }, "examples": { "response": { "summary": "Response Example", "value": { "user": { "id": "PXPGF42", "type": "user", "summary": "Earline Greenholt", "self": "https://api.pagerduty.com/users/PXPGF42", "html_url": "https://subdomain.pagerduty.com/users/PXPGF42", "name": "Earline Greenholt", "email": "125.greenholt.earline@graham.name", "time_zone": "America/Lima", "color": "green", "role": "admin", "avatar_url": "https://secure.gravatar.com/avatar/a8b714a39626f2444ee05990b078995f.png?d=mm&r=PG", "description": "I'm the boss", "invitation_sent": false, "contact_methods": [ { "id": "PTDVERC", "type": "email_contact_method_reference", "summary": "Default", "self": "https://api.pagerduty.com/users/PXPGF42/contact_methods/PTDVERC" } ], "notification_rules": [ { "id": "P8GRWKK", "type": "assignment_notification_rule_reference", "summary": "Default", "self": "https://api.pagerduty.com/users/PXPGF42/notification_rules/P8GRWKK", "html_url": null } ], "job_title": "Director of Engineering", "teams": [ { "id": "PQ9K7I8", "type": "team_reference", "summary": "Engineering", "self": "https://api.pagerduty.com/teams/PQ9K7I8", "html_url": "https://subdomain.pagerduty.com/teams/PQ9K7I8" } ] } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "402": { "$ref": "#/components/responses/PaymentRequired" }, "403": { "$ref": "#/components/responses/Forbidden" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } } }, "/users/{id}": { "description": "Manage a user.", "get": { "x-pd-requires-scope": "users.read", "tags": [ "Users" ], "operationId": "getUser", "description": "Get details about an existing user.\n\nUsers are members of a PagerDuty account that have the ability to interact with Incidents and other data on the account.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#users)\n\nScoped OAuth requires: `users.read`\n", "summary": "Get a user", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" }, { "$ref": "#/components/parameters/include_user" } ], "responses": { "200": { "description": "The user requested.", "content": { "application/json": { "schema": { "type": "object", "properties": { "user": { "$ref": "#/components/schemas/User" } }, "required": [ "user" ] }, "examples": { "response": { "summary": "Response Example", "value": { "user": { "id": "PXPGF42", "type": "user", "summary": "Earline Greenholt", "self": "https://api.pagerduty.com/users/PXPGF42", "html_url": "https://subdomain.pagerduty.com/users/PXPGF42", "name": "Earline Greenholt", "email": "125.greenholt.earline@graham.name", "time_zone": "America/Lima", "color": "green", "role": "admin", "avatar_url": "https://secure.gravatar.com/avatar/a8b714a39626f2444ee05990b078995f.png?d=mm&r=PG", "description": "I'm the boss", "invitation_sent": false, "contact_methods": [ { "id": "PTDVERC", "type": "email_contact_method_reference", "summary": "Default", "self": "https://api.pagerduty.com/users/PXPGF42/contact_methods/PTDVERC" } ], "notification_rules": [ { "id": "P8GRWKK", "type": "assignment_notification_rule_reference", "summary": "Default", "self": "https://api.pagerduty.com/users/PXPGF42/notification_rules/P8GRWKK", "html_url": null } ], "job_title": "Director of Engineering", "teams": [ { "id": "PQ9K7I8", "type": "team_reference", "summary": "Engineering", "self": "https://api.pagerduty.com/teams/PQ9K7I8", "html_url": "https://subdomain.pagerduty.com/teams/PQ9K7I8" } ] } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } }, "delete": { "x-pd-requires-scope": "users.write", "tags": [ "Users" ], "operationId": "deleteUser", "description": "Remove an existing user.\n\nReturns 400 if the user has assigned incidents unless your [pricing plan](https://www.pagerduty.com/pricing) has the `offboarding` feature and the account is [configured](https://support.pagerduty.com/docs/offboarding#section-additional-configurations) appropriately.\n\nNote that the incidents reassignment process is asynchronous and has no guarantee to complete before the api call return.\n\n[*Learn more about `offboarding` feature*](https://support.pagerduty.com/docs/offboarding).\n\nUsers are members of a PagerDuty account that have the ability to interact with Incidents and other data on the account.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#users)\n\nScoped OAuth requires: `users.write`\n", "summary": "Delete a user", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" } ], "responses": { "204": { "description": "The user was deleted successfully." }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } }, "put": { "x-pd-requires-scope": "users.write", "tags": [ "Users" ], "operationId": "updateUser", "description": "Update an existing user.\n\nUsers are members of a PagerDuty account that have the ability to interact with Incidents and other data on the account.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#users)\n\nScoped OAuth requires: `users.write`\n", "summary": "Update a user", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "user": { "allOf": [ { "$ref": "#/components/schemas/User" }, { "properties": { "license": { "allOf": [ { "description": "The License assigned to the User" }, { "$ref": "#/components/schemas/LicenseReference" } ] } } } ] } }, "required": [ "user" ] }, "examples": { "request": { "summary": "Request Example", "value": { "user": { "type": "user", "name": "Earline Greenholt", "email": "125.greenholt.earline@graham.name", "time_zone": "America/Lima", "color": "green", "role": "admin", "job_title": "Director of Engineering", "avatar_url": "https://secure.gravatar.com/avatar/1d1a39d4635208d5664082a6c654a73f.png?d=mm&r=PG", "description": "I'm the boss", "license": { "id": "PTDVERC", "type": "license_reference" } } } } } } }, "description": "The user to be updated." }, "responses": { "200": { "description": "The user that was updated.", "content": { "application/json": { "schema": { "type": "object", "properties": { "user": { "$ref": "#/components/schemas/User" } }, "required": [ "user" ] }, "examples": { "response": { "summary": "Response Example", "value": { "user": { "id": "PXPGF42", "type": "user", "summary": "Earline Greenholt", "self": "https://api.pagerduty.com/users/PXPGF42", "html_url": "https://subdomain.pagerduty.com/users/PXPGF42", "name": "Earline Greenholt", "email": "125.greenholt.earline@graham.name", "time_zone": "America/Lima", "color": "green", "role": "admin", "avatar_url": "https://secure.gravatar.com/avatar/a8b714a39626f2444ee05990b078995f.png?d=mm&r=PG", "description": "I'm the boss", "invitation_sent": false, "contact_methods": [ { "id": "PTDVERC", "type": "email_contact_method_reference", "summary": "Default", "self": "https://api.pagerduty.com/users/PXPGF42/contact_methods/PTDVERC" } ], "notification_rules": [ { "id": "P8GRWKK", "type": "assignment_notification_rule_reference", "summary": "Default", "self": "https://api.pagerduty.com/users/PXPGF42/notification_rules/P8GRWKK", "html_url": null } ], "job_title": "Director of Engineering", "teams": [ { "id": "PQ9K7I8", "type": "team_reference", "summary": "Engineering", "self": "https://api.pagerduty.com/teams/PQ9K7I8", "html_url": "https://subdomain.pagerduty.com/teams/PQ9K7I8" } ] } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "402": { "$ref": "#/components/responses/PaymentRequired" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } } }, "/users/{id}/audit/records": { "description": "List audit records of changes made to the user.", "get": { "x-pd-requires-scope": "audit_records.read", "tags": [ "Users" ], "operationId": "listUsersAuditRecords", "summary": "List audit records for a user", "description": "The response will include audit records with changes that are made to the identified user not changes made by the identified user.\n\n\nThe returned records are sorted by the `execution_time` from newest to oldest.\n\nSee [`Cursor-based pagination`](https://developer.pagerduty.com/docs/rest-api-v2/pagination/) for instructions on how to paginate through the result set.\n\nFor more information see the [Audit API Document](https://developer.pagerduty.com/docs/rest-api-v2/audit-records-api/).\n\nScoped OAuth requires: `audit_records.read`\n", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" }, { "$ref": "#/components/parameters/cursor_limit" }, { "$ref": "#/components/parameters/cursor_cursor" }, { "$ref": "#/components/parameters/audit_since" }, { "$ref": "#/components/parameters/audit_until" } ], "responses": { "200": { "description": "Records matching the query criteria.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuditRecordResponseSchema" }, "examples": { "response": { "$ref": "#/components/examples/AuditRecordUserResponse" } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "402": { "$ref": "#/components/responses/PaymentRequired" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" }, "500": { "$ref": "#/components/responses/InternalServerError" } } } }, "/users/{id}/contact_methods": { "description": "List a user's contact methods.", "get": { "x-pd-requires-scope": "users:contact_methods.read", "tags": [ "Users" ], "operationId": "getUserContactMethods", "description": "List contact methods of your PagerDuty user.\n\nUsers are members of a PagerDuty account that have the ability to interact with Incidents and other data on the account.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#users)\n\nScoped OAuth requires: `users:contact_methods.read`\n", "summary": "List a user's contact methods", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" } ], "responses": { "200": { "description": "A list of contact methods.", "content": { "application/json": { "schema": { "type": "object", "properties": { "contact_methods": { "type": "array", "items": { "oneOf": [ { "$ref": "#/components/schemas/PhoneContactMethod" }, { "$ref": "#/components/schemas/PushContactMethod" }, { "$ref": "#/components/schemas/EmailContactMethod" } ] } } } }, "examples": { "response": { "summary": "Response Example", "value": { "contact_methods": [ { "id": "PXPGF42", "type": "email_contact_method", "summary": "Work", "self": "https://api.pagerduty.com/users/PXPGF42/contact_method/PXPGF42", "label": "Work", "address": "grady.haylie.126@hickle.net", "send_short_email": false } ] } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } }, "post": { "x-pd-requires-scope": "users:contact_methods.write", "tags": [ "Users" ], "operationId": "createUserContactMethod", "description": "Create a new contact method for the User.\n\nUsers are members of a PagerDuty account that have the ability to interact with Incidents and other data on the account.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#users)\n\nScoped OAuth requires: `users:contact_methods.write`\n", "summary": "Create a user contact method", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "contact_method": { "oneOf": [ { "$ref": "#/components/schemas/PhoneContactMethod" }, { "$ref": "#/components/schemas/PushContactMethod" }, { "$ref": "#/components/schemas/EmailContactMethod" } ] } }, "required": [ "contact_method" ] }, "examples": { "request": { "summary": "Request Example", "value": { "contact_method": { "id": "PXPGF42", "type": "email_contact_method", "summary": "Work", "self": "https://api.pagerduty.com/users/PXPGF42/contact_method/PXPGF42", "label": "Work", "address": "grady.haylie.126@hickle.net", "send_short_email": false } } } } } }, "description": "The contact method to be created." }, "responses": { "201": { "description": "The contact method that was created.", "content": { "application/json": { "schema": { "type": "object", "properties": { "contact_method": { "oneOf": [ { "$ref": "#/components/schemas/PhoneContactMethod" }, { "$ref": "#/components/schemas/PushContactMethod" }, { "$ref": "#/components/schemas/EmailContactMethod" } ] } } }, "examples": { "response": { "summary": "Response Example", "value": { "contact_method": { "id": "PXPGF42", "type": "email_contact_method", "summary": "Work", "self": "https://api.pagerduty.com/users/PXPGF42/contact_method/PXPGF42", "label": "Work", "address": "grady.haylie.126@hickle.net", "send_short_email": false } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } } }, "/users/{id}/contact_methods/{contact_method_id}": { "description": "Manage a user's contact method.", "get": { "x-pd-requires-scope": "users:contact_methods.read", "tags": [ "Users" ], "operationId": "getUserContactMethod", "description": "Get details about a User's contact method.\n\nUsers are members of a PagerDuty account that have the ability to interact with Incidents and other data on the account.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#users)\n\nScoped OAuth requires: `users:contact_methods.read`\n", "summary": "Get a user's contact method", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" }, { "$ref": "#/components/parameters/user_contact_method_id" } ], "responses": { "200": { "description": "The user's contact method requested.", "content": { "application/json": { "schema": { "type": "object", "properties": { "contact_method": { "oneOf": [ { "$ref": "#/components/schemas/PhoneContactMethod" }, { "$ref": "#/components/schemas/PushContactMethod" }, { "$ref": "#/components/schemas/EmailContactMethod" } ] } } }, "examples": { "response": { "summary": "Response Example", "value": { "contact_method": { "id": "PXPGF42", "type": "email_contact_method", "summary": "Work", "self": "https://api.pagerduty.com/users/PXPGF42/contact_method/PXPGF42", "label": "Work", "address": "grady.haylie.126@hickle.net", "send_short_email": false } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } }, "delete": { "x-pd-requires-scope": "users:contact_methods.write", "tags": [ "Users" ], "operationId": "deleteUserContactMethod", "description": "Remove a user's contact method.\n\nUsers are members of a PagerDuty account that have the ability to interact with Incidents and other data on the account.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#users)\n\nScoped OAuth requires: `users:contact_methods.write`\n", "summary": "Delete a user's contact method", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" }, { "$ref": "#/components/parameters/user_contact_method_id" } ], "responses": { "204": { "description": "The contact method was deleted successfully." }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } }, "put": { "x-pd-requires-scope": "users:contact_methods.write", "tags": [ "Users" ], "operationId": "updateUserContactMethod", "description": "Update a User's contact method.\n\nUsers are members of a PagerDuty account that have the ability to interact with Incidents and other data on the account.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#users)\n\nScoped OAuth requires: `users:contact_methods.write`\n", "summary": "Update a user's contact method", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" }, { "$ref": "#/components/parameters/user_contact_method_id" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "contact_method": { "oneOf": [ { "$ref": "#/components/schemas/PhoneContactMethod" }, { "$ref": "#/components/schemas/PushContactMethod" }, { "$ref": "#/components/schemas/EmailContactMethod" } ] } }, "required": [ "contact_method" ] }, "examples": { "request": { "summary": "Request Example", "value": { "contact_method": { "id": "PXPGF42", "type": "email_contact_method", "summary": "Work", "self": "https://api.pagerduty.com/users/PXPGF42/contact_method/PXPGF42", "label": "Work", "address": "grady.haylie.126@hickle.net", "send_short_email": false } } } } } }, "description": "The user's contact method to be updated." }, "responses": { "200": { "description": "The user's contact method that was updated.", "content": { "application/json": { "schema": { "type": "object", "properties": { "contact_method": { "oneOf": [ { "$ref": "#/components/schemas/PhoneContactMethod" }, { "$ref": "#/components/schemas/PushContactMethod" }, { "$ref": "#/components/schemas/EmailContactMethod" } ] } } }, "examples": { "response": { "summary": "Response Example", "value": { "contact_method": { "id": "PXPGF42", "type": "email_contact_method", "summary": "Work", "self": "https://api.pagerduty.com/users/PXPGF42/contact_method/PXPGF42", "label": "Work", "address": "grady.haylie.126@hickle.net", "send_short_email": false } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } } }, "/users/{id}/license": { "description": "The License allocated to a User", "get": { "x-pd-requires-scope": "licenses.read", "tags": [ "Users" ], "operationId": "getUserLicense", "description": "Get the License allocated to a User\n\nScoped OAuth requires: `licenses.read`\n", "summary": "Get the License allocated to a User", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" } ], "responses": { "200": { "description": "The License allocated to the User", "content": { "application/json": { "schema": { "type": "object", "properties": { "license": { "$ref": "#/components/schemas/LicenseWithCounts/allOf/0" } }, "required": [ "license" ] }, "examples": { "response": { "summary": "Response Example", "value": { "license": { "id": "PIP248G", "name": "Business (Full User)", "description": "Event Intelligence", "valid_roles": [ "owner", "admin", "user", "limited_user", "observer", "restricted_access" ], "role_group": "FullUser", "summary": "Business (Full User)", "type": "license", "self": null, "html_url": null } } } } } } }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" } } } }, "/users/{id}/notification_rules": { "description": "List a user's notification rules.", "get": { "x-pd-requires-scope": "users:contact_methods.read", "tags": [ "Users" ], "operationId": "getUserNotificationRules", "description": "List notification rules of your PagerDuty user.\n\nUsers are members of a PagerDuty account that have the ability to interact with Incidents and other data on the account.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#users)\n\nScoped OAuth requires: `users:contact_methods.read`\n", "summary": "List a user's notification rules", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" }, { "$ref": "#/components/parameters/include_notification_rules" }, { "$ref": "#/components/parameters/urgency" } ], "responses": { "200": { "description": "A list of notification rules.", "content": { "application/json": { "schema": { "type": "object", "properties": { "notification_rules": { "type": "array", "items": { "$ref": "#/components/schemas/NotificationRule" } } }, "required": [ "notification_rules" ] }, "examples": { "response": { "summary": "Response Example", "value": { "notification_rules": [ { "id": "PXPGF42", "type": "assignment_notification_rule", "summary": "Work", "self": "https://api.pagerduty.com/users/PXPGF42/notification_rules/PPSCXAN", "start_delay_in_minutes": 0, "contact_method": { "id": "PXPGF42", "type": "email_contact_method_reference", "summary": "Work", "self": "https://api.pagerduty.com/users/PXPGF42/contact_methods/PXPGF42", "html_url": null }, "created_at": "2016-02-01T16:06:27-05:00", "urgency": "high" } ] } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } }, "post": { "x-pd-requires-scope": "users:contact_methods.write", "tags": [ "Users" ], "operationId": "createUserNotificationRule", "description": "Create a new notification rule.\n\nUsers are members of a PagerDuty account that have the ability to interact with Incidents and other data on the account.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#users)\n\nScoped OAuth requires: `users:contact_methods.write`\n", "summary": "Create a user notification rule", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "notification_rule": { "$ref": "#/components/schemas/NotificationRule" } }, "required": [ "notification_rule" ] }, "examples": { "request": { "summary": "Request Example", "value": { "notification_rule": { "type": "assignment_notification_rule", "start_delay_in_minutes": 0, "contact_method": { "id": "PXPGF42", "type": "email_contact_method_reference" }, "urgency": "high" } } } } } }, "description": "The notification rule to be created." }, "responses": { "201": { "description": "The notification rule that was created.", "content": { "application/json": { "schema": { "type": "object", "properties": { "notification_rule": { "$ref": "#/components/schemas/NotificationRule" } }, "required": [ "notification_rule" ] }, "examples": { "response": { "summary": "Response Example", "value": { "notification_rule": { "id": "PXPGF42", "type": "assignment_notification_rule", "summary": "Work", "self": "https://api.pagerduty.com/users/PXPGF42/notification_rules/PPSCXAN", "start_delay_in_minutes": 0, "contact_method": { "id": "PXPGF42", "type": "email_contact_method_reference", "summary": "Work", "self": "https://api.pagerduty.com/users/PXPGF42/contact_methods/PXPGF42", "html_url": null }, "created_at": "2016-02-01T16:06:27-05:00", "urgency": "high" } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "402": { "$ref": "#/components/responses/PaymentRequired" }, "403": { "$ref": "#/components/responses/Forbidden" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } } }, "/users/{id}/notification_rules/{notification_rule_id}": { "description": "Manage a user's notification rule.", "get": { "x-pd-requires-scope": "users:contact_methods.read", "tags": [ "Users" ], "operationId": "getUserNotificationRule", "description": "Get details about a user's notification rule.\n\nUsers are members of a PagerDuty account that have the ability to interact with Incidents and other data on the account.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#users)\n\nScoped OAuth requires: `users:contact_methods.read`\n", "summary": "Get a user's notification rule", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" }, { "$ref": "#/components/parameters/user_notification_rule_id" }, { "$ref": "#/components/parameters/include_notification_rules" } ], "responses": { "200": { "description": "The user's notification rule requested.", "content": { "application/json": { "schema": { "type": "object", "properties": { "notification_rule": { "$ref": "#/components/schemas/NotificationRule" } }, "required": [ "notification_rule" ] }, "examples": { "response": { "summary": "Response Example", "value": { "notification_rule": { "id": "PXPGF42", "type": "assignment_notification_rule", "summary": "Work", "self": "https://api.pagerduty.com/users/PXPGF42/notification_rules/PPSCXAN", "start_delay_in_minutes": 0, "contact_method": { "id": "PXPGF42", "type": "email_contact_method_reference", "summary": "Work", "self": "https://api.pagerduty.com/users/PXPGF42/contact_methods/PXPGF42" }, "created_at": "2016-02-01T16:06:27-05:00", "urgency": "high" } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } }, "delete": { "x-pd-requires-scope": "users:contact_methods.write", "tags": [ "Users" ], "operationId": "deleteUserNotificationRule", "description": "Remove a user's notification rule.\n\nUsers are members of a PagerDuty account that have the ability to interact with Incidents and other data on the account.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#users)\n\nScoped OAuth requires: `users:contact_methods.write`\n", "summary": "Delete a user's notification rule", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" }, { "$ref": "#/components/parameters/user_notification_rule_id" } ], "responses": { "204": { "description": "The notification rule was deleted successfully." }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } }, "put": { "x-pd-requires-scope": "users:contact_methods.write", "tags": [ "Users" ], "operationId": "updateUserNotificationRule", "description": "Update a user's notification rule.\n\nUsers are members of a PagerDuty account that have the ability to interact with Incidents and other data on the account.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#users)\n\nScoped OAuth requires: `users:contact_methods.write`\n", "summary": "Update a user's notification rule", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" }, { "$ref": "#/components/parameters/user_notification_rule_id" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "notification_rule": { "$ref": "#/components/schemas/NotificationRule" } }, "required": [ "notification_rule" ] }, "examples": { "request": { "summary": "Request Example", "value": { "notification_rule": { "type": "assignment_notification_rule", "start_delay_in_minutes": 0, "contact_method": { "id": "PXPGF42", "type": "email_contact_method_reference" }, "urgency": "high" } } } } } }, "description": "The user's notification rule to be updated." }, "responses": { "200": { "description": "The user's notification rule that was updated.", "content": { "application/json": { "schema": { "type": "object", "properties": { "notification_rule": { "$ref": "#/components/schemas/NotificationRule" } } }, "examples": { "response": { "summary": "Response Example", "value": { "notification_rule": { "id": "PXPGF42", "type": "assignment_notification_rule", "summary": "Work", "self": "https://api.pagerduty.com/users/PXPGF42/notification_rules/PPSCXAN", "start_delay_in_minutes": 0, "contact_method": { "id": "PXPGF42", "type": "email_contact_method_reference", "summary": "Work", "self": "https://api.pagerduty.com/users/PXPGF42/contact_methods/PXPGF42" }, "created_at": "2016-02-01T16:06:27-05:00", "urgency": "high" } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "402": { "$ref": "#/components/responses/PaymentRequired" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } } }, "/users/{id}/notification_subscriptions": { "get": { "x-pd-requires-scope": "subscribers.read", "tags": [ "Users" ], "operationId": "getUserNotificationSubscriptions", "description": "Retrieve a list of Notification Subscriptions the given User has.\n\n\n> Users must be added through `POST /users/{id}/notification_subscriptions` to be returned from this endpoint.\n\nScoped OAuth requires: `subscribers.read`\n", "summary": "List Notification Subscriptions", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/id" } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/Pagination" }, { "type": "object", "properties": { "subscriptions": { "type": "array", "items": { "type": "object", "properties": { "subscription": { "$ref": "#/components/schemas/NotificationSubscription" }, "subscribable_name": { "type": "string", "nullable": true, "description": "The name of the subscribable" } } } } }, "required": [ "subscriptions" ] } ] }, "examples": { "response": { "summary": "Response Example", "value": { "subscriptions": [ { "subscription": { "subscriber_id": "PD1234", "subscriber_type": "user", "subscribable_id": "PD1234", "subscribable_type": "incident", "subscribable_name": null, "account_id": "PD1234" } }, { "subscription": { "subscriber_id": "PD1234", "subscriber_type": "user", "subscribable_id": "PD1234", "subscribable_type": "business_service", "subscribable_name": "business service name", "account_id": "PD1234" } } ], "limit": 2, "offset": 0, "total": 1000, "more": true } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } }, "post": { "x-pd-requires-scope": "subscribers.write", "summary": "Create Notification Subcriptions", "operationId": "createUserNotificationSubscriptions", "tags": [ "Users" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "subscriptions": { "type": "array", "items": { "$ref": "#/components/schemas/NotificationSubscriptionWithContext" } } } }, "examples": { "response": { "summary": "Response Example", "value": { "subscriptions": [ { "account_id": "PD1234", "subscribable_id": "PD1234", "subscribable_type": "incident", "subscriber_id": "PD1234", "subscriber_type": "user", "result": "success" }, { "account_id": "PD1234", "subscribable_id": "PD1234", "subscribable_type": "business_service", "subscriber_id": "PD1234", "subscriber_type": "user", "result": "duplicate" }, { "account_id": "PD1234", "subscribable_id": "PD1235", "subscribable_type": "business_service", "subscriber_id": "PD1234", "subscriber_type": "user", "result": "unauthorized" } ] } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "422": { "$ref": "#/components/responses/UnprocessableEntity" } }, "description": "Create new Notification Subscriptions for the given User.\n\nScoped OAuth requires: `subscribers.write`\n", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/id" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "subscribables": { "type": "array", "uniqueItems": true, "minItems": 1, "items": { "$ref": "#/components/schemas/NotificationSubscribable" } } }, "required": [ "subscribables" ] }, "examples": { "request": { "summary": "Request Example", "value": { "subscribables": [ { "subscribable_type": "incident", "subscribable_id": "PD1234" }, { "subscribable_type": "business_service", "subscribable_id": "PD1234" }, { "subscribable_type": "business_service", "subscribable_id": "PD1235" } ] } } } } }, "description": "The entities to subscribe to." } } }, "/users/{id}/notification_subscriptions/unsubscribe": { "post": { "x-pd-requires-scope": "subscribers.write", "summary": "Remove Notification Subscriptions", "tags": [ "Users" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "deleted_count": { "type": "number" }, "unauthorized_count": { "type": "number" }, "non_existent_count": { "type": "number" } }, "required": [ "deleted_count", "unauthorized_count", "non_existent_count" ] }, "examples": { "response": { "summary": "Response Example", "value": { "deleted_count": 1, "unauthorized_count": 1, "non_existent_count": 0 } } } } } }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "422": { "$ref": "#/components/responses/UnprocessableEntity" } }, "operationId": "unsubscribeUserNotificationSubscriptions", "description": "Unsubscribe the given User from Notifications on the matching Subscribable entities.\n\nScoped OAuth requires: `subscribers.write`\n", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/id" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "subscribables": { "type": "array", "uniqueItems": true, "minItems": 1, "items": { "$ref": "#/components/schemas/NotificationSubscribable" } } }, "required": [ "subscribables" ] }, "examples": { "request": { "summary": "Response Example", "value": { "subscribables": [ { "subscribable_type": "incident", "subscribable_id": "PD1234" }, { "subscribable_type": "business_service", "subscribable_id": "PD1234" } ] } } } } }, "description": "The entities to unsubscribe from." } } }, "/users/{id}/oncall_handoff_notification_rules": { "description": "List a User's Oncall Handoff Notification Rules.", "get": { "tags": [ "Users" ], "x-pd-requires-scope": "users.read", "operationId": "getUserHandoffNotificationRules", "description": "List Handoff Notification Rules of your PagerDuty User.\nUsers are members of a PagerDuty account that have the ability to interact with Incidents and other data on the account.\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#users)\n\nScoped OAuth requires: `users.read`\n", "summary": "List a User's Handoff Notification Rules", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" } ], "responses": { "200": { "description": "A list of Handoff Notification Rules.", "content": { "application/json": { "schema": { "type": "object", "properties": { "oncall_handoff_notification_rules": { "type": "array", "items": { "$ref": "#/components/schemas/HandoffNotificationRule" } } }, "required": [ "oncall_handoff_notification_rules" ] }, "examples": { "response": { "summary": "Response Example", "value": { "oncall_handoff_notification_rules": [ { "id": "PXPGF42", "handoff_type": "both", "notify_advance_in_minutes": 0, "contact_method": { "id": "PXPGF42", "type": "email_contact_method_reference", "summary": "Work", "self": "https://api.pagerduty.com/users/PXPGF42/contact_methods/PXPGF42" } } ] } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } }, "post": { "tags": [ "Users" ], "x-pd-requires-scope": "users.write", "operationId": "createUserHandoffNotificationRule", "description": "Create a new Handoff Notification Rule.\nUsers are members of a PagerDuty account that have the ability to interact with Incidents and other data on the account.\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#users)\n\nScoped OAuth requires: `users.write`\n", "summary": "Create a User Handoff Notification Rule", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "oncall_handoff_notification_rule": { "$ref": "#/components/schemas/HandoffNotificationRule" } }, "required": [ "oncall_handoff_notification_rule" ] }, "examples": { "request": { "summary": "Request Example", "value": { "oncall_handoff_notification_rule": { "id": "PXPGF43", "handoff_type": "both", "notify_advance_in_minutes": 180, "contact_method": { "id": "PXPGF42", "type": "email_contact_method_reference" } } } } } } }, "description": "The Handoff Notification Rule to be created." }, "responses": { "201": { "description": "The Handoff Notification Rule that was created.", "content": { "application/json": { "schema": { "type": "object", "properties": { "oncall_handoff_notification_rule": { "$ref": "#/components/schemas/HandoffNotificationRule" } }, "required": [ "oncall_handoff_notification_rule" ] }, "examples": { "response": { "summary": "Response Example", "value": { "oncall_handoff_notification_rule": { "id": "PXPGF42", "handoff_type": "both", "notify_advance_in_minutes": 180, "contact_method": { "id": "PXPGF42", "type": "email_contact_method_reference", "summary": "Work", "self": "https://api.pagerduty.com/users/PXPGF42/contact_methods/PXPGF42" } } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "402": { "$ref": "#/components/responses/PaymentRequired" }, "403": { "$ref": "#/components/responses/Forbidden" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } } }, "/users/{id}/oncall_handoff_notification_rules/{oncall_handoff_notification_rule_id}": { "description": "Manage a User's Handoff Notification Rule.", "get": { "tags": [ "Users" ], "x-pd-requires-scope": "users.read", "operationId": "getUserHandoffNotifiactionRule", "description": "Get details about a User's Handoff Notification Rule.\nUsers are members of a PagerDuty account that have the ability to interact with Incidents and other data on the account.\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#users)\n\nScoped OAuth requires: `users.read`\n", "summary": "Get a user's handoff notification rule", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" }, { "$ref": "#/components/parameters/oncall_handoff_notification_rule_id" } ], "responses": { "200": { "description": "The user's handoff notification rule requested.", "content": { "application/json": { "schema": { "type": "object", "properties": { "oncall_handoff_notification_rule": { "$ref": "#/components/schemas/HandoffNotificationRule" } }, "required": [ "oncall_handoff_notification_rule" ] }, "examples": { "response": { "summary": "Response Example", "value": { "oncall_handoff_notification_rule": { "id": "PXPGF42", "handoff_type": "both", "notify_advance_in_minutes": 60, "contact_method": { "id": "PXPGF42", "type": "email_contact_method_reference", "summary": "Work", "self": "https://api.pagerduty.com/users/PXPGF42/contact_methods/PXPGF42" } } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } }, "delete": { "tags": [ "Users" ], "x-pd-requires-scope": "users.write", "operationId": "deleteUserHandoffNotificationRule", "description": "Remove a User's Handoff Notification Rule.\nUsers are members of a PagerDuty account that have the ability to interact with Incidents and other data on the account.\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#users)\n\nScoped OAuth requires: `users.write`\n", "summary": "Delete a User's Handoff Notification rule", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" }, { "$ref": "#/components/parameters/oncall_handoff_notification_rule_id" } ], "responses": { "204": { "description": "The handoff notification rule was deleted successfully." }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } }, "put": { "tags": [ "Users" ], "x-pd-requires-scope": "users.write", "operationId": "updateUserHandoffNotification", "description": "Update a User's Handoff Notification Rule.\nUsers are members of a PagerDuty account that have the ability to interact with Incidents and other data on the account.\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#users)\n\nScoped OAuth requires: `users.write`\n", "summary": "Update a User's Handoff Notification Rule", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" }, { "$ref": "#/components/parameters/oncall_handoff_notification_rule_id" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "oncall_handoff_notification_rule": { "$ref": "#/components/schemas/HandoffNotificationRule" } }, "required": [ "oncall_handoff_notification_rule" ] }, "examples": { "request": { "summary": "Request Example", "value": { "oncall_handoff_notification_rule": { "id": "PXPGF42", "handoff_type": "both", "notify_advance_in_minutes": 60, "contact_method": { "id": "PXPGF42", "type": "email_contact_method_reference" } } } } } } }, "description": "The User's Handoff Notification Rule to be updated." }, "responses": { "200": { "description": "The User's Handoff Notification Rule that was updated.", "content": { "application/json": { "schema": { "type": "object", "properties": { "oncall_handoff_notification_rule": { "$ref": "#/components/schemas/HandoffNotificationRule" } } }, "examples": { "response": { "summary": "Response Example", "value": { "oncall_handoff_notification_rule": { "id": "PXPGF42", "handoff_type": "oncall", "notify_advance_in_minutes": 30, "contact_method": { "id": "PXPGF42", "type": "email_contact_method_reference", "summary": "Work", "self": "https://api.pagerduty.com/users/PXPGF42/contact_methods/PXPGF42" } } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "402": { "$ref": "#/components/responses/PaymentRequired" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } } }, "/users/{id}/sessions": { "description": "List a user's active sessions.", "get": { "x-pd-requires-scope": "users:sessions.read", "tags": [ "Users" ], "operationId": "getUserSessions", "description": "List active sessions of a PagerDuty user.\n\nBeginning November 2021, active sessions no longer includes newly issued OAuth tokens.\n\nUsers are members of a PagerDuty account that have the ability to interact with Incidents and other data on the account.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#users)\n\nScoped OAuth requires: `users:sessions.read`\n", "summary": "List a user's active sessions", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" } ], "responses": { "200": { "description": "A list of the user's active sessions.", "content": { "application/json": { "schema": { "type": "object", "properties": { "user_sessions": { "type": "array", "items": { "$ref": "#/components/schemas/UserSession" } } }, "required": [ "user_sessions" ] }, "examples": { "response": { "summary": "Response Example", "value": { "user_sessions": [ { "id": "PXPGF42", "user_id": "PXPGF42", "created_at": "2018-10-06T21:30:42Z", "summary": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.131 Safari/537.36", "type": "browser" } ] } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } }, "delete": { "x-pd-requires-scope": "users:sessions.write", "tags": [ "Users" ], "operationId": "deleteUserSessions", "description": "Delete all user sessions.\n\nBeginning November 2021, user sessions no longer includes newly issued OAuth tokens.\n\nUsers are members of a PagerDuty account that have the ability to interact with Incidents and other data on the account.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#users)\n\nScoped OAuth requires: `users:sessions.write`\n", "summary": "Delete all user sessions", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" } ], "responses": { "204": { "description": "The user sessions were all deleted successfully." }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } } }, "/users/{id}/sessions/{type}/{session_id}": { "description": "Manage a user's active session.", "get": { "x-pd-requires-scope": "users:sessions.read", "tags": [ "Users" ], "operationId": "getUserSession", "description": "Get details about a user's session.\n\nBeginning November 2021, user sessions no longer includes newly issued OAuth tokens.\n\nUsers are members of a PagerDuty account that have the ability to interact with Incidents and other data on the account.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#users)\n\nScoped OAuth requires: `users:sessions.read`\n", "summary": "Get a user's session", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" }, { "$ref": "#/components/parameters/type" }, { "$ref": "#/components/parameters/session_id" } ], "responses": { "200": { "description": "The user's session requested.", "content": { "application/json": { "schema": { "type": "object", "properties": { "user_session": { "$ref": "#/components/schemas/UserSession" } }, "required": [ "user_session" ] }, "examples": { "response": { "summary": "Response Example", "value": { "user_session": { "id": "PXPGF42", "user_id": "PXPGF42", "created_at": "2018-10-06T21:30:42Z", "summary": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.131 Safari/537.36", "type": "browser" } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } }, "delete": { "x-pd-requires-scope": "users:sessions.write", "tags": [ "Users" ], "operationId": "deleteUserSession", "description": "Delete a user's session.\n\nBeginning November 2021, user sessions no longer includes newly issued OAuth tokens.\n\nUsers are members of a PagerDuty account that have the ability to interact with Incidents and other data on the account.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#users)\n\nScoped OAuth requires: `users:sessions.write`\n", "summary": "Delete a user's session", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" }, { "$ref": "#/components/parameters/type" }, { "$ref": "#/components/parameters/session_id" } ], "responses": { "204": { "description": "The user session was deleted successfully." }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } } }, "/users/{id}/status_update_notification_rules": { "description": "List a user's status update notification rules.", "get": { "x-pd-requires-scope": "users.read", "tags": [ "Users" ], "operationId": "getUserStatusUpdateNotificationRules", "description": "List status update notification rules of your PagerDuty user.\n\nUsers are members of a PagerDuty account that have the ability to interact with Incidents and other data on the account.\n\n\n> ### Early Access\n> This endpoint is in Early Access and may change at any time. You must pass in the X-EARLY-ACCESS header to access it.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#users)\n\nScoped OAuth requires: `users.read`\n", "summary": "List a user's status update notification rules", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" }, { "$ref": "#/components/parameters/early_access_status-update-notification-rules" }, { "$ref": "#/components/parameters/include_notification_rules" } ], "responses": { "200": { "description": "A list of status update notification rules.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status_update_notification_rules": { "type": "array", "items": { "$ref": "#/components/schemas/StatusUpdateNotificationRule" } } }, "required": [ "status_update_notification_rules" ] }, "examples": { "response": { "summary": "Response Example", "value": { "status_update_notification_rules": [ { "id": "PXPGF42", "type": "status_update_notification_rule", "summary": "contact method PXPGF42 used as status_update_notification_rule", "self": "https://api.pagerduty.com/users/PXPGF42/status_update_notification_rules/PPSCXAN", "contact_method": { "id": "PXPGF42", "type": "email_contact_method_reference", "summary": "Work", "self": "https://api.pagerduty.com/users/PXPGF42/contact_methods/PXPGF42", "html_url": null }, "created_at": "2016-02-01T16:06:27-05:00" } ] } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } }, "post": { "x-pd-requires-scope": "users.write", "tags": [ "Users" ], "operationId": "createUserStatusUpdateNotificationRule", "description": "Create a new status update notification rule.\n\nUsers are members of a PagerDuty account that have the ability to interact with Incidents and other data on the account.\n\n\n> ### Early Access\n> This endpoint is in Early Access and may change at any time. You must pass in the X-EARLY-ACCESS header to access it.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#users)\n\nScoped OAuth requires: `users.write`\n", "summary": "Create a user status update notification rule", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/early_access_status-update-notification-rules" }, { "$ref": "#/components/parameters/id" } ], "requestBody": { "content": { "application/json": { "schema": { "properties": { "status_update_notification_rule": { "$ref": "#/components/schemas/StatusUpdateNotificationRule" } }, "required": [ "status_update_notification_rule" ] }, "examples": { "request": { "summary": "Request Example", "value": { "status_update_notification_rule": { "contact_method": { "id": "PXPGF42", "type": "email_contact_method_reference" } } } } } } }, "description": "The status update notification rule to be created." }, "responses": { "201": { "description": "The status update notification rule that was created.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status_update_notification_rule": { "$ref": "#/components/schemas/StatusUpdateNotificationRule" } }, "required": [ "status_update_notification_rule" ] }, "examples": { "response": { "summary": "Response Example", "value": { "status_update_notification_rule": { "id": "PXPGF42", "type": "status_update_notification_rule", "summary": "contact method PXPGF42 used as status_update_notification_rule", "self": "https://api.pagerduty.com/users/PXPGF42/status_update_notification_rules/PPSCXAN", "contact_method": { "id": "PXPGF42", "type": "email_contact_method_reference", "summary": "Work", "self": "https://api.pagerduty.com/users/PXPGF42/contact_methods/PXPGF42", "html_url": null }, "created_at": "2016-02-01T16:06:27-05:00" } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "402": { "$ref": "#/components/responses/PaymentRequired" }, "403": { "$ref": "#/components/responses/Forbidden" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } } }, "/users/{id}/status_update_notification_rules/{status_update_notification_rule_id}": { "description": "Manage a user's status update notification rule.", "get": { "x-pd-requires-scope": "users.read", "tags": [ "Users" ], "operationId": "getUserStatusUpdateNotificationRule", "description": "Get details about a user's status update notification rule.\n\nUsers are members of a PagerDuty account that have the ability to interact with Incidents and other data on the account.\n\n\n> ### Early Access\n> This endpoint is in Early Access and may change at any time. You must pass in the X-EARLY-ACCESS header to access it.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#users)\n\nScoped OAuth requires: `users.read`\n", "summary": "Get a user's status update notification rule", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/early_access_status-update-notification-rules" }, { "$ref": "#/components/parameters/id" }, { "$ref": "#/components/parameters/user_status_update_notification_rule_id" }, { "$ref": "#/components/parameters/include_notification_rules" } ], "responses": { "200": { "description": "The user's status update notification rule requested.", "content": { "application/json": { "schema": { "type": "object", "properties": { "notification_rule": { "$ref": "#/components/schemas/StatusUpdateNotificationRule" } }, "required": [ "notification_rule" ] }, "examples": { "response": { "summary": "Response Example", "value": { "notification_rule": { "id": "PXPGF42", "type": "status_update_notification_rule", "summary": "contact method PXPGF42 used as status_update_notification_rule", "self": "https://api.pagerduty.com/users/PXPGF42/status_update_notification_rules/PPSCXAN", "contact_method": { "id": "PTDVERC", "type": "email_contact_method_reference", "summary": "Default", "self": "https://api.pagerduty.com/users/PXPGF42/contact_methods/PTDVERC", "html_url": null }, "created_at": "2016-02-01T16:06:27-05:00" } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } }, "delete": { "x-pd-requires-scope": "users.write", "tags": [ "Users" ], "operationId": "deleteUserStatusUpdateNotificationRule", "description": "Remove a user's status update notification rule.\n\nUsers are members of a PagerDuty account that have the ability to interact with Incidents and other data on the account.\n\n\n> ### Early Access\n> This endpoint is in Early Access and may change at any time. You must pass in the X-EARLY-ACCESS header to access it.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#users)\n\nScoped OAuth requires: `users.write`\n", "summary": "Delete a user's status update notification rule", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/early_access_status-update-notification-rules" }, { "$ref": "#/components/parameters/id" }, { "$ref": "#/components/parameters/user_status_update_notification_rule_id" } ], "responses": { "204": { "description": "The status update notification rule was deleted successfully." }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } }, "put": { "x-pd-requires-scope": "users.write", "tags": [ "Users" ], "operationId": "updateUserStatusUpdateNotificationRule", "description": "Update a user's status update notification rule.\n\nUsers are members of a PagerDuty account that have the ability to interact with Incidents and other data on the account.\n\n\n> ### Early Access\n> This endpoint is in Early Access and may change at any time. You must pass in the X-EARLY-ACCESS header to access it.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#users)\n\nScoped OAuth requires: `users.write`\n", "summary": "Update a user's status update notification rule", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/early_access_status-update-notification-rules" }, { "$ref": "#/components/parameters/id" }, { "$ref": "#/components/parameters/user_status_update_notification_rule_id" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "status_update_notification_rule": { "$ref": "#/components/schemas/StatusUpdateNotificationRule" } }, "required": [ "status_update_notification_rule" ] }, "examples": { "request": { "summary": "Request Example", "value": { "status_update_notification_rule": { "contact_method": { "id": "PXPGF42", "type": "email_contact_method_reference" } } } } } } }, "description": "The user's status update notification rule to be updated." }, "responses": { "200": { "description": "The user's status update notification rule that was updated.", "content": { "application/json": { "schema": { "type": "object", "properties": { "notification_rule": { "$ref": "#/components/schemas/StatusUpdateNotificationRule" } } }, "examples": { "response": { "summary": "Response Example", "value": { "status_update_notification_rule": { "id": "PXPGF42", "type": "status_update_notification_rule", "summary": "contact method PXPGF42 used as status_update_notification_rule", "self": "https://api.pagerduty.com/users/PXPGF42/status_update_notification_rules/PPSCXAN", "contact_method": { "id": "PXPGF42", "type": "email_contact_method_reference", "summary": "Work", "self": "https://api.pagerduty.com/users/PXPGF42/contact_methods/PXPGF42", "html_url": null }, "created_at": "2016-02-01T16:06:27-05:00" } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "402": { "$ref": "#/components/responses/PaymentRequired" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } } }, "/users/me": { "description": "Get the current user.", "get": { "tags": [ "Users" ], "operationId": "getCurrentUser", "description": "Get details about the current user.\n\nThis endpoint can only be used with a [user-level API key](https://support.pagerduty.com/docs/using-the-api#section-generating-a-personal-rest-api-key) or a key generated through an OAuth flow. This will not work if the request is made with an account-level access token.\n\nUsers are members of a PagerDuty account that have the ability to interact with Incidents and other data on the account.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#users)\n", "summary": "Get the current user", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/include_user" } ], "responses": { "200": { "description": "The requesting user.", "content": { "application/json": { "schema": { "type": "object", "properties": { "user": { "$ref": "#/components/schemas/User" } }, "required": [ "user" ] }, "examples": { "response": { "summary": "Response Example", "value": { "user": { "id": "PXPGF42", "type": "user", "summary": "Earline Greenholt", "self": "https://api.pagerduty.com/users/PXPGF42", "html_url": "https://subdomain.pagerduty.com/users/PXPGF42", "name": "Earline Greenholt", "email": "125.greenholt.earline@graham.name", "time_zone": "America/Lima", "color": "green", "role": "admin", "avatar_url": "https://secure.gravatar.com/avatar/a8b714a39626f2444ee05990b078995f.png?d=mm&r=PG", "description": null, "invitation_sent": false, "job_title": "Director of Engineering", "contact_methods": [ { "id": "PTDVERC", "type": "email_contact_method_reference", "summary": "Default", "self": "https://api.pagerduty.com/users/PXPGF42/contact_methods/PTDVERC", "html_url": null } ], "notification_rules": [ { "id": "P8GRWKK", "type": "assignment_notification_rule_reference", "summary": "Default", "self": "https://api.pagerduty.com/users/PXPGF42/notification_rules/PTDVERC", "html_url": null } ], "teams": [ { "id": "PQ9K7I8", "type": "team_reference", "summary": "Engineering", "self": "https://api.pagerduty.com/teams/PQ9K7I8", "html_url": "https://subdomain.pagerduty.com/teams/PQ9K7I8" } ] } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } } }, "/vendors": { "description": "List vendors.", "get": { "x-pd-requires-scope": "vendors.read", "tags": [ "Vendors" ], "operationId": "listVendors", "description": "List all vendors.\n\nA PagerDuty Vendor represents a specific type of integration. AWS Cloudwatch, Splunk, Datadog are all examples of vendors\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#vendors)\n\nScoped OAuth requires: `vendors.read`\n", "summary": "List vendors", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/offset_limit" }, { "$ref": "#/components/parameters/offset_offset" }, { "$ref": "#/components/parameters/offset_total" } ], "responses": { "200": { "description": "A paginated array of vendors.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/Pagination" }, { "type": "object", "properties": { "vendors": { "type": "array", "items": { "$ref": "#/components/schemas/Vendor" } } }, "required": [ "vendors" ] } ] }, "examples": { "response": { "summary": "Response Example", "value": { "vendors": [ { "id": "PZQ6AUS", "type": "vendor", "summary": "Amazon CloudWatch", "self": "https://api.pagerduty.com/vendors/PZQ6AUS", "name": "Amazon CloudWatch", "website_url": "https://aws.amazon.com/cloudwatch", "logo_url": "https://s3.amazonaws.com/pdpartner/cloudwatch_large.png", "thumbnail_url": "https://s3.amazonaws.com/pdpartner/cloudwatch_thumb.png", "description": "Amazon Web Services CloudWatch provides monitoring for AWS cloud resources and customer-run applications. AWS can collect data, gain insight, and alert users to fix problems within applications and organizations. AWS CloudWatch gives system-wide visibility into resource utilization and notifications can be set for when any metrics cross a specified threshold.", "integration_guide_url": "http://www.pagerduty.com/docs/guides/aws-cloudwatch-integration-guide/" } ], "limit": 25, "offset": 0, "more": false, "total": null } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } } }, "/vendors/{id}": { "description": "Get details about one specific vendor.", "get": { "x-pd-requires-scope": "vendors.read", "tags": [ "Vendors" ], "operationId": "getVendor", "description": "Get details about one specific vendor.\n\nA PagerDuty Vendor represents a specific type of integration. AWS Cloudwatch, Splunk, Datadog are all examples of vendors\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#vendors)\n\nScoped OAuth requires: `vendors.read`\n", "summary": "Get a vendor", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" } ], "responses": { "200": { "description": "The vendor requested", "content": { "application/json": { "schema": { "type": "object", "properties": { "vendor": { "type": "array", "items": { "$ref": "#/components/schemas/Vendor" } } }, "required": [ "vendor" ] }, "examples": { "response": { "summary": "Response Example", "value": { "vendor": [ { "id": "PZQ6AUS", "type": "vendor", "summary": "Amazon CloudWatch", "self": "https://api.pagerduty.com/vendors/PZQ6AUS", "name": "Amazon CloudWatch", "website_url": "https://aws.amazon.com/cloudwatch", "logo_url": "https://s3.amazonaws.com/pdpartner/cloudwatch_large.png", "thumbnail_url": "https://s3.amazonaws.com/pdpartner/cloudwatch_thumb.png", "description": "Amazon Web Services CloudWatch provides monitoring for AWS cloud resources and customer-run applications. AWS can collect data, gain insight, and alert users to fix problems within applications and organizations. AWS CloudWatch gives system-wide visibility into resource utilization and notifications can be set for when any metrics cross a specified threshold.", "integration_guide_url": "http://www.pagerduty.com/docs/guides/aws-cloudwatch-integration-guide/" } ] } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } } }, "/webhook_subscriptions": { "get": { "x-pd-requires-scope": "webhook_subscriptions.read", "tags": [ "Webhooks" ], "operationId": "listWebhookSubscriptions", "summary": "List webhook subscriptions", "description": "List existing webhook subscriptions.\n\nThe `filter_type` and `filter_id` query parameters may be used to only show subscriptions\nfor a particular _service_ or _team_.\n\nFor more information on webhook subscriptions and how they are used to configure v3 webhooks\nsee the [Webhooks v3 Developer Documentation](https://developer.pagerduty.com/docs/webhooks/v3-overview/).\n\nScoped OAuth requires: `webhook_subscriptions.read`\n", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/offset_limit" }, { "$ref": "#/components/parameters/offset_offset" }, { "$ref": "#/components/parameters/offset_total" }, { "$ref": "#/components/parameters/webhooks_filter_type" }, { "$ref": "#/components/parameters/webhooks_filter_id" } ], "responses": { "200": { "description": "A set of webhook subscriptions matching the request.", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "properties": { "webhook_subscriptions": { "type": "array", "items": { "$ref": "#/components/schemas/WebhookSubscription" } } }, "required": [ "webhook_subscriptions" ] }, { "$ref": "#/components/schemas/Pagination" } ] }, "examples": { "response": { "$ref": "#/components/examples/ListSubscriptionExample" } } } } }, "400": { "$ref": "#/components/responses/WebhookBadRequest" }, "401": { "$ref": "#/components/responses/WebhookUnauthorized" }, "403": { "$ref": "#/components/responses/WebhookForbidden" } } }, "post": { "x-pd-requires-scope": "webhook_subscriptions.write", "tags": [ "Webhooks" ], "operationId": "createWebhookSubscription", "summary": "Create a webhook subscription", "description": "Creates a new webhook subscription.\n\nFor more information on webhook subscriptions and how they are used to configure v3 webhooks\nsee the [Webhooks v3 Developer Documentation](https://developer.pagerduty.com/docs/webhooks/v3-overview/).\n\nScoped OAuth requires: `webhook_subscriptions.write`\n", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "webhook_subscription": { "$ref": "#/components/schemas/WebhookSubscription" } }, "required": [ "webhook_subscription" ] }, "examples": { "request": { "$ref": "#/components/examples/CreateSubscriptionExample" } } } } }, "responses": { "200": { "description": "The webhook subscription that was created.", "content": { "application/json": { "schema": { "type": "object", "properties": { "webhook_subscription": { "$ref": "#/components/schemas/WebhookSubscription" } }, "required": [ "webhook_subscription" ] }, "examples": { "response": { "$ref": "#/components/examples/GetSubscriptionExample" } } } } }, "400": { "$ref": "#/components/responses/WebhookBadRequest" }, "401": { "$ref": "#/components/responses/WebhookUnauthorized" }, "403": { "$ref": "#/components/responses/WebhookForbidden" } } } }, "/webhook_subscriptions/{id}": { "get": { "x-pd-requires-scope": "webhook_subscriptions.read", "tags": [ "Webhooks" ], "operationId": "getWebhookSubscription", "summary": "Get a webhook subscription", "description": "Gets details about an existing webhook subscription.\n\nScoped OAuth requires: `webhook_subscriptions.read`\n", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/id" } ], "responses": { "200": { "description": "The webhook subscription that was requested.", "content": { "application/json": { "schema": { "type": "object", "properties": { "webhook_subscription": { "$ref": "#/components/schemas/WebhookSubscription" } }, "required": [ "webhook_subscription" ] }, "examples": { "response": { "$ref": "#/components/examples/GetSubscriptionExample" } } } } }, "400": { "$ref": "#/components/responses/WebhookBadRequest" }, "401": { "$ref": "#/components/responses/WebhookUnauthorized" }, "403": { "$ref": "#/components/responses/WebhookForbidden" }, "404": { "$ref": "#/components/responses/WebhookNotFound" } } }, "put": { "x-pd-requires-scope": "webhook_subscriptions.write", "tags": [ "Webhooks" ], "operationId": "updateWebhookSubscription", "summary": "Update a webhook subscription", "description": "Updates an existing webhook subscription.\n\nOnly the fields being updated need to be included on the request. This operation does not\nsupport updating the `delivery_method` of the webhook subscription.\n\nScoped OAuth requires: `webhook_subscriptions.write`\n", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/header_Content-Type" }, { "$ref": "#/components/parameters/id" } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebhookSubscriptionUpdate" }, "examples": { "request": { "$ref": "#/components/examples/PutSubscriptionExample" } } } } }, "responses": { "200": { "description": "The updated webhook subscription.", "content": { "application/json": { "schema": { "type": "object", "properties": { "webhook_subscription": { "$ref": "#/components/schemas/WebhookSubscription" } }, "required": [ "webhook_subscription" ] }, "examples": { "response": { "$ref": "#/components/examples/GetSubscriptionExample" } } } } }, "400": { "$ref": "#/components/responses/WebhookBadRequest" }, "401": { "$ref": "#/components/responses/WebhookUnauthorized" }, "403": { "$ref": "#/components/responses/WebhookForbidden" }, "404": { "$ref": "#/components/responses/WebhookNotFound" } } }, "delete": { "x-pd-requires-scope": "webhook_subscriptions.write", "tags": [ "Webhooks" ], "operationId": "deleteWebhookSubscription", "summary": "Delete a webhook subscription", "description": "Deletes a webhook subscription.\n\nScoped OAuth requires: `webhook_subscriptions.write`\n", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/id" } ], "responses": { "204": { "description": "The webhook subscription was deleted successfully." }, "400": { "$ref": "#/components/responses/WebhookBadRequest" }, "401": { "$ref": "#/components/responses/WebhookUnauthorized" }, "403": { "$ref": "#/components/responses/WebhookForbidden" }, "404": { "$ref": "#/components/responses/WebhookNotFound" } } } }, "/webhook_subscriptions/{id}/enable": { "post": { "x-pd-requires-scope": "webhook_subscriptions.write", "tags": [ "Webhooks" ], "operationId": "enableWebhookSubscription", "summary": "Enable a webhook subscription", "description": "Enable a webhook subscription that is temporarily disabled. (This API does not require a request body.)\n\nWebhook subscriptions can become temporarily disabled when the subscription's delivery method is repeatedly rejected by the server.\n\nScoped OAuth requires: `webhook_subscriptions.write`\n", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/id" } ], "responses": { "200": { "description": "The webhook subscription that was successfully enabled.", "content": { "application/json": { "schema": { "type": "object", "properties": { "webhook_subscription": { "$ref": "#/components/schemas/WebhookSubscription" } }, "required": [ "webhook_subscription" ] }, "examples": { "response": { "$ref": "#/components/examples/GetSubscriptionExample" } } } } }, "401": { "$ref": "#/components/responses/WebhookUnauthorized" }, "403": { "$ref": "#/components/responses/WebhookForbidden" }, "404": { "$ref": "#/components/responses/WebhookNotFound" } } } }, "/webhook_subscriptions/{id}/ping": { "post": { "x-pd-requires-scope": "webhook_subscriptions.write", "tags": [ "Webhooks" ], "operationId": "testWebhookSubscription", "summary": "Test a webhook subscription", "description": "Test a webhook subscription.\n\nFires a test event against the webhook subscription. If properly configured,\nthis will deliver the `pagey.ping` webhook event to the destination.\n\nScoped OAuth requires: `webhook_subscriptions.write`\n", "parameters": [ { "$ref": "#/components/parameters/header_Accept" }, { "$ref": "#/components/parameters/id" } ], "responses": { "202": { "description": "Accepted" }, "401": { "$ref": "#/components/responses/WebhookUnauthorized" }, "403": { "$ref": "#/components/responses/WebhookForbidden" }, "404": { "$ref": "#/components/responses/WebhookNotFound" } } } } } }