on volume <*> : PROBLEM for <*>"
}
}
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
},
"500": {
"$ref": "#/components/responses/InternalServerError"
}
}
}
},
"/incidents/{id}/past_incidents": {
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/header_Content-Type"
},
{
"$ref": "#/components/parameters/id"
}
],
"get": {
"x-pd-requires-scope": "incidents.read",
"summary": "Get Past Incidents",
"tags": [
"Incidents"
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"description": "",
"type": "object",
"properties": {
"past_incidents": {
"type": "array",
"description": "Aggregate of past incidents",
"items": {
"type": "object",
"properties": {
"incident": {
"type": "object",
"description": "Incident model reference",
"properties": {
"id": {
"type": "string",
"description": "The globally unique identifier of the incident"
},
"created_at": {
"type": "string",
"description": "The date/time the incident was first triggered"
},
"self": {
"type": "string",
"description": "The URL at which the object is accessible"
},
"title": {
"type": "string",
"description": "The description of the nature, symptoms, cause, or effect of the incident"
}
}
},
"score": {
"type": "number",
"description": "The computed similarity score associated with the incident and parent incident "
}
}
}
},
"total": {
"type": "number",
"description": "The total number of Past Incidents if the total parameter was set in the request"
},
"limit": {
"type": "number",
"description": "The maximum number of Incidents requested"
}
}
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"past_incidents": [
{
"incident": {
"id": "PFBE9I2",
"created_at": "2020-11-04T16:08:15Z",
"self": "https://api.pagerduty.com/incidents/PFBE9I2",
"title": "Things are so broken!"
},
"score": 46.8249
},
{
"incident": {
"id": "P1J6V6M",
"created_at": "2020-10-22T17:18:14Z",
"self": "https://api.pagerduty.com/incidents/P1J6V6M",
"title": "Things are so broken!"
},
"score": 46.8249
},
{
"incident": {
"id": "P6HPX5N",
"created_at": "2020-10-06T22:01:13Z",
"self": "https://api.pagerduty.com/incidents/P6HPX5N",
"title": "You forgot to feed the cat!"
},
"score": 0
}
],
"total": 3,
"limit": 5
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"500": {
"$ref": "#/components/responses/InternalServerError"
}
},
"operationId": "getPastIncidents",
"parameters": [
{
"$ref": "#/components/parameters/past_incidents_limit"
},
{
"$ref": "#/components/parameters/past_incidents_total"
}
],
"description": "Past Incidents returns Incidents within the past 6 months that have similar metadata and were generated on the same Service as the parent Incident. By default, 5 Past Incidents are returned. Note: This feature is currently available as part of the Event Intelligence package or Digital Operations plan only.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#past_incidents)\n\nScoped OAuth requires: `incidents.read`\n"
}
},
"/incidents/{id}/related_change_events": {
"description": "List change events related to an incident.",
"get": {
"x-pd-requires-scope": "incidents.read",
"tags": [
"Change Events"
],
"operationId": "listIncidentRelatedChangeEvents",
"description": "List related Change Events for an Incident, as well as the reason these changes are correlated with the incident.\n\nChange events represent service changes such as deploys, build completion, and configuration changes, providing information that is critical during incident triage or hypercare. For more information on change events, see [Change Events](https://support.pagerduty.com/docs/change-events).\n\nThe Change Correlation feature provides incident responders with recent change events that are most relevant to that incident. Change Correlation informs the responder why a particular change event was surfaced and correlated to an incident based on three key factors which include time, related service, or intelligence (machine learning).\n\nScoped OAuth requires: `incidents.read`\n",
"summary": "List related Change Events for an Incident",
"parameters": [
{
"$ref": "#/components/parameters/id"
},
{
"$ref": "#/components/parameters/offset_limit"
},
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/header_Content-Type"
}
],
"responses": {
"200": {
"description": "The array of Change Events returned by the query.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"change_events": {
"type": "array",
"items": {
"allOf": [
{
"$ref": "#/components/schemas/ChangeEvent"
},
{
"type": "object",
"properties": {
"correlation_reason": {
"type": "object",
"properties": {
"reason": {
"type": "string",
"enum": [
"most_recent",
"related_service",
"intelligent"
],
"readOnly": true,
"description": "The reason a change event was determined to be related to the given incident."
}
}
}
}
}
]
}
}
}
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"change_events": [
{
"summary": "Build Success - Increase snapshot create timeout to 30 seconds",
"id": "01BBYA6PEVW6A852BUO6QYUE7O",
"timestamp": "2020-07-17T08:42:58Z",
"type": "change_event",
"source": "acme-build-pipeline-tool-default-i-9999",
"integration": {
"id": "PEYSGVF",
"type": "inbound_integration_reference"
},
"services": [
{
"id": "PEYSGRV",
"type": "service_reference"
}
],
"custom_details": {
"build_state": "passed",
"build_number": "2",
"run_time": "1236s"
},
"links": [
{
"href": "https://acme.pagerduty.dev/build/2",
"text": "View more details in Acme!"
}
],
"correlation_reason": {
"reason": "most_recent"
}
},
{
"summary": "Build Success - Increase snapshot create timeout to 15 seconds",
"id": "01BBYA6PDIXPL8KO1HPIUL9CZN",
"timestamp": "2020-07-17T07:42:58Z",
"type": "change_event",
"source": "acme-build-pipeline-tool-default-i-9999",
"integration": {
"id": "PEYSGVF",
"type": "inbound_integration_reference"
},
"services": [
{
"id": "PEYSGRV",
"type": "service_reference"
}
],
"custom_details": {
"build_state": "passed",
"build_number": "1",
"run_time": "1233s"
},
"links": [
{
"href": "https://acme.pagerduty.dev/build/1",
"text": "View more details in Acme!"
}
],
"correlation_reason": {
"reason": "related_service"
}
}
],
"limit": null,
"offset": null,
"total": null,
"more": false
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
}
}
}
},
"/incidents/{id}/related_incidents": {
"description": "Get Related Incidents",
"get": {
"x-pd-requires-scope": "incidents.read",
"tags": [
"Incidents"
],
"operationId": "getRelatedIncidents",
"description": "Returns the 20 most recent Related Incidents that are impacting other Responders and Services. Note: This feature is currently available as part of the Event Intelligence package or Digital Operations plan only.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#related_incidents)\n\nScoped OAuth requires: `incidents.read`\n",
"summary": "Get Related Incidents",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/header_Content-Type"
},
{
"$ref": "#/components/parameters/id"
},
{
"$ref": "#/components/parameters/additional_details"
}
],
"responses": {
"200": {
"description": "A list of Related Incidents and their relationships.",
"content": {
"application/json": {
"schema": {
"description": "",
"type": "object",
"properties": {
"related_incidents": {
"type": "array",
"description": "A list of Related Incidents and their relationships.",
"items": {
"properties": {
"incident": {
"$ref": "#/components/schemas/Incident"
},
"relationships": {
"type": "array",
"description": "A list of reasons for why the Incident is considered related.",
"items": {
"properties": {
"type": {
"type": "string",
"description": "The type of relationship. A relationship outlines the reason why two Incidents are considered related.",
"enum": [
"machine_learning_inferred",
"service_dependency"
]
},
"metadata": {
"anyOf": [
{
"$ref": "#/components/schemas/RelatedIncidentMachineLearningRelationship"
},
{
"$ref": "#/components/schemas/RelatedIncidentServiceDependencyRelationship"
}
]
}
}
}
}
}
}
}
}
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"related_incidents": [
{
"incident": {
"id": "PR2P3RW",
"created_at": "2020-11-18T13:08:14Z",
"self": "https://api.pagerduty.com/incidents/PR2P3RW",
"title": "The server is on fire."
},
"relationships": [
{
"type": "machine_learning_inferred",
"metadata": {
"grouping_classification": "similar_contents",
"user_feedback": {
"positive_feedback_count": 12,
"negative_feedback_count": 3
}
}
},
{
"type": "service_dependency",
"metadata": {
"dependent_services": {
"id": "P1L1YEE",
"type": "business_service_reference",
"self": "https://api.pagerduty.com/business_services/P1L1YEE"
},
"supporting_services": {
"id": "PNGCNV2",
"type": "technical_service_reference",
"self": "https://api.pagerduty.com/services/PNGCNV2"
}
}
}
]
}
]
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
},
"500": {
"$ref": "#/components/responses/InternalServerError"
}
}
}
},
"/incidents/{id}/responder_requests": {
"description": "Add responders to an incident.",
"post": {
"x-pd-requires-scope": "incidents.write",
"tags": [
"Incidents"
],
"operationId": "createIncidentResponderRequest",
"description": "Send a new responder request for the specified incident.\n\nAn incident represents a problem or an issue that needs to be addressed and resolved.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#incidents)\n\nScoped OAuth requires: `incidents.write`\n",
"summary": "Create a responder request for an incident",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/header_Content-Type"
},
{
"$ref": "#/components/parameters/id"
},
{
"$ref": "#/components/parameters/from_header"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"requester_id": {
"type": "string",
"description": "The user id of the requester."
},
"message": {
"type": "string",
"description": "The message sent with the responder request."
},
"responder_request_targets": {
"description": "The array of targets the responder request is sent to.",
"items": {
"$ref": "#/components/schemas/ResponderRequestTargetReference"
}
}
},
"required": [
"requester_id",
"message",
"responder_request_targets"
]
},
"examples": {
"request": {
"summary": "Request Example",
"value": {
"requester_id": "PL1JMK5",
"message": "Please help with issue - join bridge at +1(234)-567-8910",
"responder_request_targets": [
{
"responder_request_target": {
"id": "PJ25ZYX",
"type": "user_reference"
}
}
]
}
}
}
}
}
},
"responses": {
"200": {
"description": "The new responder request for the given incident.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"responder_request": {
"$ref": "#/components/schemas/ResponderRequest"
}
},
"required": [
"responder_request"
]
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"responder_request": {
"incident": {
"id": "PXP12GZ",
"type": "incident_reference",
"summary": "Ongoing Incident in Mailroom",
"self": "https://api.pagerduty.com/incidents/PXP12GZ",
"html_url": "https://subdomain.pagerduty.com/incidents/PXP12GZ"
},
"requester": {
"id": "P09TT3C",
"type": "user_reference",
"summary": "Jane Doe",
"self": "https://api.pagerduty.com/users/P09TT3C",
"html_url": "https://subdomain.pagerduty.com/users/P09TT3C"
},
"requested_at": "2018-08-16T14:55:17-07:00",
"message": "Please help with issue - join bridge at +1(234)-567-8910",
"responder_request_targets": [
{
"responder_request_target": {
"type": "user",
"id": "PL7A2O4",
"incidents_responders": [
{
"state": "pending",
"user": {
"id": "PL7A2O4",
"type": "user_reference",
"summary": "Lee Turner",
"self": "https://api.pagerduty.com/users/PL7A2O4",
"html_url": "https://subdomain.pagerduty.com/users/PL7A2O4",
"avatar_url": "https://secure.gravatar.com/avatar/51c673f51f6b483b24c889bbafbd2a67.png?d=mm&r=PG"
},
"incident": {
"id": "PXP12GZ",
"type": "incident_reference",
"summary": "Ongoing Incident in Mailroom",
"self": "https://api.pagerduty.com/incidents/PXP12GZ",
"html_url": "https://subdomain.pagerduty.com/incidents/PXP12GZ"
},
"updated_at": "2018-08-09T14:40:48-07:00",
"message": "Please help with issue - join bridge at +1(234)-567-8910",
"requester": {
"id": "P09TT3C",
"type": "user_reference",
"summary": "Jane Doe",
"self": "https://api.pagerduty.com/users/P09TT3C",
"html_url": "https://subdomain.pagerduty.com/users/P09TT3C",
"avatar_url": "https://secure.gravatar.com/avatar/1c747247b75acc1f724e2784c838b3f8.png?d=mm&r=PG"
},
"requested_at": "2018-08-09T21:40:49Z"
}
]
}
}
]
}
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
}
}
}
},
"/incidents/{id}/snooze": {
"description": "\"Snooze\" an incident. This suspends the acknowledgement timeout and auto-resolution for a given amount of time.",
"post": {
"tags": [
"Incidents"
],
"x-pd-requires-scope": "incidents.write",
"operationId": "createIncidentSnooze",
"description": "Snooze an incident.\n\nAn incident represents a problem or an issue that needs to be addressed and resolved.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#incidents)\n\nScoped OAuth requires: `incidents.write`\n",
"summary": "Snooze an incident",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/header_Content-Type"
},
{
"$ref": "#/components/parameters/id"
},
{
"$ref": "#/components/parameters/from_header"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"duration": {
"type": "integer",
"description": "The number of seconds to snooze the incident for. After this number of seconds has elapsed, the incident will return to the \"triggered\" state.",
"minimum": 1,
"maximum": 604800
}
},
"required": [
"duration"
]
},
"examples": {
"request": {
"summary": "Request Example",
"value": {
"duration": 3600
}
}
}
}
}
},
"responses": {
"201": {
"description": "The incident that was successfully snoozed.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"incident": {
"$ref": "#/components/schemas/Incident"
}
},
"required": [
"incident"
]
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"incident": {
"id": "PT4KHLK",
"type": "incident",
"summary": "[#1234] The server is on fire.",
"self": "https://api.pagerduty.com/incidents/PT4KHLK",
"html_url": "https://subdomain.pagerduty.com/incidents/PT4KHLK",
"incident_number": 1234,
"created_at": "2015-10-06T21:30:42Z",
"updated_at": "2015-10-06T21:40:23Z",
"status": "resolved",
"pending_actions": [
{
"type": "unacknowledge",
"at": "2015-11-10T01:02:52Z"
},
{
"type": "resolve",
"at": "2015-11-10T04:31:52Z"
}
],
"incident_key": "baf7cf21b1da41b4b0221008339ff357",
"service": {
"id": "PIJ90N7",
"type": "service_reference",
"summary": "My Mail Service",
"self": "https://api.pagerduty.com/services/PIJ90N7",
"html_url": "https://subdomain.pagerduty.com/service-directory/PIJ90N7"
},
"assigned_via": "escalation_policy",
"assignments": [
{
"at": "2015-11-10T00:31:52Z",
"assignee": {
"id": "PXPGF42",
"type": "user_reference",
"summary": "Earline Greenholt",
"self": "https://api.pagerduty.com/users/PXPGF42",
"html_url": "https://subdomain.pagerduty.com/users/PXPGF42"
}
}
],
"acknowledgements": [
{
"at": "2015-11-10T00:32:52Z",
"acknowledger": {
"id": "PXPGF42",
"type": "user_reference",
"summary": "Earline Greenholt",
"self": "https://api.pagerduty.com/users/PXPGF42",
"html_url": "https://subdomain.pagerduty.com/users/PXPGF42"
}
}
],
"resolved_at": "2015-10-06T21:38:23Z",
"last_status_change_at": "2015-10-06T21:38:23Z",
"last_status_change_by": {
"id": "PXPGF42",
"type": "user_reference",
"summary": "Earline Greenholt",
"self": "https://api.pagerduty.com/users/PXPGF42",
"html_url": "https://subdomain.pagerduty.com/users/PXPGF42"
},
"first_trigger_log_entry": {
"id": "Q02JTSNZWHSEKV",
"type": "trigger_log_entry_reference",
"summary": "Triggered through the API",
"self": "https://api.pagerduty.com/log_entries/Q02JTSNZWHSEKV?incident_id=PT4KHLK",
"html_url": "https://subdomain.pagerduty.com/incidents/PT4KHLK/log_entries/Q02JTSNZWHSEKV"
},
"escalation_policy": {
"id": "PT20YPA",
"type": "escalation_policy_reference",
"summary": "Another Escalation Policy",
"self": "https://api.pagerduty.com/escalation_policies/PT20YPA",
"html_url": "https://subdomain.pagerduty.com/escalation_policies/PT20YPA"
},
"teams": [
{
"id": "PQ9K7I8",
"type": "team_reference",
"summary": "Engineering",
"self": "https://api.pagerduty.com/teams/PQ9K7I8",
"html_url": "https://subdomain.pagerduty.com/teams/PQ9K7I8"
}
],
"urgency": "high"
}
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
}
}
}
},
"/incidents/{id}/status_updates": {
"description": "Create incident status updates.",
"post": {
"x-pd-requires-scope": "incidents.write",
"tags": [
"Incidents"
],
"operationId": "createIncidentStatusUpdate",
"description": "Create a new status update for the specified incident. Optionally pass `subject` and `html_message` properties in the request body to override the email notification that gets sent.\n\nAn incident represents a problem or an issue that needs to be addressed and resolved.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#incidents)\n\nScoped OAuth requires: `incidents.write`\n",
"summary": "Create a status update on an incident",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/header_Content-Type"
},
{
"$ref": "#/components/parameters/id"
},
{
"$ref": "#/components/parameters/from_header"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "The message to be posted as a status update."
},
"subject": {
"type": "string",
"description": "The subject to be sent for the custom html email status update. Required if sending custom html email."
},
"html_message": {
"type": "string",
"description": "The html content to be sent for the custom html email status update. Required if sending custom html email."
}
},
"required": [
"message"
]
},
"examples": {
"request": {
"summary": "Request Example",
"value": {
"message": "The server fire is spreading.",
"subject": "Server Fire Update",
"html_message": "Server is still on fire
"
}
}
}
}
}
},
"responses": {
"200": {
"description": "The new status update for the specified incident.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"status_update": {
"$ref": "#/components/schemas/StatusUpdate"
}
},
"required": [
"status_update"
]
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"status_update": {
"id": "PWL7QXS",
"message": "The server fire is spreading.",
"sender": {
"id": "PXPGF42",
"type": "user_reference",
"summary": "Earline Greenholt",
"self": "https://api.pagerduty.com/users/PXPGF42",
"html_url": "https://subdomain.pagerduty.com/users/PXPGF42"
},
"created_at": "2013-03-06T15:28:51-05:00",
"html_message": "Server is still on fire
",
"subject": "Server Fire Update"
}
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
}
}
}
},
"/incidents/{id}/status_updates/subscribers": {
"get": {
"x-pd-requires-scope": "subscribers.read",
"summary": "List Notification Subscribers",
"tags": [
"Incidents"
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"allOf": [
{
"$ref": "#/components/schemas/Pagination"
},
{
"type": "object",
"properties": {
"subscribers": {
"type": "array",
"items": {
"$ref": "#/components/schemas/NotificationSubscriberWithContext"
}
}
}
},
{
"type": "object",
"properties": {
"account_id": {
"type": "string",
"description": "The ID of the account belonging to the subscriber entity"
}
}
}
]
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"limit": 100,
"more": false,
"offset": 0,
"subscribers": [
{
"subscriber_id": "PD1234",
"subscriber_type": "user",
"has_indirect_subscription": false,
"subscribed_via": null
},
{
"subscriber_id": "PD1234",
"subscriber_type": "team",
"has_indirect_subscription": true,
"subscribed_via": [
{
"id": "PD1234",
"type": "business_service"
}
]
}
],
"account_id": "PD1234",
"total": 2
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"422": {
"$ref": "#/components/responses/UnprocessableEntity"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
}
},
"operationId": "getIncidentNotificationSubscribers",
"description": "Retrieve a list of Notification Subscribers on the Incident.\n\n\n> Users must be added through `POST /incident/{id}/status_updates/subscribers` to be returned from this endpoint.\nScoped OAuth requires: `subscribers.read`\n",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/id"
}
]
},
"post": {
"x-pd-requires-scope": "subscribers.write",
"summary": "Add Notification Subscribers",
"operationId": "createIncidentNotificationSubscribers",
"tags": [
"Incidents"
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"subscriptions": {
"type": "array",
"items": {
"$ref": "#/components/schemas/NotificationSubscriptionWithContext"
}
}
}
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"subscriptions": [
{
"account_id": "PD1234",
"subscribable_id": "PD1234",
"subscribable_type": "incident",
"subscriber_id": "PD1234",
"subscriber_type": "user",
"result": "success"
},
{
"account_id": "PD1234",
"subscribable_id": "PD1234",
"subscribable_type": "incident",
"subscriber_id": "PD1234",
"subscriber_type": "team",
"result": "duplicate"
},
{
"account_id": "PD1234",
"subscribable_id": "PD1235",
"subscribable_type": "incident",
"subscriber_id": "PD1234",
"subscriber_type": "team",
"result": "unauthorized"
}
]
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"422": {
"$ref": "#/components/responses/UnprocessableEntity"
}
},
"description": "Subscribe the given entities to Incident Status Update Notifications.\n\nScoped OAuth requires: `subscribers.write`\n",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/id"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"subscribers": {
"type": "array",
"uniqueItems": true,
"minItems": 1,
"items": {
"$ref": "#/components/schemas/NotificationSubscriber"
}
}
},
"required": [
"subscribers"
]
},
"examples": {
"request": {
"summary": "Request Example",
"value": {
"subscribers": [
{
"subscriber_id": "PD1234",
"subscriber_type": "team"
},
{
"subscriber_id": "PD1235",
"subscriber_type": "team"
},
{
"subscriber_id": "PD1234",
"subscriber_type": "user"
}
]
}
}
}
}
},
"description": "The entities to subscribe."
}
}
},
"/incidents/{id}/status_updates/unsubscribe": {
"post": {
"x-pd-requires-scope": "subscribers.write",
"summary": "Remove Notification Subscriber",
"tags": [
"Incidents"
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"deleted_count": {
"type": "number"
},
"unauthorized_count": {
"type": "number"
},
"non_existent_count": {
"type": "number"
}
},
"required": [
"deleted_count",
"unauthorized_count",
"non_existent_count"
]
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"deleted_count": 1,
"unauthorized_count": 1,
"non_existent_count": 0
}
}
}
}
}
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"422": {
"$ref": "#/components/responses/UnprocessableEntity"
}
},
"operationId": "removeIncidentNotificationSubscribers",
"description": "Unsubscribes the matching Subscribers from Incident Status Update Notifications.\n\nScoped OAuth requires: `subscribers.write`\n",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/id"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"subscribers": {
"type": "array",
"uniqueItems": true,
"minItems": 1,
"items": {
"$ref": "#/components/schemas/NotificationSubscriber"
}
}
},
"required": [
"subscribers"
]
},
"examples": {
"request": {
"summary": "Request Example",
"value": {
"subscribers": [
{
"subscriber_id": "PD1234",
"subscriber_type": "team"
},
{
"subscriber_id": "PD1234",
"subscriber_type": "user"
}
]
}
}
}
}
},
"description": "The entities to unsubscribe."
}
}
},
"/incidents/count": {
"description": "Get a count of incidents matching a set of criteria such as service, status, and time. Counts may be fetched per status."
},
"/incidents/custom_fields": {
"description": "Create and list Fields on Incidents",
"post": {
"tags": [
"Custom Fields"
],
"x-pd-requires-scope": "custom_fields.write",
"operationId": "createCustomFieldsField",
"description": "Create a new Field, along with the Field Options if provided. An account may have up to 10 Fields.\n\nScoped OAuth requires: `custom_fields.write`\n",
"summary": "Create a Field",
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"field": {
"$ref": "#/components/schemas/CustomFieldsFieldWithOptions"
}
},
"required": [
"field"
]
},
"examples": {
"request1": {
"summary": "Example: With field_options and single-value",
"value": {
"field": {
"data_type": "string",
"name": "environment",
"display_name": "Environment",
"description": "The environment that the issue occurred in",
"field_type": "single_value_fixed",
"default_value": "production",
"field_options": [
{
"data": {
"data_type": "string",
"value": "production"
}
},
{
"data": {
"data_type": "string",
"value": "staging"
}
}
]
}
}
},
"request2": {
"summary": "Example: With field_options and multi-value",
"value": {
"field": {
"data_type": "string",
"name": "environment",
"display_name": "Environment",
"description": "The environment that the issue occurred in",
"field_type": "multi_value_fixed",
"default_value": [
"production",
"staging"
],
"field_options": [
{
"data": {
"data_type": "string",
"value": "production"
}
},
{
"data": {
"data_type": "string",
"value": "staging"
}
}
]
}
}
},
"request3": {
"summary": "Example: Without field_options",
"value": {
"field": {
"data_type": "string",
"name": "environment",
"display_name": "Environment",
"description": "The environment that the issue occurred in",
"field_type": "single_value",
"default_value": "production"
}
}
}
}
}
}
},
"responses": {
"201": {
"description": "The field object created, along with the Field Options if provided.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"field": {
"$ref": "#/components/schemas/CustomFieldsFieldWithOptions"
}
},
"required": [
"field"
]
},
"examples": {
"response1": {
"summary": "Example: With field_options and single-value",
"value": {
"field": {
"id": "P5IYCNZ",
"type": "field",
"summary": "environment",
"self": "https://api.pagerduty.com/incidents/custom_fields/P5IYCNZ",
"data_type": "string",
"name": "environment",
"display_name": "Environment",
"field_type": "single_value_fixed",
"description": "The environment that the issue occurred in",
"created_at": "2021-06-01T21:30:42Z",
"updated_at": "2021-06-01T21:30:42Z",
"default_value": "staging",
"field_options": [
{
"id": "PT4KHEE",
"type": "field_option",
"data": {
"data_type": "string",
"value": "production"
},
"created_at": "2021-06-01T21:30:42Z",
"updated_at": "2021-06-01T21:30:42Z"
},
{
"id": "P5IYCNZ",
"type": "field_option",
"data": {
"data_type": "string",
"value": "staging"
},
"created_at": "2021-06-01T21:30:42Z",
"updated_at": "2021-06-01T21:30:42Z"
}
]
}
}
},
"response2": {
"summary": "Example: With field_options and multi-value",
"value": {
"field": {
"id": "P5IYCNZ",
"type": "field",
"summary": "environment",
"self": "https://api.pagerduty.com/incidents/custom_fields/P5IYCNZ",
"data_type": "string",
"name": "environment",
"display_name": "Environment",
"field_type": "multi_value_fixed",
"description": "The environment that the issue occurred in",
"created_at": "2021-06-01T21:30:42Z",
"updated_at": "2021-06-01T21:30:42Z",
"default_value": [
"production",
"staging"
],
"field_options": [
{
"id": "PT4KHEE",
"type": "field_option",
"data": {
"data_type": "string",
"value": "production"
},
"created_at": "2021-06-01T21:30:42Z",
"updated_at": "2021-06-01T21:30:42Z"
},
{
"id": "P5IYCNZ",
"type": "field_option",
"data": {
"data_type": "string",
"value": "staging"
},
"created_at": "2021-06-01T21:30:42Z",
"updated_at": "2021-06-01T21:30:42Z"
}
]
}
}
},
"response3": {
"summary": "Example: Without field_options",
"value": {
"field": {
"id": "P5IYCNZ",
"type": "field",
"summary": "environment",
"self": "https://api.pagerduty.com/incidents/custom_fields/P5IYCNZ",
"data_type": "string",
"field_type": "single_value",
"name": "environment",
"display_name": "Environment",
"description": "The environment that the issue occurred in",
"default_value": "production",
"created_at": "2021-06-01T21:30:42Z",
"updated_at": "2021-06-01T21:30:42Z"
}
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"500": {
"$ref": "#/components/responses/InternalServerError"
}
}
},
"get": {
"tags": [
"Custom Fields"
],
"x-pd-requires-scope": "custom_fields.read",
"operationId": "listCustomFieldsFields",
"description": "List fields.\n\nScoped OAuth requires: `custom_fields.read`\n",
"summary": "List Fields",
"parameters": [
{
"$ref": "#/components/parameters/include_customfields_field"
}
],
"responses": {
"200": {
"description": "A list of fields.",
"content": {
"application/json": {
"schema": {
"allOf": [
{
"type": "object",
"properties": {
"fields": {
"type": "array",
"items": {
"$ref": "#/components/schemas/CustomFieldsFieldWithOptions"
}
}
},
"required": [
"fields"
]
}
]
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"fields": [
{
"id": "P5IYCNZ",
"type": "field",
"summary": "environment",
"self": "https://api.pagerduty.com/incidents/custom_fields/P5IYCNZ",
"data_type": "string",
"name": "environment",
"display_name": "Environment",
"description": "The environment that the issue occurred in",
"field_type": "single_value_fixed",
"created_at": "2021-06-01T21:30:42Z",
"updated_at": "2021-06-01T21:30:42Z",
"default_value": null,
"field_options": [
{
"id": "PT4KHEE",
"type": "field_option",
"data": {
"data_type": "string",
"value": "abc"
},
"created_at": "2021-06-01T21:30:42Z",
"updated_at": "2021-06-01T21:30:42Z"
}
]
}
]
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"500": {
"$ref": "#/components/responses/InternalServerError"
}
}
}
},
"/incidents/custom_fields/{field_id}": {
"description": "Get, update and delete a field.",
"get": {
"tags": [
"Custom Fields"
],
"x-pd-requires-scope": "custom_fields.read",
"operationId": "getCustomFieldsField",
"description": "Show detailed information about a field.\n\nScoped OAuth requires: `custom_fields.read`\n",
"summary": "Get a Field",
"parameters": [
{
"$ref": "#/components/parameters/field_id"
},
{
"$ref": "#/components/parameters/include_customfields_field"
}
],
"responses": {
"200": {
"description": "The field requested.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"field": {
"$ref": "#/components/schemas/CustomFieldsFieldWithOptions"
}
},
"required": [
"field"
]
},
"examples": {
"response1": {
"summary": "Example: No query parameters",
"value": {
"field": {
"id": "P5IYCNZ",
"type": "field",
"summary": "environment",
"self": "https://api.pagerduty.com/incidents/custom_fields/P5IYCNZ",
"data_type": "string",
"name": "environment",
"display_name": "Environment",
"description": "The environment that the issue occurred in",
"field_type": "multi_value",
"default_value": null,
"created_at": "2021-06-01T21:30:42Z",
"updated_at": "2021-06-01T21:30:42Z"
}
}
},
"response2": {
"summary": "Example: Using include[]=field_options",
"value": {
"field": {
"id": "P5IYCNZ",
"type": "field",
"summary": "environment",
"self": "https://api.pagerduty.com/incidents/custom_fields/P5IYCNZ",
"data_type": "string",
"name": "environment",
"display_name": "Environment",
"description": "The environment that the issue occurred in",
"field_type": "single_value_fixed",
"created_at": "2021-06-01T21:30:42Z",
"updated_at": "2021-06-01T21:30:42Z",
"default_value": null,
"field_options": [
{
"id": "PT4KHEE",
"type": "field_option",
"data": {
"data_type": "string",
"value": "production"
},
"created_at": "2021-06-01T21:30:42Z",
"updated_at": "2021-06-01T21:30:42Z"
},
{
"id": "P5IYCNZ",
"type": "field_option",
"data": {
"data_type": "string",
"value": "staging"
},
"created_at": "2021-06-01T21:30:42Z",
"updated_at": "2021-06-01T21:30:42Z"
}
]
}
}
}
}
}
}
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"500": {
"$ref": "#/components/responses/InternalServerError"
}
}
},
"put": {
"tags": [
"Custom Fields"
],
"x-pd-requires-scope": "custom_fields.write",
"operationId": "updateCustomFieldsField",
"description": "Update a field.\n\nScoped OAuth requires: `custom_fields.write`\n",
"summary": "Update a Field",
"parameters": [
{
"$ref": "#/components/parameters/field_id"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"field": {
"$ref": "#/components/schemas/CustomFieldsEditableField"
}
},
"required": [
"field"
]
},
"examples": {
"request": {
"summary": "Request Example",
"value": {
"field": {
"display_name": "New Display Name!",
"description": "New description!"
}
}
}
}
}
}
},
"responses": {
"200": {
"description": "The field object updated.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"field": {
"$ref": "#/components/schemas/CustomFieldsField"
}
},
"required": [
"field"
]
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"field": {
"id": "P5IYCNZ",
"type": "field",
"summary": "old_name",
"self": "https://api.pagerduty.com/incidents/custom_fields/P5IYCNZ",
"data_type": "string",
"name": "old_name",
"display_name": "New Display Name!",
"description": "New description!",
"field_type": "single_value",
"default_value": null,
"created_at": "2021-06-01T21:30:42Z",
"updated_at": "2021-06-01T21:30:42Z"
}
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"500": {
"$ref": "#/components/responses/InternalServerError"
}
}
},
"delete": {
"tags": [
"Custom Fields"
],
"x-pd-requires-scope": "custom_fields.write",
"operationId": "deleteCustomFieldsField",
"description": "Delete a Field. Fields may not be deleted if they are used by a Field Schema.\n\nScoped OAuth requires: `custom_fields.write`\n",
"summary": "Delete a Field",
"parameters": [
{
"$ref": "#/components/parameters/field_id"
}
],
"responses": {
"204": {
"description": "The field was deleted successfully."
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"500": {
"$ref": "#/components/responses/InternalServerError"
}
}
}
},
"/incidents/custom_fields/{field_id}/field_options": {
"description": "Create new option for the given field_options (e.g., enum) field and list all options for the given field.",
"post": {
"tags": [
"Custom Fields"
],
"x-pd-requires-scope": "custom_fields.write",
"operationId": "createCustomFieldsFieldOption",
"description": "Create a new Field Option. Field Options may only be created for Fields that have `field_options`. A Field may have no more than 10 enabled options.\n\nScoped OAuth requires: `custom_fields.write`\n",
"summary": "Create a Field Option",
"parameters": [
{
"$ref": "#/components/parameters/field_id"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"field_option": {
"$ref": "#/components/schemas/CustomFieldsFieldOption"
}
},
"required": [
"field_option"
]
},
"examples": {
"request": {
"summary": "Request Example",
"value": {
"field_option": {
"data": {
"data_type": "string",
"value": "production"
}
}
}
}
}
}
}
},
"responses": {
"201": {
"description": "The field option created.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"field_option": {
"$ref": "#/components/schemas/CustomFieldsFieldOption"
}
},
"required": [
"field_option"
]
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"field_option": {
"id": "PQ9K7I8",
"type": "field_option",
"data": {
"data_type": "string",
"value": "production"
},
"created_at": "2021-06-01T21:30:42Z",
"updated_at": "2021-06-01T21:30:42Z"
}
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"500": {
"$ref": "#/components/responses/InternalServerError"
}
}
},
"get": {
"tags": [
"Custom Fields"
],
"x-pd-requires-scope": "custom_fields.read",
"operationId": "listCustomFieldsFieldOptions",
"description": "List all enabled Field Options for a Field.\n\nScoped OAuth requires: `custom_fields.read`\n",
"summary": "List Field Options",
"parameters": [
{
"$ref": "#/components/parameters/field_id"
}
],
"responses": {
"200": {
"description": "A list of field options.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"field_options": {
"type": "array",
"items": {
"$ref": "#/components/schemas/CustomFieldsFieldOption"
}
}
},
"required": [
"field_options"
]
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"field_options": [
{
"id": "PQ9K7I8",
"type": "field_option",
"data": {
"data_type": "string",
"value": "production"
},
"created_at": "2021-06-01T21:30:42Z",
"updated_at": "2021-06-01T21:30:42Z"
}
]
}
}
}
}
}
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"500": {
"$ref": "#/components/responses/InternalServerError"
}
}
}
},
"/incidents/custom_fields/{field_id}/field_options/{field_option_id}": {
"description": "Update field option.",
"put": {
"tags": [
"Custom Fields"
],
"x-pd-requires-scope": "custom_fields.write",
"operationId": "updateCustomFieldsFieldOption",
"description": "Update Field Option for a Field.\n\nScoped OAuth requires: `custom_fields.write`\n",
"summary": "Update a Field Option",
"parameters": [
{
"$ref": "#/components/parameters/field_id"
},
{
"$ref": "#/components/parameters/field_option_id"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"field_option": {
"$ref": "#/components/schemas/CustomFieldsEditableFieldOption"
}
},
"required": [
"field_option"
]
},
"examples": {
"request": {
"summary": "Request Example",
"value": {
"field_option": {
"data": {
"data_type": "string",
"value": "prod"
}
}
}
}
}
}
}
},
"responses": {
"200": {
"description": "The field option object updated.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"field_option": {
"$ref": "#/components/schemas/CustomFieldsFieldOption"
}
},
"required": [
"field_option"
]
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"field_option": {
"id": "PQ9K7I8",
"type": "field_option",
"data": {
"data_type": "string",
"value": "prod"
},
"created_at": "2021-06-01T21:30:42Z",
"updated_at": "2021-06-01T21:30:42Z"
}
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"500": {
"$ref": "#/components/responses/InternalServerError"
}
}
},
"delete": {
"tags": [
"Custom Fields"
],
"x-pd-requires-scope": "custom_fields.write",
"operationId": "deleteCustomFieldsFieldOption",
"description": "Delete a Field Option.\n\nScoped OAuth requires: `custom_fields.write`\n",
"summary": "Delete a Field Option",
"parameters": [
{
"$ref": "#/components/parameters/field_id"
},
{
"$ref": "#/components/parameters/field_option_id"
}
],
"responses": {
"204": {
"description": "The field option was deleted successfully."
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"500": {
"$ref": "#/components/responses/InternalServerError"
}
}
}
},
"/license_allocations": {
"description": "The Licenses allocated to Users within your Account",
"get": {
"x-pd-requires-scope": "licenses.read",
"tags": [
"Licenses"
],
"operationId": "listLicenseAllocations",
"description": "List the Licenses allocated to Users within your Account\n\nScoped OAuth requires: `licenses.read`\n",
"summary": "List License Allocations",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/header_Content-Type"
},
{
"$ref": "#/components/parameters/offset_limit"
},
{
"$ref": "#/components/parameters/offset_offset"
}
],
"responses": {
"200": {
"description": "License allocations to Users within your Account",
"content": {
"application/json": {
"schema": {
"allOf": [
{
"type": "object",
"properties": {
"license_allocations": {
"type": "array",
"items": {
"type": "object",
"required": [
"user",
"license",
"allocated_at"
],
"properties": {
"user": {
"$ref": "#/components/schemas/UserReference"
},
"license": {
"$ref": "#/components/schemas/LicenseWithCounts/allOf/0"
},
"allocated_at": {
"type": "string",
"description": "Indicates the date and time the License was allocated to the User",
"format": "date-time"
}
}
}
}
}
},
{
"$ref": "#/components/schemas/Pagination"
}
]
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"license_allocations": [
{
"license": {
"id": "PIP248G",
"name": "Business (Full User)",
"description": "Event Intelligence",
"valid_roles": [
"owner",
"admin",
"user",
"limited_user",
"observer",
"restricted_access"
],
"role_group": "FullUser",
"summary": "Business (Full User)",
"type": "license",
"self": null,
"html_url": null
},
"user": {
"id": "PIP248H",
"type": "user_reference"
},
"allocated_at": "2021-06-01T00:00:00-05:00"
}
],
"offset": 0,
"limit": 1,
"more": false,
"total": 2
}
}
}
}
}
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
}
}
}
},
"/licenses": {
"description": "The Licenses associated with your Account",
"get": {
"x-pd-requires-scope": "licenses.read",
"tags": [
"Licenses"
],
"operationId": "listLicenses",
"description": "List the Licenses associated with your Account\n\nScoped OAuth requires: `licenses.read`\n",
"summary": "List Licenses",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/header_Content-Type"
}
],
"responses": {
"200": {
"description": "Licenses associated with your Account",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"licenses": {
"type": "array",
"items": {
"$ref": "#/components/schemas/LicenseWithCounts"
}
}
}
},
"examples": {
"response": {
"summary": "Example Response",
"value": {
"licenses": [
{
"id": "PIP248G",
"name": "Business (Full User)",
"description": "Event Intelligence",
"current_value": 234,
"allocations_available": 4766,
"valid_roles": [
"owner",
"admin",
"user",
"limited_user",
"observer",
"restricted_access"
],
"role_group": "FullUser",
"summary": "Business (Full User)",
"type": "license",
"self": null,
"html_url": null
},
{
"id": "PTHH1SQ",
"name": "Business (Full User)",
"description": "",
"current_value": 0,
"allocations_available": 4766,
"valid_roles": [
"owner",
"admin",
"user",
"limited_user",
"observer",
"restricted_access"
],
"role_group": "FullUser",
"summary": "Business (Full User)",
"type": "license",
"self": null,
"html_url": null
},
{
"id": "PQ8W0D0",
"name": "Business (Stakeholder)",
"description": "",
"current_value": 48,
"allocations_available": 4952,
"valid_roles": [
"read_only_user",
"read_only_limited_user"
],
"role_group": "Stakeholder",
"summary": "Business (Stakeholder)",
"type": "license",
"self": null,
"html_url": null
}
]
}
}
}
}
}
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
}
}
}
},
"/log_entries": {
"description": "List all of the log entries across your account. These can be filtered (for instance, by time or by team), and the results will be paginated.",
"get": {
"x-pd-requires-scope": "incidents.read",
"tags": [
"Log Entries"
],
"operationId": "listLogEntries",
"description": "List all of the incident log entries across the entire account.\n\nA log of all the events that happen to an Incident, and these are exposed as Log Entries.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#log-entries)\n\nScoped OAuth requires: `incidents.read`\n",
"summary": "List log entries",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/header_Content-Type"
},
{
"$ref": "#/components/parameters/offset_limit"
},
{
"$ref": "#/components/parameters/offset_offset"
},
{
"$ref": "#/components/parameters/offset_total"
},
{
"$ref": "#/components/parameters/time_zone"
},
{
"$ref": "#/components/parameters/since"
},
{
"$ref": "#/components/parameters/until"
},
{
"$ref": "#/components/parameters/log_entry_is_overview"
},
{
"$ref": "#/components/parameters/include_log_entry"
},
{
"$ref": "#/components/parameters/team_ids"
}
],
"responses": {
"200": {
"description": "A paginated array of log entries.",
"content": {
"application/json": {
"schema": {
"allOf": [
{
"$ref": "#/components/schemas/Pagination"
},
{
"type": "object",
"properties": {
"log_entries": {
"type": "array",
"items": {
"oneOf": [
{
"$ref": "#/components/schemas/AcknowledgeLogEntry"
},
{
"$ref": "#/components/schemas/AnnotateLogEntry"
},
{
"$ref": "#/components/schemas/AssignLogEntry"
},
{
"$ref": "#/components/schemas/DelegateLogEntry"
},
{
"$ref": "#/components/schemas/EscalateLogEntry"
},
{
"$ref": "#/components/schemas/ExhaustEscalationPathLogEntry"
},
{
"$ref": "#/components/schemas/NotifyLogEntry"
},
{
"$ref": "#/components/schemas/ReachAckLimitLogEntry"
},
{
"$ref": "#/components/schemas/ReachTriggerLimitLogEntry"
},
{
"$ref": "#/components/schemas/RepeatEscalationPathLogEntry"
},
{
"$ref": "#/components/schemas/ResolveLogEntry"
},
{
"$ref": "#/components/schemas/SnoozeLogEntry"
},
{
"$ref": "#/components/schemas/TriggerLogEntry"
},
{
"$ref": "#/components/schemas/UnacknowledgeLogEntry"
},
{
"$ref": "#/components/schemas/UrgencyChangeLogEntry"
}
]
}
}
},
"required": [
"log_entries"
]
}
]
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"log_entries": [
{
"id": "Q02JTSNZWHSEKV",
"type": "trigger_log_entry",
"summary": "Triggered through the API",
"self": "https://api.pagerduty.com/log_entries/Q02JTSNZWHSEKV?incident_id=PT4KHLK",
"html_url": "https://subdomain.pagerduty.com/incidents/PT4KHLK/log_entries/Q02JTSNZWHSEKV",
"created_at": "2015-11-07T00:14:20Z",
"agent": {
"id": "PIJ90N7",
"type": "service_reference",
"summary": "My Mail Service",
"self": "https://api.pagerduty.com/services/PIJ90N7",
"html_url": "https://subdomain.pagerduty.com/service-directory/PIJ90N7"
},
"channel": {
"type": "api"
},
"incident": {
"id": "PT4KHLK",
"type": "incident_reference",
"summary": "[#1234] The server is on fire.",
"self": "https://api.pagerduty.com/incidents/PT4KHLK",
"html_url": "https://subdomain.pagerduty.com/incidents/PT4KHLK"
},
"teams": [
{
"id": "PQ9K7I8",
"type": "team_reference",
"summary": "Engineering",
"self": "https://api.pagerduty.com/teams/PQ9K7I8",
"html_url": "https://subdomain.pagerduty.com/teams/PQ9K7I8"
}
],
"contexts": [],
"event_details": {
"description": "Tasks::SFDCValidator - PD_Data__c - duplicates"
}
}
],
"limit": 1,
"offset": 0,
"more": true
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
}
}
}
},
"/log_entries/{id}": {
"description": "Get a single log entry by ID.",
"get": {
"x-pd-requires-scope": "incidents.read",
"tags": [
"Log Entries"
],
"operationId": "getLogEntry",
"description": "Get details for a specific incident log entry. This method provides additional information you can use to get at raw event data.\n\nA log of all the events that happen to an Incident, and these are exposed as Log Entries.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#log-entries)\n\nScoped OAuth requires: `incidents.read`\n",
"summary": "Get a log entry",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/header_Content-Type"
},
{
"$ref": "#/components/parameters/time_zone"
},
{
"$ref": "#/components/parameters/id"
},
{
"$ref": "#/components/parameters/include_log_entry"
}
],
"responses": {
"200": {
"description": "A single log entry.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"log_entry": {
"oneOf": [
{
"$ref": "#/components/schemas/AcknowledgeLogEntry"
},
{
"$ref": "#/components/schemas/AnnotateLogEntry"
},
{
"$ref": "#/components/schemas/AssignLogEntry"
},
{
"$ref": "#/components/schemas/DelegateLogEntry"
},
{
"$ref": "#/components/schemas/EscalateLogEntry"
},
{
"$ref": "#/components/schemas/ExhaustEscalationPathLogEntry"
},
{
"$ref": "#/components/schemas/NotifyLogEntry"
},
{
"$ref": "#/components/schemas/ReachAckLimitLogEntry"
},
{
"$ref": "#/components/schemas/ReachTriggerLimitLogEntry"
},
{
"$ref": "#/components/schemas/RepeatEscalationPathLogEntry"
},
{
"$ref": "#/components/schemas/ResolveLogEntry"
},
{
"$ref": "#/components/schemas/SnoozeLogEntry"
},
{
"$ref": "#/components/schemas/TriggerLogEntry"
},
{
"$ref": "#/components/schemas/UnacknowledgeLogEntry"
},
{
"$ref": "#/components/schemas/UrgencyChangeLogEntry"
}
]
}
},
"required": [
"log_entry"
]
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"log_entry": {
"id": "Q02JTSNZWHSEKV",
"type": "trigger_log_entry",
"summary": "Triggered through the API",
"self": "https://api.pagerduty.com/log_entries/Q02JTSNZWHSEKV?incident_id=PT4KHLK",
"html_url": "https://subdomain.pagerduty.com/incidents/PT4KHLK/log_entries/Q02JTSNZWHSEKV",
"created_at": "2015-11-07T00:14:20Z",
"agent": {
"id": "PIJ90N7",
"type": "service_reference",
"summary": "My Mail Service",
"self": "https://api.pagerduty.com/services/PIJ90N7",
"html_url": "https://subdomain.pagerduty.com/service-directory/PIJ90N7"
},
"channel": {
"type": "api"
},
"incident": {
"id": "PT4KHLK",
"type": "incident_reference",
"summary": "[#1234] The server is on fire.",
"self": "https://api.pagerduty.com/incidents/PT4KHLK",
"html_url": "https://subdomain.pagerduty.com/incidents/PT4KHLK"
},
"teams": [
{
"id": "PQ9K7I8",
"type": "team_reference",
"summary": "Engineering",
"self": "https://api.pagerduty.com/teams/PQ9K7I8",
"html_url": "https://subdomain.pagerduty.com/teams/PQ9K7I8"
}
],
"contexts": [],
"event_details": {
"description": "Tasks::SFDCValidator - PD_Data__c - duplicates"
}
}
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
}
}
}
},
"/log_entries/{id}/channel": {
"description": "Log entry channel information.",
"put": {
"x-pd-requires-scope": "incidents.write",
"tags": [
"Log Entries"
],
"operationId": "updateLogEntryChannel",
"description": "Update an existing incident log entry channel.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#log-entries)\n\nScoped OAuth requires: `incidents.write`\n",
"summary": "Update log entry channel information.",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/header_Content-Type"
},
{
"$ref": "#/components/parameters/id"
},
{
"$ref": "#/components/parameters/from_header"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"channel": {
"type": "object",
"description": "The parameters to update.",
"properties": {
"details": {
"type": "string",
"description": "New channel details"
},
"type": {
"type": "string",
"description": "Channel type. Cannot be changed and must match the present value.",
"enum": [
"web_trigger",
"mobile"
]
}
},
"required": [
"type",
"details"
]
}
},
"required": [
"channel"
]
},
"examples": {
"request": {
"summary": "Request Example",
"value": {
"channel": {
"type": "web_trigger",
"details": "New channel details"
}
}
}
}
}
},
"description": "The log entry channel to be updated."
},
"responses": {
"202": {
"description": "The channel information modification was accepted."
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
}
}
}
},
"/maintenance_windows": {
"description": "List and create maintenance windows.",
"get": {
"x-pd-requires-scope": "services.read",
"tags": [
"Maintenance Windows"
],
"operationId": "listMaintenanceWindows",
"description": "List existing maintenance windows, optionally filtered by service and/or team, or whether they are from the past, present or future.\n\nA Maintenance Window is used to temporarily disable one or more Services for a set period of time.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#maintenance-windows)\n\nScoped OAuth requires: `services.read`\n",
"summary": "List maintenance windows",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/header_Content-Type"
},
{
"$ref": "#/components/parameters/query"
},
{
"$ref": "#/components/parameters/offset_limit"
},
{
"$ref": "#/components/parameters/offset_offset"
},
{
"$ref": "#/components/parameters/offset_total"
},
{
"$ref": "#/components/parameters/team_ids"
},
{
"$ref": "#/components/parameters/services"
},
{
"$ref": "#/components/parameters/include_maintenance_window"
},
{
"$ref": "#/components/parameters/filter_maintenance_windows"
}
],
"responses": {
"200": {
"description": "A paginated array of maintenance windows.",
"content": {
"application/json": {
"schema": {
"allOf": [
{
"$ref": "#/components/schemas/Pagination"
},
{
"type": "object",
"properties": {
"maintenance_windows": {
"type": "array",
"items": {
"$ref": "#/components/schemas/MaintenanceWindow"
}
}
},
"required": [
"maintenance_windows"
]
}
]
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"maintenance_windows": [
{
"id": "PW98YIO",
"type": "maintenance_window",
"summary": "Immanentizing the eschaton",
"self": "https://api.pagerduty.com/maintenance_windows/PW98YIO",
"html_url": "https://subdomain.pagerduty.com/service-directory/maintenance-windows/PW98YIO",
"sequence_number": 1,
"start_time": "2015-11-09T20:00:00-05:00",
"end_time": "2015-11-09T22:00:00-05:00",
"description": "Immanentizing the eschaton",
"services": [
{
"id": "PIJ90N7",
"type": "service_reference",
"summary": "My Mail Service",
"self": "https://api.pagerduty.com/services/PIJ90N7",
"html_url": "https://subdomain.pagerduty.com/service-directory/PIJ90N7"
}
],
"teams": [
{
"id": "PQ9K7I8",
"type": "team_reference",
"summary": "Engineering",
"self": "https://api.pagerduty.com/teams/PQ9K7I8",
"html_url": "https://subdomain.pagerduty.com/teams/PQ9K7I8"
}
],
"created_by": {
"id": "PXPGF42",
"type": "user_reference",
"summary": "Earline Greenholt",
"self": "https://api.pagerduty.com/users/PXPGF42",
"html_url": "https://subdomain.pagerduty.com/users/PXPGF42"
}
}
],
"limit": 25,
"offset": 0,
"more": false,
"total": null
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
}
}
},
"post": {
"x-pd-requires-scope": "services.write",
"tags": [
"Maintenance Windows"
],
"operationId": "createMaintenanceWindow",
"description": "Create a new maintenance window for the specified services. No new incidents will be created for a service that is in maintenance.\n\nA Maintenance Window is used to temporarily disable one or more Services for a set period of time.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#maintenance-windows)\n\nScoped OAuth requires: `services.write`\n",
"summary": "Create a maintenance window",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/header_Content-Type"
},
{
"$ref": "#/components/parameters/from_header"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"maintenance_window": {
"$ref": "#/components/schemas/MaintenanceWindow"
}
},
"required": [
"maintenance_window"
]
},
"examples": {
"request": {
"summary": "Request Example",
"value": {
"maintenance_window": {
"type": "maintenance_window",
"start_time": "2015-11-09T20:00:00-05:00",
"end_time": "2015-11-09T22:00:00-05:00",
"description": "Immanentizing the eschaton",
"services": [
{
"id": "PIJ90N7",
"type": "service_reference"
}
]
}
}
}
}
}
},
"description": "The maintenance window object."
},
"responses": {
"201": {
"description": "The maintenance window that was created.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"maintenance_window": {
"$ref": "#/components/schemas/MaintenanceWindow"
}
},
"required": [
"maintenance_window"
]
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"maintenance_window": {
"id": "PW98YIO",
"type": "maintenance_window",
"summary": "Immanentizing the eschaton",
"self": "https://api.pagerduty.com/maintenance_windows/PW98YIO",
"html_url": "https://subdomain.pagerduty.com/service-directory/maintenance-windows/PW98YIO",
"sequence_number": 1,
"start_time": "2015-11-09T20:00:00-05:00",
"end_time": "2015-11-09T22:00:00-05:00",
"description": "Immanentizing the eschaton",
"services": [
{
"id": "PIJ90N7",
"type": "service_reference",
"summary": "My Mail Service",
"self": "https://api.pagerduty.com/services/PIJ90N7",
"html_url": "https://subdomain.pagerduty.com/service-directory/PIJ90N7"
}
],
"teams": [
{
"id": "PQ9K7I8",
"type": "team_reference",
"summary": "Engineering",
"self": "https://api.pagerduty.com/teams/PQ9K7I8",
"html_url": "https://subdomain.pagerduty.com/teams/PQ9K7I8"
}
],
"created_by": {
"id": "PXPGF42",
"type": "user_reference",
"summary": "Earline Greenholt",
"self": "https://api.pagerduty.com/users/PXPGF42",
"html_url": "https://subdomain.pagerduty.com/users/PXPGF42"
}
}
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
}
}
}
},
"/maintenance_windows/{id}": {
"description": "Manage a maintenance window.",
"get": {
"x-pd-requires-scope": "services.read",
"tags": [
"Maintenance Windows"
],
"operationId": "getMaintenanceWindow",
"description": "Get an existing maintenance window.\n\nA Maintenance Window is used to temporarily disable one or more Services for a set period of time.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#maintenance-windows)\n\nScoped OAuth requires: `services.read`\n",
"summary": "Get a maintenance window",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/header_Content-Type"
},
{
"$ref": "#/components/parameters/id"
},
{
"$ref": "#/components/parameters/include_maintenance_window"
}
],
"responses": {
"200": {
"description": "The maintenance window that was updated.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"maintenance_window": {
"$ref": "#/components/schemas/MaintenanceWindow"
}
},
"required": [
"maintenance_window"
]
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"maintenance_window": {
"id": "PW98YIO",
"type": "maintenance_window",
"summary": "Immanentizing the eschaton",
"self": "https://api.pagerduty.com/maintenance_windows/PW98YIO",
"html_url": "https://subdomain.pagerduty.com/service-directory/maintenance-windows/PW98YIO",
"sequence_number": 1,
"start_time": "2015-11-09T20:00:00-05:00",
"end_time": "2015-11-09T22:00:00-05:00",
"description": "Immanentizing the eschaton",
"services": [
{
"id": "PIJ90N7",
"type": "service_reference",
"summary": "My Mail Service",
"self": "https://api.pagerduty.com/services/PIJ90N7",
"html_url": "https://subdomain.pagerduty.com/service-directory/PIJ90N7"
}
],
"teams": [
{
"id": "PQ9K7I8",
"type": "team_reference",
"summary": "Engineering",
"self": "https://api.pagerduty.com/teams/PQ9K7I8",
"html_url": "https://subdomain.pagerduty.com/teams/PQ9K7I8"
}
],
"created_by": {
"id": "PXPGF42",
"type": "user_reference",
"summary": "Earline Greenholt",
"self": "https://api.pagerduty.com/users/PXPGF42",
"html_url": "https://subdomain.pagerduty.com/users/PXPGF42"
}
}
}
}
}
}
}
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
}
}
},
"delete": {
"x-pd-requires-scope": "services.write",
"tags": [
"Maintenance Windows"
],
"operationId": "deleteMaintenanceWindow",
"description": "Delete an existing maintenance window if it's in the future, or end it if it's currently on-going. If the maintenance window has already ended it cannot be deleted.\n\nA Maintenance Window is used to temporarily disable one or more Services for a set period of time.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#maintenance-windows)\n\nScoped OAuth requires: `services.write`\n",
"summary": "Delete or end a maintenance window",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/header_Content-Type"
},
{
"$ref": "#/components/parameters/id"
}
],
"responses": {
"204": {
"description": "The maintenance window was deleted successfully."
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"405": {
"description": "The maintenance window can't be deleted because it has already ended."
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
}
}
},
"put": {
"x-pd-requires-scope": "services.write",
"tags": [
"Maintenance Windows"
],
"operationId": "updateMaintenanceWindow",
"description": "Update an existing maintenance window.\n\nA Maintenance Window is used to temporarily disable one or more Services for a set period of time.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#maintenance-windows)\n\nScoped OAuth requires: `services.write`\n",
"summary": "Update a maintenance window",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/header_Content-Type"
},
{
"$ref": "#/components/parameters/id"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"maintenance_window": {
"$ref": "#/components/schemas/MaintenanceWindow"
}
},
"required": [
"maintenance_window"
]
},
"examples": {
"request": {
"summary": "Request Example",
"value": {
"maintenance_window": {
"type": "maintenance_window",
"start_time": "2015-11-09T20:00:00-05:00",
"end_time": "2015-11-09T22:00:00-05:00",
"description": "Immanentizing the eschaton",
"services": [
{
"id": "PIJ90N7",
"type": "service_reference"
}
]
}
}
}
}
}
},
"description": "The maintenance window to be updated."
},
"responses": {
"200": {
"description": "The maintenance window that was updated.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"maintenance_window": {
"$ref": "#/components/schemas/MaintenanceWindow"
}
},
"required": [
"maintenance_window"
]
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"maintenance_window": {
"id": "PW98YIO",
"type": "maintenance_window",
"summary": "Immanentizing the eschaton",
"self": "https://api.pagerduty.com/maintenance_windows/PW98YIO",
"html_url": "https://subdomain.pagerduty.com/service-directory/maintenance-windows/PW98YIO",
"sequence_number": 1,
"start_time": "2015-11-09T20:00:00-05:00",
"end_time": "2015-11-09T22:00:00-05:00",
"description": "Immanentizing the eschaton",
"services": [
{
"id": "PIJ90N7",
"type": "service_reference",
"summary": "My Mail Service",
"self": "https://api.pagerduty.com/services/PIJ90N7",
"html_url": "https://subdomain.pagerduty.com/service-directory/PIJ90N7"
}
],
"teams": [
{
"id": "PQ9K7I8",
"type": "team_reference",
"summary": "Engineering",
"self": "https://api.pagerduty.com/teams/PQ9K7I8",
"html_url": "https://subdomain.pagerduty.com/teams/PQ9K7I8"
}
],
"created_by": {
"id": "PXPGF42",
"type": "user_reference",
"summary": "Earline Greenholt",
"self": "https://api.pagerduty.com/users/PXPGF42",
"html_url": "https://subdomain.pagerduty.com/users/PXPGF42"
}
}
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
}
}
}
},
"/notifications": {
"description": "List notifications that have been delivered to responders.",
"get": {
"x-pd-requires-scope": "users:notifications.read",
"tags": [
"Notifications"
],
"operationId": "listNotifications",
"description": "List notifications for a given time range, optionally filtered by type (sms_notification, email_notification, phone_notification, or push_notification).\n\nA Notification is created when an Incident is triggered or escalated.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#notifications)\n\nScoped OAuth requires: `users:notifications.read`\n",
"summary": "List notifications",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/header_Content-Type"
},
{
"$ref": "#/components/parameters/offset_limit"
},
{
"$ref": "#/components/parameters/offset_offset"
},
{
"$ref": "#/components/parameters/offset_total"
},
{
"$ref": "#/components/parameters/time_zone"
},
{
"$ref": "#/components/parameters/since_notifications"
},
{
"$ref": "#/components/parameters/until_notifications"
},
{
"$ref": "#/components/parameters/filter_notifications"
},
{
"$ref": "#/components/parameters/include_notifications"
}
],
"responses": {
"200": {
"description": "A paginated array of notifications.",
"content": {
"application/json": {
"schema": {
"allOf": [
{
"$ref": "#/components/schemas/Pagination"
},
{
"type": "object",
"properties": {
"notifications": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Notification"
}
}
},
"required": [
"notifications"
]
}
]
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"notifications": [
{
"id": "PWL7QXS",
"type": "phone_notification",
"started_at": "2013-03-06T15:28:51-05:00",
"address": "+15555551234",
"user": {
"id": "PT23IWX",
"type": "user_reference",
"summary": "Tim Wright",
"self": "https://api.pagerduty.com/users/PT23IWX",
"html_url": "https://subdomain.pagerduty.com/users/PT23IWX"
}
},
{
"id": "PKN7NBH",
"type": "push_notification",
"started_at": "2013-03-06T15:28:51-05:00",
"user": {
"id": "PT23IWX",
"type": "user_reference",
"summary": "Tim Wright",
"self": "https://api.pagerduty.com/users/PT23IWX",
"html_url": "https://subdomain.pagerduty.com/users/PT23IWX"
}
}
],
"limit": 100,
"offset": 0,
"more": false,
"total": null
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
}
}
}
},
"/oncalls": {
"description": "List all of the on-call entries within a given time range for a given set of users, escalation policies, and/or schedules. Each on-call entry includes:\n\n- the date/time period for the on-call entry;\n- the escalation policy, rule, and level;\n- the schedule, if the rule targeted a schedule and not a user; and,\n- the user on call for the escalation policy rule during that time.\n",
"get": {
"tags": [
"On-Calls"
],
"x-pd-requires-scope": "oncalls.read",
"x-pd-operation-limit": true,
"operationId": "listOnCalls",
"description": "List the on-call entries during a given time range.\n\nAn on-call represents a contiguous unit of time for which a User will be on call for a given Escalation Policy and Escalation Rules.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#on-calls)\n\nScoped OAuth requires: `oncalls.read`\n\nThis API operation has operation specific rate limits. See the [Rate Limits](https://developer.pagerduty.com/docs/72d3b724589e3-rest-api-rate-limits) page for more information.\n",
"summary": "List all of the on-calls",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/header_Content-Type"
},
{
"$ref": "#/components/parameters/time_zone"
},
{
"$ref": "#/components/parameters/offset_limit"
},
{
"$ref": "#/components/parameters/offset_offset"
},
{
"$ref": "#/components/parameters/offset_total"
},
{
"$ref": "#/components/parameters/include_oncalls"
},
{
"$ref": "#/components/parameters/user_ids_oncalls"
},
{
"$ref": "#/components/parameters/escalation_policy_ids_oncalls"
},
{
"$ref": "#/components/parameters/schedule_ids_oncalls"
},
{
"$ref": "#/components/parameters/since_oncalls"
},
{
"$ref": "#/components/parameters/until_oncalls"
},
{
"$ref": "#/components/parameters/earliest_oncalls"
}
],
"responses": {
"200": {
"description": "A paginated array of on-call objects.",
"content": {
"application/json": {
"schema": {
"allOf": [
{
"$ref": "#/components/schemas/Pagination"
},
{
"type": "object",
"properties": {
"oncalls": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Oncall"
}
}
},
"required": [
"oncalls"
]
}
]
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"oncalls": [
{
"user": {
"id": "PT23IWX",
"type": "user_reference",
"summary": "Tim Wright",
"self": "https://api.pagerduty.com/users/PT23IWX",
"html_url": "https://subdomain.pagerduty.com/users/PT23IWX"
},
"schedule": {
"id": "PI7DH85",
"type": "schedule_reference",
"summary": "Daily Engineering Rotation",
"self": "https://api.pagerduty.com/schedules/PI7DH85",
"html_url": "https://subdomain.pagerduty.com/schedules/PI7DH85"
},
"escalation_policy": {
"id": "PT20YPA",
"type": "escalation_policy_reference",
"summary": "Engineering Escalation Policy",
"self": "https://api.pagerduty.com/escalation_policies/PT20YPA",
"html_url": "https://subdomain.pagerduty.com/escalation_policies/PT20YPA"
},
"escalation_level": 2,
"start": "2015-03-06T15:28:51-05:00",
"end": "2015-03-07T15:28:51-05:00"
}
],
"limit": 25,
"offset": 0,
"more": false,
"total": null
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
}
}
}
},
"/paused_incident_reports/alerts": {
"description": "Get reporting on Alerts for paused Incident usage",
"get": {
"x-pd-requires-scope": "incidents.read",
"tags": [
"Paused Incident Reports"
],
"operationId": "getPausedIncidentReportAlerts",
"description": "Returns the 5 most recent alerts that were triggered after being paused and the 5 most recent alerts that were resolved after being paused for a given reporting period (maximum 6 months lookback period). Note: This feature is currently available as part of the Event Intelligence package or Digital Operations plan only.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#paused-incident-reports)\n\nScoped OAuth requires: `incidents.read`\n",
"summary": "Get Paused Incident Reporting on Alerts",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/header_Content-Type"
},
{
"$ref": "#/components/parameters/since"
},
{
"$ref": "#/components/parameters/until"
},
{
"$ref": "#/components/parameters/paused_incident_reports_service_id"
},
{
"$ref": "#/components/parameters/paused_incident_reports_suspended_by"
}
],
"responses": {
"200": {
"description": "Paused Incident Reporting on Alerts for the Account or scoped to a Service.",
"content": {
"application/json": {
"schema": {
"description": "",
"type": "object",
"properties": {
"paused_incident_reporting_alerts": {
"type": "object",
"description": "A list of the 5 most recent paused Alerts that weere triggered and 5 most recent Alerts that were reesolved before being triggerd.",
"properties": {
"since": {
"type": "string",
"description": "The start of the date range over which the report data is represented."
},
"until": {
"type": "string",
"description": "The end of the date range over which the report data is represented."
},
"triggered_after_pause_alerts": {
"type": "array",
"description": "An array of Alerts that were triggered after being paused.",
"items": {
"properties": {
"id": {
"type": "string",
"description": "The Alert ID"
},
"service_id": {
"type": "string",
"description": "The Alert's Service ID"
},
"created_at": {
"type": "string",
"description": "The date/time the Alert was created"
}
}
}
},
"resolved_after_pause_alerts": {
"type": "array",
"description": "An array of Alerts that were resolved after being paused.",
"items": {
"properties": {
"id": {
"type": "string",
"description": "The Alert ID"
},
"service_id": {
"type": "string",
"description": "The Alert's Service ID"
},
"created_at": {
"type": "string",
"description": "The date/time the Alert was created"
}
}
}
}
}
}
}
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"paused_incident_reporting_counts": {
"since": "2021-06-01TT13:08:14Z",
"until": "2021-08-01T13:08:14Z",
"triggered_after_pause_alerts": [
{
"id": "PR2P3RW",
"service_id": "PPSCXAN",
"created_at": "2020-10-18T12:01:11Z"
}
],
"resolved_after_pause_alerts": [
{
"id": "PS2R1RZ",
"service_id": "PRS12XW",
"created_at": "2020-10-17T02:02:10Z"
},
{
"id": "PS1S1SX",
"service_id": "PRS12XW",
"created_at": "2020-10-16T15:02:19Z"
}
]
}
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
},
"500": {
"$ref": "#/components/responses/InternalServerError"
}
}
}
},
"/paused_incident_reports/counts": {
"description": "Get reporting on counts for paused Incident usage",
"get": {
"x-pd-requires-scope": "incidents.read",
"tags": [
"Paused Incident Reports"
],
"operationId": "getPausedIncidentReportCounts",
"description": "Returns reporting counts for paused Incident usage for a given reporting period (maximum 6 months lookback period). Note: This feature is currently available as part of the Event Intelligence package or Digital Operations plan only.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#paused-incident-reports)\n\nScoped OAuth requires: `incidents.read`\n",
"summary": "Get Paused Incident Reporting counts",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/header_Content-Type"
},
{
"$ref": "#/components/parameters/since"
},
{
"$ref": "#/components/parameters/until"
},
{
"$ref": "#/components/parameters/paused_incident_reports_service_id"
},
{
"$ref": "#/components/parameters/paused_incident_reports_suspended_by"
}
],
"responses": {
"200": {
"description": "Paused Incident Reporting counts for the Account or scoped to a Service.",
"content": {
"application/json": {
"schema": {
"description": "",
"type": "object",
"properties": {
"paused_incident_reporting_counts": {
"type": "object",
"description": "A representation of Alerts that were paused, triggered after pause, and resolved after pause.",
"properties": {
"since": {
"type": "string",
"description": "The start of the date range over which the report data is represented."
},
"until": {
"type": "string",
"description": "The end of the date range over which the report data is represented."
},
"paused_count": {
"type": "number",
"description": "The total number of paused Alerts for the Account or Servce."
},
"triggered_after_pause_count": {
"type": "number",
"description": "The total number of paused Alerts for the Account or Service that were triggerd after being paused (non-transient Alerts)."
},
"resolved_after_pause_count": {
"type": "number",
"description": "The total number of paused Alerts for the Account or Service that were resolved after being paused and not triggered (transient Alerts)."
}
}
}
}
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"paused_incident_reporting_counts": {
"since": "2021-06-01TT13:08:14Z",
"until": "2021-08-01T13:08:14Z",
"paused_count": 50,
"triggered_after_pause_count": 12,
"resolved_after_pause_count": 38
}
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
},
"500": {
"$ref": "#/components/responses/InternalServerError"
}
}
}
},
"/priorities": {
"description": "List priorities.",
"get": {
"tags": [
"Priorities"
],
"x-pd-requires-scope": "priorities.read",
"operationId": "listPriorities",
"description": "List existing priorities, in order (most to least severe).\n\nA priority is a label representing the importance and impact of an incident. This feature is only available on Standard and Enterprise plans.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#priorities)\n\nScoped OAuth requires: `priorities.read`\n",
"summary": "List priorities",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/header_Content-Type"
},
{
"$ref": "#/components/parameters/offset_limit"
},
{
"$ref": "#/components/parameters/offset_offset"
},
{
"$ref": "#/components/parameters/offset_total"
}
],
"responses": {
"200": {
"description": "A paginated array of priorities.",
"content": {
"application/json": {
"schema": {
"allOf": [
{
"$ref": "#/components/schemas/Pagination"
},
{
"type": "object",
"properties": {
"priorities": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Priority"
}
}
},
"required": [
"priorities"
]
}
]
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"priorities": [
{
"id": "PSLWBL8",
"type": "priority",
"summary": "P1",
"self": "https://api.pagerduty.com/priorities/PSLWBL8",
"name": "P1",
"description": "Critical issue that warrants public notification and liaison with executive teams"
},
{
"id": "P53ZZH5",
"type": "priority",
"summary": "P2",
"self": "https://api.pagerduty.com/priorities/P53ZZH5",
"name": "P2",
"description": "Critical system issue actively impacting many customers' ability to use the product"
},
{
"id": "PGE9YCZ",
"type": "priority",
"summary": "P3",
"self": "https://api.pagerduty.com/priorities/PGE9YCZ",
"name": "P3",
"description": "Stability or minor customer-impacting issues that require immediate attention from service owners"
},
{
"id": "PVJPWYW",
"type": "priority",
"summary": "P4",
"self": "https://api.pagerduty.com/priorities/PVJPWYW",
"name": "P4",
"description": "Minor issues requiring action, but not affecting customer ability to use the product"
},
{
"id": "P81SUUT",
"type": "priority",
"summary": "P5",
"self": "https://api.pagerduty.com/priorities/P81SUUT",
"name": "P5",
"description": "Cosmetic issues or bugs, not affecting customer ability to use the product"
}
],
"limit": 25,
"offset": 0,
"more": false,
"total": null
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"402": {
"$ref": "#/components/responses/PaymentRequired"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
}
}
}
},
"/response_plays": {
"description": "List and create response plays.",
"get": {
"x-pd-requires-scope": "response_plays.read",
"deprecated": true,
"tags": [
"Response Plays"
],
"operationId": "listResponsePlays",
"description": "List all of the existing Response Plays.\n\nResponse Plays allow you to create packages of Incident Actions that can be applied during an Incident's life cycle.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#response-plays)\n\nWhen using a Global API token, the `From` header is required.\n\nScoped OAuth requires: `response_plays.read`\n",
"summary": "List Response Plays",
"parameters": [
{
"$ref": "#/components/parameters/query"
},
{
"$ref": "#/components/parameters/filter_for_manual_run"
},
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/header_Content-Type"
},
{
"$ref": "#/components/parameters/optional_from_header"
}
],
"responses": {
"200": {
"description": "The array of Response Plays returned by the query.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"response_plays": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ResponsePlay"
}
}
}
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"response_plays": [
{
"type": "response_play",
"team": null,
"summary": "An Existing Response Play For Responders",
"self": "https://api.pagerduty.com/response_plays/15b4b27e-2448-adf9-c5a5-85382304ff37",
"name": "An Existing Response Play For Responders",
"id": "15b4b27e-2448-adf9-c5a5-85382304ff37",
"html_url": null,
"description": "A Response Play that adds responders."
},
{
"type": "response_play",
"team": null,
"summary": "An Existing Response Play For Subscribers",
"self": "https://api.pagerduty.com/response_plays/15b4b27e-2771-abe5-t6m9-81234304ff37",
"name": "An Existing Response Play For Subscribers",
"id": "15b4b27e-2771-abe5-t6m9-81234304ff37",
"html_url": null,
"description": "A Response Play that adds subscribers."
}
],
"limit": null,
"offset": null,
"total": 2,
"more": false
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
}
}
},
"post": {
"deprecated": true,
"x-pd-requires-scope": "response_plays.write",
"tags": [
"Response Plays"
],
"operationId": "createResponsePlay",
"description": "Creates a new Response Plays.\n\nResponse Plays allow you to create packages of Incident Actions that can be applied during an Incident's life cycle.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#response-plays)\n\nScoped OAuth requires: `response_plays.write`\n",
"summary": "Create a Response Play",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/header_Content-Type"
},
{
"$ref": "#/components/parameters/from_header"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"response_play": {
"$ref": "#/components/schemas/ResponsePlay"
}
},
"required": [
"response_play"
]
},
"examples": {
"Example1": {
"summary": "Create a Response Play which adds a Escalation Policy and User to an incident when the response play is run",
"value": {
"response_play": {
"type": "response_play",
"team": null,
"name": "Standard NOC-EP",
"description": "A Response Play to add NOC EP on Run",
"subscribers": [],
"subscribers_message": null,
"responders": [
{
"type": "user_reference",
"id": "PROW72A",
"summary": "our team stakeholder"
},
{
"type": "escalation_policy_reference",
"id": "P12TU3X",
"summary": "Network Center Escalation Policy"
}
],
"responders_message": "NOC-EP",
"runnability": "services"
}
}
},
"Example2": {
"summary": "Add a static conference url to an incident when the response play is run",
"value": {
"response_play": {
"type": "response_play",
"name": "Basic Fixed URL",
"description": "preset conference url",
"runnability": "services",
"conference_url": "https://my.conference.com/our_team/123"
}
}
}
}
}
},
"description": "The Response Play to be created."
},
"responses": {
"201": {
"description": "The Response Play that was created.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"response_play": {
"$ref": "#/components/schemas/ResponsePlay"
}
}
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"response_play": {
"type": "response_play",
"team": null,
"summary": "A New Response Play",
"subscribers_message": "Please view the attached incident.",
"subscribers": [
{
"type": "user_reference",
"summary": null,
"self": "https://api.pagerduty.com/users/PSEJLIN",
"id": "PSEJLIN",
"html_url": null
},
{
"type": "team_reference",
"summary": null,
"self": "https://api.pagerduty.com/teams/P12TU3X",
"id": "P12TU3X",
"html_url": null
}
],
"self": "https://api.pagerduty.com/response_plays/15b4b27e-2448-adf9-c5a5-85382304ff37",
"runnability": "services",
"responders_message": "We need executive attention on this incident.",
"responders": [
{
"type": "user_reference",
"summary": null,
"self": "https://api.pagerduty.com/users/PZOW51A",
"id": "PZOW51A",
"html_url": null
}
],
"name": "A New Response Play",
"id": "15b4b27e-2448-adf9-c5a5-85382304ff37",
"html_url": null,
"description": "A Response Play that adds subscribers and responders",
"conference_url": null,
"conference_number": null
}
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
}
}
}
},
"/response_plays/{id}": {
"description": "Manage a Response Play.",
"get": {
"deprecated": true,
"x-pd-requires-scope": "response_plays.read",
"tags": [
"Response Plays"
],
"operationId": "getResponsePlay",
"description": "Get details about an existing Response Play.\n\nResponse Plays allow you to create packages of Incident Actions that can be applied during an Incident's life cycle.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#response-plays)\n\nWhen using a Global API token, the `From` header is required.\nScoped OAuth requires: `response_plays.read`\n",
"summary": "Get a Response Play",
"parameters": [
{
"$ref": "#/components/parameters/id"
},
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/header_Content-Type"
},
{
"$ref": "#/components/parameters/optional_from_header"
}
],
"responses": {
"200": {
"description": "The Response Play requested.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"response_play": {
"$ref": "#/components/schemas/ResponsePlay"
}
}
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"response_play": {
"type": "response_play",
"team": null,
"summary": "Email Service Response Play",
"subscribers_message": null,
"subscribers": null,
"self": "https://api.pagerduty.com/response_plays/15b4b27e-2448-adf9-c5a5-85382304ff37",
"runnability": "services",
"responders_message": null,
"responders": [
{
"type": "escalation_policy_reference",
"summary": null,
"self": "https://api.pagerduty.com/escalation_policies/PZOW51A",
"id": "PZOW51A",
"html_url": null
}
],
"name": "Email Service Response Play",
"id": "15b4b27e-2448-adf9-c5a5-85382304ff37",
"html_url": null,
"description": null,
"conference_url": null,
"conference_number": null
}
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
}
}
},
"put": {
"deprecated": true,
"x-pd-requires-scope": "response_plays.write",
"tags": [
"Response Plays"
],
"operationId": "updateResponsePlay",
"description": "Updates an existing Response Play.\n\nResponse Plays allow you to create packages of Incident Actions that can be applied during an Incident's life cycle.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#response-plays)\n\nScoped OAuth requires: `response_plays.write`\n",
"summary": "Update a Response Play",
"parameters": [
{
"$ref": "#/components/parameters/id"
},
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/header_Content-Type"
},
{
"$ref": "#/components/parameters/from_header"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"response_play": {
"$ref": "#/components/schemas/ResponsePlay"
}
},
"required": [
"response_play"
]
},
"examples": {
"request": {
"summary": "Request Example",
"value": {
"response_play": {
"type": "response_play",
"team": null,
"summary": "Test Response Play",
"subscribers_message": "Please view the attached incident.",
"subscribers": [
{
"type": "user_reference",
"id": "PFS9QZZ"
}
],
"self": "https://api.pagerduty.com/response_plays/153d9e1f-9008-ee4e-fa70-0d70cdf92f27",
"runnability": "responders",
"responders_message": null,
"responders": [],
"name": "Test Response Play",
"id": "153d9e1f-9008-ee4e-fa70-0d70cdf92f27",
"html_url": null,
"description": "An updated description of this Response Play.",
"conference_url": null,
"conference_number": null
}
}
}
}
}
},
"description": "The Response Play to be updated."
},
"responses": {
"200": {
"description": "The Response Play that was updated.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"response_play": {
"$ref": "#/components/schemas/ResponsePlay"
}
}
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"response_play": {
"type": "response_play",
"team": null,
"summary": "Test Response Play",
"subscribers_message": "Please view the attached incident.",
"subscribers": [
{
"type": "user_reference",
"summary": null,
"self": "https://api.pagerduty.com/users/PFS9QZZ",
"id": "PFS9QZZ",
"html_url": null
}
],
"self": "https://api.pagerduty.com/response_plays/153d9e1f-9008-ee4e-fa70-0d70cdf92f27",
"runnability": "services",
"responders_message": null,
"responders": [],
"name": "Test Response Play",
"id": "153d9e1f-9008-ee4e-fa70-0d70cdf92f27",
"html_url": null,
"description": null,
"conference_url": null,
"conference_number": null
}
}
}
}
}
}
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"402": {
"$ref": "#/components/responses/PaymentRequired"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
}
}
},
"delete": {
"deprecated": true,
"x-pd-requires-scope": "response_plays.write",
"tags": [
"Response Plays"
],
"operationId": "deleteResponsePlay",
"description": "Delete an existing Response Play. Once the Response Play is deleted, the action cannot be undone.\n\nWARNING: When the Response Play is deleted, it is also removed from any Services that were using it.\n\nResponse Plays allow you to create packages of Incident Actions that can be applied to an Incident.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#response-plays)\n\nScoped OAuth requires: `response_plays.write`\n",
"summary": "Delete a Response Play",
"parameters": [
{
"$ref": "#/components/parameters/id"
},
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/header_Content-Type"
},
{
"$ref": "#/components/parameters/from_header"
}
],
"responses": {
"204": {
"description": "The Response Play was deleted successfully."
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
}
}
}
},
"/response_plays/{response_play_id}/run": {
"description": "Run response plays.",
"post": {
"x-pd-requires-scope": "response_plays.write",
"deprecated": true,
"tags": [
"Response Plays"
],
"operationId": "runResponsePlay",
"description": "Run a specified response play on a given incident.\n\nResponse Plays are a package of Incident Actions that can be applied during an Incident's life cycle.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#response-plays)\n\nScoped OAuth requires: `response_plays.write`\n",
"summary": "Run a response play",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/header_Content-Type"
},
{
"$ref": "#/components/parameters/response_play_id"
},
{
"$ref": "#/components/parameters/from_header"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"incident": {
"$ref": "#/components/schemas/IncidentReference"
}
},
"required": [
"incident"
]
},
"examples": {
"request": {
"summary": "Request Example",
"value": {
"incident": {
"id": "PWL7QXS",
"type": "incident_reference"
}
}
}
}
}
}
},
"responses": {
"200": {
"description": "Informs the user if the response play has been run successfully.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"status": {
"type": "string"
}
},
"required": [
"status"
]
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"status": "ok"
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
}
}
}
},
"/rulesets": {
"description": "Create, list, update and delete Rulesets.",
"get": {
"x-pd-requires-scope": "event_rules.read",
"tags": [
"Rulesets"
],
"operationId": "listRulesets",
"description": "List all Rulesets\n\n> ### End-of-life\n> Rulesets and Event Rules will end-of-life soon. We highly recommend that you [migrate to Event Orchestration](https://support.pagerduty.com/docs/migrate-to-event-orchestration) as soon as possible so you can take advantage of the new functionality, such as improved UI, rule creation, APIs and Terraform support, advanced conditions, and rule nesting.\n\nRulesets allow you to route events to an endpoint and create collections of Event Rules, which define sets of actions to take based on event content.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#rulesets)\n\nScoped OAuth requires: `event_rules.read`\n",
"summary": "List Rulesets",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/header_Content-Type"
},
{
"$ref": "#/components/parameters/offset_limit"
},
{
"$ref": "#/components/parameters/offset_offset"
},
{
"$ref": "#/components/parameters/offset_total"
}
],
"responses": {
"200": {
"description": "A paginated array of Ruleset objects.",
"content": {
"application/json": {
"schema": {
"allOf": [
{
"$ref": "#/components/schemas/Pagination"
},
{
"type": "object",
"properties": {
"rulesets": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Ruleset"
}
}
}
}
]
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"rulesets": [
{
"id": "0e84de00-9511-4380-9f4f-a7b568bb49a0",
"name": "MySQL Clusters",
"type": "global",
"routing_keys": [
"R0212P1QXGEIQE2NMTQ7L7WXD00DWHIN"
],
"self": "https://api.pagerduty.com/rulesets/0e84de00-9511-4380-9f4f-a7b568bb49a0",
"created_at": "2019-12-24T21:18:52Z",
"creator": {
"type": "user_reference",
"self": "https://api.pagerduty.com/users/PABO808",
"id": "PABO808"
},
"updated_at": "2019-12-25T14:54:23Z",
"updater": {
"type": "user_reference",
"self": "https://api.pagerduty.com/users/PABO808",
"id": "PABO808"
},
"team": {
"type": "team_reference",
"self": "https://api.pagerduty.com/teams/P3ZQXDF",
"id": "P3ZQXDF"
}
}
],
"limit": 25,
"offset": 0,
"more": false,
"total": null
}
}
}
}
}
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
}
}
},
"post": {
"x-pd-requires-scope": "event_rules.write",
"tags": [
"Rulesets"
],
"operationId": "createRuleset",
"description": "Create a new Ruleset.\n\n> ### End-of-life\n> Rulesets and Event Rules will end-of-life soon. We highly recommend that you [migrate to Event Orchestration](https://support.pagerduty.com/docs/migrate-to-event-orchestration) as soon as possible so you can take advantage of the new functionality, such as improved UI, rule creation, APIs and Terraform support, advanced conditions, and rule nesting.\n\nRulesets allow you to route events to an endpoint and create collections of Event Rules, which define sets of actions to take based on event content.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#rulesets)\n\nScoped OAuth requires: `event_rules.write`\n",
"summary": "Create a Ruleset",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/header_Content-Type"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"ruleset": {
"allOf": [
{
"$ref": "#/components/schemas/Ruleset"
},
{
"type": "object",
"required": [
"name"
]
}
]
}
},
"required": [
"ruleset"
]
},
"examples": {
"request": {
"summary": "Request Example",
"value": {
"ruleset": {
"name": "MySQL Clusters",
"team": {
"id": "PWL7QXS",
"type": "team_reference"
}
}
}
}
}
}
}
},
"responses": {
"201": {
"description": "The Ruleset that was created.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"ruleset": {
"$ref": "#/components/schemas/Ruleset"
}
}
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"rulesets": {
"id": "0e84de00-9511-4380-9f4f-a7b568bb49a0",
"name": "MySQL Clusters",
"type": "global",
"routing_keys": [
"R0212P1QXGEIQE2NMTQ7L7WXD00DWHIN"
],
"self": "https://api.pagerduty.com/rulesets/0e84de00-9511-4380-9f4f-a7b568bb49a0",
"created_at": "2019-12-24T21:18:52Z",
"creator": {
"type": "user_reference",
"self": "https://api.pagerduty.com/users/PABO808",
"id": "PABO808"
},
"updated_at": "2019-12-25T14:54:23Z",
"updater": {
"type": "user_reference",
"self": "https://api.pagerduty.com/users/PABO808",
"id": "PABO808"
},
"team": {
"type": "team_reference",
"self": "https://api.pagerduty.com/teams/P3ZQXDF",
"id": "P3ZQXDF"
}
}
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
}
}
}
},
"/rulesets/{id}": {
"description": "Manage Rulesets.",
"get": {
"x-pd-requires-scope": "event_rules.read",
"tags": [
"Rulesets"
],
"operationId": "getRuleset",
"description": "Get a Ruleset.\n\n> ### End-of-life\n> Rulesets and Event Rules will end-of-life soon. We highly recommend that you [migrate to Event Orchestration](https://support.pagerduty.com/docs/migrate-to-event-orchestration) as soon as possible so you can take advantage of the new functionality, such as improved UI, rule creation, APIs and Terraform support, advanced conditions, and rule nesting.\n\nRulesets allow you to route events to an endpoint and create collections of Event Rules, which define sets of actions to take based on event content.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#rulesets)\n\nScoped OAuth requires: `event_rules.read`\n",
"summary": "Get a Ruleset",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/header_Content-Type"
},
{
"$ref": "#/components/parameters/id"
}
],
"responses": {
"200": {
"description": "The Ruleset object.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"ruleset": {
"$ref": "#/components/schemas/Ruleset"
}
}
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"ruleset": {
"id": "0e84de00-9511-4380-9f4f-a7b568bb49a0",
"name": "MySQL Clusters",
"type": "global",
"routing_keys": [
"R0212P1QXGEIQE2NMTQ7L7WXD00DWHIN"
],
"self": "https://api.pagerduty.com/rulesets/0e84de00-9511-4380-9f4f-a7b568bb49a0",
"created_at": "2019-12-24T21:18:52Z",
"creator": {
"type": "user_reference",
"self": "https://api.pagerduty.com/users/PABO808",
"id": "PABO808"
},
"updated_at": "2019-12-25T14:54:23Z",
"updater": {
"type": "user_reference",
"self": "https://api.pagerduty.com/users/PABO808",
"id": "PABO808"
},
"team": {
"type": "team_reference",
"self": "https://api.pagerduty.com/teams/P3ZQXDF",
"id": "P3ZQXDF"
}
}
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
}
}
},
"put": {
"x-pd-requires-scope": "event_rules.write",
"tags": [
"Rulesets"
],
"operationId": "updateRuleset",
"description": "Update a Ruleset.\n\n> ### End-of-life\n> Rulesets and Event Rules will end-of-life soon. We highly recommend that you [migrate to Event Orchestration](https://support.pagerduty.com/docs/migrate-to-event-orchestration) as soon as possible so you can take advantage of the new functionality, such as improved UI, rule creation, APIs and Terraform support, advanced conditions, and rule nesting.\n\nRulesets allow you to route events to an endpoint and create collections of Event Rules, which define sets of actions to take based on event content.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#rulesets)\n\nScoped OAuth requires: `event_rules.write`\n",
"summary": "Update a Ruleset",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/header_Content-Type"
},
{
"$ref": "#/components/parameters/id"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"ruleset": {
"$ref": "#/components/schemas/Ruleset"
}
},
"required": [
"ruleset"
]
},
"examples": {
"change_name": {
"summary": "Example: Change name",
"value": {
"ruleset": {
"name": "MySQL Clusters"
}
}
},
"change_team": {
"summary": "Example: Change team",
"value": {
"ruleset": {
"team": {
"id": "PWL7QXS",
"type": "team_reference"
}
}
}
}
}
}
}
},
"responses": {
"200": {
"description": "The Ruleset that was updated.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"ruleset": {
"$ref": "#/components/schemas/Ruleset"
}
}
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"rulesets": {
"id": "0e84de00-9511-4380-9f4f-a7b568bb49a0",
"name": "MySQL Clusters",
"type": "global",
"routing_keys": [
"R0212P1QXGEIQE2NMTQ7L7WXD00DWHIN"
],
"self": "https://api.pagerduty.com/rulesets/0e84de00-9511-4380-9f4f-a7b568bb49a0",
"created_at": "2019-12-24T21:18:52Z",
"creator": {
"type": "user_reference",
"self": "https://api.pagerduty.com/users/PABO808",
"id": "PABO808"
},
"updated_at": "2019-12-25T14:54:23Z",
"updater": {
"type": "user_reference",
"self": "https://api.pagerduty.com/users/PABO808",
"id": "PABO808"
},
"team": {
"type": "team_reference",
"self": "https://api.pagerduty.com/teams/P3ZQXDF",
"id": "P3ZQXDF"
}
}
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"405": {
"$ref": "#/components/responses/NotAllowed"
},
"409": {
"$ref": "#/components/responses/Conflict"
}
}
},
"delete": {
"x-pd-requires-scope": "event_rules.write",
"tags": [
"Rulesets"
],
"operationId": "deleteRuleset",
"description": "Delete a Ruleset.\n\n> ### End-of-life\n> Rulesets and Event Rules will end-of-life soon. We highly recommend that you [migrate to Event Orchestration](https://support.pagerduty.com/docs/migrate-to-event-orchestration) as soon as possible so you can take advantage of the new functionality, such as improved UI, rule creation, APIs and Terraform support, advanced conditions, and rule nesting.\n\nRulesets allow you to route events to an endpoint and create collections of Event Rules, which define sets of actions to take based on event content.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#rulesets)\n\nScoped OAuth requires: `event_rules.write`\n",
"summary": "Delete a Ruleset",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/header_Content-Type"
},
{
"$ref": "#/components/parameters/id"
}
],
"responses": {
"204": {
"description": "The Ruleset was deleted successfully."
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"405": {
"$ref": "#/components/responses/NotAllowed"
},
"409": {
"$ref": "#/components/responses/Conflict"
}
}
}
},
"/rulesets/{id}/rules": {
"description": "Create, list, update and delete Event Rules.",
"get": {
"x-pd-requires-scope": "event_rules.read",
"tags": [
"Rulesets"
],
"operationId": "listRulesetEventRules",
"description": "List all Event Rules on a Ruleset.\n\n> ### End-of-life\n> Rulesets and Event Rules will end-of-life soon. We highly recommend that you [migrate to Event Orchestration](https://support.pagerduty.com/docs/migrate-to-event-orchestration) as soon as possible so you can take advantage of the new functionality, such as improved UI, rule creation, APIs and Terraform support, advanced conditions, and rule nesting.\n\nRulesets allow you to route events to an endpoint and create collections of Event Rules, which define sets of actions to take based on event content.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#rulesets)\n\nNote: Create and Update on rules will accept 'description' or 'summary' interchangeably as an extraction action target. Get and List on rules will always return 'summary' as the target. If you are expecting 'description' please change your automation code to expect 'summary' instead.\n\nScoped OAuth requires: `event_rules.read`\n",
"summary": "List Event Rules",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/header_Content-Type"
},
{
"$ref": "#/components/parameters/offset_limit"
},
{
"$ref": "#/components/parameters/offset_offset"
},
{
"$ref": "#/components/parameters/offset_total"
},
{
"$ref": "#/components/parameters/id"
}
],
"responses": {
"200": {
"description": "A paginated array of Event Rule objects.",
"content": {
"application/json": {
"schema": {
"allOf": [
{
"$ref": "#/components/schemas/Pagination"
},
{
"type": "object",
"properties": {
"rules": {
"type": "array",
"description": "The paginated list of rules of the Ruleset.",
"items": {
"$ref": "#/components/schemas/EventRule"
}
}
}
}
]
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"rules": [
{
"id": "14e56445-ebab-4dd0-ba9d-fc28a41b7e7b",
"position": 0,
"disabled": false,
"catch_all": false,
"self": "https://api.pagerduty.com/rulesets/0e84de00-9511-4380-9f4f-a7b568bb49a0/rules/14e56445-ebab-4dd0-ba9d-fc28a41b7e7b",
"conditions": {
"operator": "and",
"subconditions": [
{
"operator": "contains",
"parameters": {
"value": "mysql",
"path": "details.host"
}
}
]
},
"time_frame": {
"active_between": {
"start_time": 1577880000000,
"end_time": 1580558400000
}
},
"actions": {
"annotate": {
"value": "This incident was created by a Global Event Rule"
},
"route": {
"value": "PI2KBWI"
},
"priority": {
"value": "PCMUB6F"
},
"severity": {
"value": "warning"
},
"extractions": [
{
"target": "dedup_key",
"source": "details.error_summary",
"regex": "Host (.*) is experiencing errors"
}
]
}
},
{
"id": "0d819a5a-b714-4bae-9333-dc73ea0daefb",
"position": 1,
"disabled": false,
"catch_all": true,
"self": "https://api.pagerduty.com/rulesets/0e84de00-9511-4380-9f4f-a7b568bb49a0/rules/0d819a5a-b714-4bae-9333-dc73ea0daefb",
"actions": {
"suppress": {
"value": true
},
"severity": null,
"route": null,
"priority": null,
"extractions": [],
"event_action": null,
"annotate": null
}
}
],
"limit": 25,
"offset": 0,
"more": false,
"total": null
}
}
}
}
}
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
}
}
},
"post": {
"x-pd-requires-scope": "event_rules.write",
"tags": [
"Rulesets"
],
"operationId": "createRulesetEventRule",
"description": "Create a new Event Rule.\n\n> ### End-of-life\n> Rulesets and Event Rules will end-of-life soon. We highly recommend that you [migrate to Event Orchestration](https://support.pagerduty.com/docs/migrate-to-event-orchestration) as soon as possible so you can take advantage of the new functionality, such as improved UI, rule creation, APIs and Terraform support, advanced conditions, and rule nesting.\n\nRulesets allow you to route events to an endpoint and create collections of Event Rules, which define sets of actions to take based on event content.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#rulesets)\n\nNote: Create and Update on rules will accept 'description' or 'summary' interchangeably as an extraction action target. Get and List on rules will always return 'summary' as the target. If you are expecting 'description' please change your automation code to expect 'summary' instead.\n\nScoped OAuth requires: `event_rules.write`\n",
"summary": "Create an Event Rule",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/header_Content-Type"
},
{
"$ref": "#/components/parameters/id"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"rule": {
"$ref": "#/components/schemas/EventRule"
}
},
"required": [
"rule"
]
},
"examples": {
"request": {
"summary": "Request Example",
"value": {
"rule": {
"id": "14e56445-ebab-4dd0-ba9d-fc28a41b7e7b",
"position": 0,
"disabled": false,
"catch_all": false,
"conditions": {
"operator": "and",
"subconditions": [
{
"operator": "contains",
"parameters": {
"value": "mysql",
"path": "details.host"
}
}
]
},
"time_frame": {
"active_between": {
"start_time": 1577880000000,
"end_time": 1580558400000
}
},
"actions": {
"annotate": {
"value": "This incident was created by a Global Event Rule"
},
"route": {
"value": "PI2KBWI"
},
"priority": {
"value": "PCMUB6F"
},
"severity": {
"value": "warning"
},
"extractions": [
{
"target": "dedup_key",
"source": "details.error_summary",
"regex": "Host (.*) is experiencing errors"
}
]
}
}
}
}
}
}
}
},
"responses": {
"201": {
"description": "The Event Rule that was created.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"rule": {
"$ref": "#/components/schemas/EventRule"
}
}
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"ruleset": {
"id": "14e56445-ebab-4dd0-ba9d-fc28a41b7e7b",
"position": 0,
"disabled": false,
"catch_all": false,
"self": "https://api.pagerduty.com/rulesets/0e84de00-9511-4380-9f4f-a7b568bb49a0/rules/14e56445-ebab-4dd0-ba9d-fc28a41b7e7b",
"conditions": {
"operator": "and",
"subconditions": [
{
"operator": "contains",
"parameters": {
"value": "mysql",
"path": "details.host"
}
}
]
},
"time_frame": {
"active_between": {
"start_time": 1577880000000,
"end_time": 1580558400000
}
},
"actions": {
"annotate": {
"value": "This incident was created by a Global Event Rule"
},
"route": {
"value": "PI2KBWI"
},
"priority": {
"value": "PCMUB6F"
},
"severity": {
"value": "warning"
},
"extractions": [
{
"target": "dedup_key",
"source": "details.error_summary",
"regex": "Host (.*) is experiencing errors"
}
]
}
}
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"409": {
"$ref": "#/components/responses/Conflict"
}
}
}
},
"/rulesets/{id}/rules/{rule_id}": {
"description": "Manage Event Rules.",
"get": {
"x-pd-requires-scope": "event_rules.read",
"tags": [
"Rulesets"
],
"operationId": "getRulesetEventRule",
"description": "Get an Event Rule.\n\n> ### End-of-life\n> Rulesets and Event Rules will end-of-life soon. We highly recommend that you [migrate to Event Orchestration](https://support.pagerduty.com/docs/migrate-to-event-orchestration) as soon as possible so you can take advantage of the new functionality, such as improved UI, rule creation, APIs and Terraform support, advanced conditions, and rule nesting.\n\nRulesets allow you to route events to an endpoint and create collections of Event Rules, which define sets of actions to take based on event content.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#rulesets)\n\nNote: Create and Update on rules will accept 'description' or 'summary' interchangeably as an extraction action target. Get and List on rules will always return 'summary' as the target. If you are expecting 'description' please change your automation code to expect 'summary' instead.\n\nScoped OAuth requires: `event_rules.read`\n",
"summary": "Get an Event Rule",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/header_Content-Type"
},
{
"$ref": "#/components/parameters/id"
},
{
"$ref": "#/components/parameters/rule_id"
}
],
"responses": {
"200": {
"description": "The Event Rule object.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"rule": {
"$ref": "#/components/schemas/EventRule"
}
}
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"rule": {
"id": "14e56445-ebab-4dd0-ba9d-fc28a41b7e7b",
"position": 0,
"disabled": false,
"catch_all": false,
"self": "https://api.pagerduty.com/rulesets/0e84de00-9511-4380-9f4f-a7b568bb49a0/rules/14e56445-ebab-4dd0-ba9d-fc28a41b7e7b",
"conditions": {
"operator": "and",
"subconditions": [
{
"operator": "contains",
"parameters": {
"value": "mysql",
"path": "details.host"
}
}
]
},
"time_frame": {
"active_between": {
"start_time": 1577880000000,
"end_time": 1580558400000
}
},
"actions": {
"annotate": {
"value": "This incident was created by a Global Event Rule"
},
"route": {
"value": "PI2KBWI"
},
"priority": {
"value": "PCMUB6F"
},
"severity": {
"value": "warning"
},
"extractions": [
{
"target": "dedup_key",
"template": "{{error_level}} error on host {{host}}"
}
]
},
"variables": [
{
"name": "error_level",
"type": "regex",
"parameters": {
"value": ".*error level is (\\w+)\\.",
"path": "payload.summary"
}
},
{
"name": "host",
"type": "regex",
"parameters": {
"value": "(.*)-USW2",
"path": "payload.host.human_name"
}
}
]
}
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
}
}
},
"put": {
"x-pd-requires-scope": "event_rules.write",
"tags": [
"Rulesets"
],
"operationId": "updateRulesetEventRule",
"summary": "Update an Event Rule",
"description": "Update an Event Rule. Note that the endpoint supports partial updates, so any number of the writable fields can be provided.\n\n> ### End-of-life\n> Rulesets and Event Rules will end-of-life soon. We highly recommend that you [migrate to Event Orchestration](https://support.pagerduty.com/docs/migrate-to-event-orchestration) as soon as possible so you can take advantage of the new functionality, such as improved UI, rule creation, APIs and Terraform support, advanced conditions, and rule nesting.\n\nRulesets allow you to route events to an endpoint and create collections of Event Rules, which define sets of actions to take based on event content.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#rulesets)\n\nNote: Create and Update on rules will accept 'description' or 'summary' interchangeably as an extraction action target. Get and List on rules will always return 'summary' as the target. If you are expecting 'description' please change your automation code to expect 'summary' instead.\n\nScoped OAuth requires: `event_rules.write`\n",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/header_Content-Type"
},
{
"$ref": "#/components/parameters/id"
},
{
"$ref": "#/components/parameters/rule_id"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"rule": {
"$ref": "#/components/schemas/EventRule"
},
"rule_id": {
"description": "The id of the Event Rule to update.",
"type": "string"
}
},
"required": [
"rule_id"
]
},
"examples": {
"suppress_action": {
"summary": "Example: Enable suppress action",
"value": {
"rule_id": "7123bdd1-74e8-4aa7-aa38-4a9ebe123456",
"rule": {
"actions": {
"suppress": {
"value": true
}
}
}
}
},
"disable_rule": {
"summary": "Example: Disable rule",
"value": {
"rule_id": "7123bdd1-74e8-4aa7-aa38-4a9ebe123456",
"rule": {
"disabled": true,
"actions": {
"suppress": {
"value": true
}
}
}
}
}
}
}
}
},
"responses": {
"200": {
"description": "The Event Rule that was updated.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"rule": {
"$ref": "#/components/schemas/EventRule"
}
}
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"rule": {
"id": "14e56445-ebab-4dd0-ba9d-fc28a41b7e7b",
"position": 0,
"disabled": false,
"catch_all": false,
"self": "https://api.pagerduty.com/rulesets/0e84de00-9511-4380-9f4f-a7b568bb49a0/rules/14e56445-ebab-4dd0-ba9d-fc28a41b7e7b",
"conditions": {
"operator": "and",
"subconditions": [
{
"operator": "contains",
"parameters": {
"value": "mysql",
"path": "details.host"
}
}
]
},
"time_frame": {
"active_between": {
"start_time": 1577880000000,
"end_time": 1580558400000
}
},
"actions": {
"annotate": {
"value": "This incident was created by a Global Event Rule"
},
"route": {
"value": "PI2KBWI"
},
"priority": {
"value": "PCMUB6F"
},
"severity": {
"value": "warning"
},
"extractions": [
{
"target": "dedup_key",
"source": "details.error_summary",
"regex": "Host (.*) is experiencing errors"
}
]
}
}
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"405": {
"$ref": "#/components/responses/NotAllowed"
},
"409": {
"$ref": "#/components/responses/Conflict"
}
}
},
"delete": {
"x-pd-requires-scope": "event_rules.write",
"tags": [
"Rulesets"
],
"operationId": "deleteRulesetEventRule",
"description": "Delete an Event Rule.\n\n> ### End-of-life\n> Rulesets and Event Rules will end-of-life soon. We highly recommend that you [migrate to Event Orchestration](https://support.pagerduty.com/docs/migrate-to-event-orchestration) as soon as possible so you can take advantage of the new functionality, such as improved UI, rule creation, APIs and Terraform support, advanced conditions, and rule nesting.\n\nRulesets allow you to route events to an endpoint and create collections of Event Rules, which define sets of actions to take based on event content.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#rulesets)\n\nScoped OAuth requires: `event_rules.write`\n",
"summary": "Delete an Event Rule",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/header_Content-Type"
},
{
"$ref": "#/components/parameters/id"
},
{
"$ref": "#/components/parameters/rule_id"
}
],
"responses": {
"204": {
"description": "The Event Rule was deleted successfully."
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"405": {
"$ref": "#/components/responses/NotAllowed"
},
"409": {
"$ref": "#/components/responses/Conflict"
}
}
}
},
"/schedules": {
"description": "List and create on-call schedules.",
"get": {
"tags": [
"Schedules"
],
"x-pd-requires-scope": "schedules.read",
"operationId": "listSchedules",
"description": "List the on-call schedules.\n\nA Schedule determines the time periods that users are On-Call.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#schedules)\n\nScoped OAuth requires: `schedules.read`\n",
"summary": "List schedules",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/header_Content-Type"
},
{
"$ref": "#/components/parameters/offset_limit"
},
{
"$ref": "#/components/parameters/offset_offset"
},
{
"$ref": "#/components/parameters/offset_total"
},
{
"$ref": "#/components/parameters/query"
},
{
"$ref": "#/components/parameters/include_schedules"
},
{
"$ref": "#/components/parameters/schedule_list_time_zone"
}
],
"responses": {
"200": {
"description": "A paginated array of schedule objects.",
"content": {
"application/json": {
"schema": {
"allOf": [
{
"$ref": "#/components/schemas/Pagination"
},
{
"type": "object",
"properties": {
"schedules": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Schedule"
}
}
},
"required": [
"schedules"
]
}
]
},
"examples": {
"Basic Example": {
"value": {
"schedules": [
{
"id": "PI7DH85",
"type": "schedule",
"summary": "Daily Engineering Rotation",
"self": "https://api.pagerduty.com/schedules/PI7DH85",
"html_url": "https://subdomain.pagerduty.com/schedules/PI7DH85",
"name": "Daily Engineering Rotation",
"time_zone": "America/New_York",
"description": "Rotation schedule for engineering",
"escalation_policies": [
{
"id": "PT20YPA",
"type": "escalation_policy_reference",
"summary": "Another Escalation Policy",
"self": "https://api.pagerduty.com/escalation_policies/PT20YPA",
"html_url": "https://subdomain.pagerduty.com/escalation_policies/PT20YPA"
}
],
"users": [
{
"id": "PEYSGVF",
"type": "user_reference",
"summary": "PagerDuty Admin",
"self": "https://api.pagerduty.com/users/PEYSGVF",
"html_url": "https://subdomain.pagerduty.com/users/PEYSGVF"
}
]
}
],
"limit": 100,
"offset": 0,
"more": false,
"total": null
}
},
"With Schedule Layers": {
"summary": "With Schedule Layers Included",
"value": {
"schedules": [
{
"id": "PI7DH85",
"type": "schedule",
"summary": "Daily Engineering Rotation",
"self": "https://api.pagerduty.com/schedules/PI7DH85",
"html_url": "https://subdomain.pagerduty.com/schedules/PI7DH85",
"name": "Daily Engineering Rotation",
"time_zone": "America/New_York",
"description": "Rotation schedule for engineering",
"escalation_policies": [
{
"id": "PT20YPA",
"type": "escalation_policy_reference",
"summary": "Another Escalation Policy",
"self": "https://api.pagerduty.com/escalation_policies/PT20YPA",
"html_url": "https://subdomain.pagerduty.com/escalation_policies/PT20YPA"
}
],
"users": [
{
"id": "PEYSGVF",
"type": "user_reference",
"summary": "PagerDuty Admin",
"self": "https://api.pagerduty.com/users/PEYSGVF",
"html_url": "https://subdomain.pagerduty.com/users/PEYSGVF"
}
],
"schedule_layers": [
{
"name": "Night Shift",
"start": "2015-11-06T20:00:00-05:00",
"end": "2016-11-06T20:00:00-05:00",
"rotation_virtual_start": "2015-11-06T20:00:00-05:00",
"rotation_turn_length_seconds": 86400,
"users": [
{
"user": {
"id": "PEYSGVF",
"type": "user_reference",
"summary": "PagerDuty Admin",
"self": "https://api.pagerduty.com/users/PEYSGVF",
"html_url": "https://subdomain.pagerduty.com/users/PEYSGVF"
}
}
],
"restrictions": [
{
"type": "daily_restriction",
"start_time_of_day": "08:00:00",
"duration_seconds": 32400
}
]
}
]
}
],
"limit": 100,
"offset": 0,
"more": false,
"total": null
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
}
}
},
"post": {
"tags": [
"Schedules"
],
"x-pd-requires-scope": "schedules.write",
"operationId": "createSchedule",
"description": "Create a new on-call schedule.\n\nA Schedule determines the time periods that users are On-Call.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#schedules)\n\nScoped OAuth requires: `schedules.write`\n",
"summary": "Create a schedule",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/header_Content-Type"
},
{
"$ref": "#/components/parameters/schedule_overflow"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"schedule": {
"$ref": "#/components/schemas/Schedule"
}
},
"required": [
"schedule"
]
},
"examples": {
"request": {
"summary": "Request Example",
"value": {
"schedule": {
"name": "Daily Engineering Rotation",
"type": "schedule",
"time_zone": "America/New_York",
"description": "Rotation schedule for engineering",
"schedule_layers": [
{
"name": "Night Shift",
"start": "2015-11-06T20:00:00-05:00",
"rotation_virtual_start": "2015-11-06T20:00:00-05:00",
"rotation_turn_length_seconds": 86400,
"users": [
{
"user": {
"id": "PXPGF42",
"type": "user_reference"
}
}
],
"restrictions": [
{
"type": "daily_restriction",
"start_time_of_day": "08:00:00",
"duration_seconds": 32400
}
]
}
]
}
}
}
}
}
},
"description": "The schedule to be created."
},
"responses": {
"201": {
"description": "The schedule object created.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"schedule": {
"$ref": "#/components/schemas/Schedule"
}
},
"required": [
"schedule"
]
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"schedule": {
"id": "PI7DH85",
"type": "schedule",
"summary": "Daily Engineering Rotation",
"self": "https://api.pagerduty.com/schedules/PI7DH85",
"html_url": "https://subdomain.pagerduty.com/schedules/PI7DH85",
"name": "Daily Engineering Rotation",
"time_zone": "America/New_York",
"description": "Rotation schedule for engineering",
"escalation_policies": [
{
"id": "PT20YPA",
"type": "escalation_policy_reference",
"summary": "Another Escalation Policy",
"self": "https://api.pagerduty.com/escalation_policies/PT20YPA",
"html_url": "https://subdomain.pagerduty.com/escalation_policies/PT20YPA"
}
],
"users": [
{
"id": "PEYSGVF",
"type": "user_reference",
"summary": "PagerDuty Admin",
"self": "https://api.pagerduty.com/users/PEYSGVF",
"html_url": "https://subdomain.pagerduty.com/users/PEYSGVF"
}
],
"teams": [],
"schedule_layers": [
{
"name": "Layer 1",
"rendered_schedule_entries": [],
"id": "PG68P1M",
"start": "2015-11-06T20:00:00-05:00",
"rotation_virtual_start": "2015-11-06T20:00:00-05:00",
"rotation_turn_length_seconds": 86400,
"users": [
{
"user": {
"id": "PEYSGVF",
"type": "user_reference",
"summary": "PagerDuty Admin",
"self": "https://api.pagerduty.com/users/PEYSGVF",
"html_url": "https://subdomain.pagerduty.com/users/PEYSGVF"
}
}
],
"restrictions": [
{
"type": "daily_restriction",
"start_time_of_day": "08:00:00",
"duration_seconds": 32400
}
]
}
],
"overrides_subschedule": {
"name": "Overrides",
"rendered_schedule_entries": []
},
"final_schedule": {
"name": "Final Schedule",
"rendered_schedule_entries": []
}
}
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
}
}
}
},
"/schedules/{id}": {
"description": "Manage an on-call schedule.",
"get": {
"tags": [
"Schedules"
],
"x-pd-requires-scope": "schedules.read",
"operationId": "getSchedule",
"description": "Show detailed information about a schedule, including entries for each layer.\nScoped OAuth requires: `schedules.read`\n",
"summary": "Get a schedule",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/header_Content-Type"
},
{
"$ref": "#/components/parameters/schedule_time_zone"
},
{
"$ref": "#/components/parameters/schedule_since"
},
{
"$ref": "#/components/parameters/schedule_until"
},
{
"$ref": "#/components/parameters/schedule_overflow"
},
{
"$ref": "#/components/parameters/id"
}
],
"responses": {
"200": {
"description": "The schedule object.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"schedule": {
"$ref": "#/components/schemas/Schedule"
}
},
"required": [
"schedule"
]
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"schedule": {
"id": "PI7DH85",
"type": "schedule",
"summary": "Daily Engineering Rotation",
"self": "https://api.pagerduty.com/schedules/PI7DH85",
"html_url": "https://subdomain.pagerduty.com/schedules/PI7DH85",
"name": "Daily Engineering Rotation",
"time_zone": "America/New_York",
"description": "Rotation schedule for engineering",
"escalation_policies": [
{
"id": "PT20YPA",
"type": "escalation_policy_reference",
"summary": "Another Escalation Policy",
"self": "https://api.pagerduty.com/escalation_policies/PT20YPA",
"html_url": "https://subdomain.pagerduty.com/escalation_policies/PT20YPA"
}
],
"users": [
{
"id": "PXPGF42",
"type": "user_reference",
"summary": "Regina Phalange",
"self": "https://api.pagerduty.com/users/PXPGF42",
"html_url": "https://subdomain.pagerduty.com/users/PXPGF42"
}
],
"teams": [
{
"id": "PQ9K7I8",
"type": "team_reference",
"summary": "Engineering",
"self": "https://api.pagerduty.com/teams/PQ9K7I8",
"html_url": "https://subdomain.pagerduty.com/teams/PQ9K7I8"
}
],
"schedule_layers": [
{
"name": "Layer 1",
"rendered_schedule_entries": [
{
"start": "2015-11-09T08:00:00-05:00",
"end": "2015-11-09T17:00:00-05:00",
"user": {
"id": "PXPGF42",
"type": "user_reference",
"summary": "Regina Phalange",
"self": "https://api.pagerduty.com/users/PXPGF42",
"html_url": "https://subdomain.pagerduty.com/users/PXPGF42"
}
}
],
"rendered_coverage_percentage": 37.5,
"id": "PG68P1M",
"start": "2015-11-06T21:00:00-05:00",
"rotation_virtual_start": "2015-11-06T20:00:00-05:00",
"rotation_turn_length_seconds": 86400,
"users": [
{
"user": {
"id": "PXPGF42",
"type": "user_reference",
"summary": "Regina Phalange",
"self": "https://api.pagerduty.com/users/PXPGF42",
"html_url": "https://subdomain.pagerduty.com/users/PXPGF42"
}
}
],
"restrictions": [
{
"type": "daily_restriction",
"start_time_of_day": "08:00:00",
"duration_seconds": 32400
}
]
}
],
"overrides_subschedule": {
"name": "Overrides",
"rendered_schedule_entries": [],
"rendered_coverage_percentage": 0
},
"final_schedule": {
"name": "Final Schedule",
"rendered_schedule_entries": [
{
"start": "2015-11-10T08:00:00-05:00",
"end": "2015-11-10T17:00:00-05:00",
"user": {
"id": "PXPGF42",
"type": "user_reference",
"summary": "Regina Phalange",
"self": "https://api.pagerduty.com/users/PXPGF42",
"html_url": "https://subdomain.pagerduty.com/users/PXPGF42"
}
}
],
"rendered_coverage_percentage": 37.5
}
}
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
}
}
},
"delete": {
"tags": [
"Schedules"
],
"x-pd-requires-scope": "schedules.write",
"operationId": "deleteSchedule",
"description": "Delete an on-call schedule.\n\nA Schedule determines the time periods that users are On-Call.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#schedules)\n\nScoped OAuth requires: `schedules.write`\n",
"summary": "Delete a schedule",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/header_Content-Type"
},
{
"$ref": "#/components/parameters/id"
}
],
"responses": {
"204": {
"description": "The schedule was deleted successfully."
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
}
}
},
"put": {
"tags": [
"Schedules"
],
"x-pd-requires-scope": "schedules.write",
"operationId": "updateSchedule",
"description": "Update an existing on-call schedule.\n\nA Schedule determines the time periods that users are On-Call.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#schedules)\n\nScoped OAuth requires: `schedules.write`\n",
"summary": "Update a schedule",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/header_Content-Type"
},
{
"$ref": "#/components/parameters/id"
},
{
"$ref": "#/components/parameters/schedule_overflow"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"schedule": {
"$ref": "#/components/schemas/Schedule"
}
},
"required": [
"schedule"
]
},
"examples": {
"request": {
"summary": "Request Example",
"value": {
"schedule": {
"name": "Daily Engineering Rotation",
"type": "schedule",
"time_zone": "America/New_York",
"description": "Rotation schedule for engineering",
"schedule_layers": [
{
"name": "Night Shift",
"start": "2015-11-06T20:00:00-05:00",
"end": "2016-11-06T20:00:00-05:00",
"rotation_virtual_start": "2015-11-06T20:00:00-05:00",
"rotation_turn_length_seconds": 86400,
"users": [
{
"user": {
"id": "PXPGF42",
"type": "user_reference"
}
}
],
"restrictions": [
{
"type": "daily_restriction",
"start_time_of_day": "08:00:00",
"duration_seconds": 32400
}
]
}
]
}
}
}
}
}
},
"description": "The schedule to be updated."
},
"responses": {
"200": {
"description": "The updated schedule.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"schedule": {
"$ref": "#/components/schemas/Schedule"
}
},
"required": [
"schedule"
]
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"schedule": {
"id": "PI7DH85",
"type": "schedule",
"summary": "Daily Engineering Rotation",
"self": "https://api.pagerduty.com/schedules/PI7DH85",
"html_url": "https://subdomain.pagerduty.com/schedules/PI7DH85",
"name": "Daily Engineering Rotation",
"time_zone": "America/New_York",
"description": "Rotation schedule for engineering",
"escalation_policies": [
{
"id": "PT20YPA",
"type": "escalation_policy_reference",
"summary": "Another Escalation Policy",
"self": "https://api.pagerduty.com/escalation_policies/PT20YPA",
"html_url": "https://subdomain.pagerduty.com/escalation_policies/PT20YPA"
}
],
"users": [
{
"id": "PXPGF42",
"type": "user_reference",
"summary": "Regina Phalange",
"self": "https://api.pagerduty.com/users/PXPGF42",
"html_url": "https://subdomain.pagerduty.com/users/PXPGF42"
}
],
"teams": [
{
"id": "PQ9K7I8",
"type": "team_reference",
"summary": "Engineering",
"self": "https://api.pagerduty.com/teams/PQ9K7I8",
"html_url": "https://subdomain.pagerduty.com/teams/PQ9K7I8"
}
],
"schedule_layers": [
{
"name": "Layer 1",
"rendered_schedule_entries": [],
"id": "PG68P1M",
"start": "2015-11-06T20:00:00-05:00",
"rotation_virtual_start": "2015-11-06T20:00:00-05:00",
"rotation_turn_length_seconds": 86400,
"users": [
{
"user": {
"id": "PXPGF42",
"type": "user_reference",
"summary": "Regina Phalange",
"self": "https://api.pagerduty.com/users/PXPGF42",
"html_url": "https://subdomain.pagerduty.com/users/PXPGF42"
}
}
],
"restrictions": [
{
"type": "daily_restriction",
"start_time_of_day": "08:00:00",
"duration_seconds": 32400
}
]
}
],
"overrides_subschedule": {
"name": "Overrides",
"rendered_schedule_entries": []
},
"final_schedule": {
"name": "Final Schedule",
"rendered_schedule_entries": []
}
}
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
}
}
}
},
"/schedules/{id}/audit/records": {
"description": "List audit records of changes made to the schedule.",
"get": {
"x-pd-requires-scope": "audit_records.read",
"tags": [
"Schedules"
],
"operationId": "listSchedulesAuditRecords",
"summary": "List audit records for a schedule",
"description": "The returned records are sorted by the `execution_time` from newest to oldest.\n\nSee [`Cursor-based pagination`](https://developer.pagerduty.com/docs/rest-api-v2/pagination/) for instructions on how to paginate through the result set.\n\nFor more information see the [Audit API Document](https://developer.pagerduty.com/docs/rest-api-v2/audit-records-api/).\n\nScoped OAuth requires: `audit_records.read`\n",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/header_Content-Type"
},
{
"$ref": "#/components/parameters/id"
},
{
"$ref": "#/components/parameters/cursor_limit"
},
{
"$ref": "#/components/parameters/cursor_cursor"
},
{
"$ref": "#/components/parameters/audit_since"
},
{
"$ref": "#/components/parameters/audit_until"
}
],
"responses": {
"200": {
"description": "Records matching the query criteria.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AuditRecordResponseSchema"
},
"examples": {
"response": {
"$ref": "#/components/examples/AuditRecordScheduleResponse"
}
}
}
}
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"402": {
"$ref": "#/components/responses/PaymentRequired"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
},
"500": {
"$ref": "#/components/responses/InternalServerError"
}
}
}
},
"/schedules/{id}/overrides": {
"description": "List and create schedule overrides.",
"get": {
"tags": [
"Schedules"
],
"x-pd-requires-scope": "schedules.read",
"operationId": "listScheduleOverrides",
"description": "List overrides for a given time range.\n\nA Schedule determines the time periods that users are On-Call.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#schedules)\n\nScoped OAuth requires: `schedules.read`\n",
"summary": "List overrides",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/header_Content-Type"
},
{
"$ref": "#/components/parameters/id"
},
{
"$ref": "#/components/parameters/since_schedules"
},
{
"$ref": "#/components/parameters/until_schedules"
},
{
"$ref": "#/components/parameters/editable_schedules"
},
{
"$ref": "#/components/parameters/overflow_schedules"
}
],
"responses": {
"201": {
"description": "The collection of override objects returned by the query.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"overrides": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Override"
}
}
},
"required": [
"overrides"
]
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"overrides": [
{
"id": "PQ47DCP",
"start": "2012-07-01T00:00:00-04:00",
"end": "2012-07-02T00:00:00-04:00",
"user": {
"id": "PEYSGVF",
"type": "user_reference",
"summary": "Aurelio Rice",
"self": "https://api.pagerduty.com/users/PEYSGVF",
"html_url": "https://subdomain.pagerduty.com/users/PEYSGVF"
}
}
]
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
}
}
},
"post": {
"tags": [
"Schedules"
],
"x-pd-requires-scope": "schedules.write",
"operationId": "createScheduleOverride",
"description": "Create one or more overrides, each for a specific user covering a specified time range. If you create an override on top of an existing override, the last created override will have priority.\n\nA Schedule determines the time periods that users are On-Call.\n\nNote: An older implementation of this endpoint only supported creating a single ocverride per request. That functionality is still supported, but deprecated and may be removed in the future.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#schedules)\n\nScoped OAuth requires: `schedules.write`\n",
"summary": "Create one or more overrides",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/header_Content-Type"
},
{
"$ref": "#/components/parameters/id"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"description": "",
"type": "object",
"properties": {
"overrides": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Override"
}
}
}
},
"examples": {
"request": {
"summary": "Request Example",
"value": {
"overrides": [
{
"start": "2012-07-01T00:00:00-04:00",
"end": "2012-07-02T00:00:00-04:00",
"user": {
"id": "PEYSGVA",
"type": "user_reference"
},
"time_zone": "UTC"
},
{
"start": "2012-07-03T00:00:00-04:00",
"end": "2012-07-04T00:00:00-04:00",
"user": {
"id": "PEYSGVF",
"type": "user_reference"
},
"time_zone": "UTC"
}
]
}
}
}
}
},
"description": "The overrides to be created",
"required": true
},
"responses": {
"201": {
"description": "A list of overrides requested and a status code indicating whether they were created or rejected",
"content": {
"application/json": {
"schema": {
"type": "array",
"description": "",
"minItems": 1,
"uniqueItems": true,
"items": {
"type": "object",
"properties": {
"status": {
"type": "number",
"description": "HTTP Status Code reflecting the result of creating this specific override, e.g. 201 for success, 400 for invalid parameters."
},
"errors": {
"type": "array",
"description": "If present, an array of strings representing human-readable explanations for errors found.",
"items": {
"type": "string"
}
},
"override": {
"$ref": "#/components/schemas/Override"
}
},
"required": [
"override"
]
}
},
"examples": {
"response": {
"summary": "Response Example",
"value": [
{
"status": 201,
"override": {
"start": "2021-03-09T05:00:00Z",
"end": "2021-03-09T17:00:00Z",
"user": {
"id": "P37CSDJ",
"type": "user_reference",
"summary": "Scott",
"self": "https://api.pd-staging.com/users/P37CSDJ",
"html_url": "https://pdt-braythwayt.pd-staging.com/users/P37CSDJ"
},
"id": "Q3X6MJ1LUKD6QW"
}
},
{
"status": 201,
"override": {
"start": "2021-03-10T05:00:00Z",
"end": "2021-03-10T17:00:00Z",
"user": {
"id": "P37CSDJ",
"type": "user_reference",
"summary": "Scott",
"self": "https://api.pd-staging.com/users/P37CSDJ",
"html_url": "https://pdt-braythwayt.pd-staging.com/users/P37CSDJ"
},
"id": "Q37A85CJZP1DTT"
}
},
{
"status": 400,
"errors": [
"Override must end after its start"
],
"override": {
"start": "2021-03-11T05:00:00Z",
"end": "2021-03-11T05:00:00Z",
"user": {
"id": "P37CSDJ",
"type": "user_reference",
"summary": "Scott",
"self": "https://api.pd-staging.com/users/P37CSDJ",
"html_url": "https://pdt-braythwayt.pd-staging.com/users/P37CSDJ"
}
}
}
]
}
}
}
}
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
}
}
}
},
"/schedules/{id}/overrides/{override_id}": {
"description": "Delete a schedule override.",
"delete": {
"tags": [
"Schedules"
],
"x-pd-requires-scope": "schedules.write",
"operationId": "deleteScheduleOverride",
"description": "Remove an override.\n\nYou cannot remove a past override.\n\nIf the override start time is before the current time, but the end time is after the current time, the override will be truncated to the current time.\n\nIf the override is truncated, the status code will be 200 OK, as opposed to a 204 No Content for a successful delete.\n\nA Schedule determines the time periods that users are On-Call.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#schedules)\n\nScoped OAuth requires: `schedules.write`\n",
"summary": "Delete an override",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/header_Content-Type"
},
{
"$ref": "#/components/parameters/id"
},
{
"$ref": "#/components/parameters/schedule_override_id"
}
],
"responses": {
"200": {
"description": "The override was truncated."
},
"204": {
"description": "The override was deleted successfully."
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
}
}
}
},
"/schedules/{id}/users": {
"description": "List the users on call for a given schedule.",
"get": {
"tags": [
"Schedules"
],
"x-pd-requires-scope": "users.read",
"operationId": "listScheduleUsers",
"description": "List all of the users on call in a given schedule for a given time range.\n\nA Schedule determines the time periods that users are On-Call.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#schedules)\n\nScoped OAuth requires: `users.read`\n",
"summary": "List users on call.",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/header_Content-Type"
},
{
"$ref": "#/components/parameters/id"
},
{
"$ref": "#/components/parameters/since"
},
{
"$ref": "#/components/parameters/until"
}
],
"responses": {
"200": {
"description": "The users on the given schedule.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"users": {
"type": "array",
"readOnly": true,
"items": {
"$ref": "#/components/schemas/User"
}
}
},
"required": [
"users"
]
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"users": [
{
"id": "PAM4FGS",
"type": "user",
"summary": "Kyler Kuhn",
"self": "https://api.pagerduty.com/users/PAM4FGS",
"html_url": "https://subdomain.pagerduty.com/users/PAM4FGS",
"name": "Kyler Kuhn",
"email": "126_dvm_kyler_kuhn@beahan.name",
"time_zone": "Asia/Hong_Kong",
"color": "red",
"role": "admin",
"avatar_url": "https://secure.gravatar.com/avatar/47857d059adacf9a41dc4030c2e14b0a.png?d=mm&r=PG",
"description": "Engineer based in HK",
"invitation_sent": false,
"contact_methods": [
{
"id": "PVMGSML",
"type": "email_contact_method_reference",
"summary": "Work",
"self": "https://api.pagerduty.com/users/PAM4FGS/contact_methods/PVMGSMLL"
}
],
"notification_rules": [
{
"id": "P8GRWKZ",
"type": "assignment_notification_rule_reference",
"summary": "Default",
"self": "https://api.pagerduty.com/users/PAM4FGS/notification_rules/P8GRWKZ",
"html_url": null
}
],
"job_title": "Senior Engineer",
"teams": [
{
"id": "PQ9K7I8",
"type": "team_reference",
"summary": "Engineering",
"self": "https://api.pagerduty.com/teams/PQ9K7I8",
"html_url": "https://subdomain.pagerduty.com/teams/PQ9K7I8"
}
]
},
{
"id": "PXPGF42",
"type": "user",
"summary": "Earline Greenholt",
"self": "https://api.pagerduty.com/users/PXPGF42",
"html_url": "https://subdomain.pagerduty.com/users/PXPGF42",
"name": "Earline Greenholt",
"email": "125.greenholt.earline@graham.name",
"time_zone": "America/Lima",
"color": "green",
"role": "admin",
"avatar_url": "https://secure.gravatar.com/avatar/a8b714a39626f2444ee05990b078995f.png?d=mm&r=PG",
"description": "I'm the boss",
"invitation_sent": false,
"contact_methods": [
{
"id": "PTDVERC",
"type": "email_contact_method_reference",
"summary": "Default",
"self": "https://api.pagerduty.com/users/PXPGF42/contact_methods/PTDVERC"
}
],
"notification_rules": [
{
"id": "P8GRWKK",
"type": "assignment_notification_rule_reference",
"summary": "Default",
"self": "https://api.pagerduty.com/users/PXPGF42/notification_rules/P8GRWKK",
"html_url": null
}
],
"job_title": "Director of Engineering",
"teams": [
{
"id": "PQ9K7I8",
"type": "team_reference",
"summary": "Engineering",
"self": "https://api.pagerduty.com/teams/PQ9K7I8",
"html_url": "https://subdomain.pagerduty.com/teams/PQ9K7I8"
}
]
}
]
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
}
}
}
},
"/schedules/preview": {
"description": "Preview what an on-call schedule would look like without saving it. This works the same as the update or create actions, except that the result is not persisted. Preview optionally takes two additional arguments, since and until, delimiting the span of the preview.",
"post": {
"tags": [
"Schedules"
],
"x-pd-requires-scope": "schedules.write",
"operationId": "createSchedulePreview",
"description": "Preview what an on-call schedule would look like without saving it.\n\nA Schedule determines the time periods that users are On-Call.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#schedules)\n\nScoped OAuth requires: `schedules.write`\n",
"summary": "Preview a schedule",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/header_Content-Type"
},
{
"$ref": "#/components/parameters/since"
},
{
"$ref": "#/components/parameters/until"
},
{
"$ref": "#/components/parameters/schedule_overflow"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"schedule": {
"$ref": "#/components/schemas/Schedule"
}
},
"required": [
"schedule"
]
},
"examples": {
"request": {
"summary": "Request Example",
"value": {
"schedule": {
"name": "Daily Engineering Rotation",
"type": "schedule",
"time_zone": "America/New_York",
"description": "Rotation schedule for engineering",
"schedule_layers": [
{
"name": "Night Shift",
"start": "2015-11-06T20:00:00-05:00",
"end": "2016-11-06T20:00:00-05:00",
"rotation_virtual_start": "2015-11-06T20:00:00-05:00",
"rotation_turn_length_seconds": 86400,
"users": [
{
"user": {
"id": "PXPGF42",
"type": "user_reference"
}
}
],
"restrictions": [
{
"type": "daily_restriction",
"start_time_of_day": "08:00:00",
"duration_seconds": 32400
}
]
}
]
}
}
}
}
}
},
"description": "The schedule to be previewed."
},
"responses": {
"200": {
"description": "What the schedule will look like if posted.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"schedule": {
"$ref": "#/components/schemas/Schedule"
}
},
"required": [
"schedule"
]
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"schedule": {
"id": "PI7DH85",
"type": "schedule",
"summary": "Daily Engineering Rotation",
"self": "https://api.pagerduty.com/schedules/PI7DH85",
"html_url": "https://subdomain.pagerduty.com/schedules/PI7DH85",
"name": "Daily Engineering Rotation",
"time_zone": "America/New_York",
"description": "Rotation schedule for engineering",
"escalation_policies": [],
"users": [
{
"id": "PXPGF42",
"type": "user_reference",
"summary": "Regina Phalange",
"self": "https://api.pagerduty.com/users/PXPGF42",
"html_url": "https://subdomain.pagerduty.com/users/PXPGF42"
}
],
"teams": [
{
"id": "PQ9K7I8",
"type": "team_reference",
"summary": "Engineering",
"self": "https://api.pagerduty.com/teams/PQ9K7I8",
"html_url": "https://subdomain.pagerduty.com/teams/PQ9K7I8"
}
],
"schedule_layers": [
{
"name": "Layer 1",
"rendered_schedule_entries": [],
"id": "PG68P1M",
"start": "2015-11-06T20:00:00-05:00",
"rotation_virtual_start": "2015-11-06T20:00:00-05:00",
"rotation_turn_length_seconds": 86400,
"users": [
{
"user": {
"id": "PXPGF42",
"type": "user_reference",
"summary": "Regina Phalange",
"self": "https://api.pagerduty.com/users/PXPGF42",
"html_url": "https://subdomain.pagerduty.com/users/PXPGF42"
}
}
],
"restrictions": [
{
"type": "daily_restriction",
"start_time_of_day": "08:00:00",
"duration_seconds": 32400
}
]
}
],
"overrides_subschedule": {
"name": "Overrides",
"rendered_schedule_entries": []
},
"final_schedule": {
"name": "Final Schedule",
"rendered_schedule_entries": []
}
}
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
}
}
}
},
"/service_dependencies/associate": {
"description": "Associate dependencies of services.",
"post": {
"x-pd-requires-scope": "services.write",
"tags": [
"Service Dependencies"
],
"operationId": "createServiceDependency",
"summary": "Associate service dependencies",
"description": "Create new dependencies between two services.\n\nBusiness services model capabilities that span multiple technical services and that may be owned by several different teams.\n\nA service can have a maximum of 2,000 dependencies with a depth limit of 100. If the limit is reached, the API will respond with an error.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#business-services)\n\nScoped OAuth requires: `services.write`\n",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/header_Content-Type"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"relationships": {
"type": "array",
"description": "List of all service dependencies to be created.",
"items": {
"type": "object",
"properties": {
"supporting_service": {
"type": "object",
"description": "The reference to the service that supports the dependent service.",
"properties": {
"id": {
"type": "string"
},
"type": {
"type": "string"
}
}
},
"dependent_service": {
"type": "object",
"description": "The reference to the service that is dependent on the supporting service.",
"properties": {
"id": {
"type": "string"
},
"type": {
"type": "string"
}
}
}
}
}
}
}
},
"examples": {
"request": {
"summary": "Request Example",
"value": {
"relationships": [
{
"supporting_service": {
"id": "P7AD56",
"type": "service"
},
"dependent_service": {
"id": "P99DJ6",
"type": "business_service"
}
},
{
"supporting_service": {
"id": "DT93K1",
"type": "business_service"
},
"dependent_service": {
"id": "RS34D9",
"type": "service"
}
}
]
}
}
}
}
}
},
"responses": {
"200": {
"description": "An array of service relationships that were successfully associated.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"relationships": {
"type": "array",
"description": "List of all the technical service's dependencies",
"items": {
"type": "object",
"properties": {
"supporting_service": {
"type": "object",
"description": "The reference to the service that supports the technical service.",
"properties": {
"id": {
"type": "string"
},
"type": {
"type": "string"
}
}
},
"dependent_service": {
"type": "object",
"description": "The reference to the service that is dependent on the technical service.",
"properties": {
"id": {
"type": "string"
},
"type": {
"type": "string"
}
}
},
"id": {
"type": "string"
},
"type": {
"type": "string"
}
}
}
}
}
},
"examples": {
"relationships": {
"summary": "Response Example",
"value": {
"relationships": [
{
"supporting_service": {
"id": "P7AD56",
"type": "technical_service_reference"
},
"dependent_service": {
"id": "P99DJ6",
"type": "business_service_reference"
},
"id": "DQVP7E6G0E8AC3NR",
"type": "service_dependency"
},
{
"supporting_service": {
"id": "DT93K1",
"type": "business_service_reference"
},
"dependent_service": {
"id": "RS34D9",
"type": "technical_service_reference"
},
"id": "D3PG0QVACE87RNE6",
"type": "service_dependency"
}
]
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
}
}
}
},
"/service_dependencies/business_services/{id}": {
"description": "Get the dependencies of a given Business Service.",
"get": {
"x-pd-requires-scope": "services.read",
"tags": [
"Service Dependencies"
],
"operationId": "getBusinessServiceServiceDependencies",
"summary": "Get Business Service dependencies",
"description": "Get all immediate dependencies of any Business Service.\n\nBusiness Services model capabilities that span multiple technical services and that may be owned by several different teams.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#business-services)\n\nScoped OAuth requires: `services.read`\n",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/header_Content-Type"
},
{
"$ref": "#/components/parameters/id"
}
],
"responses": {
"200": {
"description": "An array of service relationships.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"relationships": {
"type": "array",
"description": "List of all the Business Service's dependencies.",
"items": {
"type": "object",
"properties": {
"supporting_service": {
"type": "object",
"description": "The reference to the service that supports the Business Service.",
"properties": {
"id": {
"type": "string"
},
"type": {
"type": "string"
}
}
},
"dependent_service": {
"type": "object",
"description": "The reference to the service that is dependent on the Business Service.",
"properties": {
"id": {
"type": "string"
},
"type": {
"type": "string"
}
}
},
"id": {
"type": "string"
},
"type": {
"type": "string"
}
}
}
}
}
},
"examples": {
"relationships": {
"summary": "Response Example",
"value": {
"relationships": [
{
"supporting_service": {
"id": "P7AD56",
"type": "technical_service_reference"
},
"dependent_service": {
"id": "P99DJ6",
"type": "business_service_reference"
},
"id": "DQVP7E6G0E8AC3NR",
"type": "service_dependency"
},
{
"supporting_service": {
"id": "P99DJ6",
"type": "business_service_reference"
},
"dependent_service": {
"id": "RS34D9",
"type": "business_service_reference"
},
"id": "D3PG0QVACE87RNE6",
"type": "service_dependency"
}
]
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
}
}
}
},
"/service_dependencies/disassociate": {
"description": "Disassociate dependencies of services.",
"post": {
"x-pd-requires-scope": "services.write",
"tags": [
"Service Dependencies"
],
"operationId": "deleteServiceDependency",
"summary": "Disassociate service dependencies",
"description": "Disassociate dependencies between two services.\n\nBusiness services model capabilities that span multiple technical services and that may be owned by several different teams.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#business-services)\n\nScoped OAuth requires: `services.write`\n",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/header_Content-Type"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"relationships": {
"type": "array",
"description": "List of all service dependencies to be deleted.",
"items": {
"type": "object",
"properties": {
"supporting_service": {
"type": "object",
"description": "The reference to the service that supports the dependent service.",
"properties": {
"id": {
"type": "string"
},
"type": {
"type": "string"
}
}
},
"dependent_service": {
"type": "object",
"description": "The reference to the service that is dependent on the supporting service.",
"properties": {
"id": {
"type": "string"
},
"type": {
"type": "string"
}
}
}
}
}
}
}
},
"examples": {
"request": {
"summary": "Request Example",
"value": {
"relationships": [
{
"supporting_service": {
"id": "P7AD56",
"type": "service"
},
"dependent_service": {
"id": "P99DJ6",
"type": "business_service"
}
},
{
"supporting_service": {
"id": "DT93K1",
"type": "business_service"
},
"dependent_service": {
"id": "RS34D9",
"type": "service"
}
}
]
}
}
}
}
}
},
"responses": {
"200": {
"description": "An array of service relationships that were successfully disassociated.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"relationships": {
"type": "array",
"description": "List of all the technical service's dependencies",
"items": {
"type": "object",
"properties": {
"supporting_service": {
"type": "object",
"description": "The reference to the service that supports the technical service.",
"properties": {
"id": {
"type": "string"
},
"type": {
"type": "string"
}
}
},
"dependent_service": {
"type": "object",
"description": "The reference to the service that is dependent on the technical service.",
"properties": {
"id": {
"type": "string"
},
"type": {
"type": "string"
}
}
},
"id": {
"type": "string"
},
"type": {
"type": "string"
}
}
}
}
}
},
"examples": {
"relationships": {
"summary": "Example Response",
"value": {
"relationships": [
{
"supporting_service": {
"id": "P7AD56",
"type": "technical_service_reference"
},
"dependent_service": {
"id": "P99DJ6",
"type": "business_service_reference"
},
"id": "DQVP7E6G0E8AC3NR",
"type": "service_dependency"
},
{
"supporting_service": {
"id": "DT93K1",
"type": "business_service_reference"
},
"dependent_service": {
"id": "RS34D9",
"type": "technical_service_reference"
},
"id": "D3PG0QVACE87RNE6",
"type": "service_dependency"
}
]
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
}
}
}
},
"/service_dependencies/technical_services/{id}": {
"description": "Get the dependencies of a given technical service.",
"get": {
"x-pd-requires-scope": "services.read",
"tags": [
"Service Dependencies"
],
"operationId": "getTechnicalServiceServiceDependencies",
"summary": "Get technical service dependencies",
"description": "Get all immediate dependencies of any technical service.\nTechnical services are also known as `services`.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#services)\n\nScoped OAuth requires: `services.read`\n",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/header_Content-Type"
},
{
"$ref": "#/components/parameters/id"
}
],
"responses": {
"200": {
"description": "An array of service relationships.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"relationships": {
"type": "array",
"description": "List of all the technical service's dependencies",
"items": {
"type": "object",
"properties": {
"supporting_service": {
"type": "object",
"description": "The reference to the service that supports the technical service.",
"properties": {
"id": {
"type": "string"
},
"type": {
"type": "string"
}
}
},
"dependent_service": {
"type": "object",
"description": "The reference to the service that is dependent on the technical service.",
"properties": {
"id": {
"type": "string"
},
"type": {
"type": "string"
}
}
},
"id": {
"type": "string"
},
"type": {
"type": "string"
}
}
}
}
}
},
"examples": {
"relationships": {
"summary": "Response Example",
"value": {
"relationships": [
{
"supporting_service": {
"id": "P7AD56",
"type": "technical_service_reference"
},
"dependent_service": {
"id": "P99DJ6",
"type": "business_service_reference"
},
"id": "DQVP7E6G0E8AC3NR",
"type": "service_dependency"
},
{
"supporting_service": {
"id": "R87DK4",
"type": "technical_service_reference"
},
"dependent_service": {
"id": "P7AD56",
"type": "technical_service_reference"
},
"id": "D3PG0QVACE87RNE6",
"type": "service_dependency"
}
]
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
}
}
}
},
"/services": {
"description": "List and create services.",
"get": {
"tags": [
"Services"
],
"operationId": "listServices",
"x-pd-requires-scope": "services.read",
"description": "List existing Services.\n\nA service may represent an application, component, or team you wish to open incidents against.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#services)\n\nScoped OAuth requires: `services.read`\n",
"summary": "List services",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/header_Content-Type"
},
{
"$ref": "#/components/parameters/query"
},
{
"$ref": "#/components/parameters/offset_limit"
},
{
"$ref": "#/components/parameters/offset_offset"
},
{
"$ref": "#/components/parameters/offset_total"
},
{
"$ref": "#/components/parameters/team_ids"
},
{
"$ref": "#/components/parameters/time_zone"
},
{
"$ref": "#/components/parameters/sort_by_service"
},
{
"$ref": "#/components/parameters/include_services"
}
],
"responses": {
"200": {
"description": "A paginated array of services.",
"content": {
"application/json": {
"schema": {
"allOf": [
{
"$ref": "#/components/schemas/Pagination"
},
{
"type": "object",
"properties": {
"services": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Service"
}
}
},
"required": [
"services"
]
}
]
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"services": [
{
"id": "PIJ90N7",
"summary": "My Application Service",
"type": "service",
"self": "https://api.pagerduty.com/services/PIJ90N7",
"html_url": "https://subdomain.pagerduty.com/service-directory/PIJ90N7",
"name": "My Application Service",
"auto_resolve_timeout": 14400,
"acknowledgement_timeout": 600,
"created_at": "2015-11-06T11:12:51-05:00",
"status": "active",
"alert_creation": "create_alerts_and_incidents",
"alert_grouping_parameters": {
"type": "intelligent"
},
"integrations": [
{
"id": "PQ12345",
"type": "generic_email_inbound_integration_reference",
"summary": "Email Integration",
"self": "https://api.pagerduty.com/services/PIJ90N7/integrations/PQ12345",
"html_url": "https://subdomain.pagerduty.com/services/PIJ90N7/integrations/PQ12345"
}
],
"escalation_policy": {
"id": "PT20YPA",
"type": "escalation_policy_reference",
"summary": "Another Escalation Policy",
"self": "https://api.pagerduty.com/escalation_policies/PT20YPA",
"html_url": "https://subdomain.pagerduty.com/escalation_policies/PT20YPA"
},
"teams": [
{
"id": "PQ9K7I8",
"type": "team_reference",
"summary": "Engineering",
"self": "https://api.pagerduty.com/teams/PQ9K7I8",
"html_url": "https://subdomain.pagerduty.com/teams/PQ9K7I8"
}
],
"incident_urgency_rule": {
"type": "use_support_hours",
"during_support_hours": {
"type": "constant",
"urgency": "high"
},
"outside_support_hours": {
"type": "constant",
"urgency": "low"
}
},
"support_hours": {
"type": "fixed_time_per_day",
"time_zone": "America/Lima",
"start_time": "09:00:00",
"end_time": "17:00:00",
"days_of_week": [
1,
2,
3,
4,
5
]
},
"scheduled_actions": [
{
"type": "urgency_change",
"at": {
"type": "named_time",
"name": "support_hours_start"
},
"to_urgency": "high"
}
],
"auto_pause_notifications_parameters": {
"enabled": true,
"timeout": 300
}
}
],
"limit": 25,
"offset": 0,
"more": false,
"total": null
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
}
}
},
"post": {
"x-pd-requires-scope": "services.write",
"tags": [
"Services"
],
"operationId": "createService",
"description": "Create a new service.\n\nIf `status` is included in the request, it must have a value of `active` when creating a new service. If a different status is required, make a second request to update the service.\n\nA service may represent an application, component, or team you wish to open incidents against.\n\nThere is a limit of 25,000 services per account. If the limit is reached, the API will respond with an error. There is also a limit of 100,000 open Incidents per Service. If the limit is reached and `auto_resolve_timeout` is disabled (set to 0 or null), the `auto_resolve_timeout` property will automatically be set to 84600 (1 day).\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#services)\n\nScoped OAuth requires: `services.write`\n",
"summary": "Create a service",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/header_Content-Type"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"service": {
"$ref": "#/components/schemas/Service"
}
},
"required": [
"service"
]
},
"examples": {
"request": {
"summary": "Request Example",
"value": {
"service": {
"type": "service",
"name": "My Web App",
"description": "My cool web application that does things.",
"auto_resolve_timeout": 14400,
"acknowledgement_timeout": 600,
"status": "active",
"escalation_policy": {
"id": "PWIP6CQ",
"type": "escalation_policy_reference"
},
"incident_urgency_rule": {
"type": "use_support_hours",
"during_support_hours": {
"type": "constant",
"urgency": "high"
},
"outside_support_hours": {
"type": "constant",
"urgency": "low"
}
},
"support_hours": {
"type": "fixed_time_per_day",
"time_zone": "America/Lima",
"start_time": "09:00:00",
"end_time": "17:00:00",
"days_of_week": [
1,
2,
3,
4,
5
]
},
"scheduled_actions": [
{
"type": "urgency_change",
"at": {
"type": "named_time",
"name": "support_hours_start"
},
"to_urgency": "high"
}
],
"alert_creation": "create_alerts_and_incidents",
"alert_grouping_parameters": {
"type": "time",
"config": {
"timeout": 2
}
},
"auto_pause_notifications_parameters": {
"enabled": true,
"timeout": 300
}
}
}
}
}
}
},
"description": "The service to be created"
},
"responses": {
"201": {
"description": "The service that was created",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"service": {
"$ref": "#/components/schemas/Service"
}
},
"required": [
"service"
]
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"service": {
"id": "PIJ90N7",
"summary": "My Application Service",
"type": "service",
"self": "https://api.pagerduty.com/services/PIJ90N7",
"html_url": "https://subdomain.pagerduty.com/service-directory/PIJ90N7",
"name": "My Application Service",
"auto_resolve_timeout": 14400,
"acknowledgement_timeout": 600,
"created_at": "2015-11-06T11:12:51-05:00",
"status": "active",
"alert_creation": "create_alerts_and_incidents",
"integrations": [
{
"id": "PQ12345",
"type": "generic_email_inbound_integration_reference",
"summary": "Email Integration",
"self": "https://api.pagerduty.com/services/PIJ90N7/integrations/PQ12345",
"html_url": "https://subdomain.pagerduty.com/services/PIJ90N7/integrations/PQ12345"
}
],
"escalation_policy": {
"id": "PT20YPA",
"type": "escalation_policy_reference",
"summary": "Another Escalation Policy",
"self": "https://api.pagerduty.com/escalation_policies/PT20YPA",
"html_url": "https://subdomain.pagerduty.com/escalation_policies/PT20YPA"
},
"teams": [
{
"id": "PQ9K7I8",
"type": "team_reference",
"summary": "Engineering",
"self": "https://api.pagerduty.com/teams/PQ9K7I8",
"html_url": "https://subdomain.pagerduty.com/teams/PQ9K7I8"
}
],
"incident_urgency_rule": {
"type": "use_support_hours",
"during_support_hours": {
"type": "constant",
"urgency": "high"
},
"outside_support_hours": {
"type": "constant",
"urgency": "low"
}
},
"support_hours": {
"type": "fixed_time_per_day",
"time_zone": "America/Lima",
"start_time": "09:00:00",
"end_time": "17:00:00",
"days_of_week": [
1,
2,
3,
4,
5
]
},
"scheduled_actions": [
{
"type": "urgency_change",
"at": {
"type": "named_time",
"name": "support_hours_start"
},
"to_urgency": "high"
}
],
"auto_pause_notifications_parameters": {
"enabled": true,
"timeout": 300
}
}
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"402": {
"$ref": "#/components/responses/PaymentRequired"
},
"403": {
"$ref": "#/components/responses/Forbidden"
}
}
}
},
"/services/{id}": {
"description": "Manage a service.",
"get": {
"tags": [
"Services"
],
"operationId": "getService",
"x-pd-requires-scope": "services.read",
"description": "Get details about an existing service.\n\nA service may represent an application, component, or team you wish to open incidents against.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#services)\n\nScoped OAuth requires: `services.read`\n",
"summary": "Get a service",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/header_Content-Type"
},
{
"$ref": "#/components/parameters/id"
},
{
"$ref": "#/components/parameters/include_services_id"
}
],
"responses": {
"200": {
"description": "The service requested.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"service": {
"$ref": "#/components/schemas/Service"
}
},
"required": [
"service"
]
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"service": {
"id": "PIJ90N7",
"type": "service",
"summary": "My Application Service",
"self": "https://api.pagerduty.com/services/PIJ90N7",
"html_url": "https://subdomain.pagerduty.com/service-directory/PIJ90N7",
"name": "My Application Service",
"auto_resolve_timeout": 14400,
"acknowledgement_timeout": 600,
"created_at": "2015-11-06T11:12:51-05:00",
"status": "active",
"alert_creation": "create_alerts_and_incidents",
"integrations": [
{
"id": "PQ12345",
"type": "generic_email_inbound_integration_reference",
"summary": "Email Integration",
"self": "https://api.pagerduty.com/services/PIJ90N7/integrations/PQ12345",
"html_url": "https://subdomain.pagerduty.com/services/PIJ90N7/integrations/PQ12345"
}
],
"escalation_policy": {
"id": "PT20YPA",
"type": "escalation_policy_reference",
"summary": "Another Escalation Policy",
"self": "https://api.pagerduty.com/escalation_policies/PT20YPA",
"html_url": "https://subdomain.pagerduty.com/escalation_policies/PT20YPA"
},
"teams": [
{
"id": "PQ9K7I8",
"type": "team_reference",
"summary": "Engineering",
"self": "https://api.pagerduty.com/teams/PQ9K7I8",
"html_url": "https://subdomain.pagerduty.com/teams/PQ9K7I8"
}
],
"incident_urgency_rule": {
"type": "use_support_hours",
"during_support_hours": {
"type": "constant",
"urgency": "high"
},
"outside_support_hours": {
"type": "constant",
"urgency": "low"
}
},
"support_hours": {
"type": "fixed_time_per_day",
"time_zone": "America/Lima",
"start_time": "09:00:00",
"end_time": "17:00:00",
"days_of_week": [
1,
2,
3,
4,
5
]
},
"scheduled_actions": [
{
"type": "urgency_change",
"at": {
"type": "named_time",
"name": "support_hours_start"
},
"to_urgency": "high"
}
],
"auto_pause_notifications_parameters": {
"enabled": true,
"timeout": 300
}
}
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
}
}
},
"delete": {
"x-pd-requires-scope": "services.write",
"tags": [
"Services"
],
"operationId": "deleteService",
"description": "Delete an existing service.\n\nOnce the service is deleted, it will not be accessible from the web UI and new incidents won't be able to be created for this service.\n\nA service may represent an application, component, or team you wish to open incidents against.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#services)\n\nScoped OAuth requires: `services.write`\n",
"summary": "Delete a service",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/header_Content-Type"
},
{
"$ref": "#/components/parameters/id"
}
],
"responses": {
"204": {
"description": "The service was deleted successfully."
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
}
}
},
"put": {
"x-pd-requires-scope": "services.write",
"tags": [
"Services"
],
"description": "Update an existing service.\n\nA service may represent an application, component, or team you wish to open incidents against.\n\nThere is a limit of 100,000 open Incidents per Service. If the limit is reached and you disable `auto_resolve_timeout` (set to 0 or null), the API will respond with an error.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#services)\n\nScoped OAuth requires: `services.write`\n",
"summary": "Update a service",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/header_Content-Type"
},
{
"$ref": "#/components/parameters/id"
}
],
"operationId": "updateService",
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"service": {
"$ref": "#/components/schemas/Service"
}
},
"required": [
"service"
]
},
"examples": {
"request": {
"summary": "Request Example",
"value": {
"service": {
"type": "service",
"name": "My Web App",
"description": "My cool web application that does things.",
"auto_resolve_timeout": 14400,
"acknowledgement_timeout": 600,
"status": "active",
"escalation_policy": {
"id": "PWIP6CQ",
"type": "escalation_policy_reference"
},
"incident_urgency_rule": {
"type": "use_support_hours",
"during_support_hours": {
"type": "constant",
"urgency": "high"
},
"outside_support_hours": {
"type": "constant",
"urgency": "low"
}
},
"support_hours": {
"type": "fixed_time_per_day",
"time_zone": "America/Lima",
"start_time": "09:00:00",
"end_time": "17:00:00",
"days_of_week": [
1,
2,
3,
4,
5
]
},
"scheduled_actions": [
{
"type": "urgency_change",
"at": {
"type": "named_time",
"name": "support_hours_start"
},
"to_urgency": "high"
}
],
"alert_creation": "create_alerts_and_incidents",
"alert_grouping_parameters": {
"type": "time",
"config": {
"timeout": 2
}
},
"auto_pause_notifications_parameters": {
"enabled": true,
"timeout": 300
}
}
}
}
}
}
},
"description": "The service to be updated."
},
"responses": {
"200": {
"description": "The service that was updated.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"service": {
"$ref": "#/components/schemas/Service"
}
},
"required": [
"service"
]
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"service": {
"id": "PIJ90N7",
"type": "service",
"summary": "My Application Service",
"self": "https://api.pagerduty.com/services/PIJ90N7",
"html_url": "https://subdomain.pagerduty.com/service-directory/PIJ90N7",
"name": "My Application Service",
"auto_resolve_timeout": 14400,
"acknowledgement_timeout": 600,
"created_at": "2015-11-06T11:12:51-05:00",
"status": "active",
"alert_creation": "create_alerts_and_incidents",
"alert_grouping_parameters": {
"type": "time",
"config": {
"timeout": 2
}
},
"integrations": [
{
"id": "PQ12345",
"type": "generic_email_inbound_integration_reference",
"summary": "Email Integration",
"self": "https://api.pagerduty.com/services/PIJ90N7/integrations/PQ12345",
"html_url": "https://subdomain.pagerduty.com/services/PIJ90N7/integrations/PQ12345"
}
],
"escalation_policy": {
"id": "PT20YPA",
"type": "escalation_policy_reference",
"summary": "Another Escalation Policy",
"self": "https://api.pagerduty.com/escalation_policies/PT20YPA",
"html_url": "https://subdomain.pagerduty.com/escalation_policies/PT20YPA"
},
"teams": [
{
"id": "PQ9K7I8",
"type": "team_reference",
"summary": "Engineering",
"self": "https://api.pagerduty.com/teams/PQ9K7I8",
"html_url": "https://subdomain.pagerduty.com/teams/PQ9K7I8"
}
],
"incident_urgency_rule": {
"type": "use_support_hours",
"during_support_hours": {
"type": "constant",
"urgency": "high"
},
"outside_support_hours": {
"type": "constant",
"urgency": "low"
}
},
"support_hours": {
"type": "fixed_time_per_day",
"time_zone": "America/Lima",
"start_time": "09:00:00",
"end_time": "17:00:00",
"days_of_week": [
1,
2,
3,
4,
5
]
},
"scheduled_actions": [
{
"type": "urgency_change",
"at": {
"type": "named_time",
"name": "support_hours_start"
},
"to_urgency": "high"
}
],
"auto_pause_notifications_parameters": {
"enabled": true,
"timeout": 300
}
}
}
}
}
}
}
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"402": {
"$ref": "#/components/responses/PaymentRequired"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
}
}
}
},
"/services/{id}/audit/records": {
"description": "List audit records for a service.",
"get": {
"x-pd-requires-scope": "audit_records.read",
"tags": [
"Services"
],
"operationId": "listServiceAuditRecords",
"summary": "List audit records for a service",
"description": "The returned records are sorted by the `execution_time` from newest to oldest.\n\nSee [`Cursor-based pagination`](https://developer.pagerduty.com/docs/rest-api-v2/pagination/) for instructions on how to paginate through the result set.\n\nFor more information see the [Audit API Document](https://developer.pagerduty.com/docs/rest-api-v2/audit-records-api/).\n\nScoped OAuth requires: `audit_records.read`\n",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/header_Content-Type"
},
{
"$ref": "#/components/parameters/id"
},
{
"$ref": "#/components/parameters/cursor_limit"
},
{
"$ref": "#/components/parameters/cursor_cursor"
},
{
"$ref": "#/components/parameters/audit_since"
},
{
"$ref": "#/components/parameters/audit_until"
}
],
"responses": {
"200": {
"description": "Records matching the query criteria.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AuditRecordResponseSchema"
},
"examples": {
"response": {
"$ref": "#/components/examples/AuditRecordServiceResponse"
}
}
}
}
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"402": {
"$ref": "#/components/responses/PaymentRequired"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
},
"500": {
"$ref": "#/components/responses/InternalServerError"
}
}
}
},
"/services/{id}/change_events": {
"description": "List change events for a service.",
"get": {
"x-pd-requires-scope": "services.read",
"tags": [
"Change Events"
],
"operationId": "listServiceChangeEvents",
"description": "List all of the existing Change Events for a service.\n\nScoped OAuth requires: `services.read`\n",
"summary": "List Change Events for a service",
"parameters": [
{
"$ref": "#/components/parameters/id"
},
{
"$ref": "#/components/parameters/change_since"
},
{
"$ref": "#/components/parameters/change_until"
},
{
"$ref": "#/components/parameters/offset_limit"
},
{
"$ref": "#/components/parameters/offset_offset"
},
{
"$ref": "#/components/parameters/offset_total"
},
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/header_Content-Type"
},
{
"$ref": "#/components/parameters/team_ids"
},
{
"$ref": "#/components/parameters/integration_ids"
}
],
"responses": {
"200": {
"description": "The array of Change Events returned by the query.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"change_events": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ChangeEvent"
}
}
}
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"change_events": [
{
"summary": "Build Success - Increase snapshot create timeout to 30 seconds",
"id": "01BBYA6PEVW6A852BUO6QYUE7O",
"timestamp": "2020-07-17T08:42:58Z",
"type": "change_event",
"source": "acme-build-pipeline-tool-default-i-9999",
"integration": {
"id": "PEYSGVF",
"type": "inbound_integration_reference"
},
"services": [
{
"id": "PEYSGRV",
"type": "service_reference"
}
],
"custom_details": {
"build_state": "passed",
"build_number": "2",
"run_time": "1236s"
},
"links": [
{
"href": "https://acme.pagerduty.dev/build/2",
"text": "View more details in Acme!"
}
]
},
{
"summary": "Build Success - Increase snapshot create timeout to 15 seconds",
"id": "01BBYA6PDIXPL8KO1HPIUL9CZN",
"timestamp": "2020-07-17T07:42:58Z",
"type": "change_event",
"source": "acme-build-pipeline-tool-default-i-9999",
"integration": {
"id": "PEYSGVF",
"type": "inbound_integration_reference"
},
"services": [
{
"id": "PEYSGRV",
"type": "service_reference"
}
],
"custom_details": {
"build_state": "passed",
"build_number": "1",
"run_time": "1233s"
},
"links": [
{
"href": "https://acme.pagerduty.dev/build/1",
"text": "View more details in Acme!"
}
]
}
],
"limit": null,
"offset": null,
"total": null,
"more": false
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
}
}
}
},
"/services/{id}/integrations": {
"description": "Create integrations belonging to a service.",
"post": {
"x-pd-requires-scope": "services.write",
"tags": [
"Services"
],
"operationId": "createServiceIntegration",
"summary": "Create a new integration",
"description": "Create a new integration belonging to a Service.\n\nA service may represent an application, component, or team you wish to open incidents against.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#services)\n\nScoped OAuth requires: `services.write`\n",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/header_Content-Type"
},
{
"$ref": "#/components/parameters/id"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"integration": {
"$ref": "#/components/schemas/Integration"
}
},
"required": [
"integration"
]
},
"examples": {
"email_integration": {
"summary": "Request Example for Email Integration",
"value": {
"integration": {
"type": "generic_email_inbound_integration",
"name": "Email",
"service": {
"id": "PQL78HM",
"type": "service_reference"
},
"integration_email": "my-email-based-integration@subdomain.pagerduty.com",
"vendor": {
"type": "vendor_reference",
"id": "PZD94QK"
}
}
}
},
"email_integration_with_filters": {
"summary": "Email Integration With Filters",
"value": {
"integration": {
"type": "generic_email_inbound_integration",
"name": "Email with Filters",
"integration_email": "your-service@subdomain.pd-staging.com",
"email_incident_creation": "on_new_email_subject",
"email_filter_mode": "or-rules-email",
"email_parsers": [
{
"action": "trigger",
"match_predicate": {
"type": "any",
"matcher": "this thing",
"part": "body",
"children": []
},
"value_extractors": [
{
"type": "entire",
"part": "body",
"value_name": "incident_key"
}
]
}
],
"email_parsing_fallback": "discard",
"email_filters": [
{
"subject_mode": "match",
"subject_regex": "alert",
"body_mode": "match",
"body_regex": "alert",
"from_email_mode": "match",
"from_email_regex": "alert"
}
]
}
}
},
"events_v2_integration": {
"summary": "Request Example for Events v2 Integration",
"value": {
"integration": {
"type": "events_api_v2_inbound_integration",
"name": "Events V2",
"service": {
"id": "PQL78HM",
"type": "service_reference"
}
}
}
}
}
}
},
"description": "The integration to be created"
},
"responses": {
"201": {
"description": "The integration that was created.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"integration": {
"$ref": "#/components/schemas/Integration"
}
},
"required": [
"integration"
]
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"integration": {
"id": "PE1U9CH",
"type": "generic_email_inbound_integration",
"summary": "Email",
"self": "https://api.pagerduty.com/services/PQL78HM/integrations/PE1U9CH",
"html_url": "https://subdomain.pagerduty.com/services/PQL78HM/integrations/PE1U9CH",
"name": "Email",
"service": {
"id": "PQL78HM",
"type": "service_reference",
"summary": "My Email-Based Integration",
"self": "https://api.pagerduty.com/services/PQL78HM",
"html_url": "https://subdomain.pagerduty.com/service-directory/PQL78HM"
},
"created_at": "2015-10-14T13:33:02-07:00",
"integration_email": "my-email-based-integration@subdomain.pagerduty.com"
}
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
}
}
}
},
"/services/{id}/integrations/{integration_id}": {
"description": "View or update integrations belonging to a service.",
"put": {
"x-pd-requires-scope": "services.write",
"tags": [
"Services"
],
"operationId": "updateServiceIntegration",
"summary": "Update an existing integration",
"description": "Update an integration belonging to a Service.\n\nA service may represent an application, component, or team you wish to open incidents against.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#services)\n\nScoped OAuth requires: `services.write`\n",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/header_Content-Type"
},
{
"$ref": "#/components/parameters/id"
},
{
"$ref": "#/components/parameters/integration_id"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"integration": {
"$ref": "#/components/schemas/Integration"
}
},
"required": [
"integration"
]
},
"examples": {
"request": {
"summary": "Request Example",
"value": {
"integration": {
"type": "generic_email_inbound_integration",
"name": "Email",
"service": {
"id": "PQL78HM",
"type": "service_reference",
"summary": "My Email-Based Integration",
"self": "https://api.pagerduty.com/services/PQL78HM",
"html_url": "https://subdomain.pagerduty.com/service-directory/PQL78HM"
},
"integration_email": "my-email-based-integration@subdomain.pagerduty.com",
"vendor": {
"type": "vendor_reference",
"id": "PZD94QK"
}
}
}
}
}
}
},
"description": "The integration to be updated"
},
"responses": {
"200": {
"description": "The integration that was updated.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"integration": {
"$ref": "#/components/schemas/Integration"
}
},
"required": [
"integration"
]
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"integration": {
"id": "PE1U9CH",
"type": "generic_email_inbound_integration",
"summary": "Email",
"self": "https://api.pagerduty.com/services/PQL78HM/integrations/PE1U9CH",
"html_url": "https://subdomain.pagerduty.com/services/PQL78HM/integrations/PE1U9CH",
"name": "Email",
"service": {
"id": "PQL78HM",
"type": "service_reference",
"summary": "My Email-Based Integration",
"self": "https://api.pagerduty.com/services/PQL78HM",
"html_url": "https://subdomain.pagerduty.com/service-directory/PQL78HM"
},
"created_at": "2015-10-14T13:33:02-07:00",
"integration_email": "my-email-based-integration@subdomain.pagerduty.com"
}
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
}
}
},
"get": {
"x-pd-requires-scope": "services.read",
"tags": [
"Services"
],
"operationId": "getServiceIntegration",
"summary": "View an integration",
"description": "Get details about an integration belonging to a service.\n\nA service may represent an application, component, or team you wish to open incidents against.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#services)\n\nScoped OAuth requires: `services.read`\n",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/header_Content-Type"
},
{
"$ref": "#/components/parameters/id"
},
{
"$ref": "#/components/parameters/integration_id"
},
{
"$ref": "#/components/parameters/include_services_integrations"
}
],
"responses": {
"200": {
"description": "The integration that was requested.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"integration": {
"$ref": "#/components/schemas/Integration"
}
},
"required": [
"integration"
]
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"integration": {
"id": "PE1U9CH",
"type": "generic_email_inbound_integration",
"summary": "Email",
"self": "https://api.pagerduty.com/services/PQL78HM/integrations/PE1U9CH",
"html_url": "https://subdomain.pagerduty.com/services/PQL78HM/integrations/PE1U9CH",
"name": "Email",
"service": {
"id": "PQL78HM",
"type": "service_reference",
"summary": "My Email-Based Integration",
"self": "https://api.pagerduty.com/services/PQL78HM",
"html_url": "https://subdomain.pagerduty.com/service-directory/PQL78HM"
},
"created_at": "2015-10-14T13:33:02-07:00",
"vendor": {
"id": "P8JX75F",
"type": "vendor_reference",
"summary": "Autotask",
"self": "https://api.pagerduty.com/vendors/P8JX75F"
},
"integration_email": "my-email-based-integration@subdomain.pagerduty.com"
}
}
}
}
}
}
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
}
}
}
},
"/services/{id}/rules": {
"get": {
"x-pd-requires-scope": "services.read",
"tags": [
"Services"
],
"operationId": "listServiceEventRules",
"description": "List Event Rules on a Service.\n\n> ### End-of-life\n> Rulesets and Event Rules will end-of-life soon. We highly recommend that you [migrate to Event Orchestration](https://support.pagerduty.com/docs/migrate-to-event-orchestration) as soon as possible so you can take advantage of the new functionality, such as improved UI, rule creation, APIs and Terraform support, advanced conditions, and rule nesting.\n\nScoped OAuth requires: `services.read`\n",
"summary": "List Service's Event Rules",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/header_Content-Type"
},
{
"$ref": "#/components/parameters/offset_limit"
},
{
"$ref": "#/components/parameters/offset_offset"
},
{
"$ref": "#/components/parameters/offset_total"
},
{
"$ref": "#/components/parameters/id"
},
{
"$ref": "#/components/parameters/include_ruleset_migrated_metadata"
}
],
"responses": {
"200": {
"description": "A paginated array of Event Rule objects.",
"content": {
"application/json": {
"schema": {
"allOf": [
{
"$ref": "#/components/schemas/Pagination"
},
{
"type": "object",
"properties": {
"migrated_at": {
"type": "string",
"format": "date-time",
"description": "The date/time the service's Event Rules were converted to a Service Orchestration. This property is only included if the `migrated_metadata` query parameter is provided.",
"readOnly": true
},
"migrated_by": {
"type": "object",
"description": "Reference to the user that converted the service's Event Rules to a Service Orchestration. This property is only included if the `migrated_metadata` query parameter is provided.",
"properties": {
"id": {
"type": "string",
"readOnly": true
},
"type": {
"type": "string",
"description": "A string that determines the schema of the object. This must be the standard name for the entity, suffixed by `_reference` if the object is a reference.",
"readOnly": true
},
"self": {
"type": "string",
"format": "url",
"description": "The API show URL at which the object is accessible",
"readOnly": true
}
},
"readOnly": true
},
"migrated_status": {
"type": "string",
"description": "The status indicating whether the service's Event Rules were successfully converted to a Service Orchestration. This property is only included if the `migrated_metadata` query parameter is provided.",
"enum": [
"completed"
],
"readOnly": true
},
"migrated_to": {
"type": "object",
"description": "Reference to the Service Orchestration that the service's Event Rules were converted to. This property is only included if the `migrated_metadata` query parameter is provided.",
"properties": {
"id": {
"type": "string",
"readOnly": true
},
"type": {
"type": "string",
"description": "A string that determines the schema of the object. This must be the standard name for the entity, suffixed by `_reference` if the object is a reference.",
"readOnly": true
},
"self": {
"type": "string",
"format": "url",
"description": "The API show URL at which the object is accessible",
"readOnly": true
}
},
"readOnly": true
},
"migrated_via": {
"type": "string",
"description": "Indicates whether the conversion was performed via the PagerDuty API or PagerDuty website. This property is only included if the `migrated_metadata` query parameter is provided.",
"enum": [
"API",
"UI"
],
"readOnly": true
}
}
},
{
"type": "object",
"properties": {
"rules": {
"type": "array",
"description": "The paginated list of Event Rules of the Service.",
"items": {
"$ref": "#/components/schemas/ServiceEventRule"
}
}
}
}
]
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"rules": [
{
"id": "14e56445-ebab-4dd0-ba9d-fc28a41b7e7b",
"position": 0,
"disabled": false,
"self": "https://api.pagerduty.com/service-directory/PI2KBWI/rules/14e56445-ebab-4dd0-ba9d-fc28a41b7e7b",
"conditions": {
"operator": "and",
"subconditions": [
{
"operator": "contains",
"parameters": {
"value": "mysql",
"path": "class"
}
}
]
},
"time_frame": {
"active_between": {
"start_time": 1577880000000,
"end_time": 1580558400000
}
},
"actions": {
"severity": {
"value": "info"
},
"extractions": [
{
"target": "dedup_key",
"template": "{{error_level}} error on host {{host}}"
}
]
},
"variables": [
{
"name": "error_level",
"type": "regex",
"parameters": {
"value": ".*error level is (\\w+)\\.",
"path": "summary"
}
},
{
"name": "host",
"type": "regex",
"parameters": {
"value": "(.*)-USW2",
"path": "source"
}
}
]
}
],
"limit": 25,
"migrated_at": "2023-06-14T13:51:31Z",
"migrated_by": {
"id": "P8B9WR8",
"self": "https://api.pagerduty.com/users/P8B9WR8",
"type": "user_reference"
},
"migrated_status": "completed",
"migrated_to": {
"id": "PI2KBWI",
"self": "https://api.pagerduty.com/event_orchestrations/services/PI2KBWI",
"type": "event_orchestration_reference"
},
"migrated_via": "API",
"offset": 0,
"more": false,
"total": null
}
}
}
}
}
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
}
}
},
"post": {
"x-pd-requires-scope": "services.write",
"tags": [
"Services"
],
"operationId": "createServiceEventRule",
"description": "Create a new Event Rule on a Service.\n\n> ### End-of-life\n> Rulesets and Event Rules will end-of-life soon. We highly recommend that you [migrate to Event Orchestration](https://support.pagerduty.com/docs/migrate-to-event-orchestration) as soon as possible so you can take advantage of the new functionality, such as improved UI, rule creation, APIs and Terraform support, advanced conditions, and rule nesting.\n\nScoped OAuth requires: `services.write`\n",
"summary": "Create an Event Rule on a Service",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/header_Content-Type"
},
{
"$ref": "#/components/parameters/id"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"rule": {
"$ref": "#/components/schemas/ServiceEventRule"
}
},
"required": [
"rule"
]
},
"examples": {
"request": {
"summary": "Request Example",
"value": {
"rule": {
"id": "14e56445-ebab-4dd0-ba9d-fc28a41b7e7b",
"position": 0,
"disabled": false,
"conditions": {
"operator": "and",
"subconditions": [
{
"operator": "contains",
"parameters": {
"value": "mysql",
"path": "class"
}
}
]
},
"time_frame": {
"active_between": {
"start_time": 1577880000000,
"end_time": 1580558400000
}
},
"actions": {
"annotate": {
"value": "This incident was modified by an Event Rule"
},
"priority": {
"value": "PCMUB6F"
},
"severity": {
"value": "warning"
},
"extractions": [
{
"target": "dedup_key",
"source": "custom_details.error_summary",
"regex": "Host (.*) is experiencing errors"
}
]
}
}
}
}
}
}
}
},
"responses": {
"201": {
"description": "The Event Rule that was created.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"rule": {
"$ref": "#/components/schemas/ServiceEventRule"
}
}
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"ruleset": {
"id": "14e56445-ebab-4dd0-ba9d-fc28a41b7e7b",
"position": 0,
"disabled": false,
"self": "https://api.pagerduty.com/services/PI2KBWI/rules/14e56445-ebab-4dd0-ba9d-fc28a41b7e7b",
"conditions": {
"operator": "and",
"subconditions": [
{
"operator": "contains",
"parameters": {
"value": "mysql",
"path": "class"
}
}
]
},
"time_frame": {
"active_between": {
"start_time": 1577880000000,
"end_time": 1580558400000
}
},
"actions": {
"annotate": {
"value": "This incident was modified by an Event Rule"
},
"priority": {
"value": "PCMUB6F"
},
"severity": {
"value": "warning"
},
"extractions": [
{
"target": "dedup_key",
"source": "custom_details.error_summary",
"regex": "Host (.*) is experiencing errors"
}
]
}
}
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"409": {
"$ref": "#/components/responses/Conflict"
}
}
}
},
"/services/{id}/rules/convert": {
"description": "Convert a Service's Event Rules into Event Orchestration Rules",
"post": {
"x-pd-requires-scope": "services.write",
"tags": [
"Services"
],
"operationId": "convertServiceEventRulesToEventOrchestration",
"summary": "Convert a Service's Event Rules into Event Orchestration Rules",
"description": "Convert this Service's Event Rules into functionally equivalent Event Orchestration Rules.\n\nSending a request to this API endpoint has several effects:\n\n1. Automatically creates Event Orchestration Rules for this Service that will behave identically as this Service's currently configured Event Rules.\n2. Makes all existing Event Rules for this Service read-only. All future updates need to be made via the newly created Event Orchestration rules.\n\nSending a request to this API endpoint will **not** change how future events will be processed. If past events for this Service have been evaluated via Event Rules then new events sent to this Service will also continue to be evaluated via the (now read-only) Event Rules. To change this Service so that new events start being evaluated via the newly created Event Orchestration Rules use the [Update the Service Orchestration active status for a Service API](https://developer.pagerduty.com/api-reference/855659be83d9e-update-the-service-orchestration-active-status-for-a-service).\n\n> ### End-of-life\n> Event Rules will end-of-life soon. We highly recommend that you use this API to [migrate to Event Orchestration](https://support.pagerduty.com/docs/migrate-to-event-orchestration) as soon as possible so you can take advantage of the new functionality, such as improved UI, rule creation, APIs and Terraform support, advanced conditions, and rule nesting.\n\nScoped OAuth requires: `services.write`\n",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/header_Content-Type"
},
{
"$ref": "#/components/parameters/id"
}
],
"responses": {
"200": {
"description": "The Event Orchestration Rules were successfully created",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"convert_status": {
"type": "string",
"readOnly": true,
"description": "Did PagerDuty successfully create equivalent Event Orchestration rules"
},
"converted_to": {
"type": "string",
"format": "url",
"readOnly": true,
"description": "the API URL at which the newly created Event Orchestration rules are accessible"
}
}
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"convert_status": "completed",
"converted_to": "https://api.pagerduty.com/event_orchestrations/service/PC2D9ML"
}
}
}
}
}
},
"400": {
"description": "Could not create equivalent Event Orchestration Rules based on the Service's current Event Rules",
"content": {
"application/json": {
"schema": {
"type": "object",
"readOnly": true,
"properties": {
"error": {
"type": "object",
"readOnly": true,
"properties": {
"message": {
"type": "string",
"readOnly": true,
"description": "Error message string"
},
"errors": {
"type": "array",
"readOnly": true,
"items": {
"type": "object",
"readOnly": true,
"description": "Convertion error Details",
"properties": {
"rule_id": {
"type": "string",
"readOnly": true,
"description": "The ID of the Service Event Rule that couldn't be successfully converted."
},
"position": {
"type": "integer",
"readOnly": true,
"description": "The position of the Service Event Rule that couldn't be successfully converted."
},
"messages": {
"type": "array",
"readOnly": true,
"description": "Human friendly explanations of why this Event Rule couldn't be converted into an equivalent Event Orchestration Rule.",
"items": {
"type": "string",
"readOnly": true
}
}
}
}
}
}
}
}
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"error": {
"message": "Unable to convert given Ruleset to an Event Orchestration",
"errors": [
{
"rule_id": "693cdcd1-ecfd-4064-a834-5cb28a74c060",
"position": 0,
"messages": [
"Unable to convert a rule that has a `time_frame` with both `active_between` and `scheduled_weekly` settings."
]
},
{
"rule_id": "9f6896c0-b435-401f-b25f-62e145d9ccf4",
"position": 5,
"messages": [
"Unable to convert `actions.extractions`; Should have a most 25 extractions but this rule has 42 extractions."
]
}
]
}
}
}
}
}
}
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"405": {
"$ref": "#/components/responses/NotAllowed"
},
"409": {
"$ref": "#/components/responses/Conflict"
}
}
}
},
"/services/{id}/rules/{rule_id}": {
"get": {
"x-pd-requires-scope": "services.read",
"tags": [
"Services"
],
"operationId": "getServiceEventRule",
"description": "Get an Event Rule from a Service.\n\n> ### End-of-life\n> Rulesets and Event Rules will end-of-life soon. We highly recommend that you [migrate to Event Orchestration](https://support.pagerduty.com/docs/migrate-to-event-orchestration) as soon as possible so you can take advantage of the new functionality, such as improved UI, rule creation, APIs and Terraform support, advanced conditions, and rule nesting.\n\nScoped OAuth requires: `services.read`\n",
"summary": "Get an Event Rule from a Service",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/header_Content-Type"
},
{
"$ref": "#/components/parameters/id"
},
{
"$ref": "#/components/parameters/rule_id"
}
],
"responses": {
"200": {
"description": "The Event Rule object.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"rule": {
"$ref": "#/components/schemas/ServiceEventRule"
}
}
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"rule": {
"id": "14e56445-ebab-4dd0-ba9d-fc28a41b7e7b",
"position": 0,
"disabled": false,
"self": "https://api.pagerduty.com/services/PI2KBWI/rules/14e56445-ebab-4dd0-ba9d-fc28a41b7e7b",
"conditions": {
"operator": "and",
"subconditions": [
{
"operator": "contains",
"parameters": {
"value": "mysql",
"path": "class"
}
}
]
},
"time_frame": {
"active_between": {
"start_time": 1577880000000,
"end_time": 1580558400000
}
},
"actions": {
"annotate": {
"value": "This incident was modified by an Event Rule"
},
"priority": {
"value": "PCMUB6F"
},
"severity": {
"value": "warning"
},
"extractions": [
{
"target": "dedup_key",
"source": "custom_details.error_summary",
"regex": "Host (.*) is experiencing errors"
}
]
}
}
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
}
}
},
"put": {
"x-pd-requires-scope": "services.write",
"tags": [
"Services"
],
"operationId": "updateServiceEventRule",
"summary": "Update an Event Rule on a Service",
"description": "Update an Event Rule on a Service. Note that the endpoint supports partial updates, so any number of the writable fields can be provided.\n\n> ### End-of-life\n> Rulesets and Event Rules will end-of-life soon. We highly recommend that you [migrate to Event Orchestration](https://support.pagerduty.com/docs/migrate-to-event-orchestration) as soon as possible so you can take advantage of the new functionality, such as improved UI, rule creation, APIs and Terraform support, advanced conditions, and rule nesting.\n\nScoped OAuth requires: `services.write`\n",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/header_Content-Type"
},
{
"$ref": "#/components/parameters/id"
},
{
"$ref": "#/components/parameters/rule_id"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"rule": {
"$ref": "#/components/schemas/ServiceEventRule"
},
"rule_id": {
"description": "The id of the Event Rule to update on the Service.",
"type": "string"
}
},
"required": [
"rule_id"
]
},
"examples": {
"suppress_action": {
"summary": "Example: Enable suppress action",
"value": {
"rule_id": "7123bdd1-74e8-4aa7-aa38-4a9ebe123456",
"rule": {
"actions": {
"suppress": {
"value": true
}
}
}
}
},
"disable_rule": {
"summary": "Example: Disable rule",
"value": {
"rule_id": "7123bdd1-74e8-4aa7-aa38-4a9ebe123456",
"rule": {
"disabled": true
}
}
}
}
}
}
},
"responses": {
"200": {
"description": "The Event Rule that was updated.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"rule": {
"$ref": "#/components/schemas/ServiceEventRule"
}
}
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"rule": {
"id": "14e56445-ebab-4dd0-ba9d-fc28a41b7e7b",
"position": 0,
"disabled": false,
"self": "https://api.pagerduty.com/services/PI2KBWI/rules/14e56445-ebab-4dd0-ba9d-fc28a41b7e7b",
"conditions": {
"operator": "and",
"subconditions": [
{
"operator": "contains",
"parameters": {
"value": "mysql",
"path": "class"
}
}
]
},
"time_frame": {
"active_between": {
"start_time": 1577880000000,
"end_time": 1580558400000
}
},
"actions": {
"annotate": {
"value": "This incident was modified by an Event Rule"
},
"priority": {
"value": "PCMUB6F"
},
"severity": {
"value": "warning"
},
"extractions": [
{
"target": "dedup_key",
"source": "custom_details.error_summary",
"regex": "Host (.*) is experiencing errors"
}
]
}
}
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"405": {
"$ref": "#/components/responses/NotAllowed"
},
"409": {
"$ref": "#/components/responses/Conflict"
}
}
},
"delete": {
"x-pd-requires-scope": "services.write",
"tags": [
"Services"
],
"operationId": "deleteServiceEventRule",
"description": "Delete an Event Rule from a Service.\n\n> ### End-of-life\n> Rulesets and Event Rules will end-of-life soon. We highly recommend that you [migrate to Event Orchestration](https://support.pagerduty.com/docs/migrate-to-event-orchestration) as soon as possible so you can take advantage of the new functionality, such as improved UI, rule creation, APIs and Terraform support, advanced conditions, and rule nesting.\n\nScoped OAuth requires: `services.write`\n",
"summary": "Delete an Event Rule from a Service",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/header_Content-Type"
},
{
"$ref": "#/components/parameters/id"
},
{
"$ref": "#/components/parameters/rule_id"
}
],
"responses": {
"204": {
"description": "The Event Rule was deleted successfully."
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"405": {
"$ref": "#/components/responses/NotAllowed"
},
"409": {
"$ref": "#/components/responses/Conflict"
}
}
}
},
"/standards": {
"get": {
"x-pd-requires-scope": "standards.read",
"tags": [
"Standards"
],
"operationId": "listStandards",
"summary": "List Standards",
"description": "Get all standards of an account.\n\nScoped OAuth requires: `standards.read`\n",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/active_standard"
},
{
"$ref": "#/components/parameters/query_resource_type_standard"
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"allOf": [
{
"type": "object",
"properties": {
"standards": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Standard"
}
}
}
}
]
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"standards": [
{
"active": true,
"description": "A description provides critical context about what a service represents or is used for to inform team members and responders. The description should be kept concise and understandable by those without deep knowledge of the service.",
"exclusions": [],
"id": "01CXX38Q0U8XKHO4LNKXUJTBFG",
"inclusions": [
{
"type": "technical_service_reference",
"id": "P0CPWBO"
}
],
"name": "Service has a description",
"resource_type": "technical_service",
"type": "has_technical_service_description"
},
{
"active": true,
"description": "Ensure that no incident goes unaddressed, even if the on-call responder on the first level of the escalation policy is unavailable.",
"exclusions": [],
"id": "01CXX38Q0Y8D9IYFAEDCH5F53L",
"inclusions": [],
"name": "Service has an escalation policy with 2 or more unique levels",
"resource_type": "technical_service",
"type": "minimum_escalation_policy_rule_depth"
},
{
"active": true,
"description": "Extensions or add-ons streamline incident response and communication processes by connecting PagerDuty services to other tools that matter to your incident management workflow.",
"exclusions": [],
"id": "01CXX38Q11T19P0K1GFKHUZJ35",
"inclusions": [],
"name": "Service has an extension or add-on (e.g. Slack, etc.)",
"resource_type": "technical_service",
"type": "minimum_outbound_integrations"
}
]
}
}
}
}
}
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
}
}
}
},
"/standards/{id}": {
"put": {
"x-pd-requires-scope": "standards.write",
"tags": [
"Standards"
],
"summary": "Update a standard",
"operationId": "updateStandard",
"description": "Updates a standard\n\nScoped OAuth requires: `standards.write`\n",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/header_Content-Type"
},
{
"$ref": "#/components/parameters/id_standard"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"allOf": [
{
"type": "object",
"properties": {
"active": {
"type": "boolean"
},
"values": {
"type": "object",
"properties": {
"regex": {
"type": "string"
}
}
},
"description": {
"type": "string"
},
"inclusions": {
"type": "array",
"items": {
"$ref": "#/components/schemas/StandardInclusionExclusion"
}
},
"exclusions": {
"type": "array",
"items": {
"$ref": "#/components/schemas/StandardInclusionExclusion"
}
}
}
}
]
},
"examples": {
"request": {
"summary": "Request Example",
"value": {
"active": false
}
}
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Standard"
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"active": false,
"description": "A description provides critical context about what a service represents or is used for to inform team members and responders. The description should be kept concise and understandable by those without deep knowledge of the service.",
"exclusions": [],
"id": "01CXX38Q0U8XKHO4LNKXUJTBFG",
"inclusions": [],
"name": "Service has a description",
"resource_type": "technical_service",
"type": "has_technical_service_description"
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/UnprocessableEntity"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
}
}
}
},
"/standards/scores/{resource_type}": {
"get": {
"x-pd-requires-scope": "standards.read",
"tags": [
"Standards"
],
"summary": "List resources' standards scores",
"operationId": "listResourceStandardsManyServices",
"description": "List standards applied to a set of resources\n\nScoped OAuth requires: `standards.read`\n",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/resource_ids_standard"
},
{
"$ref": "#/components/parameters/resource_type_standard"
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"allOf": [
{
"type": "object",
"properties": {
"resources": {
"type": "array",
"items": {
"$ref": "#/components/schemas/StandardApplied"
}
}
}
}
]
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"resources": [
{
"resource_id": "P0CPWBO",
"resource_type": "technical_service",
"score": {
"passing": 1,
"total": 1
},
"standards": [
{
"active": true,
"description": "A description provides critical context about what a service represents or is used for to inform team members and responders. The description should be kept concise and understandable by those without deep knowledge of the service.",
"id": "01CXX38Q0U8XKHO4LNKXUJTBFG",
"pass": true,
"name": "Service has a description",
"type": "has_technical_service_description"
}
]
}
]
}
}
}
}
}
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
}
}
}
},
"/standards/scores/{resource_type}/{id}": {
"get": {
"x-pd-requires-scope": "standards.read",
"tags": [
"Standards"
],
"summary": "List a resource's standards scores",
"operationId": "listResourceStandards",
"description": "List standards applied to a specific resource\n\nScoped OAuth requires: `standards.read`\n",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/resource_id_standard"
},
{
"$ref": "#/components/parameters/resource_type_standard"
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/StandardApplied"
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"resource_id": "P0CPWBO",
"resource_type": "technical_service",
"score": {
"passing": 1,
"total": 1
},
"standards": [
{
"active": true,
"description": "A description provides critical context about what a service represents or is used for to inform team members and responders. The description should be kept concise and understandable by those without deep knowledge of the service.",
"id": "01CXX38Q0U8XKHO4LNKXUJTBFG",
"pass": true,
"name": "Service has a description",
"type": "has_technical_service_description"
}
]
}
}
}
}
}
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
}
}
}
},
"/status_dashboards": {
"get": {
"x-pd-requires-scope": "status_dashboards.read",
"tags": [
"Status Dashboards"
],
"operationId": "listStatusDashboards",
"description": "Get all your account's custom Status Dashboard views.\n\nScoped OAuth requires: `status_dashboards.read`\n",
"summary": "List Status Dashboards",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"allOf": [
{
"$ref": "#/components/schemas/CursorPagination"
},
{
"type": "object",
"properties": {
"status_dashboards": {
"type": "array",
"items": {
"$ref": "#/components/schemas/StatusDashboard"
}
}
}
}
]
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"limit": 100,
"next_cursor": null,
"status_dashboards": [
{
"id": "PFCVPS0",
"url_slug": "analytics-api",
"name": "Analytics API"
}
]
}
}
}
}
}
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
}
},
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
}
]
}
},
"/status_dashboards/{id}": {
"get": {
"x-pd-requires-scope": "status_dashboards.read",
"tags": [
"Status Dashboards"
],
"operationId": "getStatusDashboardById",
"description": "Get a Status Dashboard by its PagerDuty `id`.\n\nScoped OAuth requires: `status_dashboards.read`\n",
"summary": "Get a single Status Dashboard by `id`",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"status_dashboard": {
"$ref": "#/components/schemas/StatusDashboard"
}
}
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"status_dashboard": {
"id": "PFCVPS0",
"url_slug": "analytics-api",
"name": "Analytics API"
}
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"422": {
"$ref": "#/components/responses/UnprocessableEntity"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
}
},
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/id"
}
]
}
},
"/status_dashboards/{id}/service_impacts": {
"get": {
"x-pd-requires-scope": "status_dashboards.read",
"tags": [
"Status Dashboards"
],
"operationId": "getStatusDashboardServiceImpactsById",
"description": "Get impacted Business Services for a Status Dashboard by `id`\n\nThis endpoint does not return an exhaustive list of Business Services but rather provides access to the most impacted on the specified Status Dashboard up to the limit of 200.\n\nThe returned Business Services are sorted first by Impact, secondarily by most recently impacted, and finally by name.\n\nTo get Impact information about a specific Business Service on the Status Dashboard that does not appear in the Impact-sorted response, use the `ids[]` parameter on the `/business_services/impacts` endpoint.\n\nScoped OAuth requires: `status_dashboards.read`\n",
"summary": "Get impacted Business Services for a Status Dashboard by `id`.",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"allOf": [
{
"$ref": "#/components/schemas/LiveListResponse"
},
{
"type": "object",
"properties": {
"services": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Impact"
}
}
}
},
{
"type": "object",
"properties": {
"additional_fields": {
"type": "object",
"properties": {
"total_impacted_count": {
"type": "integer"
}
}
}
}
}
]
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"limit": 100,
"more": false,
"services": [
{
"id": "PD1234",
"name": "Web API",
"type": "business_service",
"status": "impacted",
"additional_fields": {
"highest_impacting_priority": {
"id": "PQOMK4S",
"order": 128
}
}
},
{
"id": "PF9KMXH",
"name": "Analytics Backend",
"type": "business_service",
"status": "not_impacted",
"additional_fields": {
"highest_impacting_priority": null
}
}
],
"additional_fields": {
"total_impacted_count": 1
}
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"422": {
"$ref": "#/components/responses/UnprocessableEntity"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
}
},
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/id"
},
{
"$ref": "#/components/parameters/impacts_additional_fields"
}
]
}
},
"/status_dashboards/url_slugs/{url_slug}": {
"get": {
"x-pd-requires-scope": "status_dashboards.read",
"tags": [
"Status Dashboards"
],
"operationId": "getStatusDashboardByUrlSlug",
"description": "Get a Status Dashboard by its PagerDuty `url_slug`. A `url_slug` is a human-readable reference\nfor a custom Status Dashboard that may be created or changed in the UI. It will generally be a `dash-separated-string-like-this`.\n\nScoped OAuth requires: `status_dashboards.read`\n",
"summary": "Get a single Status Dashboard by `url_slug`",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"status_dashboard": {
"$ref": "#/components/schemas/StatusDashboard"
}
}
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"status_dashboard": {
"id": "PFCVPS0",
"url_slug": "analytics-api",
"name": "Analytics API"
}
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"422": {
"$ref": "#/components/responses/UnprocessableEntity"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
}
},
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/url_slug"
}
]
}
},
"/status_dashboards/url_slugs/{url_slug}/service_impacts": {
"get": {
"x-pd-requires-scope": "status_dashboards.read",
"tags": [
"Status Dashboards"
],
"operationId": "getStatusDashboardServiceImpactsByUrlSlug",
"description": "Get Business Service Impacts for the Business Services on a Status Dashboard by its `url_slug`. A `url_slug` is a human-readable reference\nfor a custom Status Dashboard that may be created or changed in the UI. It will generally be a `dash-separated-string-like-this`.\n\nThis endpoint does not return an exhaustive list of Business Services but rather provides access to the most impacted on the Status Dashboard up to the limit of 200.\n\nThe returned Business Services are sorted first by Impact, secondarily by most recently impacted, and finally by name.\n\nTo get impact information about a specific Business Service on the Status Dashboard that does not appear in the Impact-sored response, use the `ids[]` parameter on the `/business_services/impacts` endpoint.\n\nScoped OAuth requires: `status_dashboards.read`\n",
"summary": "Get impacted Business Services for a Status Dashboard by `url_slug`",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"allOf": [
{
"$ref": "#/components/schemas/LiveListResponse"
},
{
"type": "object",
"properties": {
"services": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Impact"
}
}
}
},
{
"type": "object",
"properties": {
"additional_fields": {
"type": "object",
"properties": {
"total_impacted_count": {
"type": "integer"
}
}
}
}
}
]
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"limit": 100,
"more": false,
"services": [
{
"id": "PD1234",
"name": "Web API",
"type": "business_service",
"status": "impacted",
"additional_fields": {
"highest_impacting_priority": {
"id": "PQOMK4S",
"order": 128
}
}
},
{
"id": "PF9KMXH",
"name": "Analytics Backend",
"type": "business_service",
"status": "not_impacted",
"additional_fields": {
"highest_impacting_priority": null
}
}
],
"additional_fields": {
"total_impacted_count": 1
}
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"422": {
"$ref": "#/components/responses/UnprocessableEntity"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
}
},
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/url_slug"
},
{
"$ref": "#/components/parameters/impacts_additional_fields"
}
]
}
},
"/status_pages": {
"get": {
"x-pd-requires-scope": "status_pages.read",
"tags": [
"Status Pages"
],
"operationId": "listStatusPages",
"description": "List Status Pages.\n\nScoped OAuth requires: `status_pages.read`\n",
"summary": "List Status Pages",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/status_page_type"
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"allOf": [
{
"$ref": "#/components/schemas/Pagination"
},
{
"type": "object",
"properties": {
"status_pages": {
"type": "array",
"items": {
"$ref": "#/components/schemas/StatusPage"
}
}
}
}
]
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"limit": 25,
"more": false,
"offset": 0,
"status_pages": [
{
"id": "PT4KHLK",
"name": "My brand Status Page",
"published_at": "2017-09-13T10:11:12.000Z",
"status_page_type": "private",
"type": "status_page",
"url": "https://status.mybrand.example"
}
]
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
}
}
}
},
"/status_pages/{id}/impacts": {
"get": {
"x-pd-requires-scope": "status_pages.read",
"tags": [
"Status Pages"
],
"operationId": "listStatusPageImpacts",
"description": "List Impacts for a Status Page by Status Page ID.\n\nScoped OAuth requires: `status_pages.read`\n",
"summary": "List Status Page Impacts",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/id"
},
{
"$ref": "#/components/parameters/status_page_impact_post_type"
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"allOf": [
{
"$ref": "#/components/schemas/Pagination"
},
{
"type": "object",
"properties": {
"impacts": {
"type": "array",
"items": {
"$ref": "#/components/schemas/StatusPageImpact"
}
}
}
}
]
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"impacts": [
{
"description": "operational",
"id": "PIJ90N7",
"post_type": "incident",
"self": "https://api.pagerduty.com/status_pages/PQ8W0D0/impacts/PIJ90N7",
"status_page": {
"id": "PQ8W0D0",
"type": "status_page"
},
"type": "status_page_impact"
},
{
"description": "partial outage",
"id": "PF9KMXH",
"post_type": "incident",
"self": "https://api.pagerduty.com/status_pages/PQ8W0D0/impacts/PF9KMXH",
"status_page": {
"id": "PQ8W0D0",
"type": "status_page"
},
"type": "status_page_impact"
},
{
"description": "outage",
"id": "PBAZLIU",
"post_type": "incident",
"self": "https://api.pagerduty.com/status_pages/PQ8W0D0/impacts/PBAZLIU",
"status_page": {
"id": "PQ8W0D0",
"type": "status_page"
},
"type": "status_page_impact"
}
],
"limit": 25,
"more": false,
"offset": 0
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
}
}
}
},
"/status_pages/{id}/impacts/{impact_id}": {
"get": {
"x-pd-requires-scope": "status_pages.read",
"tags": [
"Status Pages"
],
"operationId": "getStatusPageImpact",
"description": "Get an Impact for a Status Page by Status Page ID and Impact ID.\n\nScoped OAuth requires: `status_pages.read`\n",
"summary": "Get a Status Page Impact",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/id"
},
{
"$ref": "#/components/parameters/status_page_impact_id"
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"impact": {
"$ref": "#/components/schemas/StatusPageImpact"
}
}
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"impact": {
"description": "operational",
"id": "PIJ90N7",
"post_type": "incident",
"self": "https://api.pagerduty.com/status_pages/PQ8W0D0/impacts/PIJ90N7",
"status_page": {
"id": "PQ8W0D0",
"type": "status_page"
},
"type": "status_page_impact"
}
}
}
}
}
}
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
}
}
}
},
"/status_pages/{id}/services": {
"get": {
"x-pd-requires-scope": "status_pages.read",
"tags": [
"Status Pages"
],
"operationId": "listStatusPageServices",
"description": "List Services for a Status Page by Status Page ID.\n\nScoped OAuth requires: `status_pages.read`\n",
"summary": "List Status Page Services",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/id"
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"allOf": [
{
"$ref": "#/components/schemas/Pagination"
},
{
"type": "object",
"properties": {
"services": {
"type": "array",
"items": {
"$ref": "#/components/schemas/StatusPageService"
}
}
}
}
]
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"limit": 25,
"more": false,
"offset": 0,
"services": [
{
"business_service": {
"id": "P32NFFO",
"self": "https://api.pagerduty.com/business_services/P32NFFO",
"type": "business_service"
},
"id": "PEYSGVF",
"name": "Events API (US)",
"status_page": {
"id": "PIJ90N7",
"type": "status_page"
},
"type": "status_page_service"
}
],
"total": 1
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
}
}
}
},
"/status_pages/{id}/services/{service_id}": {
"get": {
"x-pd-requires-scope": "status_pages.read",
"tags": [
"Status Pages"
],
"operationId": "getStatusPageService",
"description": "Get a Service for a Status Page by Status Page ID and Service ID.\n\nScoped OAuth requires: `status_pages.read`\n",
"summary": "Get a Status Page Service",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/id"
},
{
"$ref": "#/components/parameters/status_page_service_id"
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"service": {
"$ref": "#/components/schemas/StatusPageService"
}
}
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"service": {
"business_service": {
"id": "P32NFFO",
"self": "https://api.pagerduty.com/business_services/P32NFFO",
"type": "business_service"
},
"id": "PEYSGVF",
"name": "Events API (US)",
"status_page": {
"id": "PIJ90N7",
"type": "status_page"
},
"type": "status_page_service"
}
}
}
}
}
}
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
}
}
}
},
"/status_pages/{id}/severities": {
"get": {
"x-pd-requires-scope": "status_pages.read",
"tags": [
"Status Pages"
],
"operationId": "listStatusPageSeverities",
"description": "List Severities for a Status Page by Status Page ID.\n\nScoped OAuth requires: `status_pages.read`\n",
"summary": "List Status Page Severities",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/id"
},
{
"$ref": "#/components/parameters/status_page_severity_post_type"
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"allOf": [
{
"$ref": "#/components/schemas/Pagination"
},
{
"type": "object",
"properties": {
"severities": {
"type": "array",
"items": {
"$ref": "#/components/schemas/StatusPageSeverity"
}
}
}
}
]
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"limit": 25,
"more": false,
"offset": 0,
"severities": [
{
"description": "all good",
"id": "PIJ90N7",
"post_type": "incident",
"self": "https://api.pagerduty.com/status_pages/PQ8W0D0/severities/PIJ90N7",
"status_page": {
"id": "PQ8W0D0",
"type": "status_page"
},
"type": "status_page_severity"
},
{
"description": "minor",
"id": "PF9KMXH",
"post_type": "incident",
"self": "https://api.pagerduty.com/status_pages/PQ8W0D0/severities/PF9KMXH",
"status_page": {
"id": "PQ8W0D0",
"type": "status_page"
},
"type": "status_page_severity"
},
{
"description": "major",
"id": "PBAZLIU",
"post_type": "incident",
"self": "https://api.pagerduty.com/status_pages/PQ8W0D0/severities/PBAZLIU",
"status_page": {
"id": "PQ8W0D0",
"type": "status_page"
},
"type": "status_page_severity"
}
],
"total": 3
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
}
}
}
},
"/status_pages/{id}/severities/{severity_id}": {
"get": {
"x-pd-requires-scope": "status_pages.read",
"tags": [
"Status Pages"
],
"operationId": "getStatusPageSeverity",
"description": "Get a Severity for a Status Page by Status Page ID and Severity ID.\n\nScoped OAuth requires: `status_pages.read`\n",
"summary": "Get a Status Page Severity",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/id"
},
{
"$ref": "#/components/parameters/status_page_severity_id"
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"severity": {
"$ref": "#/components/schemas/StatusPageSeverity"
}
}
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"severity": {
"description": "all good",
"id": "PIJ90N7",
"post_type": "incident",
"status_page": {
"id": "PQ8W0D0",
"type": "status_page"
},
"type": "status_page_severity"
}
}
}
}
}
}
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
}
}
}
},
"/status_pages/{id}/statuses": {
"get": {
"x-pd-requires-scope": "status_pages.read",
"tags": [
"Status Pages"
],
"operationId": "listStatusPageStatuses",
"description": "List Statuses for a Status Page by Status Page ID.\n\nScoped OAuth requires: `status_pages.read`\n",
"summary": "List Status Page Statuses",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/id"
},
{
"$ref": "#/components/parameters/status_page_status_post_type"
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"allOf": [
{
"$ref": "#/components/schemas/Pagination"
},
{
"type": "object",
"properties": {
"statuses": {
"type": "array",
"items": {
"$ref": "#/components/schemas/StatusPageStatus"
}
}
}
}
]
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"limit": 25,
"more": false,
"offset": 0,
"statuses": [
{
"description": "investigating",
"id": "PIJ90N7",
"post_type": "incident",
"self": "https://api.pagerduty.com/status_pages/PQ8W0D0/statuses/PIJ90N7",
"status_page": {
"id": "PQ8W0D0",
"type": "status_page"
},
"type": "status_page_status"
},
{
"description": "detected",
"id": "PF9KMXH",
"post_type": "incident",
"self": "https://api.pagerduty.com/status_pages/PQ8W0D0/statuses/PF9KMXH",
"status_page": {
"id": "PQ8W0D0",
"type": "status_page"
},
"type": "status_page_status"
},
{
"description": "resolved",
"id": "PF9KMXH",
"post_type": "incident",
"self": "https://api.pagerduty.com/status_pages/PQ8W0D0/statuses/PF9KMXH",
"status_page": {
"id": "PQ8W0D0",
"type": "status_page"
},
"type": "status_page_status"
}
],
"total": 3
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
}
}
}
},
"/status_pages/{id}/statuses/{status_id}": {
"get": {
"x-pd-requires-scope": "status_pages.read",
"tags": [
"Status Pages"
],
"operationId": "getStatusPageStatus",
"description": "Get a Status for a Status Page by Status Page ID and Status ID.\n\nScoped OAuth requires: `status_pages.read`\n",
"summary": "Get a Status Page Status",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/id"
},
{
"$ref": "#/components/parameters/status_page_status_id"
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"status": {
"$ref": "#/components/schemas/StatusPageStatus"
}
}
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"status": {
"description": "investigating",
"id": "PIJ90N7",
"post_type": "incident",
"self": "https://api.pagerduty.com/status_pages/PQ8W0D0/statuses/PIJ90N7",
"status_page": {
"id": "PQ8W0D0",
"type": "status_page"
},
"type": "status_page_status"
}
}
}
}
}
}
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
}
}
}
},
"/status_pages/{id}/posts": {
"get": {
"x-pd-requires-scope": "status_pages.read",
"tags": [
"Status Pages"
],
"operationId": "listStatusPagePosts",
"description": "List Posts for a Status Page by Status Page ID.\n\nScoped OAuth requires: `status_pages.read`\n",
"summary": "List Status Page Posts",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/id"
},
{
"$ref": "#/components/parameters/status_page_post_type"
},
{
"$ref": "#/components/parameters/status_page_post_reviewed_status"
},
{
"$ref": "#/components/parameters/status_page_post_status"
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"allOf": [
{
"$ref": "#/components/schemas/Pagination"
},
{
"type": "object",
"properties": {
"posts": {
"type": "array",
"items": {
"$ref": "#/components/schemas/StatusPagePost"
}
}
}
}
]
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"limit": 25,
"more": false,
"offset": 0,
"posts": [
{
"ends_at": "2023-12-12T11:00:00.000Z",
"id": "PIJ90N7",
"post_type": "maintenance",
"postmortem": {
"id": "PWZ0PTR",
"self": "https://api.pagerduty.com/status_pages/PR5LMML/posts/PIJ90N7/postmortem",
"type": "status_page_postmortem"
},
"self": "https://api.pagerduty.com/status_pages/PR5LMML/posts/PIJ90N7",
"starts_at": "2023-12-12T11:00:00.000Z",
"status_page": {
"id": "PR5LMML",
"type": "status_page"
},
"title": "maintenance window for database upgrade",
"type": "status_page_post",
"updates": [
{
"id": "P7HUBBZ",
"self": "https://api.pagerduty.com/status_pages/PR5LMML/posts/PIJ90N7/post_updates/P7HUBBZ",
"type": "status_page_post_update"
}
]
}
],
"total": 3
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
}
}
},
"post": {
"x-pd-requires-scope": "status_pages.write",
"tags": [
"Status Pages"
],
"operationId": "createStatusPagePost",
"description": "Create a Post for a Status Page by Status Page ID.\n\nScoped OAuth requires: `status_pages.write`\n",
"summary": "Create a Status Page Post",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/id"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"post": {
"$ref": "#/components/schemas/StatusPagePostPostRequest"
}
},
"required": [
"post"
]
},
"example": {
"post": {
"ends_at": "2023-12-12T11:00:00.000Z",
"post_type": "maintenance",
"starts_at": "2023-12-12T11:00:00.000Z",
"status_page": {
"id": "PR5LMML",
"type": "status_page"
},
"title": "maintenance window for database upgrade",
"type": "status_page_post",
"updates": [
{
"impacted_services": [
{
"impact": {
"id": "PY5OM08",
"type": "status_page_impact"
},
"service": {
"id": "PYHMEI3",
"type": "status_page_service"
}
}
],
"message": "Message
",
"update_frequency_ms": null,
"notify_subscribers": false,
"severity": {
"id": "PY5OM08",
"type": "status_page_severity"
},
"status": {
"id": "P0400H4",
"type": "status_page_status"
},
"type": "status_page_post_update"
}
]
}
}
}
}
},
"responses": {
"201": {
"description": "Created",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"post": {
"$ref": "#/components/schemas/StatusPagePost"
}
}
},
"example": {
"post": {
"ends_at": "2023-12-12T11:00:00.000Z",
"id": "PIJ90N7",
"post_type": "maintenance",
"postmortem": {
"id": "PWZ0PTR",
"self": "https://api.pagerduty.com/status_pages/PR5LMML/posts/PIJ90N7/postmortem",
"type": "status_page_postmortem"
},
"self": "https://api.pagerduty.com/status_pages/PR5LMML/posts/PIJ90N7",
"starts_at": "2023-12-12T11:00:00.000Z",
"status_page": {
"id": "PR5LMML",
"type": "status_page"
},
"title": "maintenance window for database upgrade",
"type": "status_page_post",
"updates": [
{
"id": "P7HUBBZ",
"self": "https://api.pagerduty.com/status_pages/PR5LMML/posts/PIJ90N7/post_updates/P7HUBBZ",
"type": "status_page_post_update"
}
]
}
}
}
}
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
}
}
}
},
"/status_pages/{id}/posts/{post_id}": {
"get": {
"x-pd-requires-scope": "status_pages.read",
"tags": [
"Status Pages"
],
"operationId": "getStatusPagePost",
"description": "Get a Post for a Status Page by Status Page ID and Post ID.\n\nScoped OAuth requires: `status_pages.read`\n",
"summary": "Get a Status Page Post",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/id"
},
{
"$ref": "#/components/parameters/status_page_post_id"
},
{
"$ref": "#/components/parameters/status_page_post_include"
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"post": {
"$ref": "#/components/schemas/StatusPagePost"
}
}
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"post": {
"ends_at": "2023-12-12T11:00:00.000Z",
"id": "PIJ90N7",
"post_type": "maintenance",
"postmortem": {
"id": "PWZ0PTR",
"self": "https://api.pagerduty.com/status_pages/PR5LMML/posts/PIJ90N7/postmortem",
"type": "status_page_postmortem"
},
"self": "https://api.pagerduty.com/status_pages/PR5LMML/posts/PIJ90N7",
"starts_at": "2023-12-12T11:00:00.000Z",
"status_page": {
"id": "PR5LMML",
"type": "status_page"
},
"title": "maintenance window for database upgrade",
"type": "status_page_post",
"updates": [
{
"id": "P7HUBBZ",
"self": "https://api.pagerduty.com/status_pages/PR5LMML/posts/PIJ90N7/post_updates/P7HUBBZ",
"type": "status_page_post_update"
}
]
}
}
}
}
}
}
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
}
}
},
"put": {
"x-pd-requires-scope": "status_pages.write",
"tags": [
"Status Pages"
],
"operationId": "updateStatusPagePost",
"description": "Update a Post for a Status Page by Status Page ID.\n\nScoped OAuth requires: `status_pages.write`\n",
"summary": "Update a Status Page Post",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/id"
},
{
"$ref": "#/components/parameters/status_page_post_id"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"post": {
"$ref": "#/components/schemas/StatusPagePostPutRequest"
}
},
"required": [
"post"
]
},
"example": {
"post": {
"ends_at": "2023-12-12T11:00:00.000Z",
"post_type": "maintenance",
"starts_at": "2023-12-12T11:00:00.000Z",
"status_page": {
"id": "PR5LMML",
"type": "status_page"
},
"title": "maintenance window for database upgrade",
"type": "status_page_post"
}
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"post": {
"$ref": "#/components/schemas/StatusPagePost"
}
}
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"post": {
"ends_at": "2023-12-12T11:00:00.000Z",
"post_type": "maintenance",
"starts_at": "2023-12-12T11:00:00.000Z",
"status_page": {
"id": "PR5LMML",
"type": "status_page"
},
"title": "maintenance window for database upgrade",
"type": "status_page_post",
"updates": [
{
"impacted_services": [
{
"impact": {
"id": "PY5OM08",
"type": "status_page_impact"
},
"service": {
"id": "PYHMEI3",
"type": "status_page_service"
}
}
],
"message": "Message
",
"update_frequency_ms": null,
"notify_subscribers": false,
"severity": {
"id": "PY5OM08",
"type": "status_page_severity"
},
"status": {
"id": "P0400H4",
"type": "status_page_status"
},
"type": "status_page_post_update"
}
]
}
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
}
}
},
"delete": {
"x-pd-requires-scope": "status_pages.write",
"tags": [
"Status Pages"
],
"operationId": "deleteStatusPagePost",
"description": "Delete a Post for a Status Page by Status Page ID and Post ID.\n\nScoped OAuth requires: `status_pages.write`\n",
"summary": "Delete a Status Page Post",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/id"
},
{
"$ref": "#/components/parameters/status_page_post_id"
}
],
"responses": {
"204": {
"description": "No Content"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
}
}
}
},
"/status_pages/{id}/posts/{post_id}/post_updates": {
"get": {
"x-pd-requires-scope": "status_pages.read",
"tags": [
"Status Pages"
],
"operationId": "listStatusPagePostUpdates",
"description": "List Post Updates for a Status Page by Status Page ID and Post ID.\n\nScoped OAuth requires: `status_pages.read`\n",
"summary": "List Status Page Post Updates",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/id"
},
{
"$ref": "#/components/parameters/status_page_post_id"
},
{
"$ref": "#/components/parameters/status_page_post_update_reviewed_status"
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"allOf": [
{
"$ref": "#/components/schemas/Pagination"
},
{
"type": "object",
"properties": {
"post_updates": {
"type": "array",
"items": {
"$ref": "#/components/schemas/StatusPagePostUpdate"
}
}
}
}
]
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"limit": 25,
"more": false,
"offset": 0,
"post_updates": [
{
"id": "PXSOCH0",
"impacted_services": [
{
"impact": {
"id": "PY5OM08",
"self": "https://api.pagerduty.com/status_pages/PR5LMML/impacts/PY5OM08",
"type": "status_page_impact"
},
"service": {
"id": "PYHMEI3",
"self": "https://api.pagerduty.com/status_pages/PR5LMML/services/PYHMEI3",
"type": "status_page_service"
}
}
],
"message": "We will be undergoing schedule maitenance at this date and time
",
"notify_subscribers": false,
"post": {
"id": "P6F2CJ3",
"self": "https://api.pagerduty.com/status_pages/PR5LMML/posts/P6F2CJ3",
"type": "status_page_post"
},
"reported_at": "2023-12-12T10:08:19.000Z",
"reviewed_status": "approved",
"self": "https://api.pagerduty.com/status_pages/PR5LMML/posts/P6F2CJ3/post_updates/PXSOCH0",
"severity": {
"id": "PY5OM08",
"self": "https://api.pagerduty.com/status_pages/PR5LMML/severities/PY5OM08",
"type": "status_page_severity"
},
"status": {
"id": "P0400H4",
"self": "https://api.pagerduty.com/status_pages/PR5LMML/statuses/P0400H4",
"type": "status_page_status"
},
"type": "status_page_post_update"
}
],
"total": 1
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
}
}
},
"post": {
"x-pd-requires-scope": "status_pages.write",
"tags": [
"Status Pages"
],
"operationId": "createStatusPagePostUpdate",
"description": "Create a Post Update for a Post by Post ID.\n\nScoped OAuth requires: `status_pages.write`\n",
"summary": "Create a Status Page Post Update",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/id"
},
{
"$ref": "#/components/parameters/status_page_post_id"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"post_update": {
"$ref": "#/components/schemas/StatusPagePostUpdateRequest"
}
},
"required": [
"post_update"
]
},
"example": {
"post_update": {
"impacted_services": [
{
"impact": {
"id": "PY5OM08",
"type": "status_page_impact"
},
"service": {
"id": "PYHMEI3",
"type": "status_page_service"
}
}
],
"message": "Message
",
"notify_subscribers": false,
"post": {
"id": "P6F2CJ3",
"type": "status_page_post"
},
"severity": {
"id": "PY5OM08",
"type": "status_page_severity"
},
"status": {
"id": "P0400H4",
"type": "status_page_status"
},
"type": "status_page_post_update"
}
}
}
}
},
"responses": {
"201": {
"description": "Created",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"post_update": {
"$ref": "#/components/schemas/StatusPagePostUpdate"
}
}
},
"example": {
"post_update": {
"id": "PXSOCH0",
"impacted_services": [
{
"impact": {
"id": "PY5OM08",
"self": "https://api.pagerduty.com/status_pages/PR5LMML/impacts/PY5OM08",
"type": "status_page_impact"
},
"service": {
"id": "PYHMEI3",
"self": "https://api.pagerduty.com/status_pages/PR5LMML/services/PYHMEI3",
"type": "status_page_service"
}
}
],
"message": "We will be undergoing schedule maitenance at this date and time
",
"notify_subscribers": false,
"post": {
"id": "P6F2CJ3",
"self": "https://api.pagerduty.com/status_pages/PR5LMML/posts/P6F2CJ3",
"type": "status_page_post"
},
"reported_at": "2023-12-12T10:08:19.000Z",
"self": "https://api.pagerduty.com/status_pages/PR5LMML/posts/P6F2CJ3/post_updates/PXSOCH0",
"severity": {
"id": "P6F2CJ4",
"self": "https://api.pagerduty.com/status_pages/PR5LMML/severities/P6F2CJ4",
"type": "status_page_severity"
},
"status": {
"id": "P6F2CJ3",
"self": "https://api.pagerduty.com/status_pages/PR5LMML/statuses/P6F2CJ3",
"type": "status_page_status"
},
"type": "status_page_post_update",
"update_frequency_ms": 300000
}
}
}
}
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
}
}
}
},
"/status_pages/{id}/posts/{post_id}/post_updates/{post_update_id}": {
"get": {
"x-pd-requires-scope": "status_pages.read",
"tags": [
"Status Pages"
],
"operationId": "getPostUpdate",
"description": "Get a Post Update for a Post by Post ID and Post Update ID.\n\nScoped OAuth requires: `status_pages.read`\n",
"summary": "Get a Status Page Post Update",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/id"
},
{
"$ref": "#/components/parameters/status_page_post_id"
},
{
"$ref": "#/components/parameters/status_page_post_update_id"
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"post_update": {
"$ref": "#/components/schemas/StatusPagePostUpdate"
}
}
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"post_update": {
"id": "PXSOCH0",
"impacted_services": [
{
"impact": {
"id": "PY5OM08",
"self": "https://api.pagerduty.com/status_pages/PR5LMML/impacts/PY5OM08",
"type": "status_page_impact"
},
"service": {
"id": "PYHMEI3",
"self": "https://api.pagerduty.com/status_pages/PR5LMML/services/PYHMEI3",
"type": "status_page_service"
}
}
],
"message": "We will be undergoing schedule maitenance at this date and time
",
"notify_subscribers": false,
"post": {
"id": "P6F2CJ3",
"self": "https://api.pagerduty.com/status_pages/PR5LMML/posts/P6F2CJ3",
"type": "status_page_post"
},
"reported_at": "2023-12-12T10:08:19.000Z",
"self": "https://api.pagerduty.com/status_pages/PR5LMML/posts/P6F2CJ3/post_updates/PXSOCH0",
"severity": {
"id": "P6F2CJ4",
"self": "https://api.pagerduty.com/status_pages/PR5LMML/severities/P6F2CJ4",
"type": "status_page_severity"
},
"status": {
"id": "P6F2CJ3",
"self": "https://api.pagerduty.com/status_pages/PR5LMML/statuses/P6F2CJ3",
"type": "status_page_status"
},
"type": "status_page_post_update",
"update_frequency_ms": 300000
}
}
}
}
}
}
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
}
}
},
"put": {
"x-pd-requires-scope": "status_pages.write",
"tags": [
"Status Pages"
],
"operationId": "updateStatusPagePostUpdate",
"description": "Update a Post Update for a Post by Post ID and Post Update ID.\n\nScoped OAuth requires: `status_pages.write`\n",
"summary": "Update a Status Page Post Update",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/id"
},
{
"$ref": "#/components/parameters/status_page_post_id"
},
{
"$ref": "#/components/parameters/status_page_post_update_id"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"post_update": {
"$ref": "#/components/schemas/StatusPagePostUpdateRequest"
}
},
"required": [
"post_update"
]
},
"example": {
"post_update": {
"impacted_services": [
{
"impact": {
"id": "PY5OM08",
"type": "status_page_impact"
},
"service": {
"id": "PYHMEI3",
"type": "status_page_service"
}
}
],
"message": "Message
",
"notify_subscribers": false,
"post": {
"id": "P6F2CJ3",
"type": "status_page_post"
},
"severity": {
"id": "PY5OM08",
"type": "status_page_severity"
},
"status": {
"id": "P0400H4",
"type": "status_page_status"
},
"type": "status_page_post_update"
}
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"post_update": {
"$ref": "#/components/schemas/StatusPagePostUpdate"
}
}
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"post_update": {
"id": "PXSOCH0",
"impacted_services": [
{
"impact": {
"id": "PY5OM08",
"self": "https://api.pagerduty.com/status_pages/PR5LMML/impacts/PY5OM08",
"type": "status_page_impact"
},
"service": {
"id": "PYHMEI3",
"self": "https://api.pagerduty.com/status_pages/PR5LMML/services/PYHMEI3",
"type": "status_page_service"
}
}
],
"message": "We will be undergoing schedule maitenance at this date and time
",
"notify_subscribers": false,
"post": {
"id": "P6F2CJ3",
"self": "https://api.pagerduty.com/status_pages/PR5LMML/posts/P6F2CJ3",
"type": "status_page_post"
},
"reported_at": "2023-12-12T10:08:19.000Z",
"self": "https://api.pagerduty.com/status_pages/PR5LMML/posts/P6F2CJ3/post_updates/PXSOCH0",
"severity": {
"id": "P6F2CJ4",
"self": "https://api.pagerduty.com/status_pages/PR5LMML/severities/P6F2CJ4",
"type": "status_page_severity"
},
"status": {
"id": "P6F2CJ3",
"self": "https://api.pagerduty.com/status_pages/PR5LMML/statuses/P6F2CJ3",
"type": "status_page_status"
},
"type": "status_page_post_update",
"update_frequency_ms": 300000
}
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
}
}
},
"delete": {
"x-pd-requires-scope": "status_pages.write",
"tags": [
"Status Pages"
],
"operationId": "deleteStatusPagePostUpdate",
"description": "Delete a Post Update for a Post by Post ID and Post Update ID.\n\nScoped OAuth requires: `status_pages.write`\n",
"summary": "Delete a Status Page Post Update",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/id"
},
{
"$ref": "#/components/parameters/status_page_post_id"
},
{
"$ref": "#/components/parameters/status_page_post_update_id"
}
],
"responses": {
"204": {
"description": "No Content"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
}
}
}
},
"/status_pages/{id}/posts/{post_id}/postmortem": {
"get": {
"x-pd-requires-scope": "status_pages.read",
"tags": [
"Status Pages"
],
"operationId": "getPostmortem",
"description": "Get a Postmortem for a Post by Post ID.\n\nScoped OAuth requires: `status_pages.read`\n",
"summary": "Get a Post Postmortem",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/id"
},
{
"$ref": "#/components/parameters/status_page_post_id"
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"postmortem": {
"$ref": "#/components/schemas/StatusPagePostmortem"
}
}
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"postmortem": {
"id": "PIJ90N7",
"message": "Something wrong happened and this is a postmortem.
",
"notify_subscribers": true,
"post": {
"id": "P6F2CJ3",
"self": "https://api.pagerduty.com/status_pages/PR5LMML/posts/P6F2CJ3",
"type": "status_page_post"
},
"reported_at": "2023-09-13T10:34:04.000Z",
"self": "https://api.pagerduty.com/status_pages/PR5LMML/posts/P6F2CJ3/postmortem",
"type": "status_page_post_postmortem"
}
}
}
}
}
}
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
}
}
},
"post": {
"x-pd-requires-scope": "status_pages.write",
"tags": [
"Status Pages"
],
"operationId": "createStatusPagePostmortem",
"description": "Create a Postmortem for a Post by Post ID.\n\nScoped OAuth requires: `status_pages.write`\n",
"summary": "Create a Post Postmortem",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/id"
},
{
"$ref": "#/components/parameters/status_page_post_id"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"postmortem": {
"$ref": "#/components/schemas/StatusPagePostmortemRequest"
}
},
"required": [
"post_update"
]
},
"example": {
"postmortem": {
"message": "
Something wrong happened and this is a postmortem.
",
"notify_subscribers": true,
"post": {
"id": "P6F2CJ3",
"self": "https://api.pagerduty.com/status_pages/PR5LMML/posts/P6F2CJ3",
"type": "status_page_post"
},
"type": "status_page_post_postmortem"
}
}
}
}
},
"responses": {
"201": {
"description": "Created",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"postmortem": {
"$ref": "#/components/schemas/StatusPagePostmortem"
}
}
},
"example": {
"postmortem": {
"id": "PIJ90N7",
"message": "
Something wrong happened and this is a postmortem.
",
"notify_subscribers": true,
"post": {
"id": "P6F2CJ3",
"self": "https://api.pagerduty.com/status_pages/PR5LMML/posts/P6F2CJ3",
"type": "status_page_post"
},
"reported_at": "2023-09-13T10:34:04.000Z",
"self": "https://api.pagerduty.com/status_pages/PR5LMML/posts/P6F2CJ3/postmortem",
"type": "status_page_post_postmortem"
}
}
}
}
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
}
}
},
"put": {
"x-pd-requires-scope": "status_pages.write",
"tags": [
"Status Pages"
],
"operationId": "updateStatusPagePostmortem",
"description": "Update a Postmortem for a Post by Post ID.\n\nScoped OAuth requires: `status_pages.write`\n",
"summary": "Update a Post Postmortem",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/id"
},
{
"$ref": "#/components/parameters/status_page_post_id"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"postmortem": {
"$ref": "#/components/schemas/StatusPagePostmortemRequest"
}
},
"required": [
"postmortem"
]
},
"example": {
"postmortem": {
"message": "
Something wrong happened and this is a postmortem.
",
"notify_subscribers": true,
"post": {
"id": "P6F2CJ3",
"self": "https://api.pagerduty.com/status_pages/PR5LMML/posts/P6F2CJ3",
"type": "status_page_post"
},
"type": "status_page_post_postmortem"
}
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"postmortem": {
"$ref": "#/components/schemas/StatusPagePostmortem"
}
}
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"postmortem": {
"id": "PIJ90N7",
"message": "
Something wrong happened and this is a postmortem.
",
"notify_subscribers": true,
"post": {
"id": "P6F2CJ3",
"self": "https://api.pagerduty.com/status_pages/PR5LMML/posts/P6F2CJ3",
"type": "status_page_post"
},
"reported_at": "2023-09-13T10:34:04.000Z",
"self": "https://api.pagerduty.com/status_pages/PR5LMML/posts/P6F2CJ3/postmortem",
"type": "status_page_post_postmortem"
}
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
}
}
},
"delete": {
"x-pd-requires-scope": "status_pages.write",
"tags": [
"Status Pages"
],
"operationId": "deleteStatusPagePostmortem",
"description": "Delete a Postmortem for a Post by Post ID.\n\nScoped OAuth requires: `status_pages.write`\n",
"summary": "Delete a Post Postmortem",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/id"
},
{
"$ref": "#/components/parameters/status_page_post_id"
}
],
"responses": {
"204": {
"description": "No Content"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
}
}
}
},
"/status_pages/{id}/subscriptions": {
"get": {
"x-pd-requires-scope": "status_pages.read",
"tags": [
"Status Pages"
],
"operationId": "listStatusPageSubscriptions",
"description": "List Subscriptions for a Status Page by Status Page ID.\n\nScoped OAuth requires: `status_pages.read`\n",
"summary": "List Status Page Subscriptions",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/id"
},
{
"$ref": "#/components/parameters/status_page_subscription_status"
},
{
"$ref": "#/components/parameters/status_page_subscription_channel"
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"allOf": [
{
"$ref": "#/components/schemas/Pagination"
},
{
"type": "object",
"properties": {
"subscriptions": {
"type": "array",
"items": {
"$ref": "#/components/schemas/StatusPageSubscription"
}
}
}
}
]
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"limit": 25,
"more": false,
"offset": 0,
"subscriptions": [
{
"channel": "email",
"contact": "address@email.example",
"id": "PWZ0PTR",
"self": "https://api.pagerduty.com/status_pages/PIJ90N7/subscriptions/PWZ0PTR",
"status": "active",
"status_page": {
"id": "PIJ90N7",
"type": "status_page"
},
"subscribable_object": {
"id": "PIJ90N7",
"type": "status_page"
},
"type": "status_page_susbcription"
}
],
"total": 1
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
}
}
},
"post": {
"x-pd-requires-scope": "status_pages.write",
"tags": [
"Status Pages"
],
"operationId": "createStatusPageSubscription",
"description": "Create a Subscription for a Status Page by Status Page ID.\n\nScoped OAuth requires: `status_pages.write`\n",
"summary": "Create a Status Page Subscription",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/id"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"subscription": {
"type": "object",
"title": "StatusPageSubscriptionRequest",
"description": "Request schema for creating a StatusPageSubscription.",
"properties": {
"channel": {
"description": "The channel of the Subscription.",
"enum": [
"webhook",
"email"
],
"nullable": false,
"title": "SubscriptionChannel",
"type": "string"
},
"contact": {
"description": "The subscriber's contact - email address or webhook URL.",
"type": "string",
"nullable": false
},
"status_page": {
"description": "Status Page",
"nullable": false,
"properties": {
"id": {
"description": "The id of the status page.",
"type": "string"
},
"type": {
"description": "A string that determines the schema of the object.",
"type": "string"
}
},
"required": [
"id"
],
"type": "object"
},
"subscribable_object": {
"type": "object",
"title": "SubscribableObject",
"description": "The subscribed entity for a given subscription.",
"properties": {
"id": {
"description": "The ID of the subscribed entity for a given subscription.",
"type": "string",
"nullable": false
},
"type": {
"description": "The type of the subscribed entity for a given subscription.",
"enum": [
"status_page",
"status_page_service",
"status_page_post"
],
"type": "string",
"nullable": false
}
}
},
"type": {
"description": "A string that determines the schema of the object.",
"type": "string"
}
},
"required": [
"channel",
"contact",
"subscribable_object",
"status_page",
"type"
]
}
},
"required": [
"subscription"
]
},
"example": {
"subscription": {
"channel": "email",
"contact": "joe@email.example",
"status_page": {
"id": "PIJ90N7",
"type": "status_page"
},
"subscribable_object": {
"id": "PSX4LJI",
"type": "status_page_service"
},
"type": "status_page_subscription"
}
}
}
}
},
"responses": {
"201": {
"description": "Created",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"subscription": {
"$ref": "#/components/schemas/StatusPageSubscription"
}
}
},
"example": {
"subscription": {
"channel": "email",
"contact": "address@email.example",
"id": "PWZ0PTR",
"self": "https://api.pagerduty.com/status_pages/PIJ90N7/subscriptions/PWZ0PTR",
"status": "active",
"status_page": {
"id": "PIJ90N7",
"type": "status_page"
},
"subscribable_object": {
"id": "PSX4LJI",
"type": "status_page_service"
},
"type": "status_page_subscription"
}
}
}
}
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
}
}
}
},
"/status_pages/{id}/subscriptions/{subscription_id}": {
"get": {
"x-pd-requires-scope": "status_pages.read",
"tags": [
"Status Pages"
],
"operationId": "getStatusPageSubscription",
"description": "Get a Subscription for a Status Page by Status Page ID and Subscription ID.\n\nScoped OAuth requires: `status_pages.read`\n",
"summary": "Get a Status Page Subscription",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/id"
},
{
"$ref": "#/components/parameters/status_page_subscription_id"
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"subscription": {
"$ref": "#/components/schemas/StatusPageSubscription"
}
}
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"subscription": {
"channel": "email",
"contact": "address@email.example",
"id": "PWZ0PTR",
"self": "https://api.pagerduty.com/status_pages/PIJ90N7/subscriptions/PWZ0PTR",
"status": "active",
"status_page": {
"id": "PIJ90N7",
"type": "status_page"
},
"subscribable_object": {
"id": "PSX4LJI",
"type": "status_page_service"
},
"type": "status_page_subscription"
}
}
}
}
}
}
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
}
}
},
"delete": {
"x-pd-requires-scope": "status_pages.write",
"tags": [
"Status Pages"
],
"operationId": "deleteStatusPageSubscription",
"description": "Delete a Subscription for a Status Page by Status Page ID and Subscription ID.\n\nScoped OAuth requires: `status_pages.write`\n",
"summary": "Delete a Status Page Subscription",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/id"
},
{
"$ref": "#/components/parameters/status_page_subscription_id"
}
],
"responses": {
"204": {
"description": "No Content"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
}
}
}
},
"/tags": {
"get": {
"x-pd-requires-scope": "tags.read",
"tags": [
"Tags"
],
"operationId": "listTags",
"description": "List all of your account's tags.\n\nA Tag is applied to Escalation Policies, Teams or Users and can be used to filter them.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#tags)\n\nScoped OAuth requires: `tags.read`\n",
"summary": "List tags",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/header_Content-Type"
},
{
"$ref": "#/components/parameters/offset_limit"
},
{
"$ref": "#/components/parameters/offset_offset"
},
{
"$ref": "#/components/parameters/offset_total"
},
{
"$ref": "#/components/parameters/tag_query"
}
],
"responses": {
"200": {
"description": "An array of tags names.",
"content": {
"application/json": {
"schema": {
"allOf": [
{
"$ref": "#/components/schemas/Pagination"
},
{
"type": "object",
"properties": {
"tags": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Tag"
}
}
},
"required": [
"tags"
]
}
]
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"tags": [
{
"type": "tag",
"summary": "Batman",
"self": "https://api.pagerduty.com/tags/P5IYCNZ",
"label": "Batman",
"id": "P5IYCNZ",
"html_url": null
}
],
"limit": 100,
"offset": 0,
"total": 1,
"more": false
}
}
}
}
}
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
}
}
},
"post": {
"x-pd-requires-scope": "tags.write",
"tags": [
"Tags"
],
"operationId": "createTags",
"description": "Create a Tag.\n\nA Tag is applied to Escalation Policies, Teams or Users and can be used to filter them.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#tags)\n\nScoped OAuth requires: `tags.write`\n",
"summary": "Create a tag",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/header_Content-Type"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"tag": {
"$ref": "#/components/schemas/Tag"
}
},
"required": [
"tag"
]
},
"examples": {
"request": {
"summary": "Request Example",
"value": {
"tag": {
"type": "tag",
"label": "Batman"
}
}
}
}
}
}
},
"responses": {
"201": {
"description": "The tag that was created.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"tag": {
"$ref": "#/components/schemas/Tag"
}
},
"required": [
"tag"
]
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"tag": {
"type": "tag",
"summary": "Batman",
"self": "https://api.pagerduty.com/tags/P5IYCNZ",
"label": "Batman",
"id": "P5IYCNZ",
"html_url": null
}
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
}
}
}
},
"/tags/{id}": {
"get": {
"x-pd-requires-scope": "tags.read",
"tags": [
"Tags"
],
"operationId": "getTag",
"description": "Get details about an existing Tag.\n\nA Tag is applied to Escalation Policies, Teams or Users and can be used to filter them.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#tags)\n\nScoped OAuth requires: `tags.read`\n",
"summary": "Get a tag",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/header_Content-Type"
},
{
"$ref": "#/components/parameters/id"
}
],
"responses": {
"200": {
"description": "The tag requested.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"tag": {
"$ref": "#/components/schemas/Tag"
}
},
"required": [
"tag"
]
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"tag": {
"type": "tag",
"summary": "Batman",
"self": "https://api.pagerduty.com/tags/P5IYCNZ",
"label": "Batman",
"id": "P5IYCNZ",
"html_url": null
}
}
}
}
}
}
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
}
}
},
"delete": {
"x-pd-requires-scope": "tags.write",
"tags": [
"Tags"
],
"operationId": "deleteTag",
"description": "Remove an existing Tag.\n\nA Tag is applied to Escalation Policies, Teams or Users and can be used to filter them.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#tags)\n\nScoped OAuth requires: `tags.write`\n",
"summary": "Delete a tag",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/header_Content-Type"
},
{
"$ref": "#/components/parameters/id"
}
],
"responses": {
"204": {
"description": "The tag was deleted successfully."
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
}
}
}
},
"/tags/{id}/{entity_type}": {
"get": {
"x-pd-requires-scope": "tags.read",
"tags": [
"Tags"
],
"operationId": "getTagsByEntityType",
"description": "Get related Users, Teams or Escalation Policies for the Tag.\n\nA Tag is applied to Escalation Policies, Teams or Users and can be used to filter them.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#tags)\n\nScoped OAuth requires: `tags.read`\n",
"summary": "Get connected entities",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/header_Content-Type"
},
{
"$ref": "#/components/parameters/offset_limit"
},
{
"$ref": "#/components/parameters/offset_offset"
},
{
"$ref": "#/components/parameters/offset_total"
},
{
"$ref": "#/components/parameters/id"
},
{
"$ref": "#/components/parameters/entity_type"
}
],
"responses": {
"200": {
"description": "An array of connected entities.",
"content": {
"application/json": {
"schema": {
"allOf": [
{
"$ref": "#/components/schemas/Pagination"
},
{
"type": "object",
"properties": {
"users": {
"type": "array",
"items": {
"$ref": "#/components/schemas/EntityReference"
}
},
"teams": {
"type": "array",
"items": {
"$ref": "#/components/schemas/EntityReference"
}
},
"escalation_policies": {
"type": "array",
"items": {
"$ref": "#/components/schemas/EntityReference"
}
}
}
}
]
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"users": [
{
"id": "PXPGF42",
"type": "user_reference"
},
{
"id": "PAM4FGS",
"type": "user_reference"
}
],
"limit": 100,
"offset": 0,
"total": 2,
"more": false
}
}
}
}
}
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
}
}
}
},
"/teams": {
"description": "List or create teams.",
"post": {
"x-pd-requires-scope": "teams.write",
"tags": [
"Teams"
],
"operationId": "createTeam",
"description": "Create a new Team.\n\nA team is a collection of Users and Escalation Policies that represent a group of people within an organization.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#teams)\n\nScoped OAuth requires: `teams.write`\n",
"summary": "Create a team",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/header_Content-Type"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"team": {
"$ref": "#/components/schemas/Team"
}
},
"required": [
"team"
]
},
"examples": {
"request": {
"summary": "Request Example",
"value": {
"team": {
"type": "team",
"name": "Engineering",
"description": "The engineering team"
}
}
}
}
}
},
"description": "The team to be created."
},
"responses": {
"201": {
"description": "The team that was created.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"team": {
"$ref": "#/components/schemas/Team"
}
},
"required": [
"team"
]
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"team": {
"id": "PQ9K7I8",
"type": "team",
"summary": "Engineering",
"self": "https://api.pagerduty.com/teams/PQ9K7I8",
"html_url": "https://subdomain.pagerduty.com/teams/PQ9K7I8",
"name": "Engineering",
"description": "All engineering",
"base_role": "observer"
}
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"402": {
"$ref": "#/components/responses/PaymentRequired"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
}
}
},
"get": {
"x-pd-requires-scope": "teams.read",
"tags": [
"Teams"
],
"operationId": "listTeams",
"description": "List teams of your PagerDuty account, optionally filtered by a search query.\n\nA team is a collection of Users and Escalation Policies that represent a group of people within an organization.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#teams)\n\nScoped OAuth requires: `teams.read`\n",
"summary": "List teams",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/header_Content-Type"
},
{
"$ref": "#/components/parameters/offset_limit"
},
{
"$ref": "#/components/parameters/offset_offset"
},
{
"$ref": "#/components/parameters/offset_total"
},
{
"$ref": "#/components/parameters/query"
}
],
"responses": {
"200": {
"description": "A paginated array of teams.",
"content": {
"application/json": {
"schema": {
"allOf": [
{
"$ref": "#/components/schemas/Pagination"
},
{
"type": "object",
"properties": {
"teams": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Team"
}
}
},
"required": [
"teams"
]
}
]
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"teams": [
{
"id": "PQ9K7I8",
"type": "team",
"summary": "Engineering",
"self": "https://api.pagerduty.com/teams/PQ9K7I8",
"html_url": "https://subdomain.pagerduty.com/teams/PQ9K7I8",
"name": "Engineering",
"description": "All engineering"
}
],
"limit": 100,
"offset": 0,
"more": false,
"total": null
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"402": {
"$ref": "#/components/responses/PaymentRequired"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
}
}
}
},
"/teams/{id}": {
"description": "Manage a team.",
"get": {
"x-pd-requires-scope": "teams.read",
"tags": [
"Teams"
],
"operationId": "getTeam",
"description": "Get details about an existing team.\n\nA team is a collection of Users and Escalation Policies that represent a group of people within an organization.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#teams)\n\nScoped OAuth requires: `teams.read`\n",
"summary": "Get a team",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/header_Content-Type"
},
{
"$ref": "#/components/parameters/id"
},
{
"$ref": "#/components/parameters/include_teams"
}
],
"responses": {
"200": {
"description": "The team requested.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"team": {
"$ref": "#/components/schemas/Team"
}
},
"required": [
"team"
]
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"team": {
"id": "PQ9K7I8",
"type": "team",
"summary": "Engineering",
"self": "https://api.pagerduty.com/teams/PQ9K7I8",
"html_url": "https://subdomain.pagerduty.com/teams/PQ9K7I8",
"name": "Engineering",
"description": "All engineering",
"default_role": "observer"
}
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"402": {
"$ref": "#/components/responses/PaymentRequired"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
}
}
},
"delete": {
"x-pd-requires-scope": "teams.write",
"tags": [
"Teams"
],
"operationId": "deleteTeam",
"description": "Remove an existing team.\n\nSucceeds only if the team has no associated Escalation Policies, Services, Schedules and Subteams.\n\nAll associated unresovled incidents will be reassigned to another team (if specified) or will loose team association, thus becoming account-level (with visibility implications).\n\nNote that the incidents reassignment process is asynchronous and has no guarantee to complete before the API call return.\n\nA team is a collection of Users and Escalation Policies that represent a group of people within an organization.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#teams)\n\nScoped OAuth requires: `teams.write`\n",
"summary": "Delete a team",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/header_Content-Type"
},
{
"$ref": "#/components/parameters/reassignment_team"
},
{
"$ref": "#/components/parameters/id"
}
],
"responses": {
"204": {
"description": "The team was deleted successfully."
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"402": {
"$ref": "#/components/responses/PaymentRequired"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
}
}
},
"put": {
"x-pd-requires-scope": "teams.write",
"tags": [
"Teams"
],
"operationId": "updateTeam",
"description": "Update an existing team.\n\nA team is a collection of Users and Escalation Policies that represent a group of people within an organization.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#teams)\n\nScoped OAuth requires: `teams.write`\n",
"summary": "Update a team",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/header_Content-Type"
},
{
"$ref": "#/components/parameters/id"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"team": {
"$ref": "#/components/schemas/Team"
}
},
"required": [
"team"
]
},
"examples": {
"request": {
"summary": "Request Example",
"value": {
"team": {
"type": "team",
"name": "Engineering",
"description": "The engineering team"
}
}
}
}
}
},
"description": "The team to be updated."
},
"responses": {
"200": {
"description": "The team that was updated.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"team": {
"$ref": "#/components/schemas/Team"
}
},
"required": [
"team"
]
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"team": {
"id": "PQ9K7I8",
"type": "team",
"summary": "Engineering",
"self": "https://api.pagerduty.com/teams/PQ9K7I8",
"html_url": "https://subdomain.pagerduty.com/teams/PQ9K7I8",
"name": "Engineering",
"description": "All engineering",
"default_role": "observer"
}
}
}
}
}
}
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"402": {
"$ref": "#/components/responses/PaymentRequired"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
}
}
}
},
"/teams/{id}/audit/records": {
"description": "List audit records of changes made to the team.",
"get": {
"x-pd-requires-scope": "audit_records.read",
"tags": [
"Teams"
],
"operationId": "listTeamsAuditRecords",
"summary": "List audit records for a team",
"description": "The returned records are sorted by the `execution_time` from newest to oldest.\n\nSee [`Cursor-based pagination`](https://developer.pagerduty.com/docs/rest-api-v2/pagination/) for instructions on how to paginate through the result set.\n\nFor more information see the [Audit API Document](https://developer.pagerduty.com/docs/rest-api-v2/audit-records-api/).\n\nScoped OAuth requires: `audit_records.read`\n",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/header_Content-Type"
},
{
"$ref": "#/components/parameters/id"
},
{
"$ref": "#/components/parameters/cursor_limit"
},
{
"$ref": "#/components/parameters/cursor_cursor"
},
{
"$ref": "#/components/parameters/audit_since"
},
{
"$ref": "#/components/parameters/audit_until"
}
],
"responses": {
"200": {
"description": "Records matching the query criteria.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AuditRecordResponseSchema"
},
"examples": {
"response": {
"$ref": "#/components/examples/AuditRecordTeamResponse"
}
}
}
}
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"402": {
"$ref": "#/components/responses/PaymentRequired"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
},
"500": {
"$ref": "#/components/responses/InternalServerError"
}
}
}
},
"/teams/{id}/escalation_policies/{escalation_policy_id}": {
"description": "Manage an escalation policy for a team.",
"delete": {
"tags": [
"Teams"
],
"x-pd-requires-scope": "teams.write",
"operationId": "deleteTeamEscalationPolicy",
"description": "Remove an escalation policy from a team.\n\nA team is a collection of Users and Escalation Policies that represent a group of people within an organization.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#teams)\n\nScoped OAuth requires: `teams.write`\n",
"summary": "Remove an escalation policy from a team",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/header_Content-Type"
},
{
"$ref": "#/components/parameters/id"
},
{
"$ref": "#/components/parameters/team_escalation_policy_id"
}
],
"responses": {
"204": {
"description": "The escalation policy was removed from the team."
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"402": {
"$ref": "#/components/responses/PaymentRequired"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
}
}
},
"put": {
"tags": [
"Teams"
],
"x-pd-requires-scope": "teams.write",
"operationId": "updateTeamEscalationPolicy",
"description": "Add an escalation policy to a team.\n\nA team is a collection of Users and Escalation Policies that represent a group of people within an organization.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#teams)\n\nScoped OAuth requires: `teams.write`\n",
"summary": "Add an escalation policy to a team",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/header_Content-Type"
},
{
"$ref": "#/components/parameters/id"
},
{
"$ref": "#/components/parameters/team_escalation_policy_id"
}
],
"responses": {
"204": {
"description": "The escalation policy was added to the team."
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"402": {
"$ref": "#/components/responses/PaymentRequired"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
}
}
}
},
"/teams/{id}/members": {
"description": "List information about members within a team.",
"get": {
"x-pd-requires-scope": "teams.read",
"tags": [
"Teams"
],
"operationId": "listTeamUsers",
"description": "Get information about members on a team.\n\nA team is a collection of Users and Escalation Policies that represent a group of people within an organization.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#teams)\n\nScoped OAuth requires: `teams.read`\n",
"summary": "List members of a team",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/header_Content-Type"
},
{
"$ref": "#/components/parameters/offset_limit"
},
{
"$ref": "#/components/parameters/offset_offset"
},
{
"$ref": "#/components/parameters/offset_total"
},
{
"$ref": "#/components/parameters/id"
},
{
"$ref": "#/components/parameters/include_teams_members"
}
],
"responses": {
"200": {
"description": "A paginated array of users within the requested team.",
"content": {
"application/json": {
"schema": {
"allOf": [
{
"$ref": "#/components/schemas/Pagination"
},
{
"type": "object",
"properties": {
"members": {
"type": "array",
"uniqueItems": false,
"items": {
"type": "object",
"properties": {
"user": {
"$ref": "#/components/schemas/UserReference"
},
"role": {
"type": "string"
}
}
}
}
}
}
]
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"members": [
{
"user": {
"id": "P0XJYI9",
"type": "user_reference",
"summary": "Jane Doe",
"self": "https://api.pagerduty.com/users/P0XJYI9",
"html_url": "https://subdomain.pagerduty.com/users/P0XJYI9"
},
"role": "manager"
}
],
"limit": 100,
"offset": 0,
"more": false,
"total": null
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
}
}
}
},
"/teams/{id}/notification_subscriptions": {
"get": {
"x-pd-requires-scope": "subscribers.read",
"summary": "List Team Notification Subscriptions",
"tags": [
"Teams"
],
"operationId": "getTeamNotificationSubscriptions",
"description": "Retrieve a list of Notification Subscriptions the given Team has.\n\n\n> Teams must be added through `POST /teams/{id}/notification_subscriptions` to be returned from this endpoint.\n\nScoped OAuth requires: `subscribers.read`\n",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/id"
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"allOf": [
{
"$ref": "#/components/schemas/Pagination"
},
{
"type": "object",
"properties": {
"subscriptions": {
"type": "array",
"items": {
"type": "object",
"properties": {
"subscription": {
"$ref": "#/components/schemas/NotificationSubscription"
},
"subscribable_name": {
"type": "string",
"nullable": true,
"description": "The name of the subscribable"
}
}
}
}
},
"required": [
"subscriptions"
]
}
]
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"subscriptions": [
{
"subscription": {
"subscriber_id": "PD1234",
"subscriber_type": "team",
"subscribable_id": "PD1234",
"subscribable_type": "incident",
"subscribable_name": null,
"account_id": "PD1234"
}
},
{
"subscription": {
"subscriber_id": "PD1234",
"subscriber_type": "team",
"subscribable_id": "PD1234",
"subscribable_type": "business_service",
"subscribable_name": "Online Payment",
"account_id": "PD1234"
}
}
],
"limit": 2,
"offset": 0,
"total": 1000,
"more": true
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
}
}
},
"post": {
"x-pd-requires-scope": "subscribers.write",
"summary": "Create Team Notification Subscriptions",
"tags": [
"Teams"
],
"operationId": "createTeamNotificationSubscriptions",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"subscriptions": {
"type": "array",
"items": {
"$ref": "#/components/schemas/NotificationSubscriptionWithContext"
}
}
}
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"subscriptions": [
{
"account_id": "PD1234",
"subscribable_id": "PD1234",
"subscribable_type": "incident",
"subscriber_id": "PD1234",
"subscriber_type": "team",
"result": "success"
},
{
"account_id": "PD1234",
"subscribable_id": "PD1234",
"subscribable_type": "business_service",
"subscriber_id": "PD1234",
"subscriber_type": "team",
"result": "duplicate"
},
{
"account_id": "PD1234",
"subscribable_id": "PD1235",
"subscribable_type": "business_service",
"subscriber_id": "PD1234",
"subscriber_type": "team",
"result": "unauthorized"
}
]
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"422": {
"$ref": "#/components/responses/UnprocessableEntity"
}
},
"description": "Create new Notification Subscriptions for the given Team.\n\nScoped OAuth requires: `subscribers.write`\n",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/id"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"subscribables": {
"type": "array",
"uniqueItems": true,
"minItems": 1,
"items": {
"$ref": "#/components/schemas/NotificationSubscribable"
}
}
},
"required": [
"subscribables"
]
},
"examples": {
"request": {
"summary": "Request Example",
"value": {
"subscribables": [
{
"subscribable_type": "incident",
"subscribable_id": "PD1234"
},
{
"subscribable_type": "business_service",
"subscribable_id": "PD1234"
},
{
"subscribable_type": "business_service",
"subscribable_id": "PD1235"
}
]
}
}
}
}
},
"description": "The entities to subscribe to."
}
}
},
"/teams/{id}/notification_subscriptions/unsubscribe": {
"summary": "Remove Team Notification Subscriptions",
"post": {
"x-pd-requires-scope": "subscribers.write",
"tags": [
"Teams"
],
"operationId": "removeTeamNotificationSubscriptions",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"deleted_count": {
"type": "number"
},
"unauthorized_count": {
"type": "number"
},
"non_existent_count": {
"type": "number"
}
},
"required": [
"deleted_count",
"unauthorized_count",
"non_existent_count"
]
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"deleted_count": 1,
"unauthorized_count": 1,
"non_existent_count": 0
}
}
}
}
}
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"422": {
"$ref": "#/components/responses/UnprocessableEntity"
}
},
"description": "Unsubscribe the given Team from Notifications on the matching Subscribable entities.\n\nScoped OAuth requires: `subscribers.write`\n",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/id"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"subscribables": {
"type": "array",
"uniqueItems": true,
"minItems": 1,
"items": {
"$ref": "#/components/schemas/NotificationSubscribable"
}
}
},
"required": [
"subscribables"
]
},
"examples": {
"request": {
"summary": "Response Example",
"value": {
"subscribables": [
{
"subscribable_type": "incident",
"subscribable_id": "PD1234"
},
{
"subscribable_type": "business_service",
"subscribable_id": "PD1234"
}
]
}
}
}
}
},
"description": "The entities to unsubscribe from."
}
}
},
"/teams/{id}/users/{user_id}": {
"description": "Manage team memberships.",
"delete": {
"x-pd-requires-scope": "teams.write",
"tags": [
"Teams"
],
"operationId": "deleteTeamUser",
"description": "Remove a user from a team.\n\nA team is a collection of Users and Escalation Policies that represent a group of people within an organization.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#teams)\n\nScoped OAuth requires: `teams.write`\n",
"summary": "Remove a user from a team",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/header_Content-Type"
},
{
"$ref": "#/components/parameters/id"
},
{
"$ref": "#/components/parameters/team_user_id"
}
],
"responses": {
"204": {
"description": "The user was removed to the team."
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"402": {
"$ref": "#/components/responses/PaymentRequired"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
}
}
},
"put": {
"x-pd-requires-scope": "teams.write",
"tags": [
"Teams"
],
"operationId": "updateTeamUser",
"description": "Add a user to a team. Attempting to add a user with the `read_only_user` role will return a 400 error.\n\nA team is a collection of Users and Escalation Policies that represent a group of people within an organization.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#teams)\n\nScoped OAuth requires: `teams.write`\n",
"summary": "Add a user to a team",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/header_Content-Type"
},
{
"$ref": "#/components/parameters/id"
},
{
"$ref": "#/components/parameters/team_user_id"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"role": {
"type": "string",
"description": "The role of the user on the team.",
"enum": [
"observer",
"responder",
"manager"
]
}
}
},
"examples": {
"role": {
"summary": "Request Example",
"value": {
"role": "observer"
}
}
}
}
},
"description": "The role of the user on the team."
},
"responses": {
"204": {
"description": "The user was added to the team."
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"402": {
"$ref": "#/components/responses/PaymentRequired"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
}
}
}
},
"/templates": {
"description": "List and Create Templates",
"get": {
"x-pd-requires-scope": "templates.read",
"tags": [
"Templates"
],
"operationId": "getTemplates",
"description": "Get a list of all the template on an account\n\nScoped OAuth requires: `templates.read`\n",
"summary": "List templates",
"parameters": [
{
"$ref": "#/components/parameters/offset_limit"
},
{
"$ref": "#/components/parameters/offset_offset"
},
{
"$ref": "#/components/parameters/offset_total"
},
{
"$ref": "#/components/parameters/template_query"
},
{
"$ref": "#/components/parameters/template_type"
},
{
"$ref": "#/components/parameters/sort_by_template"
}
],
"responses": {
"200": {
"description": "A paginated array of templates.",
"content": {
"application/json": {
"schema": {
"allOf": [
{
"$ref": "#/components/schemas/Pagination"
},
{
"type": "object",
"properties": {
"templates": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Template"
}
}
},
"required": [
"templates"
]
}
]
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"limit": 25,
"more": false,
"offset": 0,
"templates": [
{
"created_at": "2022-12-30T16:00:00Z",
"created_by": {
"id": "PDZR4CN",
"self": "https://api.pagerduty.com/users/PDZR4CN",
"type": "user_reference"
},
"description": "Sample template description",
"id": "PBZUP2B",
"name": "Sample Template 160",
"self": "https://api.pagerduty.com/templates/PBZUP2B",
"template_type": "status_update",
"type": "template",
"updated_at": "2022-12-30T16:00:00Z",
"updated_by": {
"id": "PGY287N",
"self": "https://api.pagerduty.com/users/PGY287N",
"type": "user_reference"
}
}
],
"total": null
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"402": {
"$ref": "#/components/responses/PaymentRequired"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"500": {
"$ref": "#/components/responses/InternalServerError"
}
}
},
"post": {
"x-pd-requires-scope": "templates.write",
"tags": [
"Templates"
],
"operationId": "createTemplate",
"description": "Create a new template\n\nScoped OAuth requires: `templates.write`\n",
"summary": "Create a template",
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"template": {
"$ref": "#/components/schemas/EditableTemplate"
}
},
"required": [
"template"
]
},
"examples": {
"request": {
"summary": "Request Example",
"value": {
"template": {
"description": "Sample template description",
"templated_fields": {
"email_body": "
sample
",
"email_subject": "Sample email Subject",
"message": "Sample SMS message"
},
"name": "Sample Template",
"template_type": "status_update"
}
}
}
}
}
},
"required": true
},
"responses": {
"201": {
"description": "Template successfully created",
"content": {
"application/json": {
"x-type": true,
"schema": {
"type": "object",
"properties": {
"template": {
"$ref": "#/components/schemas/Template"
}
},
"required": [
"template"
]
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"template": {
"created_at": "2022-08-19T13:46:22Z",
"created_by": {
"id": "PF9KMXH",
"self": "https://api.pagerduty.com/users/PF9KMXH",
"type": "user_reference"
},
"description": "Sample template description",
"templated_fields": {
"email_body": " sample
",
"email_subject": "Sample email Subject",
"message": "Sample SMS message"
},
"id": "PCCR863",
"name": "Sample Template",
"self": "https://api.pagerduty.com/templates/PCCR863",
"template_type": "status_update",
"type": "template",
"updated_at": "2022-08-19T13:46:22Z",
"updated_by": {
"id": "PF9KMXH",
"self": "https://api.pagerduty.com/users/PF9KMXH",
"type": "user_reference"
}
}
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"402": {
"$ref": "#/components/responses/PaymentRequired"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"500": {
"$ref": "#/components/responses/InternalServerError"
}
}
}
},
"/templates/{id}": {
"description": "Update and Delete Templates",
"get": {
"x-pd-requires-scope": "templates.read",
"tags": [
"Templates"
],
"operationId": "getTemplate",
"description": "Get a single template on the account\n\nScoped OAuth requires: `templates.read`\n",
"summary": "Get a template",
"parameters": [
{
"$ref": "#/components/parameters/id"
}
],
"responses": {
"200": {
"description": "Successful operation",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"template": {
"$ref": "#/components/schemas/Template"
}
},
"required": [
"template"
]
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"template": {
"created_at": "2022-12-30T16:00:00Z",
"created_by": {
"id": "PDZR4CN",
"self": "https://api.pagerduty.com/users/PDZR4CN",
"type": "user_reference"
},
"description": "Sample template description",
"templated_fields": {
"email_body": " sample
",
"email_subject": "Sample email Subject",
"message": "Sample template message"
},
"id": "PBZUP2B",
"name": "Sample Template 160",
"self": "https://api.pagerduty.com/templates/PBZUP2B",
"template_type": "status_update",
"type": "template",
"updated_at": "2022-12-30T16:00:00Z",
"updated_by": {
"id": "PGY287N",
"self": "https://api.pagerduty.com/users/PGY287N",
"type": "user_reference"
}
}
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"402": {
"$ref": "#/components/responses/PaymentRequired"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"500": {
"$ref": "#/components/responses/InternalServerError"
}
}
},
"put": {
"x-pd-requires-scope": "templates.write",
"tags": [
"Templates"
],
"operationId": "updateTemplate",
"description": "Update an existing template\n\nScoped OAuth requires: `templates.write`\n",
"summary": "Update a template",
"parameters": [
{
"$ref": "#/components/parameters/id"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"template": {
"$ref": "#/components/schemas/EditableTemplate"
}
},
"required": [
"template"
]
},
"examples": {
"request": {
"summary": "Request Example",
"value": {
"template": {
"description": "Sample template description",
"templated_fields": {
"email_body": " sample
",
"email_subject": "Sample email Subject",
"message": "Sample SMS message"
},
"name": "Sample Template",
"template_type": "status_update"
}
}
}
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Successful operation",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"template": {
"$ref": "#/components/schemas/Template"
}
},
"required": [
"template"
]
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"template": {
"created_at": "2022-08-19T13:46:22Z",
"created_by": {
"id": "PF9KMXH",
"self": "https://api.pagerduty.com/users/PF9KMXH",
"type": "user_reference"
},
"description": "Sample template description",
"templated_fields": {
"email_body": " sample
",
"email_subject": "Sample email Subject",
"message": "Sample SMS message"
},
"id": "PCCR863",
"name": "Sample Template",
"self": "https://api.pagerduty.com/templates/PCCR863",
"template_type": "status_update",
"type": "template",
"updated_at": "2022-08-19T13:46:22Z",
"updated_by": {
"id": "PF9KMXH",
"self": "https://api.pagerduty.com/users/PF9KMXH",
"type": "user_reference"
}
}
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"402": {
"$ref": "#/components/responses/PaymentRequired"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"500": {
"$ref": "#/components/responses/InternalServerError"
}
}
},
"delete": {
"x-pd-requires-scope": "templates.write",
"tags": [
"Templates"
],
"operationId": "deleteTemplate",
"description": "Delete a specific of templates on the account\n\nScoped OAuth requires: `templates.write`\n",
"summary": "Delete a template",
"parameters": [
{
"$ref": "#/components/parameters/id"
}
],
"responses": {
"204": {
"description": "Successful operation"
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"402": {
"$ref": "#/components/responses/PaymentRequired"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"500": {
"$ref": "#/components/responses/InternalServerError"
}
}
}
},
"/templates/{id}/render": {
"post": {
"x-pd-requires-scope": "templates.read",
"tags": [
"Templates"
],
"operationId": "renderTemplate",
"summary": "Render a template",
"description": "Render a template. This endpoint has a variable request body depending on the template type. For the `status_update` template type, the caller will provide the incident id, and a status update message.\n\nScoped OAuth requires: `templates.read`\n",
"parameters": [
{
"$ref": "#/components/parameters/id"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"$ref": "#/components/schemas/StatusUpdateTemplateInput"
}
]
},
"examples": {
"request": {
"summary": "Request Example",
"value": {
"incident_id": "QT4KHLK034QWE34",
"status_update": {
"message": "Status update message"
}
}
}
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Successful operation",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/RenderedTemplate"
},
"examples": {
"response": {
"value": {
"templated_fields": {
"email_subject": "Update: Status update message",
"email_body": "Status update message
",
"message": "Update: Status update message"
},
"warnings": [
{
"email_body": [
"{{incident.bad_value}} does not exist."
]
}
],
"errors": []
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"402": {
"$ref": "#/components/responses/PaymentRequired"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"500": {
"$ref": "#/components/responses/InternalServerError"
}
}
}
},
"/templates/fields": {
"get": {
"x-pd-requires-scope": "templates.read",
"tags": [
"Templates"
],
"operationId": "getTemplateFields",
"description": "Get a list of fields that can be used on the account templates.\n\nScoped OAuth requires: `templates.read`\n",
"summary": "List template fields",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/header_Content-Type"
}
],
"responses": {
"200": {
"description": "An array of template fields.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"fields": {
"type": "array",
"items": {
"title": "Field",
"type": "object",
"properties": {
"data_type": {
"type": "string",
"description": "The kind of data the template field is allowed to contain.",
"enum": [
"boolean",
"integer",
"float",
"string",
"datetime",
"url"
]
},
"default_value": {
"type": "string",
"description": "The default value of the template field.",
"nullable": true
},
"description": {
"type": "string",
"description": "A short description of the template field.",
"nullable": true
},
"domain_name": {
"type": "object",
"properties": {
"order": {
"type": "integer"
},
"summary": {
"type": "string"
}
}
},
"example": {
"type": "string",
"description": "An example value for the template field.",
"nullable": true
},
"keyword": {
"type": "string",
"nullable": true
},
"summary": {
"type": "string",
"description": "A short summary of the template field."
},
"type": {
"type": "string",
"description": "The type of template field.",
"enum": [
"standard_field",
"custom_field"
]
}
}
}
}
},
"required": [
"fields"
]
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"fields": [
{
"data_type": "datetime",
"default_value": null,
"description": "The time the incident was created.",
"domain": {
"order": 1,
"summary": "Incident"
},
"example": "2023-11-22T07:12:50Z",
"keyword": null,
"summary": "incident.created_at",
"type": "standard_field"
},
{
"data_type": "string",
"default_value": null,
"description": "The name of the escalation policy attached to the service that the incident is on",
"domain": {
"order": 1,
"summary": "Incident"
},
"example": "Another Escalation Policy",
"keyword": "name",
"summary": "incident.escalation_policy.summary",
"type": "standard_field"
},
{
"data_type": "string",
"default_value": "default value",
"description": "An account defined custom field",
"domain": {
"order": 1,
"summary": "Incident"
},
"example": null,
"keyword": null,
"summary": "incident.custom_field",
"type": "custom_field"
}
]
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"402": {
"$ref": "#/components/responses/PaymentRequired"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"500": {
"$ref": "#/components/responses/InternalServerError"
}
}
}
},
"/users": {
"description": "List and create users.",
"get": {
"x-pd-requires-scope": "users.read",
"tags": [
"Users"
],
"operationId": "listUsers",
"description": "List users of your PagerDuty account, optionally filtered by a search query.\n\nUsers are members of a PagerDuty account that have the ability to interact with Incidents and other data on the account.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#users)\n\nScoped OAuth requires: `users.read`\n",
"summary": "List users",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/header_Content-Type"
},
{
"$ref": "#/components/parameters/query"
},
{
"$ref": "#/components/parameters/team_ids"
},
{
"$ref": "#/components/parameters/offset_limit"
},
{
"$ref": "#/components/parameters/offset_offset"
},
{
"$ref": "#/components/parameters/offset_total"
},
{
"$ref": "#/components/parameters/include_user"
}
],
"responses": {
"200": {
"description": "A paginated array of users.",
"content": {
"application/json": {
"schema": {
"allOf": [
{
"$ref": "#/components/schemas/Pagination"
},
{
"type": "object",
"properties": {
"users": {
"type": "array",
"items": {
"$ref": "#/components/schemas/User"
}
}
},
"required": [
"users"
]
}
]
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"users": [
{
"id": "PXPGF42",
"type": "user",
"summary": "Earline Greenholt",
"self": "https://api.pagerduty.com/users/PXPGF42",
"html_url": "https://subdomain.pagerduty.com/users/PXPGF42",
"name": "Earline Greenholt",
"email": "125.greenholt.earline@graham.name",
"time_zone": "America/Lima",
"color": "green",
"role": "admin",
"avatar_url": "https://secure.gravatar.com/avatar/a8b714a39626f2444ee05990b078995f.png?d=mm&r=PG",
"description": "I'm the boss",
"invitation_sent": false,
"contact_methods": [
{
"id": "PTDVERC",
"type": "email_contact_method_reference",
"summary": "Default",
"self": "https://api.pagerduty.com/users/PXPGF42/contact_methods/PTDVERC"
}
],
"notification_rules": [
{
"id": "P8GRWKK",
"type": "assignment_notification_rule_reference",
"summary": "Default",
"self": "https://api.pagerduty.com/users/PXPGF42/notification_rules/P8GRWKK",
"html_url": null
}
],
"job_title": "Director of Engineering",
"teams": [
{
"id": "PQ9K7I8",
"type": "team_reference",
"summary": "Engineering",
"self": "https://api.pagerduty.com/teams/PQ9K7I8",
"html_url": "https://subdomain.pagerduty.com/teams/PQ9K7I8"
}
]
},
{
"id": "PAM4FGS",
"type": "user",
"summary": "Kyler Kuhn",
"self": "https://api.pagerduty.com/users/PAM4FGS",
"html_url": "https://subdomain.pagerduty.com/users/PAM4FGS",
"name": "Kyler Kuhn",
"email": "126_dvm_kyler_kuhn@beahan.name",
"time_zone": "Asia/Hong_Kong",
"color": "red",
"role": "admin",
"avatar_url": "https://secure.gravatar.com/avatar/47857d059adacf9a41dc4030c2e14b0a.png?d=mm&r=PG",
"description": "Actually, I am the boss",
"invitation_sent": false,
"contact_methods": [
{
"id": "PVMGSML",
"type": "email_contact_method_reference",
"summary": "Work",
"self": "https://api.pagerduty.com/users/PAM4FGS/contact_methods/PVMGSMLL"
}
],
"notification_rules": [
{
"id": "P8GRWKK",
"type": "assignment_notification_rule_reference",
"summary": "Default",
"self": "https://api.pagerduty.com/users/PXPGF42/notification_rules/P8GRWKK",
"html_url": null
}
],
"job_title": "Senior Engineer",
"teams": [
{
"id": "PQ9K7I8",
"type": "team_reference",
"summary": "Engineering",
"self": "https://api.pagerduty.com/teams/PQ9K7I8",
"html_url": "https://subdomain.pagerduty.com/teams/PQ9K7I8"
}
]
}
],
"limit": 25,
"offset": 0,
"more": false,
"total": null
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
}
}
},
"post": {
"x-pd-requires-scope": "users.write",
"tags": [
"Users"
],
"operationId": "createUser",
"description": "Create a new user.\n\nUsers are members of a PagerDuty account that have the ability to interact with Incidents and other data on the account.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#users)\n\nScoped OAuth requires: `users.write`\n",
"summary": "Create a user",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/header_Content-Type"
},
{
"$ref": "#/components/parameters/from_header"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"user": {
"allOf": [
{
"$ref": "#/components/schemas/User"
},
{
"properties": {
"license": {
"allOf": [
{
"description": "The License assigned to the User"
},
{
"$ref": "#/components/schemas/LicenseReference"
}
]
}
}
}
]
}
},
"required": [
"user"
]
},
"examples": {
"request": {
"summary": "Request Example",
"value": {
"user": {
"type": "user",
"name": "Earline Greenholt",
"email": "125.greenholt.earline@graham.name",
"time_zone": "America/Lima",
"color": "green",
"role": "admin",
"job_title": "Director of Engineering",
"avatar_url": "https://secure.gravatar.com/avatar/1d1a39d4635208d5664082a6c654a73f.png?d=mm&r=PG",
"description": "I'm the boss",
"license": {
"id": "PTDVERC",
"type": "license_reference"
}
}
}
}
}
}
},
"description": "The user to be created."
},
"responses": {
"201": {
"description": "The user that was created.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"user": {
"$ref": "#/components/schemas/User"
}
},
"required": [
"user"
]
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"user": {
"id": "PXPGF42",
"type": "user",
"summary": "Earline Greenholt",
"self": "https://api.pagerduty.com/users/PXPGF42",
"html_url": "https://subdomain.pagerduty.com/users/PXPGF42",
"name": "Earline Greenholt",
"email": "125.greenholt.earline@graham.name",
"time_zone": "America/Lima",
"color": "green",
"role": "admin",
"avatar_url": "https://secure.gravatar.com/avatar/a8b714a39626f2444ee05990b078995f.png?d=mm&r=PG",
"description": "I'm the boss",
"invitation_sent": false,
"contact_methods": [
{
"id": "PTDVERC",
"type": "email_contact_method_reference",
"summary": "Default",
"self": "https://api.pagerduty.com/users/PXPGF42/contact_methods/PTDVERC"
}
],
"notification_rules": [
{
"id": "P8GRWKK",
"type": "assignment_notification_rule_reference",
"summary": "Default",
"self": "https://api.pagerduty.com/users/PXPGF42/notification_rules/P8GRWKK",
"html_url": null
}
],
"job_title": "Director of Engineering",
"teams": [
{
"id": "PQ9K7I8",
"type": "team_reference",
"summary": "Engineering",
"self": "https://api.pagerduty.com/teams/PQ9K7I8",
"html_url": "https://subdomain.pagerduty.com/teams/PQ9K7I8"
}
]
}
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"402": {
"$ref": "#/components/responses/PaymentRequired"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
}
}
}
},
"/users/{id}": {
"description": "Manage a user.",
"get": {
"x-pd-requires-scope": "users.read",
"tags": [
"Users"
],
"operationId": "getUser",
"description": "Get details about an existing user.\n\nUsers are members of a PagerDuty account that have the ability to interact with Incidents and other data on the account.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#users)\n\nScoped OAuth requires: `users.read`\n",
"summary": "Get a user",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/header_Content-Type"
},
{
"$ref": "#/components/parameters/id"
},
{
"$ref": "#/components/parameters/include_user"
}
],
"responses": {
"200": {
"description": "The user requested.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"user": {
"$ref": "#/components/schemas/User"
}
},
"required": [
"user"
]
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"user": {
"id": "PXPGF42",
"type": "user",
"summary": "Earline Greenholt",
"self": "https://api.pagerduty.com/users/PXPGF42",
"html_url": "https://subdomain.pagerduty.com/users/PXPGF42",
"name": "Earline Greenholt",
"email": "125.greenholt.earline@graham.name",
"time_zone": "America/Lima",
"color": "green",
"role": "admin",
"avatar_url": "https://secure.gravatar.com/avatar/a8b714a39626f2444ee05990b078995f.png?d=mm&r=PG",
"description": "I'm the boss",
"invitation_sent": false,
"contact_methods": [
{
"id": "PTDVERC",
"type": "email_contact_method_reference",
"summary": "Default",
"self": "https://api.pagerduty.com/users/PXPGF42/contact_methods/PTDVERC"
}
],
"notification_rules": [
{
"id": "P8GRWKK",
"type": "assignment_notification_rule_reference",
"summary": "Default",
"self": "https://api.pagerduty.com/users/PXPGF42/notification_rules/P8GRWKK",
"html_url": null
}
],
"job_title": "Director of Engineering",
"teams": [
{
"id": "PQ9K7I8",
"type": "team_reference",
"summary": "Engineering",
"self": "https://api.pagerduty.com/teams/PQ9K7I8",
"html_url": "https://subdomain.pagerduty.com/teams/PQ9K7I8"
}
]
}
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
}
}
},
"delete": {
"x-pd-requires-scope": "users.write",
"tags": [
"Users"
],
"operationId": "deleteUser",
"description": "Remove an existing user.\n\nReturns 400 if the user has assigned incidents unless your [pricing plan](https://www.pagerduty.com/pricing) has the `offboarding` feature and the account is [configured](https://support.pagerduty.com/docs/offboarding#section-additional-configurations) appropriately.\n\nNote that the incidents reassignment process is asynchronous and has no guarantee to complete before the api call return.\n\n[*Learn more about `offboarding` feature*](https://support.pagerduty.com/docs/offboarding).\n\nUsers are members of a PagerDuty account that have the ability to interact with Incidents and other data on the account.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#users)\n\nScoped OAuth requires: `users.write`\n",
"summary": "Delete a user",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/header_Content-Type"
},
{
"$ref": "#/components/parameters/id"
}
],
"responses": {
"204": {
"description": "The user was deleted successfully."
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
}
}
},
"put": {
"x-pd-requires-scope": "users.write",
"tags": [
"Users"
],
"operationId": "updateUser",
"description": "Update an existing user.\n\nUsers are members of a PagerDuty account that have the ability to interact with Incidents and other data on the account.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#users)\n\nScoped OAuth requires: `users.write`\n",
"summary": "Update a user",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/header_Content-Type"
},
{
"$ref": "#/components/parameters/id"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"user": {
"allOf": [
{
"$ref": "#/components/schemas/User"
},
{
"properties": {
"license": {
"allOf": [
{
"description": "The License assigned to the User"
},
{
"$ref": "#/components/schemas/LicenseReference"
}
]
}
}
}
]
}
},
"required": [
"user"
]
},
"examples": {
"request": {
"summary": "Request Example",
"value": {
"user": {
"type": "user",
"name": "Earline Greenholt",
"email": "125.greenholt.earline@graham.name",
"time_zone": "America/Lima",
"color": "green",
"role": "admin",
"job_title": "Director of Engineering",
"avatar_url": "https://secure.gravatar.com/avatar/1d1a39d4635208d5664082a6c654a73f.png?d=mm&r=PG",
"description": "I'm the boss",
"license": {
"id": "PTDVERC",
"type": "license_reference"
}
}
}
}
}
}
},
"description": "The user to be updated."
},
"responses": {
"200": {
"description": "The user that was updated.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"user": {
"$ref": "#/components/schemas/User"
}
},
"required": [
"user"
]
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"user": {
"id": "PXPGF42",
"type": "user",
"summary": "Earline Greenholt",
"self": "https://api.pagerduty.com/users/PXPGF42",
"html_url": "https://subdomain.pagerduty.com/users/PXPGF42",
"name": "Earline Greenholt",
"email": "125.greenholt.earline@graham.name",
"time_zone": "America/Lima",
"color": "green",
"role": "admin",
"avatar_url": "https://secure.gravatar.com/avatar/a8b714a39626f2444ee05990b078995f.png?d=mm&r=PG",
"description": "I'm the boss",
"invitation_sent": false,
"contact_methods": [
{
"id": "PTDVERC",
"type": "email_contact_method_reference",
"summary": "Default",
"self": "https://api.pagerduty.com/users/PXPGF42/contact_methods/PTDVERC"
}
],
"notification_rules": [
{
"id": "P8GRWKK",
"type": "assignment_notification_rule_reference",
"summary": "Default",
"self": "https://api.pagerduty.com/users/PXPGF42/notification_rules/P8GRWKK",
"html_url": null
}
],
"job_title": "Director of Engineering",
"teams": [
{
"id": "PQ9K7I8",
"type": "team_reference",
"summary": "Engineering",
"self": "https://api.pagerduty.com/teams/PQ9K7I8",
"html_url": "https://subdomain.pagerduty.com/teams/PQ9K7I8"
}
]
}
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"402": {
"$ref": "#/components/responses/PaymentRequired"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
}
}
}
},
"/users/{id}/audit/records": {
"description": "List audit records of changes made to the user.",
"get": {
"x-pd-requires-scope": "audit_records.read",
"tags": [
"Users"
],
"operationId": "listUsersAuditRecords",
"summary": "List audit records for a user",
"description": "The response will include audit records with changes that are made to the identified user not changes made by the identified user.\n\n\nThe returned records are sorted by the `execution_time` from newest to oldest.\n\nSee [`Cursor-based pagination`](https://developer.pagerduty.com/docs/rest-api-v2/pagination/) for instructions on how to paginate through the result set.\n\nFor more information see the [Audit API Document](https://developer.pagerduty.com/docs/rest-api-v2/audit-records-api/).\n\nScoped OAuth requires: `audit_records.read`\n",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/header_Content-Type"
},
{
"$ref": "#/components/parameters/id"
},
{
"$ref": "#/components/parameters/cursor_limit"
},
{
"$ref": "#/components/parameters/cursor_cursor"
},
{
"$ref": "#/components/parameters/audit_since"
},
{
"$ref": "#/components/parameters/audit_until"
}
],
"responses": {
"200": {
"description": "Records matching the query criteria.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AuditRecordResponseSchema"
},
"examples": {
"response": {
"$ref": "#/components/examples/AuditRecordUserResponse"
}
}
}
}
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"402": {
"$ref": "#/components/responses/PaymentRequired"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
},
"500": {
"$ref": "#/components/responses/InternalServerError"
}
}
}
},
"/users/{id}/contact_methods": {
"description": "List a user's contact methods.",
"get": {
"x-pd-requires-scope": "users:contact_methods.read",
"tags": [
"Users"
],
"operationId": "getUserContactMethods",
"description": "List contact methods of your PagerDuty user.\n\nUsers are members of a PagerDuty account that have the ability to interact with Incidents and other data on the account.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#users)\n\nScoped OAuth requires: `users:contact_methods.read`\n",
"summary": "List a user's contact methods",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/header_Content-Type"
},
{
"$ref": "#/components/parameters/id"
}
],
"responses": {
"200": {
"description": "A list of contact methods.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"contact_methods": {
"type": "array",
"items": {
"oneOf": [
{
"$ref": "#/components/schemas/PhoneContactMethod"
},
{
"$ref": "#/components/schemas/PushContactMethod"
},
{
"$ref": "#/components/schemas/EmailContactMethod"
}
]
}
}
}
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"contact_methods": [
{
"id": "PXPGF42",
"type": "email_contact_method",
"summary": "Work",
"self": "https://api.pagerduty.com/users/PXPGF42/contact_method/PXPGF42",
"label": "Work",
"address": "grady.haylie.126@hickle.net",
"send_short_email": false
}
]
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
}
}
},
"post": {
"x-pd-requires-scope": "users:contact_methods.write",
"tags": [
"Users"
],
"operationId": "createUserContactMethod",
"description": "Create a new contact method for the User.\n\nUsers are members of a PagerDuty account that have the ability to interact with Incidents and other data on the account.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#users)\n\nScoped OAuth requires: `users:contact_methods.write`\n",
"summary": "Create a user contact method",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/header_Content-Type"
},
{
"$ref": "#/components/parameters/id"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"contact_method": {
"oneOf": [
{
"$ref": "#/components/schemas/PhoneContactMethod"
},
{
"$ref": "#/components/schemas/PushContactMethod"
},
{
"$ref": "#/components/schemas/EmailContactMethod"
}
]
}
},
"required": [
"contact_method"
]
},
"examples": {
"request": {
"summary": "Request Example",
"value": {
"contact_method": {
"id": "PXPGF42",
"type": "email_contact_method",
"summary": "Work",
"self": "https://api.pagerduty.com/users/PXPGF42/contact_method/PXPGF42",
"label": "Work",
"address": "grady.haylie.126@hickle.net",
"send_short_email": false
}
}
}
}
}
},
"description": "The contact method to be created."
},
"responses": {
"201": {
"description": "The contact method that was created.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"contact_method": {
"oneOf": [
{
"$ref": "#/components/schemas/PhoneContactMethod"
},
{
"$ref": "#/components/schemas/PushContactMethod"
},
{
"$ref": "#/components/schemas/EmailContactMethod"
}
]
}
}
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"contact_method": {
"id": "PXPGF42",
"type": "email_contact_method",
"summary": "Work",
"self": "https://api.pagerduty.com/users/PXPGF42/contact_method/PXPGF42",
"label": "Work",
"address": "grady.haylie.126@hickle.net",
"send_short_email": false
}
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
}
}
}
},
"/users/{id}/contact_methods/{contact_method_id}": {
"description": "Manage a user's contact method.",
"get": {
"x-pd-requires-scope": "users:contact_methods.read",
"tags": [
"Users"
],
"operationId": "getUserContactMethod",
"description": "Get details about a User's contact method.\n\nUsers are members of a PagerDuty account that have the ability to interact with Incidents and other data on the account.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#users)\n\nScoped OAuth requires: `users:contact_methods.read`\n",
"summary": "Get a user's contact method",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/header_Content-Type"
},
{
"$ref": "#/components/parameters/id"
},
{
"$ref": "#/components/parameters/user_contact_method_id"
}
],
"responses": {
"200": {
"description": "The user's contact method requested.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"contact_method": {
"oneOf": [
{
"$ref": "#/components/schemas/PhoneContactMethod"
},
{
"$ref": "#/components/schemas/PushContactMethod"
},
{
"$ref": "#/components/schemas/EmailContactMethod"
}
]
}
}
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"contact_method": {
"id": "PXPGF42",
"type": "email_contact_method",
"summary": "Work",
"self": "https://api.pagerduty.com/users/PXPGF42/contact_method/PXPGF42",
"label": "Work",
"address": "grady.haylie.126@hickle.net",
"send_short_email": false
}
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
}
}
},
"delete": {
"x-pd-requires-scope": "users:contact_methods.write",
"tags": [
"Users"
],
"operationId": "deleteUserContactMethod",
"description": "Remove a user's contact method.\n\nUsers are members of a PagerDuty account that have the ability to interact with Incidents and other data on the account.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#users)\n\nScoped OAuth requires: `users:contact_methods.write`\n",
"summary": "Delete a user's contact method",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/header_Content-Type"
},
{
"$ref": "#/components/parameters/id"
},
{
"$ref": "#/components/parameters/user_contact_method_id"
}
],
"responses": {
"204": {
"description": "The contact method was deleted successfully."
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
}
}
},
"put": {
"x-pd-requires-scope": "users:contact_methods.write",
"tags": [
"Users"
],
"operationId": "updateUserContactMethod",
"description": "Update a User's contact method.\n\nUsers are members of a PagerDuty account that have the ability to interact with Incidents and other data on the account.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#users)\n\nScoped OAuth requires: `users:contact_methods.write`\n",
"summary": "Update a user's contact method",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/header_Content-Type"
},
{
"$ref": "#/components/parameters/id"
},
{
"$ref": "#/components/parameters/user_contact_method_id"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"contact_method": {
"oneOf": [
{
"$ref": "#/components/schemas/PhoneContactMethod"
},
{
"$ref": "#/components/schemas/PushContactMethod"
},
{
"$ref": "#/components/schemas/EmailContactMethod"
}
]
}
},
"required": [
"contact_method"
]
},
"examples": {
"request": {
"summary": "Request Example",
"value": {
"contact_method": {
"id": "PXPGF42",
"type": "email_contact_method",
"summary": "Work",
"self": "https://api.pagerduty.com/users/PXPGF42/contact_method/PXPGF42",
"label": "Work",
"address": "grady.haylie.126@hickle.net",
"send_short_email": false
}
}
}
}
}
},
"description": "The user's contact method to be updated."
},
"responses": {
"200": {
"description": "The user's contact method that was updated.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"contact_method": {
"oneOf": [
{
"$ref": "#/components/schemas/PhoneContactMethod"
},
{
"$ref": "#/components/schemas/PushContactMethod"
},
{
"$ref": "#/components/schemas/EmailContactMethod"
}
]
}
}
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"contact_method": {
"id": "PXPGF42",
"type": "email_contact_method",
"summary": "Work",
"self": "https://api.pagerduty.com/users/PXPGF42/contact_method/PXPGF42",
"label": "Work",
"address": "grady.haylie.126@hickle.net",
"send_short_email": false
}
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
}
}
}
},
"/users/{id}/license": {
"description": "The License allocated to a User",
"get": {
"x-pd-requires-scope": "licenses.read",
"tags": [
"Users"
],
"operationId": "getUserLicense",
"description": "Get the License allocated to a User\n\nScoped OAuth requires: `licenses.read`\n",
"summary": "Get the License allocated to a User",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/header_Content-Type"
},
{
"$ref": "#/components/parameters/id"
}
],
"responses": {
"200": {
"description": "The License allocated to the User",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"license": {
"$ref": "#/components/schemas/LicenseWithCounts/allOf/0"
}
},
"required": [
"license"
]
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"license": {
"id": "PIP248G",
"name": "Business (Full User)",
"description": "Event Intelligence",
"valid_roles": [
"owner",
"admin",
"user",
"limited_user",
"observer",
"restricted_access"
],
"role_group": "FullUser",
"summary": "Business (Full User)",
"type": "license",
"self": null,
"html_url": null
}
}
}
}
}
}
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
}
}
}
},
"/users/{id}/notification_rules": {
"description": "List a user's notification rules.",
"get": {
"x-pd-requires-scope": "users:contact_methods.read",
"tags": [
"Users"
],
"operationId": "getUserNotificationRules",
"description": "List notification rules of your PagerDuty user.\n\nUsers are members of a PagerDuty account that have the ability to interact with Incidents and other data on the account.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#users)\n\nScoped OAuth requires: `users:contact_methods.read`\n",
"summary": "List a user's notification rules",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/header_Content-Type"
},
{
"$ref": "#/components/parameters/id"
},
{
"$ref": "#/components/parameters/include_notification_rules"
},
{
"$ref": "#/components/parameters/urgency"
}
],
"responses": {
"200": {
"description": "A list of notification rules.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"notification_rules": {
"type": "array",
"items": {
"$ref": "#/components/schemas/NotificationRule"
}
}
},
"required": [
"notification_rules"
]
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"notification_rules": [
{
"id": "PXPGF42",
"type": "assignment_notification_rule",
"summary": "Work",
"self": "https://api.pagerduty.com/users/PXPGF42/notification_rules/PPSCXAN",
"start_delay_in_minutes": 0,
"contact_method": {
"id": "PXPGF42",
"type": "email_contact_method_reference",
"summary": "Work",
"self": "https://api.pagerduty.com/users/PXPGF42/contact_methods/PXPGF42",
"html_url": null
},
"created_at": "2016-02-01T16:06:27-05:00",
"urgency": "high"
}
]
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
}
}
},
"post": {
"x-pd-requires-scope": "users:contact_methods.write",
"tags": [
"Users"
],
"operationId": "createUserNotificationRule",
"description": "Create a new notification rule.\n\nUsers are members of a PagerDuty account that have the ability to interact with Incidents and other data on the account.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#users)\n\nScoped OAuth requires: `users:contact_methods.write`\n",
"summary": "Create a user notification rule",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/header_Content-Type"
},
{
"$ref": "#/components/parameters/id"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"notification_rule": {
"$ref": "#/components/schemas/NotificationRule"
}
},
"required": [
"notification_rule"
]
},
"examples": {
"request": {
"summary": "Request Example",
"value": {
"notification_rule": {
"type": "assignment_notification_rule",
"start_delay_in_minutes": 0,
"contact_method": {
"id": "PXPGF42",
"type": "email_contact_method_reference"
},
"urgency": "high"
}
}
}
}
}
},
"description": "The notification rule to be created."
},
"responses": {
"201": {
"description": "The notification rule that was created.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"notification_rule": {
"$ref": "#/components/schemas/NotificationRule"
}
},
"required": [
"notification_rule"
]
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"notification_rule": {
"id": "PXPGF42",
"type": "assignment_notification_rule",
"summary": "Work",
"self": "https://api.pagerduty.com/users/PXPGF42/notification_rules/PPSCXAN",
"start_delay_in_minutes": 0,
"contact_method": {
"id": "PXPGF42",
"type": "email_contact_method_reference",
"summary": "Work",
"self": "https://api.pagerduty.com/users/PXPGF42/contact_methods/PXPGF42",
"html_url": null
},
"created_at": "2016-02-01T16:06:27-05:00",
"urgency": "high"
}
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"402": {
"$ref": "#/components/responses/PaymentRequired"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
}
}
}
},
"/users/{id}/notification_rules/{notification_rule_id}": {
"description": "Manage a user's notification rule.",
"get": {
"x-pd-requires-scope": "users:contact_methods.read",
"tags": [
"Users"
],
"operationId": "getUserNotificationRule",
"description": "Get details about a user's notification rule.\n\nUsers are members of a PagerDuty account that have the ability to interact with Incidents and other data on the account.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#users)\n\nScoped OAuth requires: `users:contact_methods.read`\n",
"summary": "Get a user's notification rule",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/header_Content-Type"
},
{
"$ref": "#/components/parameters/id"
},
{
"$ref": "#/components/parameters/user_notification_rule_id"
},
{
"$ref": "#/components/parameters/include_notification_rules"
}
],
"responses": {
"200": {
"description": "The user's notification rule requested.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"notification_rule": {
"$ref": "#/components/schemas/NotificationRule"
}
},
"required": [
"notification_rule"
]
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"notification_rule": {
"id": "PXPGF42",
"type": "assignment_notification_rule",
"summary": "Work",
"self": "https://api.pagerduty.com/users/PXPGF42/notification_rules/PPSCXAN",
"start_delay_in_minutes": 0,
"contact_method": {
"id": "PXPGF42",
"type": "email_contact_method_reference",
"summary": "Work",
"self": "https://api.pagerduty.com/users/PXPGF42/contact_methods/PXPGF42"
},
"created_at": "2016-02-01T16:06:27-05:00",
"urgency": "high"
}
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
}
}
},
"delete": {
"x-pd-requires-scope": "users:contact_methods.write",
"tags": [
"Users"
],
"operationId": "deleteUserNotificationRule",
"description": "Remove a user's notification rule.\n\nUsers are members of a PagerDuty account that have the ability to interact with Incidents and other data on the account.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#users)\n\nScoped OAuth requires: `users:contact_methods.write`\n",
"summary": "Delete a user's notification rule",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/header_Content-Type"
},
{
"$ref": "#/components/parameters/id"
},
{
"$ref": "#/components/parameters/user_notification_rule_id"
}
],
"responses": {
"204": {
"description": "The notification rule was deleted successfully."
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
}
}
},
"put": {
"x-pd-requires-scope": "users:contact_methods.write",
"tags": [
"Users"
],
"operationId": "updateUserNotificationRule",
"description": "Update a user's notification rule.\n\nUsers are members of a PagerDuty account that have the ability to interact with Incidents and other data on the account.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#users)\n\nScoped OAuth requires: `users:contact_methods.write`\n",
"summary": "Update a user's notification rule",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/header_Content-Type"
},
{
"$ref": "#/components/parameters/id"
},
{
"$ref": "#/components/parameters/user_notification_rule_id"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"notification_rule": {
"$ref": "#/components/schemas/NotificationRule"
}
},
"required": [
"notification_rule"
]
},
"examples": {
"request": {
"summary": "Request Example",
"value": {
"notification_rule": {
"type": "assignment_notification_rule",
"start_delay_in_minutes": 0,
"contact_method": {
"id": "PXPGF42",
"type": "email_contact_method_reference"
},
"urgency": "high"
}
}
}
}
}
},
"description": "The user's notification rule to be updated."
},
"responses": {
"200": {
"description": "The user's notification rule that was updated.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"notification_rule": {
"$ref": "#/components/schemas/NotificationRule"
}
}
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"notification_rule": {
"id": "PXPGF42",
"type": "assignment_notification_rule",
"summary": "Work",
"self": "https://api.pagerduty.com/users/PXPGF42/notification_rules/PPSCXAN",
"start_delay_in_minutes": 0,
"contact_method": {
"id": "PXPGF42",
"type": "email_contact_method_reference",
"summary": "Work",
"self": "https://api.pagerduty.com/users/PXPGF42/contact_methods/PXPGF42"
},
"created_at": "2016-02-01T16:06:27-05:00",
"urgency": "high"
}
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"402": {
"$ref": "#/components/responses/PaymentRequired"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
}
}
}
},
"/users/{id}/notification_subscriptions": {
"get": {
"x-pd-requires-scope": "subscribers.read",
"tags": [
"Users"
],
"operationId": "getUserNotificationSubscriptions",
"description": "Retrieve a list of Notification Subscriptions the given User has.\n\n\n> Users must be added through `POST /users/{id}/notification_subscriptions` to be returned from this endpoint.\n\nScoped OAuth requires: `subscribers.read`\n",
"summary": "List Notification Subscriptions",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/id"
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"allOf": [
{
"$ref": "#/components/schemas/Pagination"
},
{
"type": "object",
"properties": {
"subscriptions": {
"type": "array",
"items": {
"type": "object",
"properties": {
"subscription": {
"$ref": "#/components/schemas/NotificationSubscription"
},
"subscribable_name": {
"type": "string",
"nullable": true,
"description": "The name of the subscribable"
}
}
}
}
},
"required": [
"subscriptions"
]
}
]
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"subscriptions": [
{
"subscription": {
"subscriber_id": "PD1234",
"subscriber_type": "user",
"subscribable_id": "PD1234",
"subscribable_type": "incident",
"subscribable_name": null,
"account_id": "PD1234"
}
},
{
"subscription": {
"subscriber_id": "PD1234",
"subscriber_type": "user",
"subscribable_id": "PD1234",
"subscribable_type": "business_service",
"subscribable_name": "business service name",
"account_id": "PD1234"
}
}
],
"limit": 2,
"offset": 0,
"total": 1000,
"more": true
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
}
}
},
"post": {
"x-pd-requires-scope": "subscribers.write",
"summary": "Create Notification Subcriptions",
"operationId": "createUserNotificationSubscriptions",
"tags": [
"Users"
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"subscriptions": {
"type": "array",
"items": {
"$ref": "#/components/schemas/NotificationSubscriptionWithContext"
}
}
}
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"subscriptions": [
{
"account_id": "PD1234",
"subscribable_id": "PD1234",
"subscribable_type": "incident",
"subscriber_id": "PD1234",
"subscriber_type": "user",
"result": "success"
},
{
"account_id": "PD1234",
"subscribable_id": "PD1234",
"subscribable_type": "business_service",
"subscriber_id": "PD1234",
"subscriber_type": "user",
"result": "duplicate"
},
{
"account_id": "PD1234",
"subscribable_id": "PD1235",
"subscribable_type": "business_service",
"subscriber_id": "PD1234",
"subscriber_type": "user",
"result": "unauthorized"
}
]
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"422": {
"$ref": "#/components/responses/UnprocessableEntity"
}
},
"description": "Create new Notification Subscriptions for the given User.\n\nScoped OAuth requires: `subscribers.write`\n",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/id"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"subscribables": {
"type": "array",
"uniqueItems": true,
"minItems": 1,
"items": {
"$ref": "#/components/schemas/NotificationSubscribable"
}
}
},
"required": [
"subscribables"
]
},
"examples": {
"request": {
"summary": "Request Example",
"value": {
"subscribables": [
{
"subscribable_type": "incident",
"subscribable_id": "PD1234"
},
{
"subscribable_type": "business_service",
"subscribable_id": "PD1234"
},
{
"subscribable_type": "business_service",
"subscribable_id": "PD1235"
}
]
}
}
}
}
},
"description": "The entities to subscribe to."
}
}
},
"/users/{id}/notification_subscriptions/unsubscribe": {
"post": {
"x-pd-requires-scope": "subscribers.write",
"summary": "Remove Notification Subscriptions",
"tags": [
"Users"
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"deleted_count": {
"type": "number"
},
"unauthorized_count": {
"type": "number"
},
"non_existent_count": {
"type": "number"
}
},
"required": [
"deleted_count",
"unauthorized_count",
"non_existent_count"
]
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"deleted_count": 1,
"unauthorized_count": 1,
"non_existent_count": 0
}
}
}
}
}
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"422": {
"$ref": "#/components/responses/UnprocessableEntity"
}
},
"operationId": "unsubscribeUserNotificationSubscriptions",
"description": "Unsubscribe the given User from Notifications on the matching Subscribable entities.\n\nScoped OAuth requires: `subscribers.write`\n",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/id"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"subscribables": {
"type": "array",
"uniqueItems": true,
"minItems": 1,
"items": {
"$ref": "#/components/schemas/NotificationSubscribable"
}
}
},
"required": [
"subscribables"
]
},
"examples": {
"request": {
"summary": "Response Example",
"value": {
"subscribables": [
{
"subscribable_type": "incident",
"subscribable_id": "PD1234"
},
{
"subscribable_type": "business_service",
"subscribable_id": "PD1234"
}
]
}
}
}
}
},
"description": "The entities to unsubscribe from."
}
}
},
"/users/{id}/oncall_handoff_notification_rules": {
"description": "List a User's Oncall Handoff Notification Rules.",
"get": {
"tags": [
"Users"
],
"x-pd-requires-scope": "users.read",
"operationId": "getUserHandoffNotificationRules",
"description": "List Handoff Notification Rules of your PagerDuty User.\nUsers are members of a PagerDuty account that have the ability to interact with Incidents and other data on the account.\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#users)\n\nScoped OAuth requires: `users.read`\n",
"summary": "List a User's Handoff Notification Rules",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/header_Content-Type"
},
{
"$ref": "#/components/parameters/id"
}
],
"responses": {
"200": {
"description": "A list of Handoff Notification Rules.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"oncall_handoff_notification_rules": {
"type": "array",
"items": {
"$ref": "#/components/schemas/HandoffNotificationRule"
}
}
},
"required": [
"oncall_handoff_notification_rules"
]
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"oncall_handoff_notification_rules": [
{
"id": "PXPGF42",
"handoff_type": "both",
"notify_advance_in_minutes": 0,
"contact_method": {
"id": "PXPGF42",
"type": "email_contact_method_reference",
"summary": "Work",
"self": "https://api.pagerduty.com/users/PXPGF42/contact_methods/PXPGF42"
}
}
]
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
}
}
},
"post": {
"tags": [
"Users"
],
"x-pd-requires-scope": "users.write",
"operationId": "createUserHandoffNotificationRule",
"description": "Create a new Handoff Notification Rule.\nUsers are members of a PagerDuty account that have the ability to interact with Incidents and other data on the account.\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#users)\n\nScoped OAuth requires: `users.write`\n",
"summary": "Create a User Handoff Notification Rule",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/header_Content-Type"
},
{
"$ref": "#/components/parameters/id"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"oncall_handoff_notification_rule": {
"$ref": "#/components/schemas/HandoffNotificationRule"
}
},
"required": [
"oncall_handoff_notification_rule"
]
},
"examples": {
"request": {
"summary": "Request Example",
"value": {
"oncall_handoff_notification_rule": {
"id": "PXPGF43",
"handoff_type": "both",
"notify_advance_in_minutes": 180,
"contact_method": {
"id": "PXPGF42",
"type": "email_contact_method_reference"
}
}
}
}
}
}
},
"description": "The Handoff Notification Rule to be created."
},
"responses": {
"201": {
"description": "The Handoff Notification Rule that was created.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"oncall_handoff_notification_rule": {
"$ref": "#/components/schemas/HandoffNotificationRule"
}
},
"required": [
"oncall_handoff_notification_rule"
]
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"oncall_handoff_notification_rule": {
"id": "PXPGF42",
"handoff_type": "both",
"notify_advance_in_minutes": 180,
"contact_method": {
"id": "PXPGF42",
"type": "email_contact_method_reference",
"summary": "Work",
"self": "https://api.pagerduty.com/users/PXPGF42/contact_methods/PXPGF42"
}
}
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"402": {
"$ref": "#/components/responses/PaymentRequired"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
}
}
}
},
"/users/{id}/oncall_handoff_notification_rules/{oncall_handoff_notification_rule_id}": {
"description": "Manage a User's Handoff Notification Rule.",
"get": {
"tags": [
"Users"
],
"x-pd-requires-scope": "users.read",
"operationId": "getUserHandoffNotifiactionRule",
"description": "Get details about a User's Handoff Notification Rule.\nUsers are members of a PagerDuty account that have the ability to interact with Incidents and other data on the account.\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#users)\n\nScoped OAuth requires: `users.read`\n",
"summary": "Get a user's handoff notification rule",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/header_Content-Type"
},
{
"$ref": "#/components/parameters/id"
},
{
"$ref": "#/components/parameters/oncall_handoff_notification_rule_id"
}
],
"responses": {
"200": {
"description": "The user's handoff notification rule requested.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"oncall_handoff_notification_rule": {
"$ref": "#/components/schemas/HandoffNotificationRule"
}
},
"required": [
"oncall_handoff_notification_rule"
]
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"oncall_handoff_notification_rule": {
"id": "PXPGF42",
"handoff_type": "both",
"notify_advance_in_minutes": 60,
"contact_method": {
"id": "PXPGF42",
"type": "email_contact_method_reference",
"summary": "Work",
"self": "https://api.pagerduty.com/users/PXPGF42/contact_methods/PXPGF42"
}
}
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
}
}
},
"delete": {
"tags": [
"Users"
],
"x-pd-requires-scope": "users.write",
"operationId": "deleteUserHandoffNotificationRule",
"description": "Remove a User's Handoff Notification Rule.\nUsers are members of a PagerDuty account that have the ability to interact with Incidents and other data on the account.\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#users)\n\nScoped OAuth requires: `users.write`\n",
"summary": "Delete a User's Handoff Notification rule",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/header_Content-Type"
},
{
"$ref": "#/components/parameters/id"
},
{
"$ref": "#/components/parameters/oncall_handoff_notification_rule_id"
}
],
"responses": {
"204": {
"description": "The handoff notification rule was deleted successfully."
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
}
}
},
"put": {
"tags": [
"Users"
],
"x-pd-requires-scope": "users.write",
"operationId": "updateUserHandoffNotification",
"description": "Update a User's Handoff Notification Rule.\nUsers are members of a PagerDuty account that have the ability to interact with Incidents and other data on the account.\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#users)\n\nScoped OAuth requires: `users.write`\n",
"summary": "Update a User's Handoff Notification Rule",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/header_Content-Type"
},
{
"$ref": "#/components/parameters/id"
},
{
"$ref": "#/components/parameters/oncall_handoff_notification_rule_id"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"oncall_handoff_notification_rule": {
"$ref": "#/components/schemas/HandoffNotificationRule"
}
},
"required": [
"oncall_handoff_notification_rule"
]
},
"examples": {
"request": {
"summary": "Request Example",
"value": {
"oncall_handoff_notification_rule": {
"id": "PXPGF42",
"handoff_type": "both",
"notify_advance_in_minutes": 60,
"contact_method": {
"id": "PXPGF42",
"type": "email_contact_method_reference"
}
}
}
}
}
}
},
"description": "The User's Handoff Notification Rule to be updated."
},
"responses": {
"200": {
"description": "The User's Handoff Notification Rule that was updated.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"oncall_handoff_notification_rule": {
"$ref": "#/components/schemas/HandoffNotificationRule"
}
}
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"oncall_handoff_notification_rule": {
"id": "PXPGF42",
"handoff_type": "oncall",
"notify_advance_in_minutes": 30,
"contact_method": {
"id": "PXPGF42",
"type": "email_contact_method_reference",
"summary": "Work",
"self": "https://api.pagerduty.com/users/PXPGF42/contact_methods/PXPGF42"
}
}
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"402": {
"$ref": "#/components/responses/PaymentRequired"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
}
}
}
},
"/users/{id}/sessions": {
"description": "List a user's active sessions.",
"get": {
"x-pd-requires-scope": "users:sessions.read",
"tags": [
"Users"
],
"operationId": "getUserSessions",
"description": "List active sessions of a PagerDuty user.\n\nBeginning November 2021, active sessions no longer includes newly issued OAuth tokens.\n\nUsers are members of a PagerDuty account that have the ability to interact with Incidents and other data on the account.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#users)\n\nScoped OAuth requires: `users:sessions.read`\n",
"summary": "List a user's active sessions",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/header_Content-Type"
},
{
"$ref": "#/components/parameters/id"
}
],
"responses": {
"200": {
"description": "A list of the user's active sessions.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"user_sessions": {
"type": "array",
"items": {
"$ref": "#/components/schemas/UserSession"
}
}
},
"required": [
"user_sessions"
]
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"user_sessions": [
{
"id": "PXPGF42",
"user_id": "PXPGF42",
"created_at": "2018-10-06T21:30:42Z",
"summary": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.131 Safari/537.36",
"type": "browser"
}
]
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
}
}
},
"delete": {
"x-pd-requires-scope": "users:sessions.write",
"tags": [
"Users"
],
"operationId": "deleteUserSessions",
"description": "Delete all user sessions.\n\nBeginning November 2021, user sessions no longer includes newly issued OAuth tokens.\n\nUsers are members of a PagerDuty account that have the ability to interact with Incidents and other data on the account.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#users)\n\nScoped OAuth requires: `users:sessions.write`\n",
"summary": "Delete all user sessions",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/header_Content-Type"
},
{
"$ref": "#/components/parameters/id"
}
],
"responses": {
"204": {
"description": "The user sessions were all deleted successfully."
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
}
}
}
},
"/users/{id}/sessions/{type}/{session_id}": {
"description": "Manage a user's active session.",
"get": {
"x-pd-requires-scope": "users:sessions.read",
"tags": [
"Users"
],
"operationId": "getUserSession",
"description": "Get details about a user's session.\n\nBeginning November 2021, user sessions no longer includes newly issued OAuth tokens.\n\nUsers are members of a PagerDuty account that have the ability to interact with Incidents and other data on the account.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#users)\n\nScoped OAuth requires: `users:sessions.read`\n",
"summary": "Get a user's session",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/header_Content-Type"
},
{
"$ref": "#/components/parameters/id"
},
{
"$ref": "#/components/parameters/type"
},
{
"$ref": "#/components/parameters/session_id"
}
],
"responses": {
"200": {
"description": "The user's session requested.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"user_session": {
"$ref": "#/components/schemas/UserSession"
}
},
"required": [
"user_session"
]
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"user_session": {
"id": "PXPGF42",
"user_id": "PXPGF42",
"created_at": "2018-10-06T21:30:42Z",
"summary": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.131 Safari/537.36",
"type": "browser"
}
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
}
}
},
"delete": {
"x-pd-requires-scope": "users:sessions.write",
"tags": [
"Users"
],
"operationId": "deleteUserSession",
"description": "Delete a user's session.\n\nBeginning November 2021, user sessions no longer includes newly issued OAuth tokens.\n\nUsers are members of a PagerDuty account that have the ability to interact with Incidents and other data on the account.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#users)\n\nScoped OAuth requires: `users:sessions.write`\n",
"summary": "Delete a user's session",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/header_Content-Type"
},
{
"$ref": "#/components/parameters/id"
},
{
"$ref": "#/components/parameters/type"
},
{
"$ref": "#/components/parameters/session_id"
}
],
"responses": {
"204": {
"description": "The user session was deleted successfully."
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
}
}
}
},
"/users/{id}/status_update_notification_rules": {
"description": "List a user's status update notification rules.",
"get": {
"x-pd-requires-scope": "users.read",
"tags": [
"Users"
],
"operationId": "getUserStatusUpdateNotificationRules",
"description": "List status update notification rules of your PagerDuty user.\n\nUsers are members of a PagerDuty account that have the ability to interact with Incidents and other data on the account.\n\n\n> ### Early Access\n> This endpoint is in Early Access and may change at any time. You must pass in the X-EARLY-ACCESS header to access it.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#users)\n\nScoped OAuth requires: `users.read`\n",
"summary": "List a user's status update notification rules",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/header_Content-Type"
},
{
"$ref": "#/components/parameters/id"
},
{
"$ref": "#/components/parameters/early_access_status-update-notification-rules"
},
{
"$ref": "#/components/parameters/include_notification_rules"
}
],
"responses": {
"200": {
"description": "A list of status update notification rules.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"status_update_notification_rules": {
"type": "array",
"items": {
"$ref": "#/components/schemas/StatusUpdateNotificationRule"
}
}
},
"required": [
"status_update_notification_rules"
]
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"status_update_notification_rules": [
{
"id": "PXPGF42",
"type": "status_update_notification_rule",
"summary": "contact method PXPGF42 used as status_update_notification_rule",
"self": "https://api.pagerduty.com/users/PXPGF42/status_update_notification_rules/PPSCXAN",
"contact_method": {
"id": "PXPGF42",
"type": "email_contact_method_reference",
"summary": "Work",
"self": "https://api.pagerduty.com/users/PXPGF42/contact_methods/PXPGF42",
"html_url": null
},
"created_at": "2016-02-01T16:06:27-05:00"
}
]
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
}
}
},
"post": {
"x-pd-requires-scope": "users.write",
"tags": [
"Users"
],
"operationId": "createUserStatusUpdateNotificationRule",
"description": "Create a new status update notification rule.\n\nUsers are members of a PagerDuty account that have the ability to interact with Incidents and other data on the account.\n\n\n> ### Early Access\n> This endpoint is in Early Access and may change at any time. You must pass in the X-EARLY-ACCESS header to access it.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#users)\n\nScoped OAuth requires: `users.write`\n",
"summary": "Create a user status update notification rule",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/header_Content-Type"
},
{
"$ref": "#/components/parameters/early_access_status-update-notification-rules"
},
{
"$ref": "#/components/parameters/id"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"properties": {
"status_update_notification_rule": {
"$ref": "#/components/schemas/StatusUpdateNotificationRule"
}
},
"required": [
"status_update_notification_rule"
]
},
"examples": {
"request": {
"summary": "Request Example",
"value": {
"status_update_notification_rule": {
"contact_method": {
"id": "PXPGF42",
"type": "email_contact_method_reference"
}
}
}
}
}
}
},
"description": "The status update notification rule to be created."
},
"responses": {
"201": {
"description": "The status update notification rule that was created.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"status_update_notification_rule": {
"$ref": "#/components/schemas/StatusUpdateNotificationRule"
}
},
"required": [
"status_update_notification_rule"
]
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"status_update_notification_rule": {
"id": "PXPGF42",
"type": "status_update_notification_rule",
"summary": "contact method PXPGF42 used as status_update_notification_rule",
"self": "https://api.pagerduty.com/users/PXPGF42/status_update_notification_rules/PPSCXAN",
"contact_method": {
"id": "PXPGF42",
"type": "email_contact_method_reference",
"summary": "Work",
"self": "https://api.pagerduty.com/users/PXPGF42/contact_methods/PXPGF42",
"html_url": null
},
"created_at": "2016-02-01T16:06:27-05:00"
}
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"402": {
"$ref": "#/components/responses/PaymentRequired"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
}
}
}
},
"/users/{id}/status_update_notification_rules/{status_update_notification_rule_id}": {
"description": "Manage a user's status update notification rule.",
"get": {
"x-pd-requires-scope": "users.read",
"tags": [
"Users"
],
"operationId": "getUserStatusUpdateNotificationRule",
"description": "Get details about a user's status update notification rule.\n\nUsers are members of a PagerDuty account that have the ability to interact with Incidents and other data on the account.\n\n\n> ### Early Access\n> This endpoint is in Early Access and may change at any time. You must pass in the X-EARLY-ACCESS header to access it.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#users)\n\nScoped OAuth requires: `users.read`\n",
"summary": "Get a user's status update notification rule",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/header_Content-Type"
},
{
"$ref": "#/components/parameters/early_access_status-update-notification-rules"
},
{
"$ref": "#/components/parameters/id"
},
{
"$ref": "#/components/parameters/user_status_update_notification_rule_id"
},
{
"$ref": "#/components/parameters/include_notification_rules"
}
],
"responses": {
"200": {
"description": "The user's status update notification rule requested.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"notification_rule": {
"$ref": "#/components/schemas/StatusUpdateNotificationRule"
}
},
"required": [
"notification_rule"
]
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"notification_rule": {
"id": "PXPGF42",
"type": "status_update_notification_rule",
"summary": "contact method PXPGF42 used as status_update_notification_rule",
"self": "https://api.pagerduty.com/users/PXPGF42/status_update_notification_rules/PPSCXAN",
"contact_method": {
"id": "PTDVERC",
"type": "email_contact_method_reference",
"summary": "Default",
"self": "https://api.pagerduty.com/users/PXPGF42/contact_methods/PTDVERC",
"html_url": null
},
"created_at": "2016-02-01T16:06:27-05:00"
}
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
}
}
},
"delete": {
"x-pd-requires-scope": "users.write",
"tags": [
"Users"
],
"operationId": "deleteUserStatusUpdateNotificationRule",
"description": "Remove a user's status update notification rule.\n\nUsers are members of a PagerDuty account that have the ability to interact with Incidents and other data on the account.\n\n\n> ### Early Access\n> This endpoint is in Early Access and may change at any time. You must pass in the X-EARLY-ACCESS header to access it.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#users)\n\nScoped OAuth requires: `users.write`\n",
"summary": "Delete a user's status update notification rule",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/header_Content-Type"
},
{
"$ref": "#/components/parameters/early_access_status-update-notification-rules"
},
{
"$ref": "#/components/parameters/id"
},
{
"$ref": "#/components/parameters/user_status_update_notification_rule_id"
}
],
"responses": {
"204": {
"description": "The status update notification rule was deleted successfully."
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
}
}
},
"put": {
"x-pd-requires-scope": "users.write",
"tags": [
"Users"
],
"operationId": "updateUserStatusUpdateNotificationRule",
"description": "Update a user's status update notification rule.\n\nUsers are members of a PagerDuty account that have the ability to interact with Incidents and other data on the account.\n\n\n> ### Early Access\n> This endpoint is in Early Access and may change at any time. You must pass in the X-EARLY-ACCESS header to access it.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#users)\n\nScoped OAuth requires: `users.write`\n",
"summary": "Update a user's status update notification rule",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/header_Content-Type"
},
{
"$ref": "#/components/parameters/early_access_status-update-notification-rules"
},
{
"$ref": "#/components/parameters/id"
},
{
"$ref": "#/components/parameters/user_status_update_notification_rule_id"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"status_update_notification_rule": {
"$ref": "#/components/schemas/StatusUpdateNotificationRule"
}
},
"required": [
"status_update_notification_rule"
]
},
"examples": {
"request": {
"summary": "Request Example",
"value": {
"status_update_notification_rule": {
"contact_method": {
"id": "PXPGF42",
"type": "email_contact_method_reference"
}
}
}
}
}
}
},
"description": "The user's status update notification rule to be updated."
},
"responses": {
"200": {
"description": "The user's status update notification rule that was updated.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"notification_rule": {
"$ref": "#/components/schemas/StatusUpdateNotificationRule"
}
}
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"status_update_notification_rule": {
"id": "PXPGF42",
"type": "status_update_notification_rule",
"summary": "contact method PXPGF42 used as status_update_notification_rule",
"self": "https://api.pagerduty.com/users/PXPGF42/status_update_notification_rules/PPSCXAN",
"contact_method": {
"id": "PXPGF42",
"type": "email_contact_method_reference",
"summary": "Work",
"self": "https://api.pagerduty.com/users/PXPGF42/contact_methods/PXPGF42",
"html_url": null
},
"created_at": "2016-02-01T16:06:27-05:00"
}
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"402": {
"$ref": "#/components/responses/PaymentRequired"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
}
}
}
},
"/users/me": {
"description": "Get the current user.",
"get": {
"tags": [
"Users"
],
"operationId": "getCurrentUser",
"description": "Get details about the current user.\n\nThis endpoint can only be used with a [user-level API key](https://support.pagerduty.com/docs/using-the-api#section-generating-a-personal-rest-api-key) or a key generated through an OAuth flow. This will not work if the request is made with an account-level access token.\n\nUsers are members of a PagerDuty account that have the ability to interact with Incidents and other data on the account.\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#users)\n",
"summary": "Get the current user",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/header_Content-Type"
},
{
"$ref": "#/components/parameters/include_user"
}
],
"responses": {
"200": {
"description": "The requesting user.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"user": {
"$ref": "#/components/schemas/User"
}
},
"required": [
"user"
]
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"user": {
"id": "PXPGF42",
"type": "user",
"summary": "Earline Greenholt",
"self": "https://api.pagerduty.com/users/PXPGF42",
"html_url": "https://subdomain.pagerduty.com/users/PXPGF42",
"name": "Earline Greenholt",
"email": "125.greenholt.earline@graham.name",
"time_zone": "America/Lima",
"color": "green",
"role": "admin",
"avatar_url": "https://secure.gravatar.com/avatar/a8b714a39626f2444ee05990b078995f.png?d=mm&r=PG",
"description": null,
"invitation_sent": false,
"job_title": "Director of Engineering",
"contact_methods": [
{
"id": "PTDVERC",
"type": "email_contact_method_reference",
"summary": "Default",
"self": "https://api.pagerduty.com/users/PXPGF42/contact_methods/PTDVERC",
"html_url": null
}
],
"notification_rules": [
{
"id": "P8GRWKK",
"type": "assignment_notification_rule_reference",
"summary": "Default",
"self": "https://api.pagerduty.com/users/PXPGF42/notification_rules/PTDVERC",
"html_url": null
}
],
"teams": [
{
"id": "PQ9K7I8",
"type": "team_reference",
"summary": "Engineering",
"self": "https://api.pagerduty.com/teams/PQ9K7I8",
"html_url": "https://subdomain.pagerduty.com/teams/PQ9K7I8"
}
]
}
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
}
}
}
},
"/vendors": {
"description": "List vendors.",
"get": {
"x-pd-requires-scope": "vendors.read",
"tags": [
"Vendors"
],
"operationId": "listVendors",
"description": "List all vendors.\n\nA PagerDuty Vendor represents a specific type of integration. AWS Cloudwatch, Splunk, Datadog are all examples of vendors\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#vendors)\n\nScoped OAuth requires: `vendors.read`\n",
"summary": "List vendors",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/header_Content-Type"
},
{
"$ref": "#/components/parameters/offset_limit"
},
{
"$ref": "#/components/parameters/offset_offset"
},
{
"$ref": "#/components/parameters/offset_total"
}
],
"responses": {
"200": {
"description": "A paginated array of vendors.",
"content": {
"application/json": {
"schema": {
"allOf": [
{
"$ref": "#/components/schemas/Pagination"
},
{
"type": "object",
"properties": {
"vendors": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Vendor"
}
}
},
"required": [
"vendors"
]
}
]
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"vendors": [
{
"id": "PZQ6AUS",
"type": "vendor",
"summary": "Amazon CloudWatch",
"self": "https://api.pagerduty.com/vendors/PZQ6AUS",
"name": "Amazon CloudWatch",
"website_url": "https://aws.amazon.com/cloudwatch",
"logo_url": "https://s3.amazonaws.com/pdpartner/cloudwatch_large.png",
"thumbnail_url": "https://s3.amazonaws.com/pdpartner/cloudwatch_thumb.png",
"description": "Amazon Web Services CloudWatch provides monitoring for AWS cloud resources and customer-run applications. AWS can collect data, gain insight, and alert users to fix problems within applications and organizations. AWS CloudWatch gives system-wide visibility into resource utilization and notifications can be set for when any metrics cross a specified threshold.",
"integration_guide_url": "http://www.pagerduty.com/docs/guides/aws-cloudwatch-integration-guide/"
}
],
"limit": 25,
"offset": 0,
"more": false,
"total": null
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
}
}
}
},
"/vendors/{id}": {
"description": "Get details about one specific vendor.",
"get": {
"x-pd-requires-scope": "vendors.read",
"tags": [
"Vendors"
],
"operationId": "getVendor",
"description": "Get details about one specific vendor.\n\nA PagerDuty Vendor represents a specific type of integration. AWS Cloudwatch, Splunk, Datadog are all examples of vendors\n\nFor more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#vendors)\n\nScoped OAuth requires: `vendors.read`\n",
"summary": "Get a vendor",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/header_Content-Type"
},
{
"$ref": "#/components/parameters/id"
}
],
"responses": {
"200": {
"description": "The vendor requested",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"vendor": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Vendor"
}
}
},
"required": [
"vendor"
]
},
"examples": {
"response": {
"summary": "Response Example",
"value": {
"vendor": [
{
"id": "PZQ6AUS",
"type": "vendor",
"summary": "Amazon CloudWatch",
"self": "https://api.pagerduty.com/vendors/PZQ6AUS",
"name": "Amazon CloudWatch",
"website_url": "https://aws.amazon.com/cloudwatch",
"logo_url": "https://s3.amazonaws.com/pdpartner/cloudwatch_large.png",
"thumbnail_url": "https://s3.amazonaws.com/pdpartner/cloudwatch_thumb.png",
"description": "Amazon Web Services CloudWatch provides monitoring for AWS cloud resources and customer-run applications. AWS can collect data, gain insight, and alert users to fix problems within applications and organizations. AWS CloudWatch gives system-wide visibility into resource utilization and notifications can be set for when any metrics cross a specified threshold.",
"integration_guide_url": "http://www.pagerduty.com/docs/guides/aws-cloudwatch-integration-guide/"
}
]
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/ArgumentError"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
}
}
}
},
"/webhook_subscriptions": {
"get": {
"x-pd-requires-scope": "webhook_subscriptions.read",
"tags": [
"Webhooks"
],
"operationId": "listWebhookSubscriptions",
"summary": "List webhook subscriptions",
"description": "List existing webhook subscriptions.\n\nThe `filter_type` and `filter_id` query parameters may be used to only show subscriptions\nfor a particular _service_ or _team_.\n\nFor more information on webhook subscriptions and how they are used to configure v3 webhooks\nsee the [Webhooks v3 Developer Documentation](https://developer.pagerduty.com/docs/webhooks/v3-overview/).\n\nScoped OAuth requires: `webhook_subscriptions.read`\n",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/offset_limit"
},
{
"$ref": "#/components/parameters/offset_offset"
},
{
"$ref": "#/components/parameters/offset_total"
},
{
"$ref": "#/components/parameters/webhooks_filter_type"
},
{
"$ref": "#/components/parameters/webhooks_filter_id"
}
],
"responses": {
"200": {
"description": "A set of webhook subscriptions matching the request.",
"content": {
"application/json": {
"schema": {
"allOf": [
{
"type": "object",
"properties": {
"webhook_subscriptions": {
"type": "array",
"items": {
"$ref": "#/components/schemas/WebhookSubscription"
}
}
},
"required": [
"webhook_subscriptions"
]
},
{
"$ref": "#/components/schemas/Pagination"
}
]
},
"examples": {
"response": {
"$ref": "#/components/examples/ListSubscriptionExample"
}
}
}
}
},
"400": {
"$ref": "#/components/responses/WebhookBadRequest"
},
"401": {
"$ref": "#/components/responses/WebhookUnauthorized"
},
"403": {
"$ref": "#/components/responses/WebhookForbidden"
}
}
},
"post": {
"x-pd-requires-scope": "webhook_subscriptions.write",
"tags": [
"Webhooks"
],
"operationId": "createWebhookSubscription",
"summary": "Create a webhook subscription",
"description": "Creates a new webhook subscription.\n\nFor more information on webhook subscriptions and how they are used to configure v3 webhooks\nsee the [Webhooks v3 Developer Documentation](https://developer.pagerduty.com/docs/webhooks/v3-overview/).\n\nScoped OAuth requires: `webhook_subscriptions.write`\n",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/header_Content-Type"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"webhook_subscription": {
"$ref": "#/components/schemas/WebhookSubscription"
}
},
"required": [
"webhook_subscription"
]
},
"examples": {
"request": {
"$ref": "#/components/examples/CreateSubscriptionExample"
}
}
}
}
},
"responses": {
"200": {
"description": "The webhook subscription that was created.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"webhook_subscription": {
"$ref": "#/components/schemas/WebhookSubscription"
}
},
"required": [
"webhook_subscription"
]
},
"examples": {
"response": {
"$ref": "#/components/examples/GetSubscriptionExample"
}
}
}
}
},
"400": {
"$ref": "#/components/responses/WebhookBadRequest"
},
"401": {
"$ref": "#/components/responses/WebhookUnauthorized"
},
"403": {
"$ref": "#/components/responses/WebhookForbidden"
}
}
}
},
"/webhook_subscriptions/{id}": {
"get": {
"x-pd-requires-scope": "webhook_subscriptions.read",
"tags": [
"Webhooks"
],
"operationId": "getWebhookSubscription",
"summary": "Get a webhook subscription",
"description": "Gets details about an existing webhook subscription.\n\nScoped OAuth requires: `webhook_subscriptions.read`\n",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/id"
}
],
"responses": {
"200": {
"description": "The webhook subscription that was requested.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"webhook_subscription": {
"$ref": "#/components/schemas/WebhookSubscription"
}
},
"required": [
"webhook_subscription"
]
},
"examples": {
"response": {
"$ref": "#/components/examples/GetSubscriptionExample"
}
}
}
}
},
"400": {
"$ref": "#/components/responses/WebhookBadRequest"
},
"401": {
"$ref": "#/components/responses/WebhookUnauthorized"
},
"403": {
"$ref": "#/components/responses/WebhookForbidden"
},
"404": {
"$ref": "#/components/responses/WebhookNotFound"
}
}
},
"put": {
"x-pd-requires-scope": "webhook_subscriptions.write",
"tags": [
"Webhooks"
],
"operationId": "updateWebhookSubscription",
"summary": "Update a webhook subscription",
"description": "Updates an existing webhook subscription.\n\nOnly the fields being updated need to be included on the request. This operation does not\nsupport updating the `delivery_method` of the webhook subscription.\n\nScoped OAuth requires: `webhook_subscriptions.write`\n",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/header_Content-Type"
},
{
"$ref": "#/components/parameters/id"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/WebhookSubscriptionUpdate"
},
"examples": {
"request": {
"$ref": "#/components/examples/PutSubscriptionExample"
}
}
}
}
},
"responses": {
"200": {
"description": "The updated webhook subscription.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"webhook_subscription": {
"$ref": "#/components/schemas/WebhookSubscription"
}
},
"required": [
"webhook_subscription"
]
},
"examples": {
"response": {
"$ref": "#/components/examples/GetSubscriptionExample"
}
}
}
}
},
"400": {
"$ref": "#/components/responses/WebhookBadRequest"
},
"401": {
"$ref": "#/components/responses/WebhookUnauthorized"
},
"403": {
"$ref": "#/components/responses/WebhookForbidden"
},
"404": {
"$ref": "#/components/responses/WebhookNotFound"
}
}
},
"delete": {
"x-pd-requires-scope": "webhook_subscriptions.write",
"tags": [
"Webhooks"
],
"operationId": "deleteWebhookSubscription",
"summary": "Delete a webhook subscription",
"description": "Deletes a webhook subscription.\n\nScoped OAuth requires: `webhook_subscriptions.write`\n",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/id"
}
],
"responses": {
"204": {
"description": "The webhook subscription was deleted successfully."
},
"400": {
"$ref": "#/components/responses/WebhookBadRequest"
},
"401": {
"$ref": "#/components/responses/WebhookUnauthorized"
},
"403": {
"$ref": "#/components/responses/WebhookForbidden"
},
"404": {
"$ref": "#/components/responses/WebhookNotFound"
}
}
}
},
"/webhook_subscriptions/{id}/enable": {
"post": {
"x-pd-requires-scope": "webhook_subscriptions.write",
"tags": [
"Webhooks"
],
"operationId": "enableWebhookSubscription",
"summary": "Enable a webhook subscription",
"description": "Enable a webhook subscription that is temporarily disabled. (This API does not require a request body.)\n\nWebhook subscriptions can become temporarily disabled when the subscription's delivery method is repeatedly rejected by the server.\n\nScoped OAuth requires: `webhook_subscriptions.write`\n",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/id"
}
],
"responses": {
"200": {
"description": "The webhook subscription that was successfully enabled.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"webhook_subscription": {
"$ref": "#/components/schemas/WebhookSubscription"
}
},
"required": [
"webhook_subscription"
]
},
"examples": {
"response": {
"$ref": "#/components/examples/GetSubscriptionExample"
}
}
}
}
},
"401": {
"$ref": "#/components/responses/WebhookUnauthorized"
},
"403": {
"$ref": "#/components/responses/WebhookForbidden"
},
"404": {
"$ref": "#/components/responses/WebhookNotFound"
}
}
}
},
"/webhook_subscriptions/{id}/ping": {
"post": {
"x-pd-requires-scope": "webhook_subscriptions.write",
"tags": [
"Webhooks"
],
"operationId": "testWebhookSubscription",
"summary": "Test a webhook subscription",
"description": "Test a webhook subscription.\n\nFires a test event against the webhook subscription. If properly configured,\nthis will deliver the `pagey.ping` webhook event to the destination.\n\nScoped OAuth requires: `webhook_subscriptions.write`\n",
"parameters": [
{
"$ref": "#/components/parameters/header_Accept"
},
{
"$ref": "#/components/parameters/id"
}
],
"responses": {
"202": {
"description": "Accepted"
},
"401": {
"$ref": "#/components/responses/WebhookUnauthorized"
},
"403": {
"$ref": "#/components/responses/WebhookForbidden"
},
"404": {
"$ref": "#/components/responses/WebhookNotFound"
}
}
}
}
}
}