{ "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": "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": "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": "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" } ], "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 } }, { "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 } }, "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_incident_id": { "name": "incident_id", "description": "Incident ID", "in": "query", "required": true, "schema": { "type": "string", "example": "Q2LAR4ADCXC8IB" } }, "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" } }, "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" } }, "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[]", "in": "query", "description": "Array of additional details to include.", "explode": true, "schema": { "type": "string", "enum": [ "users", "services", "first_trigger_log_entries", "escalation_policies", "teams", "assignees", "acknowledgers", "priorities", "conference_bridge" ], "uniqueItems": true } }, "include_incident": { "name": "include[]", "in": "query", "description": "Array of additional details to include.", "explode": true, "schema": { "type": "string", "enum": [ "custom_fields" ], "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" } }, "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" } }, "early_access_customfields": { "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": "flex-service-early-access", "enum": [ "flex-service-early-access" ] } } }, "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" } } } }, "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" } } ] }, { "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 } }, { "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 } }, "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_" } } } } } } }, "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": "2020-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": "2020-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 }, "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" ] }, "priority_ids": { "type": "array", "description": "An array of priority IDs. Only incidents with these priorities 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": [ "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 services the requestor has access to 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" }, "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 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 was 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." }, "service_id": { "type": "string", "description": "ID of the service. Only included when aggregating by service." }, "service_name": { "type": "string", "description": "Name of the service. Only included when aggregating by service." }, "team_id": { "type": "string", "description": "ID of the team the incident was assigned to." }, "team_name": { "type": "string", "description": "Name of the team the incident was assigned to." }, "total_business_hour_interruptions": { "type": "integer", "description": "Total number of unique interruptions during business hours.\nBusiness hour: 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 was 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_off_hour_interruptions": { "type": "integer", "description": "Total number of unique interruptions during off hours.\nOff hour: 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 hour: 10pm-8am every day, based on the user’s time zone." }, "total_snoozed_seconds": { "type": "integer", "description": "Total number of seconds incidents were snoozed." }, "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)." } } }, "AnalyticsRawIncident": { "title": "Analytics Raw Incident", "type": "object", "properties": { "assignment_count": { "type": "integer", "description": "Total count of instances where responders were assigned an incident (including through reassignment or escalation) or accepted a responder request." }, "business_hour_interruptions": { "type": "integer", "description": "Total number of unique interruptions during business hour.\nBusiness hour: 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 incident was 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." }, "id": { "type": "string", "description": "Incident ID" }, "incident_number": { "type": "integer", "description": "The PagerDuty incident number" }, "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." }, "off_hour_interruptions": { "type": "integer", "description": "Total number of unique interruptions during off hour.\nOff hour: 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." }, "resolved_at": { "type": "string", "description": "Timestamp of when the incident was resolved." }, "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 start of an incident, and the first responder to acknowledge." }, "seconds_to_mobilize": { "type": "integer", "description": "Time between start of an incident, and the last additional responder to acknowledge. If an incident has one or less responders, the value will be null." }, "seconds_to_resolve": { "type": "integer", "description": "Time from when incident 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 hour.\nSleep hour: 10pm-8am every day, based on the user’s time zone." }, "snoozed_seconds": { "type": "integer", "description": "Total seconds the incident has been snoozed for." }, "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." }, "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 } } }, "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. 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" } ] }, "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 } }, "required": [ "name", "description", "action_type" ] }, "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" } }, "required": [ "action_data_reference" ] } ] }, "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" } }, "required": [ "action_data_reference" ] } ] }, "AutomationActionsScriptActionWithTeams": { "allOf": [ { "$ref": "#/components/schemas/AutomationActionsScriptAction" }, { "type": "object", "properties": { "teams": { "type": "array", "items": { "$ref": "#/components/schemas/TeamReference" } } } } ] }, "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." } } } } } ] } } } ] }, "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/services/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" } } } ] }, "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" } }, "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" } }, "license": { "description": "The License assigned to the User", "allOf": [ { "$ref": "#/components/schemas/Reference" }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "license_reference" ] } } } ] } }, "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 }, "parent": { "$ref": "#/components/schemas/TeamReference" } }, "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." }, "created_at": { "type": "string", "format": "date-time", "description": "The time the incident was first triggered.", "example": "2019-12-01T20:00:00Z", "readOnly": true }, "status": { "type": "string", "description": "The current status of the incident.", "enum": [ "triggered", "acknowledged", "resolved" ] }, "title": { "type": "string", "readOnly": false, "description": "A succinct description of the nature, symptoms, cause, or effect of the incident." }, "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" } }, "incident_key": { "type": "string", "readOnly": true, "description": "The incident's de-duplication key." }, "service": { "$ref": "#/components/schemas/ServiceReference" }, "assignments": { "type": "array", "description": "List of all assignments for this incident. This list will be empty if the `Incident.status` is `resolved`.", "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 }, "acknowledgements": { "type": "array", "description": "List of all acknowledgements for this incident. This list will be empty if the `Incident.status` is `resolved` or `triggered`.", "items": { "$ref": "#/components/schemas/Acknowledgement" } }, "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 }, "last_status_change_by": { "$ref": "#/components/schemas/AgentReference" }, "first_trigger_log_entry": { "$ref": "#/components/schemas/LogEntryReference" }, "escalation_policy": { "$ref": "#/components/schemas/EscalationPolicyReference" }, "teams": { "type": "array", "description": "The teams involved in the incident’s lifecycle.", "items": { "$ref": "#/components/schemas/TeamReference" } }, "priority": { "$ref": "#/components/schemas/PriorityReference" }, "urgency": { "type": "string", "enum": [ "high", "low" ], "description": "The current urgency of the incident." }, "resolve_reason": { "$ref": "#/components/schemas/ResolveReason" }, "alert_counts": { "$ref": "#/components/schemas/AlertCount" }, "conference_bridge": { "$ref": "#/components/schemas/ConferenceBridge" }, "body": { "$ref": "#/components/schemas/IncidentBody" }, "incidents_responders": { "type": "array", "readOnly": true, "items": { "$ref": "#/components/schemas/IncidentsRespondersReference" } }, "responder_requests": { "type": "array", "readOnly": true, "items": { "$ref": "#/components/schemas/ResponderRequest" } }, "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." }, "updated_at": { "type": "string", "format": "date-time", "example": "2019-12-01T21:02:00Z", "description": "The time the incident was last modified." } } } ] }, "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" } ] } ], "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" } } }, "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", "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.\n", "enum": [ "create_incidents", "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.", "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" ] }, "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": { "$ref": "#/components/schemas/UserReference" } }, "required": [ "at", "assignee" ] }, "Acknowledgement": { "type": "object", "properties": { "at": { "type": "string", "format": "date-time", "description": "Time at which the acknowledgement was created." }, "acknowledger": { "$ref": "#/components/schemas/AcknowledgerReference" } }, "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" }, "resolved": { "type": "integer", "description": "The count of resolved alerts" }, "all": { "type": "integer", "description": "The total count of alerts" } } }, "IncidentBody": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "incident_body" ] }, "details": { "type": "string", "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", "items": { "type": "object", "properties": { "name": { "type": "string", "description": "The name of the 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", "readOnly": true, "items": { "type": "object", "properties": { "name": { "type": "string", "description": "The name of the 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/services/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/services/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" } } }, "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", "enum": [ "time", "intelligent", "content_based", null ] }, "config": { "anyOf": [ { "type": "object", "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`." } } }, { "$ref": "#/components/schemas/TimeBasedAlertGroupingConfiguration" }, { "$ref": "#/components/schemas/ContentBasedAlertGroupingConfiguration" } ] } } }, "ContentBasedAlertGroupingConfiguration": { "type": "object", "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": "The fields with which to group against. Depending on the aggregate, Alerts will group if some or all the fields match" } } }, "TimeBasedAlertGroupingConfiguration": { "type": "object", "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 } } }, "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" } ] } } } } } } }, "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." } } }, { "$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" } } } }, "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" } } } } } } } } } ] } } } } } }, "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": { "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/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/properties/catch_all/properties/actions/allOf/3" }, { "$ref": "#/components/schemas/OrchestrationGlobal/allOf/1/properties/orchestration_path/properties/catch_all/properties/actions/allOf/3" } ] } } } } } } }, "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" } ] } } } } } }, "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" } ], "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 } }, { "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" } ] } ] } }, { "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 } }, "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_" } } } ] }, "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.", "enum": [ "threshold_condition", "recurring_condition", "scheduled_condition", "nested_rules", "suspend", "automation_actions", "pagerduty_automation_actions", "extractions", "variables", "suppress" ] }, "feature_type": { "type": "string", "description": "Specifies whether the feature is a part of the rule's conditions, or its actions.", "enum": [ "conditions", "actions", "nested_rules" ] }, "warning_type": { "type": "string", "description": "The type of warning that is being returned for the rule.", "enum": [ "forbidden_feature" ] } } }, "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" ] }, "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": "./StringFixedOptionValue.yaml" } } } }, "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", "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", "properties": { "value": { "type": "boolean", "nullable": true } } }, { "type": "object", "properties": { "value": { "type": "number", "nullable": true } } }, { "type": "object", "properties": { "value": { "type": "integer", "nullable": true } } }, { "type": "object", "properties": { "value": { "oneOf": [ { "type": "string", "maxLength": 200, "nullable": true }, { "type": "array", "items": { "type": "string", "maxLength": 200 }, "maxItems": 10, "uniqueItems": true, "nullable": true } ] } } }, { "type": "object", "properties": { "value": { "type": "string", "nullable": true, "format": "date-time" } } }, { "type": "object", "properties": { "value": { "type": "string", "format": "uri", "maxLength": 200, "nullable": true } } } ] } }, "required": [ "id", "type", "name", "value", "display_name", "data_type", "field_type", "description" ] }, "CustomFieldsEditableFieldValue": { "oneOf": [ { "type": "object", "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", "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" } ] } } } ] } } }, "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/services/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/services/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" } } } }, "/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": { "$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, "range_start": "2020-01-01T00:00:00.000000", "total_business_hour_interruptions": 81, "total_engaged_seconds": 3591, "total_escalation_count": 5, "total_incident_count": 124, "total_off_hour_interruptions": 20, "total_sleep_hour_interruptions": 21, "total_snoozed_seconds": 78 } ], "filters": { "create_range_start": "2020-01-01T00:00:00Z", "create_range_end": "2020-02-01T00:00:00Z" }, "time_zone": "Etc/UTC" } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "429": { "$ref": "#/components/responses/TooManyRequests" } }, "parameters": [ { "$ref": "#/components/parameters/early_access_analytics" }, { "$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": "2021-01-01T00:00:00-05:00", "created_at_end": "2021-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> ### 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\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/services": { "post": { "x-pd-requires-scope": "analytics.read", "summary": "Get aggregated service data", "operationId": "getAnalyticsMetricsIncidentsService", "responses": { "200": { "description": "Currently the response 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": "week", "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, "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_off_hour_interruptions": 20, "total_sleep_hour_interruptions": 21, "total_snoozed_seconds": 78, "up_time_pct": 99.92677595628416 }, { "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, "service_id": "PPSCXAN", "service_name": "Meme Fetcher Bot", "team_id": "PDN84B1", "team_name": "Marketing", "total_business_hour_interruptions": 81, "total_engaged_seconds": 3591, "total_escalation_count": 5, "total_incident_count": 124, "total_off_hour_interruptions": 20, "total_sleep_hour_interruptions": 21, "total_snoozed_seconds": 78, "up_time_pct": 99.98747723132969 } ], "filters": { "created_at_start": "2020-06-17T17:27:27Z", "created_at_end": "2020-06-16T17:27:27Z" }, "time_zone": "Etc/UTC" } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "429": { "$ref": "#/components/responses/TooManyRequests" } }, "parameters": [ { "$ref": "#/components/parameters/early_access_analytics" }, { "$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": "2021-01-01T00:00:00-05:00", "created_at_end": "2021-01-31T00:00:00-05:00", "urgency": "high", "major": true, "team_ids": [ "PGVXG6U", "PNVU4U4" ], "service_ids": [ "PQVUB8D", "PU2D9X3" ], "priority_ids": [ "PITMC5Y", "PEHBBT8" ] }, "aggregate_unit": "week", "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. Some metric definitions can be found in our [Knowledge Base](https://support.pagerduty.com/docs/pagerduty-analytics).\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> ### 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\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": "Currently the response 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, "team_id": "PPSCXAN", "team_name": "Best Team A #1", "total_business_hour_interruptions": 81, "total_engaged_seconds": 3591, "total_escalation_count": 5, "total_incident_count": 124, "total_off_hour_interruptions": 20, "total_sleep_hour_interruptions": 21, "total_snoozed_seconds": 78, "up_time_pct": 99.98861566484517 }, { "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, "team_id": "PPSCXAN", "team_name": "Best Team A #2", "total_business_hour_interruptions": 81, "total_engaged_seconds": 3591, "total_escalation_count": 5, "total_incident_count": 124, "total_off_hour_interruptions": 20, "total_sleep_hour_interruptions": 21, "total_snoozed_seconds": 78, "up_time_pct": 99.98483728172828 } ], "filters": { "created_at_start": "2020-06-17T17:27:27Z", "created_at_end": "2020-06-16T17:27:27Z" }, "aggregate_unit": "day", "time_zone": "Etc/UTC" } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "429": { "$ref": "#/components/responses/TooManyRequests" } }, "parameters": [ { "$ref": "#/components/parameters/early_access_analytics" }, { "$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": "2021-01-01T00:00:00-05:00", "created_at_end": "2021-01-31T00:00:00-05:00", "urgency": "high", "major": true, "team_ids": [ "PGVXG6U", "PNVU4U4" ], "service_ids": [ "PQVUB8D", "PU2D9X2" ], "priority_ids": [ "PITMC5Y", "PEHBBT8" ] }, "aggregate_unit": "week", "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. Some metric definitions can be found in our [Knowledge Base](https://support.pagerduty.com/docs/pagerduty-analytics).\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> ### 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\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": { "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": [ { "assignment_count": 4, "business_hour_interruptions": 5, "created_at": "2020-05-31T10:05:00", "description": "The server is on fire!", "engaged_seconds": 3510, "engaged_user_count": 10, "escalation_count": 1, "id": "PYC0H08", "incident_number": 928, "major": false, "off_hour_interruptions": 4, "priority_id": null, "priority_name": null, "resolved_at": "2020-05-31T10:15:00", "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, "team_id": null, "team_name": null, "urgency": "low", "user_defined_effort_seconds": null }, { "assignment_count": 1, "business_hour_interruptions": 2, "created_at": "2020-05-31T10:05:00", "description": "Reply on social media", "engaged_seconds": 521, "engaged_user_count": 6, "escalation_count": 1, "id": "PCOOHCY", "incident_number": 929, "major": false, "off_hour_interruptions": 3, "priority_id": "POTCOTX", "priority_name": "SEV-2", "resolved_at": "2020-05-31T10:15:00", "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, "team_id": null, "team_name": "Marketing", "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/early_access_analytics" }, { "$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": "2020-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": "2020-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 results related to 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": "2021-01-01T00:00:00-05:00", "created_at_end": "2021-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. Some metric definitions can be found in our [Knowledge Base](https://support.pagerduty.com/docs/pagerduty-analytics).\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\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": { "assignment_count": 0, "business_hour_interruptions": 0, "created_at": "2019-12-01T21:00:00Z", "description": "The server is on fire!", "engaged_seconds": 75, "engaged_user_count": 2, "escalation_count": 0, "id": "PJASD33", "incident_number": 924, "major": true, "off_hour_interruptions": 2, "priority_id": "PZOZQXA", "priority_name": "SEV-1", "resolved_at": "2019-12-01T21:01:00Z", "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, "team_id": "PNVU4UR", "team_name": "Engineering team 7", "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. Some metric definitions can be found in our [Knowledge Base](https://support.pagerduty.com/docs/pagerduty-analytics).\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\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" }, { "$ref": "#/components/parameters/early_access_analytics" } ] } }, "/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 in to 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": { "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`." } } } } } }, "examples": { "Example Response": { "value": { "incident_id": "ABCDEFGHIJKLMN", "limit": 100, "order": "asc", "order_by": "requested_at", "time_zone": "Etc/UTC", "responses": { "responder_name": "Earline Greenholt", "responder_id": "PXPGF42", "response_status": "accepted", "responder_type": "added_responder", "requested_at": "2023-01-05T10:15:00", "responded_at": "2023-01-05T10:18:00", "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 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> ### 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\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" }, { "$ref": "#/components/parameters/early_access_analytics" } ] } }, "/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": "models/automationActions/ScriptActionPostBody.yaml", "process_automation": "models/automationActions/ProcessAutomationJobActionPostBody.yaml" } } } }, "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": "models/automationActions/ScriptActionWithTeams.yaml", "process_automation": "models/automationActions/ProcessAutomationJobActionWithTeams.yaml" } } } }, "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": "models/automationActions/ScriptAction.yaml", "process_automation": "models/automationActions/ProcessAutomationJobAction.yaml" } } } } }, "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": "models/automationActions/ScriptActionWithTeams.yaml", "process_automation": "models/automationActions/ProcessAutomationJobActionWithTeams.yaml" } } } }, "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": "models/automationActions/ScriptActionPutBody.yaml", "process_automation": "models/automationActions/ProcessAutomationJobActionPutBody.yaml" } } } }, "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": "models/automationActions/ScriptActionWithTeams.yaml", "process_automation": "models/automationActions/ProcessAutomationJobActionWithTeams.yaml" } } } }, "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": { "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_incident_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/services/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" } ] } ], "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/services/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/services/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" } ] } ], "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/services/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" } ], "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 } }, { "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 } } } } } } } }, "responses": { "200": { "description": "The Global Orchestration Rules object.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/OrchestrationGlobal" }, { "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": "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" } ], "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 } }, { "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 } }, "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" } ] } } } } } }, "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" } ], "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" } ], "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 } }, { "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 } } } } } } } }, "responses": { "200": { "description": "The Service Orchestration object.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ServiceOrchestration" }, { "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": "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" } ], "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 } }, { "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 } }, "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": "cd770384", "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" } } } }, "/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/services/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/services/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/services/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/services/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/services/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 \"listIncidentWorkflowsByService\" endpoint.\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\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/offset_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, "created_at": "2015-10-06T21:30:42Z", "updated_at": "2015-10-06T21:40:23Z", "status": "resolved", "title": "The server is on fire.", "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/services/PIJ90N7" }, "priority": { "id": "P53ZZH5", "type": "priority_reference", "summary": "P2", "self": "https://api.pagerduty.com/priorities/P53ZZH5" }, "assigned_via": "escalation_policy", "assignments": [], "acknowledgements": [], "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", "conference_bridge": { "conference_number": "+1-415-555-1212,,,,1234#", "conference_url": "https://example.com/acb-123" } } ], "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", "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\nNote: the manage incidents API endpoint is rate limited to 500 requests per minute.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#incidents)\n\nScoped OAuth requires: `incidents.write`\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/services/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", "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", "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/services/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\n\n> ### Early Access\n> The `include[]=custom_fields` part of 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\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" }, { "$ref": "#/components/parameters/early_access_customfields" } ], "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, "created_at": "2015-10-06T21:30:42Z", "updated_at": "2015-10-06T21:40:23Z", "status": "acknowledged", "title": "The server is on fire.", "alert_counts": { "all": 2, "triggered": 1, "resolved": 1 }, "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/services/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": 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", "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" } ] } } ] } ], "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" } ], "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/services/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/services/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/services/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/services/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" ], "operationId": "getIncidentFieldValues", "description": "Get custom field values for an incident.\n\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", "summary": "Get Custom Field Values", "parameters": [ { "$ref": "#/components/parameters/id" }, { "$ref": "#/components/parameters/early_access_customfields" } ], "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" ], "operationId": "setIncidentFieldValues", "description": "Set custom field values for an incident.\n\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", "summary": "Update Custom Field Values", "parameters": [ { "$ref": "#/components/parameters/id" }, { "$ref": "#/components/parameters/early_access_customfields" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "custom_fields": { "type": "array", "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/services/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 k