{ "openapi": "3.0.2", "info": { "description": "This document describes the PagerDuty REST APIs.\n\nFor guides and examples please visit our [Documentation.](https://developer.pagerduty.com/docs/get-started/getting-started/)\n\nOur REST APIs are defined in OpenAPI v3.x. You can view the schema at [github.com/PagerDuty/api-schema](https://github.com/PagerDuty/api-schema).\n", "contact": { "name": "PagerDuty Support", "url": "http://www.pagerduty.com/support", "email": "support@pagerduty.com" }, "title": "PagerDuty API", "version": "2.0.0" }, "security": [ { "api_key": [] } ], "tags": [ { "name": "Abilities", "description": "This describes your account's abilities by feature name. For example `\"teams\"`.\nAn ability may be available to your account based on things like your pricing plan or account state.\n" }, { "name": "Add-ons", "description": "Developers can write their own functionality to insert into PagerDuty's UI.\n" }, { "name": "Analytics", "description": "Provides enriched incident data.\n" }, { "name": "Audit", "description": "Provides audit record data.\n" }, { "name": "Business Services", "description": "Business services model capabilities that span multiple technical services and that may be owned by several different teams.\n" }, { "name": "Escalation Policies", "description": "Escalation policies define which user should be alerted at which time.\n" }, { "name": "Extension Schemas", "description": "A PagerDuty extension vendor represents a specific type of outbound extension such as Generic Webhook, Slack, ServiceNow.\n" }, { "name": "Extensions", "description": "Extensions are representations of Extension Schema objects that are attached to Services.\n" }, { "name": "Incidents", "description": "An incident represents a problem or an issue that needs to be addressed and resolved. Incidents trigger on a service, which prompts notifications to go out to on-call responders per the service's escalation policy.\n" }, { "name": "Log Entries", "description": "A log of all the events that happen to an Incident, and these are exposed as Log Entries.\n" }, { "name": "Maintenance Windows", "description": "A Maintenance Window is used to temporarily disable one or more Services for a set period of time.\n" }, { "name": "Notifications", "description": "A Notification is created when an Incident is triggered or escalated.\n" }, { "name": "On-Calls", "description": "An on-call represents a contiguous unit of time for which a User will be on call for a given Escalation Policy and Escalation Rules\n" }, { "name": "Priorities", "description": "A priority is a label representing the importance and impact of an incident. This feature is only available on Standard and Enterprise plans.\n" }, { "name": "Response Plays", "description": "Response Plays are a package of Incident Actions that can be applied during an Incident's life cycle.\n" }, { "name": "Rulesets", "description": "Rulesets allow you to route events to an endpoint and create collections of event rules, which define sets of actions to take based on event content.\n" }, { "name": "Schedules", "description": "A Schedule determines the time periods that users are On-Call.\n" }, { "name": "Service Dependencies", "description": "Services are categorized into technical and business services. Dependencies can be created via any combination of these services.\n" }, { "name": "Services", "description": "A Service may represent an application, component, or team you wish to open incidents against.\n" }, { "name": "Tags", "description": "A Tag is applied to EScalation Policies, Teams or Users and can be used to filter them.\n" }, { "name": "Teams", "description": "A team is a collection of Users and Escalation Policies that represent a group of people within an organization.\n" }, { "name": "Users", "description": "Users are members of a PagerDuty account that have the ability to interact with Incidents and other data on the account.\n" }, { "name": "Vendors", "description": "A PagerDuty Vendor represents a specific type of integration. AWS Cloudwatch, Splunk, Datadog are all examples of vendors\n" } ], "servers": [ { "url": "https://api.pagerduty.com", "description": "PagerDuty V2 API." } ], "components": { "parameters": { "id": { "name": "id", "description": "The ID of the resource.", "in": "path", "required": true, "schema": { "type": "string" } }, "entity_type": { "name": "entity_type", "in": "path", "description": "Type of entity related with the tag", "required": true, "schema": { "type": "string", "enum": [ "users", "teams", "escalation_policies" ] } }, "team_user_id": { "name": "user_id", "in": "path", "description": "The user ID on the team.", "required": true, "schema": { "type": "string" } }, "team_escalation_policy_id": { "name": "escalation_policy_id", "in": "path", "description": "The escalation policy ID on the team.", "required": true, "schema": { "type": "string" } }, "escalation_policy_escalation_rule_id": { "name": "escalation_rule_id", "in": "path", "description": "The escalation rule ID on the escalation policy.", "required": true, "schema": { "type": "string" } }, "include_addon": { "name": "include[]", "in": "query", "description": "Array of additional Models to include in response.", "explode": true, "schema": { "type": "array", "items": { "type": "string", "enum": [ "services" ] }, "uniqueItems": true } }, "include_escalation_policy": { "name": "include[]", "in": "query", "description": "Array of additional Models to include in response.", "explode": true, "schema": { "type": "array", "items": { "type": "string", "enum": [ "services", "teams", "targets" ] }, "uniqueItems": true } }, "include_log_entry": { "name": "include[]", "in": "query", "description": "Array of additional Models to include in response.", "explode": true, "schema": { "type": "array", "items": { "type": "string", "enum": [ "incidents", "services", "channels", "teams" ] }, "uniqueItems": true } }, "include_user": { "name": "include[]", "in": "query", "description": "Array of additional Models to include in response.", "explode": true, "schema": { "type": "array", "items": { "type": "string", "enum": [ "contact_methods", "notification_rules", "teams" ] }, "uniqueItems": true } }, "include_maintenance_window": { "name": "include[]", "in": "query", "description": "Array of additional Models to include in response.", "explode": true, "schema": { "type": "array", "items": { "type": "string", "enum": [ "teams", "services", "users" ] }, "uniqueItems": true } }, "include_teams": { "name": "include[]", "in": "query", "description": "Array of additional Models to include in response.", "explode": true, "schema": { "type": "array", "items": { "type": "string", "enum": [ "privileges" ] }, "uniqueItems": true } }, "include_teams_members": { "name": "include[]", "in": "query", "description": "Array of additional Models to include in response.", "explode": true, "schema": { "type": "array", "items": { "type": "string", "enum": [ "users" ] }, "uniqueItems": true } }, "sort_by_escalation_policy": { "name": "sort_by", "in": "query", "description": "Used to specify the field you wish to sort the results on.", "schema": { "type": "string", "enum": [ "name", "name:asc", "name:desc" ], "default": "name" } }, "sort_by_service": { "name": "sort_by", "in": "query", "description": "Used to specify the field you wish to sort the results on.", "schema": { "type": "string", "enum": [ "name", "name:asc", "name:desc" ], "default": "name" } }, "schedule_overflow": { "name": "overflow", "in": "query", "description": "Any on-call schedule entries that pass the date range bounds will be truncated at the bounds, unless the parameter `overflow=true` is passed. This parameter defaults to false.\nFor instance, if your schedule is a rotation that changes daily at midnight UTC, and your date range is from `2011-06-01T10:00:00Z` to `2011-06-01T14:00:00Z`:\n\n\n- If you don't pass the `overflow=true` parameter, you will get one schedule entry returned with a start of `2011-06-01T10:00:00Z` and end of `2011-06-01T14:00:00Z`.\n- If you do pass the `overflow=true` parameter, you will get one schedule entry returned with a start of `2011-06-01T00:00:00Z` and end of `2011-06-02T00:00:00Z`.\n", "schema": { "type": "boolean", "default": false } }, "schedule_override_id": { "name": "override_id", "in": "path", "description": "The override ID on the schedule.", "required": true, "schema": { "type": "string" } }, "team_ids": { "name": "team_ids[]", "in": "query", "description": "An array of team IDs. Only results related to these teams will be returned. Account must have the `teams` ability to use this parameter.", "explode": true, "schema": { "type": "array", "items": { "type": "string" }, "uniqueItems": true } }, "time_zone": { "name": "time_zone", "in": "query", "description": "Time zone in which dates in the result will be rendered.", "schema": { "type": "string", "format": "tzinfo", "default": "UTC" } }, "services": { "name": "service_ids[]", "in": "query", "description": "An array of service IDs. Only results related to these services will be returned.", "explode": true, "schema": { "type": "array", "items": { "type": "string" } } }, "integration_id": { "name": "integration_id", "in": "path", "description": "The integration ID on the service.", "required": true, "schema": { "type": "string" } }, "log_entry_is_overview": { "name": "is_overview", "in": "query", "description": "If `true`, will return a subset of log entries that show only the most important changes to the incident.", "required": false, "schema": { "type": "boolean", "default": false } }, "since": { "name": "since", "in": "query", "description": "The start of the date range over which you want to search.", "schema": { "type": "string", "format": "date-time" } }, "until": { "name": "until", "in": "query", "description": "The end of the date range over which you want to search.", "schema": { "type": "string", "format": "date-time" } }, "date_range": { "name": "date_range", "in": "query", "description": "When set to all, the since and until parameters and defaults are ignored.", "schema": { "type": "string", "enum": [ "all" ] } }, "incident_key": { "name": "incident_key", "in": "query", "description": "Incident de-duplication key. Incidents with child alerts do not have an incident key; querying by incident key will return incidents whose alerts have alert_key matching the given incident key.", "schema": { "type": "string" } }, "incident_services": { "name": "service_ids[]", "in": "query", "description": "Returns only the incidents associated with the passed service(s). This expects one or more service IDs.", "explode": true, "schema": { "type": "array", "items": { "type": "string" }, "uniqueItems": true } }, "incident_assigned_to_user": { "name": "user_ids[]", "in": "query", "description": "Returns only the incidents currently assigned to the passed user(s). This expects one or more user IDs. Note: When using the assigned_to_user filter, you will only receive incidents with statuses of triggered or acknowledged. This is because resolved incidents are not assigned to any user.", "explode": true, "schema": { "type": "array", "items": { "type": "string" }, "uniqueItems": true } }, "incident_urgencies": { "name": "urgencies[]", "in": "query", "description": "Array of the urgencies of the incidents to be returned. Defaults to all urgencies. Account must have the `urgencies` ability to do this.", "explode": true, "schema": { "type": "array", "items": { "type": "string", "enum": [ "high", "low" ] }, "uniqueItems": true } }, "from_header": { "name": "From", "in": "header", "description": "The email address of a valid user associated with the account making the request.", "required": true, "schema": { "type": "string", "format": "email" } }, "optional_from_header": { "name": "From", "in": "header", "description": "The email address of a valid user associated with the account making the request. This is optional, and is only used for change tracking.", "required": false, "schema": { "type": "string", "format": "email" } }, "user_contact_method_id": { "name": "contact_method_id", "in": "path", "description": "The contact method ID on the user.", "required": true, "schema": { "type": "string" } }, "user_notification_rule_id": { "name": "notification_rule_id", "in": "path", "description": "The notification rule ID on the user.", "required": true, "schema": { "type": "string" } }, "user_status_update_notification_rule_id": { "name": "status_update_notification_rule_id", "in": "path", "description": "The status update notification rule ID on the user.", "required": true, "schema": { "type": "string" } }, "session_id": { "name": "session_id", "in": "path", "description": "The session ID for the user.", "required": true, "schema": { "type": "string" } }, "type": { "name": "type", "in": "path", "description": "The session type for the user session ID.", "required": true, "schema": { "type": "string" } }, "alert_key": { "name": "alert_key", "in": "query", "description": "Alert de-duplication key.", "schema": { "type": "string" } }, "response_play_id": { "name": "response_play_id", "in": "path", "description": "The response play ID of the response play associated with the request.", "required": true, "schema": { "type": "string" } }, "total": { "name": "total", "in": "query", "description": "By default the `total` field in pagination responses is set to `null` to provide the fastest possible response times. Set `total` to `true` for this field to be populated.\n\nSee our [Pagination Docs](https://developer.pagerduty.com/docs/rest-api-v2/pagination/) for more information.\n", "required": false, "schema": { "type": "boolean" } } }, "responses": { "ArgumentError": { "description": "Caller provided invalid arguments. Please review the response for error details. Retrying with the same arguments will *not* work.", "content": { "application/json": { "schema": { "$ref": "#/paths/~1users~1%7Bid%7D~1notification_subscriptions/post/responses/422/content/application~1json/schema" } } } }, "Conflict": { "description": "The request conflicts with the current state of the server.", "content": { "application/json": { "schema": { "$ref": "#/paths/~1users~1%7Bid%7D~1notification_subscriptions/post/responses/422/content/application~1json/schema" } } } }, "Forbidden": { "description": "Caller is not authorized to view the requested resource.\nWhile your authentication is valid, the authenticated user or token does not have permission to perform this action.\n", "content": { "application/json": { "schema": { "$ref": "#/paths/~1users~1%7Bid%7D~1notification_subscriptions/post/responses/422/content/application~1json/schema" } } } }, "InternalServerError": { "description": "Internal Server Error the PagerDuty server experienced an error.", "content": { "application/json": { "schema": { "$ref": "#/paths/~1users~1%7Bid%7D~1notification_subscriptions/post/responses/422/content/application~1json/schema" } } } }, "NotAllowed": { "description": "The request was received and recognized by the server, but its HTTP method was rejected for the requested resource.", "content": { "application/json": { "schema": { "$ref": "#/paths/~1users~1%7Bid%7D~1notification_subscriptions/post/responses/422/content/application~1json/schema" } } } }, "NotFound": { "description": "The requested resource was not found.", "content": { "application/json": { "schema": { "$ref": "#/paths/~1users~1%7Bid%7D~1notification_subscriptions/post/responses/422/content/application~1json/schema" } } } }, "TooManyRequests": { "description": "Too many requests have been made, the rate limit has been reached.", "content": { "application/json": { "schema": { "$ref": "#/paths/~1users~1%7Bid%7D~1notification_subscriptions/post/responses/422/content/application~1json/schema" } } } }, "PaymentRequired": { "description": "Account does not have the abilities to perform the action. Please review the response for the required abilities.\nYou can also use the [Abilities API](#resource_Abilities) to determine what features are available to your account.\n", "content": { "application/json": { "schema": { "$ref": "#/paths/~1users~1%7Bid%7D~1notification_subscriptions/post/responses/422/content/application~1json/schema" } } } }, "Unauthorized": { "description": "Caller did not supply credentials or did not provide the correct credentials.\nIf you are using an API key, it may be invalid or your Authorization header may be malformed.\n", "content": { "application/json": { "schema": { "$ref": "#/paths/~1users~1%7Bid%7D~1notification_subscriptions/post/responses/422/content/application~1json/schema" } } } } }, "securitySchemes": { "api_key": { "type": "apiKey", "name": "Authorization", "in": "header", "description": "The API Key with format `Token token=`" } }, "examples": { "AuditRecordResponseExample": { "summary": "Response Example", "value": { "records": [ { "id": "PDRECORDID1_TEAM_CREATED", "self": "https://api.pagerduty.com/<...>/records/PDRECORDID1_TEAM_CREATED", "execution_time": "2020-06-04T15:30:16Z", "execution_context": { "request_id": "111lDEOIH-534-4ljhLHJjh111", "remote_address": "201.19.20.19" }, "actors": [ { "id": "PDUSER", "summary": "John Snow", "type": "user_reference" } ], "method": { "type": "api_token", "truncated_token": "3usr" }, "resource": { "id": "PXASDFE", "type": "team_reference", "summary": "my DevOps team" }, "action": "create", "details": { "resource": { "id": "PXASDFE", "type": "team_reference", "summary": "my DevOps team" }, "fields": [ { "name": "teamName", "value": "DevOps team" } ] } }, { "id": "PDRECORDID2_USER_REMOVED_FROM_TEAM", "self": "https://api.pagerduty.com/<...>/records/PDRECORDID2_USER_REMOVED_FROM_TEAM", "execution_time": "2020-06-04T15:30:16Z", "execution_context": { "request_id": "222lDEOIH-534-4ljhLHJjh222", "remote_address": "201.19.20.19" }, "method": { "type": "api_token", "truncated_token": "2adm" }, "resource": { "id": "PRY9M8B", "type": "team_reference", "summary": "DevOps" }, "action": "update", "details": { "resource": { "id": "PRY9M8B", "type": "team_reference", "summary": "DevOps" }, "references": [ { "name": "members", "removed": [ { "id": "PRY9M8B", "type": "user_reference", "summary": "John Doe" } ] } ] } }, { "id": "PDRECORDID5_USERS_TEAM_ROLE_UPDATED", "self": "https://api.pagerduty.com/<...>/records/PDRECORDID5_USERS_TEAM_ROLE_UPDATED", "execution_time": "2020-06-04T15:30:16Z", "execution_context": { "request_id": "222lDEOIH-534-4ljhLHJjh222", "remote_address": "201.19.20.19" }, "method": { "type": "api_token", "truncated_token": "2adm" }, "resource": { "id": "PRY9M8B", "type": "team_reference", "summary": "DevOps" }, "action": "update", "details": { "resource": { "id": "PDUSER", "type": "user_reference", "summary": "John Snow" }, "fields": [ { "name": "team_role", "before_value": "observer", "value": "manager" } ] } }, { "id": "PDRECORDID3_USERS_NAME_AND_EMAIL_UPDATED", "self": "https://api.pagerduty.com/<...>/records/PDRECORDID3_USERS_NAME_AND_EMAIL_UPDATED", "execution_time": "2020-06-04T15:30:16Z", "execution_context": { "request_id": "222lDEOIH-534-4ljhLHJjh222", "remote_address": "201.19.20.19" }, "actors": [ { "id": "PDUSER", "summary": "John Snow", "type": "user_reference" } ], "method": { "type": "identity_provider" }, "resource": { "id": "PDUSER", "type": "user_reference", "summary": "John Snow" }, "action": "update", "details": { "resource": { "id": "PDUSER", "type": "user_reference", "summary": "John Snow" }, "fields": [ { "name": "name", "before_value": "Bob Doe", "value": "Jon Snow" }, { "name": "email", "before_value": "bob.doe@domain.com", "value": "john.snow@domain.com" } ] } }, { "id": "PDRECORDID4_UPDATED_USERS_NOTIFICATION_RULE", "self": "https://api.pagerduty.com/<...>/records/PDRECORDID4_UPDATED_USERS_NOTIFICATION_RULE", "execution_time": "2020-06-04T15:30:16Z", "execution_context": { "request_id": "222lDEOIH-534-4ljhLHJjh222", "remote_address": "201.19.20.19" }, "actors": [ { "id": "PDUSER", "summary": "John Snow", "type": "user_reference" } ], "method": { "type": "api_token", "truncated_token": "2adm" }, "resource": { "id": "PDUSER", "type": "user_reference", "summary": "John Snow" }, "action": "update", "details": { "resource": { "id": "PXOGWUS", "type": "assignment_notification_rule_reference", "summary": "0 minutes: channel P1IAAPZ" }, "fields": [ { "name": "start_delay_in_minutes", "before_value": 0, "value": 2 } ], "references": [ { "name": "contact_method", "removed": [ { "id": "POE6L88", "type": "push_notification_contact_method_reference", "summary": "Pixel 3" } ], "added": [ { "id": "P4GTUMK", "type": "sms_contact_method_reference", "summary": "Mobile" } ] } ] } } ], "response_metadata": { "messages": [ "Message about the result" ] }, "pagination_token": "dXNlcjpVMEc5V0ZYTlo=", "more": true, "limit": 1 } } }, "schemas": { "AddonReference": { "allOf": [ { "$ref": "#/components/schemas/Reference" }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "full_page_addon_reference", "incident_show_addon_reference" ] } } } ] }, "Addon": { "allOf": [ { "$ref": "#/components/schemas/Tag/allOf/0" }, { "type": "object", "properties": { "type": { "type": "string", "description": "The type of Add-on.", "enum": [ "full_page_addon", "incident_show_addon" ] }, "name": { "type": "string", "description": "The name of the Add-on.", "maxLength": 100 }, "src": { "type": "string", "format": "url", "description": "The source URL to display in a frame in the PagerDuty UI. HTTPS is required." } }, "required": [ "type", "name", "src" ], "example": { "type": "full_page_addon", "name": "Internal Status Page", "src": "https://intranet.example.com/status" } } ] }, "BusinessService": { "allOf": [ { "$ref": "#/components/schemas/Tag/allOf/0" }, { "type": "object", "properties": { "name": { "type": "string", "description": "The name of the business service." }, "description": { "type": "string", "description": "The user-provided description of the business service." }, "point_of_contact": { "type": "string", "description": "The point of contact assigned to this service." }, "team": { "type": "object", "title": "Team", "description": "Reference to the team that owns the business service.", "properties": { "id": { "type": "string" }, "type": { "type": "string", "description": "A string that determines the schema of the object.", "readOnly": true }, "self": { "type": "string", "format": "url", "description": "The API show URL at which the object is accessible.", "readOnly": true } }, "required": [ "id" ] } }, "example": { "id": "P3X2XX3", "type": "business_service", "name": "Self-serve mobile checkout", "description": "Checkout service for our mobile clients", "point_of_contact": "PagerDuty Admin", "team": { "type": "team_reference", "self": "https://api.pagerduty.com/teams/P3ZQXDF", "id": "P3ZQXDF" } } } ] }, "BusinessServiceReference": { "allOf": [ { "$ref": "#/components/schemas/Reference" }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "business_service_reference" ] } } } ] }, "Tag": { "allOf": [ { "type": "object", "properties": { "id": { "type": "string", "readOnly": true }, "summary": { "type": "string", "nullable": true, "readOnly": true, "description": "A short-form, server-generated string that provides succinct, important information about an object suitable for primary labeling of an entity in a client. In many cases, this will be identical to `name`, though it is not intended to be an identifier." }, "type": { "type": "string", "readOnly": true, "description": "A string that determines the schema of the object. This must be the standard name for the entity, suffixed by `_reference` if the object is a reference." }, "self": { "type": "string", "nullable": true, "readOnly": true, "format": "url", "description": "the API show URL at which the object is accessible" }, "html_url": { "type": "string", "nullable": true, "readOnly": true, "format": "url", "description": "a URL at which the entity is uniquely displayed in the Web app" } } }, { "type": "object", "properties": { "type": { "type": "string", "description": "The type of object being created.", "default": "tag", "enum": [ "tag" ] }, "label": { "type": "string", "description": "The label of the tag.", "maxLength": 191 } }, "required": [ "label", "type" ], "example": { "type": "tag", "label": "Batman" } } ] }, "TagReference": { "allOf": [ { "$ref": "#/components/schemas/Reference" }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "tag_reference" ] } } } ] }, "EntityReference": { "allOf": [ { "$ref": "#/components/schemas/Reference" }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "user_reference", "team_reference", "escalation_policy_reference" ] } } } ] }, "IncidentAddon": { "allOf": [ { "$ref": "#/components/schemas/Addon" }, { "type": "object", "properties": { "services": { "type": "array", "description": "The services this Add-on is associated with.\nIf non-empty, the Add-on will appear only on incidents for those services.\nIf empty, it will appear on incidents for all services.\n", "items": { "$ref": "#/components/schemas/ServiceReference" } } }, "required": [ "name", "src" ] } ], "example": { "type": "incident_show_addon", "name": "Service Runbook", "src": "https://intranet.example.com/runbook.html", "services": [ { "id": "PIJ90N7", "type": "service", "summary": "My Application Service", "self": "https://api.pagerduty.com/services/PIJ90N7", "html_url": "https://subdomain.pagerduty.com/services/PIJ90N7" } ] } }, "IncidentUrgencyType": { "type": "object", "properties": { "type": { "type": "string", "description": "The type of incident urgency: whether it's constant, or it's dependent on the support hours.", "default": "constant", "enum": [ "constant", "use_support_hours" ] }, "urgency": { "type": "string", "description": "The incidents' urgency, if type is constant.", "default": "high", "enum": [ "low", "high", "severity_based" ] } } }, "IncidentUrgencyRule": { "allOf": [ { "$ref": "#/components/schemas/IncidentUrgencyType" }, { "type": "object", "properties": { "during_support_hours": { "$ref": "#/components/schemas/IncidentUrgencyType" }, "outside_support_hours": { "$ref": "#/components/schemas/IncidentUrgencyType" } } } ] }, "SupportHours": { "type": "object", "properties": { "type": { "type": "string", "description": "The type of support hours", "default": "fixed_time_per_day", "enum": [ "fixed_time_per_day" ] }, "time_zone": { "type": "string", "format": "activesupport-time-zone", "description": "The time zone for the support hours" }, "days_of_week": { "type": "array", "readOnly": true, "items": { "type": "integer", "readOnly": true, "description": "The days of the week (1 through 7, for Monday through Sunday)" } }, "start_time": { "type": "string", "format": "time", "description": "The support hours' starting time of day (date portion is ignored)" }, "end_time": { "type": "string", "format": "time", "description": "The support hours' ending time of day (date portion is ignored)" } } }, "Reference": { "allOf": [ { "$ref": "#/components/schemas/Tag/allOf/0" }, { "type": "object", "required": [ "type", "id" ] } ] }, "IncidentNote": { "type": "object", "properties": { "id": { "type": "string", "readOnly": true }, "user": { "$ref": "#/components/schemas/UserReference" }, "content": { "type": "string", "description": "The note content" }, "created_at": { "type": "string", "format": "date-time", "description": "The time at which the note was submitted", "readOnly": true } }, "example": { "content": "Firefighters are on the scene." } }, "Notification": { "type": "object", "properties": { "id": { "type": "string", "readOnly": true }, "type": { "type": "string", "readOnly": true, "description": "The type of notification.", "enum": [ "sms_notification", "email_notification", "phone_notification", "push_notification" ] }, "started_at": { "type": "string", "format": "date-time", "description": "The time at which the notification was sent", "readOnly": true }, "address": { "type": "string", "description": "The address where the notification was sent. This will be null for notification type `push_notification`.", "readOnly": true }, "user": { "$ref": "#/components/schemas/UserReference" } } }, "Context": { "type": "object", "discriminator": { "propertyName": "type" }, "properties": { "type": { "type": "string", "description": "The type of context being attached to the incident.", "enum": [ "link", "image" ] }, "href": { "type": "string", "description": "The link's target url" }, "src": { "type": "string", "description": "The image's source url" }, "text": { "type": "string", "description": "The alternate display for an image" } }, "required": [ "type" ] }, "Channel": { "type": "object", "description": "Polymorphic object representation of the means by which the action was channeled. Has different formats depending on type, indicated by channel[type]. Will be one of `auto`, `email`, `api`, `nagios`, or `timeout` if `agent[type]` is `service`. Will be one of `email`, `sms`, `website`, `web_trigger`, or `note` if `agent[type]` is `user`. See [below](https://developer.pagerduty.com/documentation/rest/log_entries/show#channel_types) for detailed information about channel formats.", "properties": { "type": { "type": "string", "description": "type" }, "user": { "type": "object", "description": "user" }, "team": { "type": "object", "description": "team" }, "channel": { "type": "object", "description": "channel" } }, "required": [ "type" ] }, "NotifyLogEntry": { "allOf": [ { "$ref": "#/components/schemas/LogEntry" }, { "type": "object", "properties": { "created_at": { "type": "string", "format": "date-time", "readOnly": true, "description": "Time at which the log entry was created" }, "user": { "$ref": "#/components/schemas/UserReference" }, "type": { "type": "string", "enum": [ "notify_log_entry" ] } } } ] }, "ScheduledAction": { "type": "object", "properties": { "type": { "type": "string", "description": "The type of schedule action. Must be set to urgency_change.", "enum": [ "urgency_change" ] }, "at": { "type": "object", "description": "Represents when scheduled action will occur.", "properties": { "type": { "type": "string", "description": "Must be set to named_time.", "enum": [ "named_time" ] }, "name": { "type": "string", "description": "Designates either the start or the end of support hours.", "enum": [ "support_hours_start", "support_hours_end" ] } }, "required": [ "type", "name" ] }, "to_urgency": { "type": "string", "description": "Urgency level. Must be set to high.", "enum": [ "high" ] } }, "required": [ "type", "at", "to_urgency" ] }, "SnoozeLogEntry": { "allOf": [ { "$ref": "#/components/schemas/LogEntry" }, { "type": "object", "properties": { "changed_actions": { "type": "array", "items": { "$ref": "#/components/schemas/IncidentAction" } }, "type": { "type": "string", "enum": [ "snooze_log_entry" ] } } } ] }, "IncidentAction": { "description": "An incident action is a pending change to an incident that will automatically happen at some future time.", "type": "object", "properties": { "type": { "type": "string", "enum": [ "unacknowledge", "escalate", "resolve", "urgency_change" ] }, "at": { "type": "string", "format": "date-time" } }, "discriminator": { "propertyName": "type" }, "required": [ "type", "at" ] }, "AssignLogEntry": { "allOf": [ { "$ref": "#/components/schemas/LogEntry" }, { "type": "object", "properties": { "assigned_user": { "$ref": "#/components/schemas/UserReference" }, "type": { "type": "string", "enum": [ "assign_log_entry" ] } } } ] }, "EscalateLogEntry": { "allOf": [ { "$ref": "#/components/schemas/LogEntry" }, { "type": "object", "properties": { "assigned_user": { "$ref": "#/components/schemas/UserReference" }, "type": { "type": "string", "enum": [ "escalate_log_entry" ] } } } ] }, "LogEntryReference": { "allOf": [ { "$ref": "#/components/schemas/Reference" }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "acknowledge_log_entry_reference", "annotate_log_entry_reference", "assign_log_entry_reference", "escalate_log_entry_reference", "exhaust_escalation_path_log_entry_reference", "notify_log_entry_reference", "reach_trigger_limit_log_entry_reference", "repeat_escalation_path_log_entry_reference", "resolve_log_entry_reference", "snooze_log_entry_reference", "trigger_log_entry_reference", "unacknowledge_log_entry_reference" ] } } } ] }, "LogEntry": { "allOf": [ { "$ref": "#/components/schemas/Tag/allOf/0" }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "acknowledge_log_entry", "annotate_log_entry", "assign_log_entry", "escalate_log_entry", "exhaust_escalation_path_log_entry", "notify_log_entry", "reach_trigger_limit_log_entry", "repeat_escalation_path_log_entry", "resolve_log_entry", "snooze_log_entry", "trigger_log_entry", "unacknowledge_log_entry" ] }, "created_at": { "type": "string", "format": "date-time", "readOnly": true, "description": "Time at which the log entry was created." }, "channel": { "$ref": "#/components/schemas/Channel" }, "agent": { "$ref": "#/components/schemas/AgentReference" }, "note": { "type": "string", "readOnly": true, "description": "Optional field containing a note, if one was included with the log entry." }, "contexts": { "type": "array", "readOnly": true, "description": "Contexts to be included with the trigger such as links to graphs or images.", "items": { "$ref": "#/components/schemas/Context" } }, "service": { "$ref": "#/components/schemas/ServiceReference" }, "incident": { "$ref": "#/components/schemas/IncidentReference" }, "teams": { "type": "array", "readOnly": true, "description": "Will consist of references unless included", "items": { "$ref": "#/components/schemas/TeamReference" } }, "event_details": { "type": "object", "readOnly": true, "properties": { "description": { "type": "string", "description": "Additional details about the event." } } } } } ] }, "AgentReference": { "allOf": [ { "$ref": "#/components/schemas/Reference" }, { "type": "object", "description": "The agent (user, service or integration) that created or modified the Incident Log Entry.", "properties": { "type": { "enum": [ "user_reference", "service_reference", "integration_reference" ], "type": "string" } }, "readOnly": true } ] }, "NotificationRuleReference": { "allOf": [ { "$ref": "#/components/schemas/Reference" }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "assignment_notification_rule_reference" ] } } } ] }, "NotificationRule": { "allOf": [ { "$ref": "#/components/schemas/Tag/allOf/0" }, { "type": "object", "description": "A rule for contacting the user.", "properties": { "type": { "type": "string", "description": "The type of object being created.", "default": "assignment_notification_rule", "enum": [ "assignment_notification_rule" ] }, "start_delay_in_minutes": { "type": "integer", "description": "The delay before firing the rule, in minutes.", "minimum": 0 }, "contact_method": { "$ref": "#/components/schemas/ContactMethodReference" }, "urgency": { "type": "string", "enum": [ "high", "low" ], "description": "Which incident urgency this rule is used for. Account must have the `urgencies` ability to have a low urgency notification rule." } }, "required": [ "start_delay_in_minutes", "urgency", "contact_method", "type" ], "example": { "type": "assignment_notification_rule", "start_delay_in_minutes": 0, "contact_method": { "id": "PXPGF42", "type": "email_contact_method_reference" }, "urgency": "high" } } ] }, "ContactMethodReference": { "allOf": [ { "$ref": "#/components/schemas/Reference" }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "email_contact_method_reference", "phone_contact_method_reference", "push_notification_contact_method_reference", "sms_contact_method_reference" ] } } } ] }, "ContactMethod": { "allOf": [ { "$ref": "#/components/schemas/Tag/allOf/0" }, { "type": "object", "description": "The method to contact a user.", "properties": { "type": { "type": "string", "description": "The type of contact method being created.", "enum": [ "email_contact_method", "phone_contact_method", "push_notification_contact_method", "sms_contact_method" ] }, "label": { "type": "string", "description": "The label (e.g., \"Work\", \"Mobile\", etc.)." }, "address": { "type": "string", "description": "The \"address\" to deliver to: email, phone number, etc., depending on the type." } }, "discriminator": { "propertyName": "type" }, "required": [ "type", "label", "address" ] } ] }, "EmailContactMethod": { "description": "The Email Contact Method of the User.", "allOf": [ { "$ref": "#/components/schemas/ContactMethod" }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "email_contact_method" ] }, "send_short_email": { "type": "boolean", "description": "Send an abbreviated email message instead of the standard email output. Useful for email-to-SMS gateways and email based pagers.", "default": false } }, "example": { "type": "email_contact_method", "label": "work", "address": "grady.haylie.126@hickle.net", "send_short_email": false } } ] }, "PhoneContactMethod": { "description": "The Phone Contact Method of the User, used for Voice or SMS.", "allOf": [ { "$ref": "#/components/schemas/ContactMethod" }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "phone_contact_method", "sms_contact_method" ] }, "country_code": { "type": "integer", "description": "The 1-to-3 digit country calling code.", "minimum": 1, "maximum": 1999 }, "enabled": { "type": "boolean", "description": "If true, this phone is capable of receiving SMS messages.", "readOnly": true }, "blacklisted": { "type": "boolean", "description": "If true, this phone has been blacklisted by PagerDuty and no messages will be sent to it.", "readOnly": true } }, "required": [ "country_code" ], "example": { "type": "phone_contact_method", "label": "work", "country_code": 123, "address": "1234567" } } ] }, "PushContactMethodSound": { "type": "object", "properties": { "type": { "type": "string", "description": "The type of sound.", "enum": [ "alert_high_urgency", "alert_low_urgency" ] }, "file": { "type": "string", "description": "The sound file name." } } }, "PushContactMethod": { "description": "The Push Contact Method of the User.", "allOf": [ { "$ref": "#/components/schemas/ContactMethod" }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "push_notification_contact_method" ] }, "device_type": { "type": "string", "description": "The type of device.", "enum": [ "android", "ios" ], "readOnly": true }, "sounds": { "type": "array", "items": { "$ref": "#/components/schemas/PushContactMethodSound" } }, "created_at": { "type": "string", "format": "date-time", "description": "Time at which the contact method was created." }, "blacklisted": { "type": "boolean", "description": "If true, this phone has been blacklisted by PagerDuty and no messages will be sent to it.", "readOnly": true } }, "required": [ "device_type" ], "example": { "type": "push_notification_contact_method", "label": "work", "device_type": "android", "address": "12341234" } } ] }, "UserRole": { "type": "object", "properties": { "role": { "type": "string", "description": "The role of the user for a set of resources.", "enum": [ "observer", "responder", "manager" ], "example": "observer" }, "resources": { "type": "array", "items": { "$ref": "#/components/schemas/Reference" } } }, "example": { "role": "manager", "resources": [ { "id": "PANZZEQ", "type": "escalation_policy", "summary": "Engineering Escalation Policy", "self": "https://api.pagerduty.com/escalation_policies/PANZZEQ", "html_url": "https://subdomain.pagerduty.com/escalation_policies/PANZZEQ" }, { "id": "PI7DH85", "type": "schedule", "summary": "Daily Engineering Rotation", "self": "https://api.pagerduty.com/schedules/PI7DH85", "html_url": "https://subdomain.pagerduty.com/schedules/PI7DH85" } ] } }, "UserReference": { "allOf": [ { "$ref": "#/components/schemas/Reference" }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "user_reference" ] } } } ] }, "UserSession": { "type": "object", "properties": { "id": { "type": "string", "readOnly": true }, "user_id": { "type": "string", "readOnly": true }, "created_at": { "type": "string", "format": "date-time", "readOnly": true, "description": "The date/time the user session was first created." }, "type": { "type": "string", "readOnly": true, "description": "The type of the session", "enum": [ "browser", "oauth" ] }, "summary": { "type": "string", "readOnly": true, "description": "The summary of the session" } }, "required": [ "id", "user_id", "created_at", "type", "summary" ], "example": { "id": "PXPGF42", "user_id": "PXPGF42", "created_at": "2018-10-06T21:30:42.000Z", "summary": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.131 Safari/537.36", "type": "browser" } }, "User": { "allOf": [ { "$ref": "#/components/schemas/Tag/allOf/0" }, { "type": "object", "properties": { "name": { "type": "string", "description": "The name of the user.", "maxLength": 100 }, "type": { "type": "string", "description": "The type of object being created.", "default": "user", "enum": [ "user" ] }, "email": { "type": "string", "format": "email", "description": "The user's email address.", "minLength": 6, "maxLength": 100 }, "time_zone": { "type": "string", "format": "tzinfo", "description": "The preferred time zone name. If null, the account's time zone will be used." }, "color": { "type": "string", "description": "The schedule color." }, "role": { "description": "The user role. Account must have the `read_only_users` ability to set a user as a `read_only_user` or a `read_only_limited_user`, and must have advanced permissions abilities to set a user as `observer` or `restricted_access`.", "type": "string", "enum": [ "admin", "limited_user", "observer", "owner", "read_only_user", "restricted_access", "read_only_limited_user", "user" ] }, "avatar_url": { "type": "string", "format": "url", "description": "The URL of the user's avatar.", "readOnly": true }, "description": { "type": "string", "description": "The user's bio." }, "invitation_sent": { "type": "boolean", "readOnly": true, "description": "If true, the user has an outstanding invitation." }, "job_title": { "type": "string", "description": "The user's title.", "maxLength": 100 }, "teams": { "type": "array", "readOnly": true, "description": "The list of teams to which the user belongs. Account must have the `teams` ability to set this.", "items": { "$ref": "#/components/schemas/TeamReference" } }, "contact_methods": { "type": "array", "readOnly": true, "description": "The list of contact methods for the user.", "items": { "$ref": "#/components/schemas/ContactMethodReference" } }, "notification_rules": { "readOnly": true, "type": "array", "description": "The list of notification rules for the user.", "items": { "$ref": "#/components/schemas/NotificationRuleReference" } } }, "required": [ "name", "email", "type" ], "example": { "type": "user", "name": "Earline Greenholt", "email": "125.greenholt.earline@graham.name", "time_zone": "America/Lima", "color": "green", "role": "admin", "job_title": "Director of Engineering", "avatar_url": "https://secure.gravatar.com/avatar/1d1a39d4635208d5664082a6c654a73f.png?d=mm&r=PG", "description": "I'm the boss" } } ] }, "TeamReference": { "allOf": [ { "$ref": "#/components/schemas/Reference" }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "team_reference" ] } } } ] }, "Team": { "allOf": [ { "$ref": "#/components/schemas/Tag/allOf/0" }, { "type": "object", "properties": { "type": { "type": "string", "description": "The type of object being created.", "default": "team", "enum": [ "team" ] }, "name": { "type": "string", "description": "The name of the team.", "maxLength": 100 }, "description": { "type": "string", "description": "The description of the team.", "maxLength": 1024 }, "parent": { "$ref": "#/components/schemas/TeamReference" } }, "required": [ "name", "type" ], "example": { "type": "team", "name": "Engineering", "description": "The engineering team" } } ] }, "IncidentReference": { "allOf": [ { "$ref": "#/components/schemas/Reference" }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "incident_reference" ] } } } ] }, "Incident": { "allOf": [ { "$ref": "#/components/schemas/Tag/allOf/0" }, { "type": "object", "properties": { "incident_number": { "type": "integer", "readOnly": true, "description": "The number of the incident. This is unique across your account." }, "created_at": { "type": "string", "format": "date-time", "readOnly": true, "description": "The date/time the incident was first triggered." }, "status": { "type": "string", "description": "The current status of the incident.", "enum": [ "triggered", "acknowledged", "resolved" ] }, "title": { "type": "string", "readOnly": false, "description": "A succinct description of the nature, symptoms, cause, or effect of the incident." }, "pending_actions": { "type": "array", "readOnly": true, "description": "The list of pending_actions on the incident. A pending_action object contains a type of action which can be escalate, unacknowledge, resolve or urgency_change. A pending_action object contains at, the time at which the action will take place. An urgency_change pending_action will contain to, the urgency that the incident will change to.", "items": { "$ref": "#/components/schemas/IncidentAction" } }, "incident_key": { "type": "string", "readOnly": true, "description": "The incident's de-duplication key." }, "service": { "$ref": "#/components/schemas/ServiceReference" }, "assignments": { "type": "array", "description": "List of all assignments for this incident.", "items": { "$ref": "#/components/schemas/Assignment" } }, "assigned_via": { "type": "string", "description": "How the current incident assignments were decided. Note that `direct_assignment` incidents will not escalate up the attached `escalation_policy`", "enum": [ "escalation_policy", "direct_assignment" ], "readOnly": true }, "acknowledgements": { "type": "array", "description": "List of all acknowledgements for this incident.", "items": { "$ref": "#/components/schemas/Acknowledgement" } }, "last_status_change_at": { "type": "string", "format": "date-time", "readOnly": true, "description": "The time at which the status of the incident last changed." }, "last_status_change_by": { "$ref": "#/components/schemas/AgentReference" }, "first_trigger_log_entry": { "$ref": "#/components/schemas/LogEntryReference" }, "escalation_policy": { "$ref": "#/components/schemas/EscalationPolicyReference" }, "teams": { "type": "array", "description": "The teams involved in the incident’s lifecycle.", "items": { "$ref": "#/components/schemas/TeamReference" } }, "priority": { "$ref": "#/components/schemas/PriorityReference" }, "urgency": { "type": "string", "enum": [ "high", "low" ], "description": "The current urgency of the incident." }, "resolve_reason": { "$ref": "#/components/schemas/ResolveReason" }, "alert_counts": { "$ref": "#/components/schemas/AlertCount" }, "conference_bridge": { "$ref": "#/components/schemas/ConferenceBridge" }, "body": { "$ref": "#/components/schemas/IncidentBody" } } } ] }, "EscalationPolicyReference": { "allOf": [ { "$ref": "#/components/schemas/Reference" }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "escalation_policy_reference" ] } } } ] }, "EscalationPolicy": { "allOf": [ { "$ref": "#/components/schemas/Tag/allOf/0" }, { "type": "object", "properties": { "type": { "type": "string", "description": "The type of object being created.", "default": "escalation_policy", "enum": [ "escalation_policy" ] }, "name": { "type": "string", "description": "The name of the escalation policy." }, "description": { "type": "string", "description": "Escalation policy description." }, "num_loops": { "type": "integer", "description": "The number of times the escalation policy will repeat after reaching the end of its escalation.", "default": 0, "minimum": 0 }, "on_call_handoff_notifications": { "type": "string", "description": "Determines how on call handoff notifications will be sent for users on the escalation policy. Defaults to \"if_has_services\".", "enum": [ "if_has_services", "always" ] }, "escalation_rules": { "type": "array", "items": { "$ref": "#/components/schemas/EscalationRule" } }, "services": { "type": "array", "items": { "$ref": "#/components/schemas/ServiceReference" }, "minLength": 0 }, "teams": { "type": "array", "description": "Teams associated with the policy. Account must have the `teams` ability to use this parameter.", "items": { "$ref": "#/components/schemas/TeamReference" }, "minLength": 0 } }, "required": [ "type", "name", "escalation_rules" ], "example": { "id": "PQIL2IX", "type": "escalation_policy", "name": "Engineering Escalation Policy", "escalation_rules": [ { "escalation_delay_in_minutes": 30, "targets": [ { "id": "PEYSGVF", "type": "user_reference" } ] } ], "services": [ { "id": "PIJ90N7", "type": "service_reference" } ], "num_loops": 2, "on_call_handoff_notifications": "if_has_services", "teams": [ { "id": "PQ9K7I8", "type": "team_reference" } ], "description": "Here is the ep for the engineering team." } } ] }, "EscalationRule": { "type": "object", "properties": { "id": { "type": "string", "readOnly": true }, "escalation_delay_in_minutes": { "type": "integer", "description": "The number of minutes before an unacknowledged incident escalates away from this rule." }, "targets": { "type": "array", "minItems": 1, "maxItems": 10, "description": "The targets an incident should be assigned to upon reaching this rule.", "items": { "$ref": "#/components/schemas/EscalationTargetReference" } } }, "required": [ "escalation_delay_in_minutes", "targets" ], "example": { "escalation_delay_in_minutes": 30, "targets": [ { "id": "PAM4FGS", "type": "user_reference" }, { "id": "PI7DH85", "type": "schedule_reference" } ] } }, "EscalationTargetReference": { "allOf": [ { "$ref": "#/components/schemas/Reference" }, { "type": "object", "description": "The escalation target is the entity that will be assigned an incident upon escalation.", "properties": { "type": { "enum": [ "user", "schedule", "user_reference", "schedule_reference" ], "type": "string" } } } ] }, "ExtensionReference": { "allOf": [ { "$ref": "#/components/schemas/Reference" }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "extension_reference" ] } } } ] }, "Extension": { "allOf": [ { "$ref": "#/components/schemas/Tag/allOf/0" }, { "type": "object", "properties": { "name": { "type": "string", "description": "The name of the extension." }, "type": { "type": "string", "description": "The type of object being created.", "default": "extension", "enum": [ "extension" ] }, "endpoint_url": { "type": "string", "format": "url", "description": "The url of the extension." }, "extension_objects": { "type": "array", "description": "The objects for which the extension applies", "items": { "$ref": "#/components/schemas/ServiceReference" } }, "extension_schema": { "$ref": "#/components/schemas/ExtensionSchemaReference" }, "temporarily_disabled": { "type": "boolean", "readOnly": true, "description": "Whether or not this extension is temporarily disabled; for example, a webhook extension that is repeatedly rejected by the server.", "default": false }, "config": { "type": "object", "description": "The object that contains extension configuration values depending on the extension schema specification." } }, "required": [ "extension_objects", "extension_schema", "name" ], "example": { "id": "PJU23I3", "endpoint_url": "https://example.com/receive_a_pagerduty_webhook", "name": "My Webhook", "summary": "My Webhook", "type": "extension", "extension_schema": { "id": "PJFWPEP", "type": "extension_schema_reference" }, "extension_objects": [ { "id": "PIJ90N7", "type": "service_reference" } ], "config": { "anykey": "anyvalue" } } } ] }, "ServiceReference": { "allOf": [ { "$ref": "#/components/schemas/Reference" }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "service_reference" ] } } } ] }, "Service": { "allOf": [ { "$ref": "#/components/schemas/Tag/allOf/0" }, { "type": "object", "properties": { "type": { "type": "string", "description": "The type of object being created.", "default": "service", "enum": [ "service" ] }, "name": { "type": "string", "description": "The name of the service." }, "description": { "type": "string", "description": "The user-provided description of the service." }, "auto_resolve_timeout": { "type": "integer", "description": "Time in seconds that an incident is automatically resolved if left open for that long. Value is `null` if the feature is disabled. Value must not be negative. Setting this field to `0`, `null` (or unset in POST request) will disable the feature.", "default": 14400 }, "acknowledgement_timeout": { "type": "integer", "description": "Time in seconds that an incident changes to the Triggered State after being Acknowledged. Value is `null` if the feature is disabled. Value must not be negative. Setting this field to `0`, `null` (or unset in POST request) will disable the feature.", "default": 1800 }, "created_at": { "type": "string", "format": "date-time", "readOnly": true, "description": "The date/time when this service was created" }, "status": { "type": "string", "description": "The current state of the Service. Valid statuses are:\n\n\n- `active`: The service is enabled and has no open incidents.\n- `warning`: The service is enabled and has one or more acknowledged incidents.\n- `critical`: The service is enabled and has one or more triggered incidents.\n- `maintenance`: The service is under maintenance, no new incidents will be triggered during maintenance mode.\n- `disabled`: The service is disabled and will not have any new triggered incidents.\n", "enum": [ "active", "warning", "critical", "maintenance", "disabled" ] }, "last_incident_timestamp": { "type": "string", "format": "date-time", "readOnly": true, "description": "The date/time when the most recent incident was created for this service." }, "escalation_policy": { "$ref": "#/components/schemas/EscalationPolicyReference" }, "teams": { "type": "array", "readOnly": true, "description": "The set of teams associated with this service.", "items": { "$ref": "#/components/schemas/TeamReference" } }, "integrations": { "type": "array", "readOnly": true, "description": "An array containing Integration objects that belong to this service. If `integrations` is passed as an argument, these are full objects - otherwise, these are references.", "items": { "$ref": "#/components/schemas/IntegrationReference" } }, "incident_urgency_rule": { "$ref": "#/components/schemas/IncidentUrgencyRule" }, "support_hours": { "$ref": "#/components/schemas/SupportHours" }, "scheduled_actions": { "type": "array", "description": "An array containing scheduled actions for the service.", "items": { "$ref": "#/components/schemas/ScheduledAction" } }, "addons": { "type": "array", "description": "The array of Add-ons associated with this service.", "readOnly": true, "items": { "$ref": "#/components/schemas/AddonReference" } }, "alert_creation": { "type": "string", "description": "Whether a service creates only incidents, or both alerts and incidents. A service must create alerts in order to enable incident merging.\n* \"create_incidents\" - The service will create one incident and zero alerts for each incoming event.\n* \"create_alerts_and_incidents\" - The service will create one incident and one associated alert for each incoming event.\n", "enum": [ "create_incidents", "create_alerts_and_incidents" ] }, "alert_grouping": { "type": "string", "description": "Defines how alerts on this service will be automatically grouped into incidents. Note that the alert grouping features are available only on certain plans. There are three available options:\n* null - No alert grouping on the service. Each alert will create a separate incident;\n* \"time\" - All alerts within a specified duration will be grouped into the same incident. This duration is set in the `alert_grouping_timeout` setting (described below). Available on Standard, Enterprise, and Event Intelligence plans;\n* \"intelligent\" - Alerts will be intelligently grouped based on a machine learning model that looks at the alert summary, timing, and the history of grouped alerts. Available on Enterprise and Event Intelligence plans\n", "enum": [ "time", "intelligent" ] }, "alert_grouping_timeout": { "type": "integer", "description": "The duration in minutes within which to automatically group incoming alerts. This setting applies only when `alert_grouping` is set to `\"time\"`. To continue grouping alerts until the incident is resolved, set this value to `0`.\n" } }, "required": [ "type", "escalation_policy" ], "example": { "id": "PSI2I2O", "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": 61200, "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": "time", "alert_grouping_timeout": 2 } } ] }, "PriorityReference": { "allOf": [ { "$ref": "#/components/schemas/Reference" }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "priority_reference" ] } } } ] }, "Priority": { "allOf": [ { "$ref": "#/components/schemas/Tag/allOf/0" }, { "type": "object", "properties": { "name": { "type": "string", "description": "The user-provided short name of the priority." }, "description": { "type": "string", "description": "The user-provided description of the priority." } } } ] }, "Integration": { "allOf": [ { "$ref": "#/components/schemas/Tag/allOf/0" }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "aws_cloudwatch_inbound_integration", "cloudkick_inbound_integration", "event_transformer_api_inbound_integration", "generic_email_inbound_integration", "generic_events_api_inbound_integration", "keynote_inbound_integration", "nagios_inbound_integration", "pingdom_inbound_integration", "sql_monitor_inbound_integration", "events_api_v2_inbound_integration" ] }, "name": { "type": "string", "description": "The name of this integration." }, "service": { "$ref": "#/components/schemas/ServiceReference" }, "created_at": { "type": "string", "format": "date-time", "readOnly": true, "description": "The date/time when this integration was created." }, "vendor": { "$ref": "#/components/schemas/VendorReference" } } } ] }, "IntegrationReference": { "allOf": [ { "$ref": "#/components/schemas/Reference" }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "aws_cloudwatch_inbound_integration_reference", "cloudkick_inbound_integration_reference", "event_transformer_api_inbound_integration_reference", "generic_email_inbound_integration_reference", "generic_events_api_inbound_integration_reference", "keynote_inbound_integration_reference", "nagios_inbound_integration_reference", "pingdom_inbound_integration_reference", "sql_monitor_inbound_integration_reference" ] } } } ] }, "MaintenanceWindowReference": { "allOf": [ { "$ref": "#/components/schemas/Reference" }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "maintenance_window_reference" ] } } } ] }, "MaintenanceWindow": { "allOf": [ { "$ref": "#/components/schemas/Tag/allOf/0" }, { "type": "object", "properties": { "type": { "type": "string", "description": "The type of object being created.", "default": "maintenance_window", "enum": [ "maintenance_window" ] }, "sequence_number": { "type": "integer", "readOnly": true, "description": "The order in which the maintenance window was created." }, "start_time": { "type": "string", "format": "date-time", "description": "This maintenance window's start time. This is when the services will stop creating incidents. If this date is in the past, it will be updated to be the current time." }, "end_time": { "type": "string", "format": "date-time", "description": "This maintenance window's end time. This is when the services will start creating incidents again. This date must be in the future and after the `start_time`." }, "description": { "type": "string", "description": "A description for this maintenance window." }, "created_by": { "$ref": "#/components/schemas/UserReference" }, "services": { "type": "array", "items": { "$ref": "#/components/schemas/ServiceReference" } }, "teams": { "type": "array", "items": { "$ref": "#/components/schemas/TeamReference" }, "readOnly": true } }, "required": [ "start_time", "end_time", "services", "type" ], "example": { "id": "PIJ89JD", "type": "maintenance_window", "start_time": "2015-11-10T01:00:00.000Z", "end_time": "2015-11-10T03:00:00.000Z", "description": "Immanentizing the eschaton", "services": [ { "id": "PIJ90N7", "type": "service_reference" } ] } } ] }, "ScheduleReference": { "allOf": [ { "$ref": "#/components/schemas/Reference" }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "schedule_reference" ] } } } ] }, "Schedule": { "allOf": [ { "$ref": "#/components/schemas/Tag/allOf/0" }, { "type": "object", "properties": { "type": { "type": "string", "description": "The type of object being created.", "default": "schedule", "enum": [ "schedule" ] }, "schedule_layers": { "type": "array", "description": "A list of schedule layers.", "items": { "$ref": "#/components/schemas/ScheduleLayer" } }, "time_zone": { "type": "string", "format": "activesupport-time-zone", "description": "The time zone of the schedule." }, "name": { "type": "string", "description": "The name of the schedule" }, "description": { "type": "string", "description": "The description of the schedule" }, "final_schedule": { "$ref": "#/components/schemas/SubSchedule" }, "overrides_subschedule": { "$ref": "#/components/schemas/SubSchedule" }, "escalation_policies": { "type": "array", "readOnly": true, "description": "An array of all of the escalation policies that uses this schedule.", "items": { "$ref": "#/components/schemas/EscalationPolicyReference" } }, "users": { "type": "array", "readOnly": true, "description": "An array of all of the users on the schedule.", "items": { "$ref": "#/components/schemas/UserReference" } }, "teams": { "type": "array", "readOnly": true, "description": "An array of all of the teams on the schedule.", "items": { "$ref": "#/components/schemas/TeamReference" } } }, "required": [ "schedule_layers", "time_zone", "type" ], "example": { "name": "Daily Engineering Rotation", "type": "schedule", "time_zone": "America/New_York", "description": "Rotation schedule for engineering", "schedule_layers": [ { "name": "Night Shift", "start": "2015-11-07T01:00:00.000Z", "end": "2016-11-07T01:00:00.000Z", "rotation_virtual_start": "2015-11-07T01:00:00.000Z", "rotation_turn_length_seconds": 86400, "users": [ { "user": { "id": "PXPGF42", "type": "user_reference" } } ], "restrictions": [ { "type": "daily_restriction", "start_time_of_day": "08:00:00", "duration_seconds": 32400 } ] } ] } } ] }, "SubSchedule": { "type": "object", "properties": { "name": { "type": "string", "readOnly": true, "description": "The name of the subschedule", "enum": [ "Final Schedule", "Overrides" ] }, "rendered_schedule_entries": { "type": "array", "readOnly": true, "description": "This is a list of entries on the computed layer for the current time range. Since or until must be set in order for this field to be populated.", "items": { "$ref": "#/components/schemas/ScheduleLayerEntry" } }, "rendered_coverage_percentage": { "type": "number", "readOnly": true, "description": "The percentage of the time range covered by this layer. Returns null unless since or until are set." } }, "required": [ "name" ] }, "ScheduleLayer": { "type": "object", "properties": { "id": { "type": "string" }, "start": { "type": "string", "format": "date-time", "description": "The start time of this layer." }, "end": { "type": "string", "format": "date-time", "description": "The end time of this layer. If `null`, the layer does not end." }, "users": { "type": "array", "description": "The ordered list of users on this layer. The position of the user on the list determines their order in the layer.", "items": { "$ref": "#/components/schemas/ScheduleLayerUser" } }, "restrictions": { "type": "array", "description": "An array of restrictions for the layer. A restriction is a limit on which period of the day or week the schedule layer can accept assignments.", "items": { "$ref": "#/components/schemas/Restriction" } }, "rotation_virtual_start": { "type": "string", "format": "date-time", "description": "The effective start time of the layer. This can be before the start time of the schedule." }, "rotation_turn_length_seconds": { "type": "integer", "description": "The duration of each on-call shift in seconds." }, "name": { "type": "string", "description": "The name of the schedule layer." }, "rendered_schedule_entries": { "type": "array", "readOnly": true, "description": "This is a list of entries on the computed layer for the current time range. Since or until must be set in order for this field to be populated.", "items": { "$ref": "#/components/schemas/ScheduleLayerEntry" } }, "rendered_coverage_percentage": { "type": "number", "readOnly": true, "description": "The percentage of the time range covered by this layer. Returns null unless since or until are set." } }, "required": [ "start", "users", "rotation_virtual_start", "rotation_turn_length_seconds" ] }, "ScheduleLayerEntry": { "type": "object", "properties": { "user": { "$ref": "#/components/schemas/UserReference" }, "start": { "type": "string", "format": "date-time", "readOnly": true, "description": "The start time of this entry." }, "end": { "type": "string", "format": "date-time", "readOnly": true, "description": "The end time of this entry. If null, the entry does not end." } }, "required": [ "start", "end" ] }, "ScheduleLayerUser": { "type": "object", "properties": { "user": { "$ref": "#/components/schemas/UserReference" } }, "required": [ "user" ] }, "Override": { "allOf": [ { "$ref": "#/components/schemas/Tag/allOf/0" }, { "type": "object", "properties": { "id": { "type": "string", "readOnly": true }, "start": { "description": "The start date and time for the override.", "type": "string", "format": "date-time" }, "end": { "description": "The end date and time for the override.", "type": "string", "format": "date-time" }, "user": { "$ref": "#/components/schemas/UserReference" } }, "required": [ "start", "end", "user" ], "example": { "start": "2012-07-01T04:00:00.000Z", "end": "2012-07-02T04:00:00.000Z", "user": { "id": "PEYSGVF", "type": "user_reference" } } } ] }, "Restriction": { "type": "object", "properties": { "type": { "type": "string", "description": "Specify the types of `restriction`.", "enum": [ "daily_restriction", "weekly_restriction" ] }, "duration_seconds": { "type": "integer", "description": "The duration of the restriction in seconds." }, "start_time_of_day": { "type": "string", "format": "partial-time", "description": "The start time in HH:mm:ss format." }, "start_day_of_week": { "type": "integer", "description": "Only required for use with a `weekly_restriction` restriction type. The first day of the weekly rotation schedule as [ISO 8601 day](https://en.wikipedia.org/wiki/ISO_week_date) (1 is Monday, etc.)", "minimum": 1, "maximum": 7 } }, "discriminator": { "propertyName": "type" }, "required": [ "type", "duration_seconds", "start_time_of_day" ] }, "WeeklyRestriction": { "allOf": [ { "$ref": "#/components/schemas/Restriction" }, { "type": "object", "properties": { "start_day_of_week": { "type": "integer", "description": "The first day of the weekly rotation schedule as [ISO 8601 day](https://en.wikipedia.org/wiki/ISO_week_date) (1 is Monday, etc.)", "minimum": 1, "maximum": 7 } }, "required": [ "start_day_of_week" ] } ] }, "Pagination": { "type": "object", "properties": { "offset": { "type": "integer", "description": "Echoes offset pagination property.", "readOnly": true }, "limit": { "type": "integer", "description": "Echoes limit pagination property.", "readOnly": true }, "more": { "type": "boolean", "description": "Indicates if there are additional records to return", "readOnly": true }, "total": { "type": "integer", "description": "The total number of records matching the given query.", "readOnly": true } } }, "Assignment": { "type": "object", "properties": { "at": { "type": "string", "format": "date-time", "description": "Time at which the assignment was created." }, "assignee": { "$ref": "#/components/schemas/UserReference" } }, "required": [ "at", "assignee" ] }, "Acknowledgement": { "type": "object", "properties": { "at": { "type": "string", "format": "date-time", "description": "Time at which the acknowledgement was created." }, "acknowledger": { "$ref": "#/components/schemas/AcknowledgerReference" } }, "required": [ "at", "acknowledger" ] }, "AcknowledgerReference": { "allOf": [ { "$ref": "#/components/schemas/Reference" }, { "description": "The acknowledger represents the entity that made the acknowledgement for an incident.", "type": "object", "properties": { "type": { "enum": [ "user_reference", "service_reference" ], "type": "string" } } } ] }, "Oncall": { "type": "object", "properties": { "escalation_policy": { "$ref": "#/components/schemas/EscalationPolicyReference" }, "user": { "$ref": "#/components/schemas/UserReference" }, "schedule": { "$ref": "#/components/schemas/ScheduleReference" }, "escalation_level": { "type": "integer", "readOnly": true, "description": "The escalation level for the on-call." }, "start": { "type": "string", "format": "date-time", "readOnly": true, "description": "The start of the on-call. If `null`, the on-call is a permanent user on-call." }, "end": { "type": "string", "format": "date-time", "readOnly": true, "description": "The end of the on-call. If `null`, the user does not go off-call." } }, "example": { "user": { "id": "PT23IWX", "type": "user_reference", "summary": "Tim Wright", "self": "https://api.pagerduty.com/users/PT23IWX", "html_url": "https://subdomain.pagerduty.com/users/PT23IWX" }, "schedule": { "id": "PI7DH85", "type": "schedule_reference", "summary": "Daily Engineering Rotation", "self": "https://api.pagerduty.com/schedules/PI7DH85", "html_url": "https://subdomain.pagerduty.com/schedules/PI7DH85" }, "escalation_policy": { "id": "PT20YPA", "type": "escalation_policy_reference", "summary": "Engineering Escalation Policy", "self": "https://api.pagerduty.com/escalation_policies/PT20YPA", "html_url": "https://subdomain.pagerduty.com/escalation_policies/PT20YPA" }, "escalation_level": 2, "start": "2015-03-06T20:28:51.000Z", "end": "2015-03-07T20:28:51.000Z" } }, "VendorReference": { "allOf": [ { "$ref": "#/components/schemas/Reference" }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "vendor_reference" ] } } } ] }, "Vendor": { "allOf": [ { "$ref": "#/components/schemas/Tag/allOf/0" }, { "type": "object", "properties": { "name": { "type": "string", "readOnly": true, "description": "The short name of the vendor" }, "website_url": { "type": "string", "format": "url", "readOnly": true, "description": "URL of the vendor's main website" }, "logo_url": { "type": "string", "format": "url", "readOnly": true, "description": "URL of a logo identifying the vendor" }, "thumbnail_url": { "type": "string", "format": "url", "readOnly": true, "description": "URL of a small thumbnail image identifying the vendor" }, "description": { "type": "string", "readOnly": true, "description": "A short description of this vendor, and common use-cases of integrations for this vendor." }, "integration_guide_url": { "type": "string", "format": "url", "readOnly": true, "description": "URL of an integration guide for this vendor" } }, "example": { "type": "vendor", "name": "Amazon CloudWatch", "website_url": "https://aws.amazon.com/cloudwatch", "logo_url": "https://s3.amazonaws.com/pdpartner/cloudwatch_large.png", "thumbnail_url": "https://s3.amazonaws.com/pdpartner/cloudwatch_thumb.png", "description": "Amazon Web Services CloudWatch provides monitoring for AWS cloud resources and customer-run applications. AWS can collect data, gain insight, and alert users to fix problems within applications and organizations. AWS CloudWatch gives system-wide visibility into resource utilization and notifications can be set for when any metrics cross a specified threshold.", "integration_guide_url": "http://www.pagerduty.com/docs/guides/aws-cloudwatch-integration-guide/" } } ] }, "ExtensionSchemaReference": { "allOf": [ { "$ref": "#/components/schemas/Reference" }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "extension_schema_reference" ] } } } ] }, "ExtensionSchema": { "type": "object", "properties": { "icon_url": { "type": "string", "format": "url", "readOnly": true, "description": "A small logo, 18-by-18 pixels." }, "logo_url": { "type": "string", "format": "url", "readOnly": true, "description": "A large logo, 75 pixels high and no more than 300 pixels wide." }, "label": { "type": "string", "readOnly": true, "description": "Human friendly display label" }, "key": { "type": "string", "readOnly": true, "description": "Machine friendly display label" }, "description": { "type": "string", "description": "The long description for the Extension" }, "guide_url": { "type": "string", "format": "url", "readOnly": true, "description": "A link to the extension's support guide" }, "send_types": { "type": "array", "description": "The types of PagerDuty incident events that will activate this Extension", "uniqueItems": true, "items": { "type": "string", "enum": [ "trigger", "acknowledge", "resolve", "delegate", "escalate", "unacknowledge", "assign", "custom" ] } }, "url": { "type": "string", "format": "url", "readOnly": true, "description": "The url that the webhook payload will be sent to for this Extension." } }, "example": { "id": "PJFWPEP", "type": "extension_schema", "summary": "Generic Webhook", "self": "https://api.pagerduty.com/extension_schemas/PJFWPEP", "html_url": "null", "description": "Long description here", "guide_url": "https://developer.pagerduty.com", "icon_url": "https://extension.com/extension.png", "key": "generic_webhook", "label": "Generic Webhook", "logo_url": "https://extension.com/logo.png", "send_types": [ "trigger", "acknowledge", "resolve", "delegate", "escalate", "unacknowledge", "assign", "custom" ], "url": "https://developer.pagerduty.com/my_webhook_endpoint" } }, "ResolveReason": { "type": "object", "properties": { "type": { "type": "string", "description": "The reason the incident was resolved. The only reason currently supported is merge.", "default": "merge_resolve_reason", "enum": [ "merge_resolve_reason" ] }, "incident": { "$ref": "#/components/schemas/IncidentReference" } } }, "Alert": { "allOf": [ { "$ref": "#/components/schemas/Tag/allOf/0" }, { "type": "object", "properties": { "created_at": { "type": "string", "format": "date-time", "readOnly": true, "description": "The date/time the alert was first triggered." }, "type": { "type": "string", "default": "alert", "description": "The type of object being created.", "enum": [ "alert" ] }, "status": { "type": "string", "description": "The current status of the alert.", "enum": [ "triggered", "resolved" ] }, "alert_key": { "type": "string", "readOnly": true, "description": "The alert's de-duplication key." }, "service": { "$ref": "#/components/schemas/ServiceReference" }, "first_trigger_log_entry": { "$ref": "#/components/schemas/LogEntryReference" }, "incident": { "$ref": "#/components/schemas/IncidentReference" }, "suppressed": { "type": "boolean", "readOnly": true, "description": "Whether or not an alert is suppressed. Suppressed alerts are not created with a parent incident.", "default": false }, "severity": { "type": "string", "readOnly": true, "description": "The magnitude of the problem as reported by the monitoring tool.", "enum": [ "info", "warning", "error", "critical" ] }, "integration": { "$ref": "#/components/schemas/Integration" }, "body": { "type": "object", "readOnly": true, "description": "A JSON object containing data describing the alert.", "title": "Body", "properties": { "type": { "type": "string", "description": "The type of the body.", "enum": [ "alert_body" ] }, "contexts": { "type": "array", "readOnly": true, "description": "Contexts to be included with the body such as links to graphs or images.", "items": { "$ref": "#/components/schemas/Context" } }, "details": { "type": "object", "readOnly": true, "description": "An arbitrary JSON object containing any data explaining the nature of the alert." } } } }, "required": [ "type" ], "example": { "type": "alert", "status": "resolved", "incident": { "id": "PEYSGVF", "type": "incident_reference" }, "body": { "type": "alert_body", "contexts": [ { "type": "link" } ], "details": { "customKey": "Server is on fire!", "customKey2": "Other stuff!" } } } } ] }, "AlertReference": { "allOf": [ { "$ref": "#/components/schemas/Reference" }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "alert_reference" ] } } } ] }, "AlertCount": { "type": "object", "properties": { "triggered": { "type": "integer", "description": "The count of triggered alerts" }, "resolved": { "type": "integer", "description": "The count of resolved alerts" }, "all": { "type": "integer", "description": "The total count of alerts" } } }, "IncidentBody": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "incident_body" ] }, "details": { "type": "string", "description": "Additional incident details." } }, "required": [ "type" ] }, "StatusUpdate": { "type": "object", "properties": { "id": { "type": "string" }, "message": { "type": "string", "description": "The message of the status update." }, "created_at": { "type": "string", "description": "The date/time when this status update was created." }, "sender": { "$ref": "#/components/schemas/UserReference" } } }, "ResponderRequest": { "type": "object", "properties": { "incident": { "$ref": "#/components/schemas/IncidentReference" }, "requester": { "$ref": "#/components/schemas/UserReference" }, "requested_at": { "type": "string", "description": "The time the request was made" }, "message": { "type": "string", "description": "The message sent with the responder request" }, "responder_request_targets": { "type": "array", "description": "The array of targets the responder request is being sent to", "items": { "$ref": "#/components/schemas/ResponderRequestTargetReference" } } } }, "ResponderRequestTargetReference": { "type": "object", "properties": { "type": { "type": "string", "description": "The type of target (either a user or an escalation policy)" }, "id": { "type": "string", "description": "The id of the user or escalation policy" }, "summary": { "type": "string" }, "incident_responders": { "type": "array", "description": "An array of responders associated with the specified incident", "items": { "$ref": "#/components/schemas/IncidentsRespondersReference" } } } }, "IncidentsRespondersReference": { "type": "object", "properties": { "state": { "type": "string", "description": "The status of the responder being added to the incident", "example": "pending" }, "user": { "$ref": "#/components/schemas/UserReference" }, "incident": { "$ref": "#/components/schemas/IncidentReference" }, "updated_at": { "type": "string" }, "message": { "type": "string", "description": "The message sent with the responder request" }, "requester": { "$ref": "#/components/schemas/UserReference" }, "requested_at": { "type": "string" } } }, "ConferenceBridge": { "type": "object", "properties": { "conference_number": { "type": "string", "description": "The phone number of the conference call for the conference bridge. Phone numbers should be formatted like +1 415-555-1212,,,,1234#, where a comma (,) represents a one-second wait and pound (#) completes access code input." }, "conference_url": { "type": "string", "format": "url", "description": "An URL for the conference bridge. This could be a link to a web conference or Slack channel." } } }, "Action": { "type": "object", "description": "A message containing information about a single PagerDuty action.", "readOnly": true, "properties": { "id": { "type": "string", "format": "uuid", "description": "Uniquely identifies this outgoing webhook message; can be used for idempotency when processing the messages.", "readOnly": true }, "triggered_at": { "type": "string", "format": "date-time", "description": "The date/time when this message was was sent.", "readOnly": true }, "webhook": { "$ref": "#/components/schemas/Webhook" } } }, "WebhookIncidentAction": { "allOf": [ { "$ref": "#/components/schemas/Action" }, { "type": "object", "properties": { "type": { "type": "string", "description": "The type of action being reported by this message. * `incident.trigger` - Sent when an incident is newly created/triggered. * `incident.acknowledge` - Sent when an incident is acknowledged by a user. * `incident.unacknowledge` - Sent when an incident is unacknowledged due to its acknowledgement timing out. * `incident.resolve` - Sent when an incident has been resolved. * `incident.assign` - Sent when an incident has been assigned to another user. Often occurs in concert with an `acknowledge`. * `incident.escalate` - Sent when an incident has been escalated to another user in the same escalation chain. * `incident.delegate` - Sent when an incident has been reassigned to another escalation policy. * `incident.annotate` - Sent when a note is created on an incident.\n", "enum": [ "incident.trigger", "incident.acknowledge", "incident.unacknowledge", "incident.resolve", "incident.assign", "incident.escalate", "incident.delegate", "incident.annotate" ] }, "incident": { "$ref": "#/components/schemas/Incident" }, "log_entries": { "type": "array", "description": "Log Entries that correspond to the action this Webhook is reporting. Includes the channels.", "items": { "$ref": "#/components/schemas/LogEntry" } } }, "example": { "id": "bb4fcb00-6324-11e6-b9aa-22000affca53", "type": "incident.resolve", "triggered_at": "2016-08-15T20:13:28.000Z", "log_entries": [ { "id": "R0FFIOTKIU30MN7XWR99SI0", "type": "resolve_log_entry", "summary": "Resolved by Earline Greenholt", "self": "https://api.pagerduty.com/log_entries/R0FFIOTKIU30MN7XWR99SI0", "html_url": null, "created_at": "2017-09-22T18:37:29.000Z", "agent": { "id": "PLMUP47", "type": "user_reference", "summary": "Earline Greenholt", "self": "https://api.pagerduty.com/users/PXPGF42", "html_url": "https://subdomain.pagerduty.com/users/PXPGF42" }, "channel": { "type": "slack", "user": { "id": "U60DQ6ZXY", "name": "alisdair" }, "team": { "id": "T029K7I8", "domain": "subdomain" }, "channel": { "id": "C6981DRAW", "name": "subdomain-ops" } }, "service": { "id": "PN49J75", "type": "service_reference", "summary": "Cool Service", "self": "https://api.pagerduty.com/services/PNTDJ30", "html_url": "https://subdomain.pagerduty.com/services/PNTDJ30" }, "incident": { "id": "PVO5OB2", "type": "incident_reference", "summary": "The server is on fire.", "self": "https://api.pagerduty.com/incidents/PT4KHLK", "html_url": "https://subdomain.pagerduty.com/incidents/PT4KHLK" }, "teams": [ { "id": "PQ9K7I8", "type": "team_reference", "summary": "Engineering", "self": "https://api.pagerduty.com/teams/PQ9K7I8", "html_url": "https://subdomain.pagerduty.com/teams/PQ9K7I8" } ] } ], "webhook": { "type": "webhook", "summary": "webhook", "self": "https://api.pagerduty.com/webhooks/PPGPXHO", "html_url": "null", "name": "My Webhook", "endpoint_url": "https://example.com", "webhook_object": { "id": "PNTDJ30", "type": "service_reference", "summary": "Cool Service", "self": "null", "html_url": "null" }, "config": { "anykey": "anyvalue" }, "outbound_integration": { "id": "PJFWPEP", "type": "outbound_integration_reference", "summary": "Generic Webhook V2", "self": "null", "html_url": "null" } }, "incident": { "id": "PT4KHLK", "type": "incident", "summary": "The server is on fire.", "self": "https://api.pagerduty.com/incidents/PT4KHLK", "html_url": "https://subdomain.pagerduty.com/incidents/PT4KHLK", "incident_number": 1234, "created_at": "2015-10-06T21:30:42.000Z", "status": "resolved", "pending_actions": [ { "type": "unacknowledge", "at": "2015-11-10T01:02:52.000Z" }, { "type": "resolve", "at": "2015-11-10T04:31:52.000Z" } ], "incident_key": "baf7cf21b1da41b4b0221008339ff357", "service": { "id": "PIJ90N7", "type": "service_reference", "summary": "My Application Service", "self": "https://api.pagerduty.com/services/PIJ90N7", "html_url": "https://subdomain.pagerduty.com/services/PIJ90N7", "name": "My Application Service", "description": "null", "auto_resolve_timeout": 14400, "acknowledgement_timeout": 600, "created_at": "2015-11-06T16:12:51.000Z", "status": "active", "last_incident_timestamp": "null", "integrations": [ { "id": "PQ12345", "type": "generic_email_inbound_integration_reference", "summary": "Email Integration", "self": "https://api.pagerduty.com/services/PIJ90N7/integrations/PQ12345", "html_url": "https://subdomain.pagerduty.com/services/PIJ90N7/integrations/PQ12345" } ], "escalation_policy": { "id": "PT20YPA", "type": "escalation_policy_reference", "summary": "Another Escalation Policy", "self": "https://api.pagerduty.com/escalation_policies/PT20YPA", "html_url": "https://subdomain.pagerduty.com/escalation_policies/PT20YPA" }, "teams": [ { "id": "PQ9K7I8", "type": "team_reference", "summary": "Engineering", "self": "https://api.pagerduty.com/teams/PQ9K7I8", "html_url": "https://subdomain.pagerduty.com/teams/PQ9K7I8" } ], "incident_urgency_rule": { "type": "use_support_hours", "during_support_hours": { "type": "constant", "urgency": "high" }, "outside_support_hours": { "type": "constant", "urgency": "low" } }, "support_hours": { "type": "fixed_time_per_day", "time_zone": "America/Lima", "start_time": "09:00:00", "end_time": 61200, "days_of_week": [ 1, 2, 3, 4, 5 ] }, "scheduled_actions": [ { "type": "urgency_change", "at": { "type": "named_time", "name": "support_hours_start" }, "to_urgency": "high" } ] }, "assignments": [ { "at": "2015-11-10T00:31:52.000Z", "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:52.000Z", "acknowledger": { "id": "PXPGF42", "type": "user_reference", "summary": "Earline Greenholt", "self": "https://api.pagerduty.com/users/PXPGF42", "html_url": "https://subdomain.pagerduty.com/users/PXPGF42" } } ], "last_status_change_at": "2015-10-06T21:38:23.000Z", "last_status_change_by": { "id": "PXPGF42", "type": "user_reference", "summary": "Earline Greenholt", "self": "https://api.pagerduty.com/users/PXPGF42", "html_url": "https://subdomain.pagerduty.com/users/PXPGF42" }, "first_trigger_log_entry": { "id": "Q02JTSNZWHSEKV", "type": "trigger_log_entry_reference", "summary": "Triggered through the API", "self": "https://api.pagerduty.com/log_entries/Q02JTSNZWHSEKV?incident_id=PT4KHLK", "html_url": "https://subdomain.pagerduty.com/incidents/PT4KHLK/log_entries/Q02JTSNZWHSEKV" }, "escalation_policy": { "id": "PT20YPA", "type": "escalation_policy_reference", "summary": "Another Escalation Policy", "self": "https://api.pagerduty.com/escalation_policies/PT20YPA", "html_url": "https://subdomain.pagerduty.com/escalation_policies/PT20YPA" }, "teams": [ { "id": "PQ9K7I8", "type": "team_reference", "summary": "Engineering", "self": "https://api.pagerduty.com/teams/PQ9K7I8", "html_url": "https://subdomain.pagerduty.com/teams/PQ9K7I8" } ], "urgency": "high" } } } ] }, "WebhookObject": { "allOf": [ { "$ref": "#/components/schemas/Reference" }, { "type": "object", "description": "The webhook object (service) that the webhook belongs to.", "properties": { "type": { "type": "string", "enum": [ "service", "service_reference" ] } } } ] }, "Webhook": { "type": "object", "description": "Information about the configured webhook.", "readOnly": true, "properties": { "endpoint_url": { "type": "string", "format": "url", "description": "The url endpoint the webhook payload is sent to." }, "name": { "type": "string", "description": "The name of the webhook." }, "webhook_object": { "$ref": "#/components/schemas/WebhookObject" }, "config": { "type": "object", "description": "The object that contains webhook configuration values depending on the webhook type specification." }, "outbound_integration": { "$ref": "#/components/schemas/OutboundIntegrationReference" } }, "example": { "id": "PPGPXHO", "type": "webhook", "summary": "webhook", "name": "My Webhook", "endpoint_url": "https://example.com", "webhook_object": { "id": "PNTDJ30", "type": "service_reference" }, "config": { "anykey": "anyvalue" }, "outbound_integration": { "id": "PJFWPEP", "type": "outbound_integration_reference" } } }, "WebhookReference": { "allOf": [ { "$ref": "#/components/schemas/Reference" }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "webhook_reference" ] } } } ] }, "OutboundIntegrationReference": { "allOf": [ { "$ref": "#/components/schemas/Reference" }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "outbound_integration_reference" ] } } } ] }, "WebhooksV1Message": { "type": "object", "description": "A message containing information about a single PagerDuty action.", "readOnly": true, "properties": { "id": { "type": "string", "format": "uuid", "description": "Uniquely identifies this outgoing webhook message; can be used for idempotency when processing the messages.", "readOnly": true }, "type": { "type": "string", "description": "The type of action being reported by this message.", "enum": [ "incident.trigger", "incident.acknowledge", "incident.unacknowledge", "incident.resolve", "incident.assign", "incident.escalate", "incident.delegate" ], "readOnly": true }, "created_on": { "type": "string", "format": "date-time", "description": "The date/time when the incident changed state.", "readOnly": true }, "data": { "type": "object", "properties": { "incident": { "$ref": "#/components/schemas/WebhooksV1IncidentData" } } } } }, "WebhooksV1IncidentData": { "type": "object", "description": "The incident details at the time of the state change.", "readOnly": true, "properties": { "id": { "type": "string", "readOnly": true }, "incident_number": { "type": "integer", "description": "The number of the incident. This is unique across the account.", "readOnly": true }, "created_on": { "type": "string", "format": "date-time", "description": "The date/time the incident was first triggered.", "readOnly": true }, "status": { "type": "string", "description": "The current status of the incident.", "enum": [ "triggered", "acknowledged", "resolved" ], "readOnly": true }, "html_url": { "type": "string", "format": "url", "readOnly": true }, "incident_key": { "type": "string", "description": "The incident's de-duplication key.", "readOnly": true }, "service": { "$ref": "#/components/schemas/WebhooksV1Service" }, "assigned_to_user": { "$ref": "#/components/schemas/WebhooksV1AssignedToUser" }, "assigned_to": { "type": "array", "items": { "$ref": "#/components/schemas/WebhooksV1AssignedTo" }, "readOnly": true }, "trigger_summary_data": { "type": "object", "properties": { "subject": { "type": "string", "readOnly": true } }, "readOnly": true }, "trigger_details_html_url": { "type": "string", "format": "url", "readOnly": true }, "last_status_change_on": { "type": "string", "format": "date-time", "readOnly": true, "description": "The time at which the status of the incident last changed." }, "last_status_change_by": { "$ref": "#/components/schemas/WebhooksV1AssignedToUser" }, "number_of_escalations": { "type": "integer", "minimum": 0, "description": "Number of times the incident has been escalated.", "readOnly": true }, "urgency": { "type": "string", "enum": [ "high", "low" ], "readOnly": true } } }, "WebhooksV1Service": { "type": "object", "description": "The service on which the incident occurred.", "properties": { "id": { "type": "string", "readOnly": true }, "name": { "type": "string", "description": "The name of the service.", "readOnly": true }, "html_url": { "type": "string", "format": "url", "readOnly": true }, "deleted_at": { "type": "string", "format": "date-time", "description": "The date/time the service was deleted, if it has been removed.", "readOnly": true }, "description": { "type": "string", "description": "The description of the service.", "readOnly": true } } }, "WebhooksV1AssignedTo": { "type": "object", "readOnly": true, "properties": { "at": { "type": "string", "format": "date-time", "description": "Time at which the assignment was created." }, "object": { "allOf": [ { "$ref": "#/components/schemas/WebhooksV1AssignedToUser" }, { "properties": { "type": { "type": "string", "enum": [ "user" ] } } } ] } } }, "WebhooksV1AssignedToUser": { "type": "object", "description": "The user assigned to the incident.", "readOnly": true, "properties": { "id": { "type": "string", "readOnly": true }, "name": { "type": "string", "description": "The user's name.", "readOnly": true }, "email": { "type": "string", "format": "email", "description": "The user's email address.", "readOnly": true }, "html_url": { "type": "string", "format": "url", "readOnly": true } } }, "ResponsePlay": { "allOf": [ { "$ref": "#/components/schemas/Tag/allOf/0" }, { "type": "object", "properties": { "type": { "type": "string", "description": "The type of object being created.", "default": "response_play", "enum": [ "response_play" ] }, "name": { "type": "string", "description": "The name of the response play." }, "description": { "type": "string", "description": "The description of the response play.", "maxLength": 349 }, "team": { "$ref": "#/components/schemas/TeamReference" }, "subscribers": { "type": "array", "description": "An array containing the users and/or teams to be added as subscribers to any incident on which this response play is run.", "items": { "anyOf": [ { "$ref": "#/components/schemas/UserReference" }, { "$ref": "#/components/schemas/TeamReference" } ], "discriminator": { "propertyName": "type" } } }, "subscribers_message": { "type": "string", "description": "The content of the notification that will be sent to all incident subscribers upon the running of this response play. Note that this includes any users who may have already been subscribed to the incident prior to the running of this response play. If empty, no notifications will be sent." }, "responders": { "type": "array", "description": "An array containing the users and/or escalation policies to be requested as responders to any incident on which this response play is run.", "items": { "anyOf": [ { "$ref": "#/components/schemas/UserReference" }, { "$ref": "#/components/schemas/EscalationPolicy" } ], "discriminator": { "propertyName": "type" } } }, "responders_message": { "type": "string", "description": "The message body of the notification that will be sent to this response play's set of responders. If empty, a default response request notification will be sent." }, "runnability": { "type": "string", "description": "String representing how this response play is allowed to be run. Valid options are:\n - `services`: This response play cannot be manually run by any users. It will run automatically for new incidents triggered on any services that are configured with this response play.\n - `teams`: This response play can be run manually on an incident only by members of its configured team. This option can only be selected when the `team` property for this response play is not empty.\n - `responders`: This response play can be run manually on an incident by any responders in this account.", "enum": [ "services", "teams", "responders" ], "default": "services" }, "conference_number": { "type": "string", "description": "The telephone number that will be set as the conference number for any incident on which this response play is run." }, "conference_url": { "type": "string", "description": "The URL that will be set as the conference URL for any incident on which this response play is run." } } } ] } } }, "paths": { "/{entity_type}/{id}/change_tags": { "post": { "tags": [ "Tags" ], "operationId": "createEntityTypeByIdChangeTags", "description": "Assign existing or new tags.\n\nA Tag is applied to EScalation Policies, Teams or Users and can be used to filter them.\n\nFor more information see the [API Concepts Document](../../docs/CONCEPTS.md#tags)\n", "summary": "Assign tags", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "$ref": "#/components/parameters/entity_type" }, { "$ref": "#/components/parameters/id" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "description": "Tags to add to or remove from the entity.", "properties": { "add": { "type": "array", "description": "Array of tags and/or tag references to add to the entity.\nFor elements with type `tag_reference`, the tag with the corresponding `id` is added to the entity.\nFor elements with type `tag`, if there is an existing tag with the given\nlabel that tag is added to the entity. If there is no existing tag with that label and the user has permission\nto create tags, a new tag is created with that label and assigned to the entity.\n", "items": { "title": "Tags to add", "type": "object", "properties": { "type": { "type": "string", "enum": [ "tag", "tag_reference" ] }, "label": { "type": "string", "description": "The label of the tag. Should be used when type is \"tag\".", "maxLength": 191 }, "id": { "type": "string", "description": "The id of the tag. Should be used when type is \"tag_reference\".", "readOnly": true } }, "required": [ "type" ] } }, "remove": { "type": "array", "description": "Array of tag references to remove from the entity.", "items": { "title": "Tags to remove.", "type": "object", "properties": { "type": { "type": "string", "enum": [ "tag_reference" ] }, "id": { "type": "string", "description": "The id of the tag", "readOnly": true } }, "required": [ "type", "id" ] } } } }, "examples": { "tags": { "summary": "Request Example", "value": { "add": [ { "type": "tag", "label": "Batman" }, { "type": "tag_reference", "id": "P5IYCNZ" } ], "remove": [ { "type": "tag_reference", "id": "POE7RY8" }, { "type": "tag_reference", "id": "PG68P1M" } ] } } } } } }, "responses": { "200": { "description": "The tags were added and/or removed.", "content": { "application/json": { "schema": { "type": "object" }, "examples": { "response": { "summary": "Request Example", "value": { "add": [ { "type": "tag", "label": "Batman" }, { "type": "tag_reference", "id": "P5IYCNZ" } ], "remove": [ { "type": "tag_reference", "id": "POE7RY8" }, { "type": "tag_reference", "id": "PG68P1M" } ] } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } } }, "/{entity_type}/{id}/tags": { "get": { "tags": [ "Tags" ], "operationId": "getEntityTypeByIdTags", "description": "Get related tags for Users, Teams or Escalation Policies.\n\nA Tag is applied to EScalation Policies, Teams or Users and can be used to filter them.\n\nFor more information see the [API Concepts Document](../../docs/CONCEPTS.md#tags)\n", "summary": "Get tags for entities", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "$ref": "#/components/parameters/total" }, { "$ref": "#/components/parameters/entity_type" }, { "$ref": "#/components/parameters/id" } ], "responses": { "200": { "description": "An array of tags.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/Pagination" }, { "type": "object", "properties": { "tags": { "type": "array", "items": { "$ref": "#/components/schemas/Tag" } } }, "required": [ "tags" ] } ] }, "examples": { "response": { "summary": "Response Example", "value": { "tags": { "type": "tag", "summary": "Batman", "self": "https://api.pagerduty.com/tags/P5IYCNZ", "label": "Batman", "id": "P5IYCNZ", "html_url": "null" }, "limit": 100, "offset": 0, "total": 1, "more": false } } } } } }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } } }, "/abilities": { "description": "List your account's abilities.", "get": { "tags": [ "Abilities" ], "operationId": "listAbilities", "description": "List all of your account's abilities, by name.\n\n\"Abilities\" describes your account's capabilities by feature name. For example `\"teams\"`.\n\nAn ability may be available to your account based on things like your pricing plan or account state.\n\nFor more information see the [API Concepts Document](../../docs/CONCEPTS.md#abilities)\n", "summary": "List abilities", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" } ], "responses": { "200": { "description": "An array of ability names.", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "properties": { "abilities": { "type": "array", "description": "The set of abilities your account has.", "items": { "type": "string", "description": "A single ability, as a name.", "readOnly": true } } }, "required": [ "abilities" ] } ] }, "examples": { "response": { "summary": "Example Response", "value": { "abilities": [ "teams", "read_only_users", "service_support_hours", "urgencies" ] } } } } } }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } } }, "/abilities/{id}": { "description": "Get an ability.", "get": { "tags": [ "Abilities" ], "operationId": "getAbility", "description": "Test whether your account has a given ability.\n\n\"Abilities\" describes your account's capabilities by feature name. For example `\"teams\"`.\n\nAn ability may be available to your account based on things like your pricing plan or account state.\n\nFor more information see the [API Concepts Document](../../docs/CONCEPTS.md#abilities)\n", "summary": "Test an ability", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "$ref": "#/components/parameters/id" } ], "responses": { "204": { "description": "The account has the requested ability." }, "401": { "$ref": "#/components/responses/Unauthorized" }, "402": { "$ref": "#/components/responses/PaymentRequired" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } } }, "/addons": { "description": "List and add Add-ons to your account.", "get": { "tags": [ "Add-ons" ], "operationId": "listAddon", "description": "List all of the Add-ons installed on your account.\n\nAddon's are pieces of functionality that developers can write to insert new functionality into PagerDuty's UI.\n\nFor more information see the [API Concepts Document](../../docs/CONCEPTS.md#add-ons)\n", "summary": "List installed Add-ons", "parameters": [ { "$ref": "#/components/parameters/total" }, { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "$ref": "#/components/parameters/include_addon" }, { "name": "service_ids[]", "in": "query", "description": "Filters the results, showing only Add-ons for the given services", "explode": true, "schema": { "type": "array", "items": { "type": "string" }, "uniqueItems": true } }, { "name": "filter", "in": "query", "description": "Filters the results, showing only Add-ons of the given type", "schema": { "type": "string", "enum": [ "full_page_addon", "incident_show_addon" ] } } ], "responses": { "200": { "description": "A paginated array of installed Add-ons.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/Pagination" }, { "type": "object", "properties": { "addons": { "type": "array", "items": { "$ref": "#/components/schemas/AddonReference" } } }, "required": [ "addons" ] } ] }, "examples": { "response": { "summary": "Example Response", "value": { "addons": [ { "id": "PKX7619", "type": "full_page_addon", "summary": "Internal Status Page", "self": "https://api.pagerduty.com/addons/PKX7619", "html_url": "https://subdomain.pagerduty.com/addons/PKX7619", "name": "Internal Status Page", "src": "https://intranet.example.com/status" } ], "limit": 25, "offset": 0, "more": false } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } }, "post": { "tags": [ "Add-ons" ], "operationId": "createAddon", "description": "Install an Add-on for your account.\n\nAddon's are pieces of functionality that developers can write to insert new functionality into PagerDuty's UI.\n\nGiven a configuration containing a `src` parameter, that URL will be embedded in an `iframe` on a page that's available to users from a drop-down menu.\n\nFor more information see the [API Concepts Document](../../docs/CONCEPTS.md#add-ons)\n", "summary": "Install an Add-on", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "addon": { "$ref": "#/components/schemas/Addon" } }, "required": [ "addon" ] }, "examples": { "request": { "summary": "Request Example", "value": { "addon": { "type": "full_page_addon", "name": "Internal Status Page", "src": "https://intranet.example.com/status" } } } } } }, "description": "The Add-on to be installed." }, "responses": { "201": { "description": "The Add-on that was installed.", "content": { "application/json": { "schema": { "type": "object", "properties": { "addon": { "$ref": "#/components/schemas/AddonReference" } }, "required": [ "addon" ] }, "examples": { "response": { "summary": "Response Example", "value": { "addon": { "id": "PKX7619", "type": "full_page_addon", "summary": "Internal Status Page", "self": "https://api.pagerduty.com/addons/PKX7619", "html_url": "https://subdomain.pagerduty.com/addons/PKX7619", "name": "Internal Status Page", "src": "https://intranet.example.com/status" } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } } }, "/addons/{id}": { "description": "Perform actions on the specified Add-on.", "get": { "tags": [ "Add-ons" ], "operationId": "getAddon", "description": "Get details about an existing Add-on.\n\nAddon's are pieces of functionality that developers can write to insert new functionality into PagerDuty's UI.\n\nFor more information see the [API Concepts Document](../../docs/CONCEPTS.md#add-ons)\n", "summary": "Get an Add-on", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "$ref": "#/components/parameters/id" } ], "responses": { "200": { "description": "The requested Add-on.", "content": { "application/json": { "schema": { "type": "object", "properties": { "addon": { "$ref": "#/components/schemas/Addon" } }, "required": [ "addon" ] }, "examples": { "response": { "summary": "Example Response", "value": { "addon": { "id": "PKX7F81", "type": "incident_show_addon", "name": "Service Runbook", "src": "https://intranet.example.com/runbook.html", "services": [ { "id": "PIJ90N7", "type": "service", "summary": "My Application Service", "self": "https://api.pagerduty.com/services/PIJ90N7", "html_url": "https://subdomain.pagerduty.com/services/PIJ90N7" } ] } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } }, "delete": { "tags": [ "Add-ons" ], "operationId": "deleteAddon", "description": "Remove an existing Add-on.\n\nAddon's are pieces of functionality that developers can write to insert new functionality into PagerDuty's UI.\n\nFor more information see the [API Concepts Document](../../docs/CONCEPTS.md#add-ons)\n", "summary": "Delete an Add-on", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "$ref": "#/components/parameters/id" } ], "responses": { "204": { "description": "The Add-on was deleted successfully." }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } }, "put": { "tags": [ "Add-ons" ], "operationId": "updateAddon", "description": "Update an existing Add-on.\n\nAddon's are pieces of functionality that developers can write to insert new functionality into PagerDuty's UI.\n\nGiven a configuration containing a `src` parameter, that URL will be embedded in an `iframe` on a page that's available to users from a drop-down menu.\n\nFor more information see the [API Concepts Document](../../docs/CONCEPTS.md#add-ons)\n", "summary": "Update an Add-on", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "$ref": "#/components/parameters/id" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "addon": { "$ref": "#/components/schemas/Addon" } }, "required": [ "addon" ] }, "examples": { "request": { "summary": "Request Example", "value": { "addon": { "type": "full_page_addon", "name": "Internal Status Page", "src": "https://intranet.example.com/status" } } } } } }, "description": "The Add-on to be updated." }, "responses": { "200": { "description": "The Add-on that was updated.", "content": { "application/json": { "schema": { "type": "object", "properties": { "addon": { "$ref": "#/components/schemas/Addon" } }, "required": [ "addon" ] }, "examples": { "response": { "summary": "Response Example", "value": { "addon": { "id": "PKX7F81", "type": "incident_show_addon", "name": "Service Runbook", "src": "https://intranet.example.com/runbook.html", "services": [ { "id": "PIJ90N7", "type": "service", "summary": "My Application Service", "self": "https://api.pagerduty.com/services/PIJ90N7", "html_url": "https://subdomain.pagerduty.com/services/PIJ90N7" } ] } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } } }, "/analytics/metrics/incidents/all": { "post": { "summary": "Get aggregated incident data", "operationId": "getAnalyticsMetricsIncidentsAll", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "aggregate_unit": { "type": "string", "description": "The time unit that was used to aggregate the metrics." }, "filters": { "type": "object", "description": "A collection of filters that were applied to the results.", "properties": { "created_at_start": { "type": "string", "description": "The lower boundary (inclusive) for the created_at range filter applied to the results." }, "created_at_end": { "type": "string", "description": "The upper boundary (exclusive) for the created_at range filter applied to the results." }, "urgency": { "type": "string", "description": "The urgency filter applied to the results.", "enum": [ "high", "low" ] }, "major": { "type": "boolean", "description": "The major incident filter applied to the results." }, "team_ids": { "type": "array", "description": "The team ids filter applied to the results.", "maxItems": 10, "items": { "type": "string" } }, "service_ids": { "type": "array", "description": "The service ids filter applied to the results.", "maxItems": 10, "items": { "type": "string" } }, "business_service_ids": { "type": "array", "description": "The business service ids filter applied to the results.", "items": { "type": "string" } }, "priority_ids": { "type": "array", "description": "The priority_ids filter applied to the results.", "maxItems": 5, "items": { "type": "string" } }, "priority_names": { "type": "array", "description": "The priority_names filter applied to the results.", "maxItems": 5, "items": { "type": "string" } } } }, "timezone": { "type": "string", "description": "The time zone that was used for grouping the results." }, "data": { "title": "Analytics Incident Metrics", "type": "object", "x-tags": [ "Analytics" ], "properties": { "service_id": { "type": "string", "description": "ID of the service. Only included when aggregating by service." }, "service_name": { "type": "string", "description": "Name of the service. Only included when aggregating by service." }, "team_id": { "type": "string", "description": "ID of the team. Only included when aggregating by team." }, "team_name": { "type": "string", "description": "Name of the team. Only included when aggregating by team." }, "mean_seconds_to_resolve": { "type": "integer", "description": "Mean time from when an incident was triggered until it was resolved." }, "mean_seconds_to_first_ack": { "type": "integer", "description": "Mean time between the start of an incident, and the first responder to acknowledge." }, "mean_seconds_to_engage": { "type": "integer", "description": "Mean time between the start of an incident, and the first responder to acknowledge, or to accept responder request." }, "mean_seconds_to_mobilize": { "type": "integer", "description": "Mean time between the start of an incident, and the last additional responder to acknowledge. For incidents with one or less engaged users, this value is null." }, "mean_engaged_user_count": { "type": "integer", "description": "Mean number of users who engaged (acknowledged, accepted responder request) with an incident." }, "total_escalation_count": { "type": "integer", "description": "Total count of instances where an incident is escalated between responders assigned to an escalation policy." }, "total_assignment_count": { "type": "integer", "description": "Total count of instances where an additional responder, who was not on-call for an incident, is added." }, "total_business_hour_interruptions": { "type": "integer", "description": "Total number of unique interruptions during business hours.\nBusiness hour: 8am-6pm Mon-Fri, based on the user’s time zone." }, "total_sleep_hour_interruptions": { "type": "integer", "description": "Total number of unique interruptions during sleep hours.\nSleep hour: 10pm-8am every day, based on the user’s time zone." }, "total_off_hour_interruptions": { "type": "integer", "description": "Total number of unique interruptions during off hours.\nOff hour: 6pm-10pm Mon-Fri and all day Sat-Sun, based on the user’s time zone." }, "total_snoozed_seconds": { "type": "integer", "description": "Total number of seconds incidents were snoozed." }, "total_engaged_seconds": { "type": "integer", "description": "Total engaged time across all responders for incidents. Engaged time is measured from the time a user engages with an incident (by acknowledging or accepting a responder request) until the incident is resolved. This may include periods in which the incidents was snoozed." } } } }, "required": [ "aggregate_unit", "timezone", "data" ] }, "examples": { "Example Response": { "value": { "data": [ { "mean_seconds_to_first_ack": 63, "mean_engaged_seconds": 366, "mean_seconds_to_engage": 81, "mean_seconds_to_mobilize": 41, "mean_seconds_to_resolve": 380, "mean_assignment_count": 1, "mean_engaged_user_count": 1, "total_engaged_seconds": 3591, "total_incident_count": 124, "total_snoozed_seconds": 78, "total_escalation_count": 5, "total_sleep_hour_interruptions": 21, "total_business_hour_interruptions": 81, "total_off_hour_interruptions": 20 } ], "filters": [ { "create_range_start": "2020-01-01T00:00:00Z" }, { "create_range_end": "2020-02-01T00:00:00Z" } ], "aggregate_unit": null, "time_zone": "Etc/UTC" } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "429": { "$ref": "#/components/responses/TooManyRequests" } }, "parameters": [ { "schema": { "type": "string", "default": "analytics-v2", "enum": [ "analytics-v2" ] }, "in": "header", "description": "This header indicates that this API endpoint is __UNDER CONSTRUCTION__ and may change at any time. You __MUST__ pass in this header and the above value. Do not use this endpoint in production, as it may change!\n", "name": "X-EARLY-ACCESS", "required": true }, { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "schema": { "type": "string", "default": "application/json", "enum": [ "application/json" ] }, "in": "header", "name": "Content-Type", "required": true } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "filters": { "type": "object", "description": "Accepts a set of filters to apply to the Incidents before aggregating. Any incidents that do not match the included filters will be omitted from the results", "properties": { "created_at_start": { "type": "string", "description": "Accepts an ISO8601 DateTime string. Any incidents with a created_at less than this value will be omitted from the results. The maximum supported time range in conjunction with created_at_end is one year.", "example": "2020-01-01T00:00:00+05:00" }, "created_at_end": { "type": "string", "description": "Accepts an ISO8601 DateTime string. Any incidents with a created_at greater than or equal to this value will be omitted from the results. The maximum supported time range in conjunction with created_at_start is one year.", "example": "2020-02-01T00:00:00Z" }, "urgency": { "type": "string", "description": "Any incidents whose urgency does not match the provided string will be omitted from the results.", "example": "high", "enum": [ "high", "low" ] }, "major": { "type": "boolean", "description": "A boolean flag including whether results should contain only major incidents, or exclude major incidents. If no value is provided all incidents will be included. You can find more information on the major incident classification here: https://support.pagerduty.com/docs/operational-reviews#major-incidents", "example": true }, "team_ids": { "type": "array", "description": "An array of team IDs. Only incidents related to these teams will be included in the results. Account must have the teams ability to use this parameter. Any teams that the requestor does not have access to will be omitted from the results. If omitted, all teams the requestor has access to will be included in the results.", "items": { "type": "string" }, "example": [ "P373JQQ", "PAECHJV", "P7SYGW6" ] }, "service_ids": { "type": "array", "description": "An array of service IDs. Only incidents related to these services will be included in the results. If omitted, all services the requestor has access to will be included in the results.", "items": { "type": "string" }, "example": [ "PSEJLIN", "PSLWBL8", "PT4KHLX" ] }, "business_service_ids": { "type": "array", "description": "An array of business service IDs. Only incidents related to these business services will be included in the results. If omitted, all services the requestor has access to will be included in the results.", "items": { "type": "string" }, "example": [ "P0200S2", "PEKZXUX", "PUEMDG6" ] }, "priority_ids": { "type": "array", "description": "An array of priority IDs. Only incidents with these priorities will be included in the results. If omitted, all services the requestor has access to will be included in the results.", "items": { "type": "string" }, "example": [ "PC8O0L3", "PX01HJD", "P5FK83M" ] }, "priority_names": { "type": "array", "description": "An array of user-defined priority names. Only incidents with these priorities will be included in the results. If omitted, all services the requestor has access to will be included in the results.", "items": { "type": "string" }, "example": [ "P1", "P2", "P3" ] } } }, "time_zone": { "type": "string", "description": "The time zone to use for the results and grouping.", "example": "Etc/UTC" }, "aggregate_unit": { "type": "string", "description": "The time unit to aggregate metrics by. If no value is provided, the metrics will be aggregated for the entire period.", "example": "day", "enum": [ "day", "week", "month" ] } } }, "examples": { "Example Request": { "value": { "filters": { "created_at_start": "2020-01-01T00:00:00-05:00", "created_at_end": "2020-01-01T00:00:00-05:00", "urgency": "high", "major": true, "team_ids": [ "PK38K1", "PNVU4U" ], "service_ids": [ "PJ51L1", "PU2D9X" ], "business_service_ids": [ "P0200S2", "PEKZXUX" ], "priority_names": [ "SEV-1", "SEV-2" ] }, "aggregate_unit": "day", "time_zone": "Etc/UTC" } } } } }, "description": "Parameters and filters to apply to the dataset." }, "description": "Provides aggregated enriched metrics for incidents.\n\nThe provided metrics are aggregated by day, week, month using the aggregate_unit parameter, or for the entire period if no aggregate_unit is provided.\n\n\n> ### Early Access\n> This endpoint is in Early Access and may change at any time. You must pass in the X-EARLY-ACCESS header to access it.\n\n> A `team_ids` or `service_ids` filter is required for [user-level API keys](https://support.pagerduty.com/docs/using-the-api#section-generating-a-personal-rest-api-key) or keys generated through an OAuth flow. Account-level API keys do not have this requirement.\n", "tags": [ "Analytics" ] }, "parameters": [] }, "/analytics/metrics/incidents/services": { "post": { "summary": "Get aggregated service data", "operationId": "getAnalyticsMetricsIncidentsService", "responses": { "200": { "description": "OK\nCurrently the response only returns data for services that match the filters and have data.", "content": { "application/json": { "schema": { "type": "object", "properties": { "filters": { "type": "object", "description": "Accepts a set of filters to apply to the Incidents before aggregating. Any incidents that do not match the included filters will be omitted from the results", "properties": { "created_at_start": { "type": "string", "description": "Accepts an ISO8601 DateTime string. Any incidents with a created_at less than this value will be omitted from the results. The maximum supported time range in conjunction with created_at_end is one year.", "example": "2020-01-01T00:00:00+05:00" }, "created_at_end": { "type": "string", "description": "Accepts an ISO8601 DateTime string. Any incidents with a created_at greater than or equal to this value will be omitted from the results. The maximum supported time range in conjunction with created_at_start is one year.", "example": "2020-02-01T00:00:00Z" }, "urgency": { "type": "string", "description": "Any incidents whose urgency does not match the provided string will be omitted from the results.", "example": "high", "enum": [ "high", "low" ] }, "major": { "type": "boolean", "description": "A boolean flag including whether results should contain only major incidents, or exclude major incidents. If no value is provided all incidents will be included. You can find more information on the major incident classification here: https://support.pagerduty.com/docs/operational-reviews#major-incidents", "example": true }, "team_ids": { "type": "array", "description": "An array of team IDs. Only incidents related to these teams will be included in the results. Account must have the teams ability to use this parameter. Any teams that the requestor does not have access to will be omitted from the results. If omitted, all teams the requestor has access to will be included in the results.", "example": [ "PSEJLIN", "PSLWBL8", "PT4KHLX" ], "maxItems": 10, "items": { "type": "string" } }, "service_ids": { "type": "array", "description": "An array of service IDs. Only incidents related to these services will be included in the results. If omitted, all services the requestor has access to will be included in the results.", "example": [ "PSEJLIN", "PSLWBL8", "PT4KHLX" ], "maxItems": 10, "items": { "type": "string" } }, "business_service_ids": { "type": "array", "description": "An array of business service IDs. Only incidents related to these business services will be included in the results. If omitted, all services the requestor has access to will be included in the results.", "items": { "type": "string" }, "example": [ "P0200S2", "PEKZXUX", "PUEMDG6" ] }, "priority_ids": { "type": "array", "description": "An array of priority IDs. Only incidents with these priorities will be included in the results. If omitted, all services the requestor has access to will be included in the results.", "example": [ "PZOZQXA", "POTCOTX", "P0YF9PU" ], "maxItems": 5, "items": { "type": "string" } }, "priority_names": { "type": "array", "description": "An array of user-defined priority names. Only incidents with these priorities will be included in the results. If omitted, all services the requestor has access to will be included in the results.", "example": [ "SEV-1", "SEV-2", "SEV-3" ], "maxItems": 5, "items": { "type": "string" } } } }, "timezone": { "type": "string", "description": "The time zone that was used for grouping the results.", "example": "America/Los_Angeles" }, "aggregate_unit": { "type": "string", "description": "The time unit to aggregate metrics by. If no value is provided, the metrics will be aggregated for the entire period.", "example": "day", "enum": [ "day", "week", "month" ] }, "data": { "$ref": "#/paths/~1analytics~1metrics~1incidents~1all/post/responses/200/content/application~1json/schema/properties/data" } }, "required": [ "aggregate_unit", "timezone", "data" ] }, "examples": { "Example Response": { "value": { "data": [ { "service_id": "PPSCXAN", "service_name": "Critical Prod Service 1", "mean_seconds_to_first_ack": 63, "mean_engaged_seconds": 366, "mean_seconds_to_engage": 81, "mean_seconds_to_mobilize": 41, "mean_seconds_to_resolve": 380, "mean_assignment_count": 1, "mean_engaged_user_count": 1, "total_engaged_seconds": 3591, "total_incident_count": 124, "total_snoozed_seconds": 78, "total_escalation_count": 5, "total_sleep_hour_interruptions": 21, "total_business_hour_interruptions": 81, "total_off_hour_interruptions": 20 }, { "service_id": "PPSCXAN", "service_name": "Meme Fetcher Bot", "mean_seconds_to_first_ack": 63, "mean_engaged_seconds": 366, "mean_seconds_to_engage": 81, "mean_seconds_to_mobilize": 41, "mean_seconds_to_resolve": 380, "mean_assignment_count": 1, "mean_engaged_user_count": 1, "total_engaged_seconds": 3591, "total_incident_count": 124, "total_snoozed_seconds": 78, "total_escalation_count": 5, "total_sleep_hour_interruptions": 21, "total_business_hour_interruptions": 81, "total_off_hour_interruptions": 20 } ], "filters": { "created_at_start": "2020-06-17T17:27:27Z", "created_at_end": "2020-06-16T17:27:27Z" }, "aggregate_unit": null, "time_zone": "Etc/UTC" } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "429": { "$ref": "#/components/responses/TooManyRequests" } }, "parameters": [ { "schema": { "type": "string", "default": "analytics-v2", "enum": [ "analytics-v2" ] }, "in": "header", "description": "This header indicates that this API endpoint is __UNDER CONSTRUCTION__ and may change at any time. You __MUST__ pass in this header and the above value. Do not use this endpoint in production, as it may change!\n", "name": "X-EARLY-ACCESS", "required": true }, { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "schema": { "type": "string", "default": "application/json", "enum": [ "application/json" ] }, "in": "header", "name": "Content-Type", "required": true } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "filters": { "type": "object", "description": "Filters the result, only show incidents that match the conditions passed in the filter.", "properties": { "created_at_start": { "type": "string", "description": "Filters the result, showing only the incidents where the creation timestamp is greater than the filter value.", "example": "2020-06-01T00:00:00+01:00" }, "created_at_end": { "type": "string", "description": "Filters the result, showing only the incidents where the creation timestamp is less than the filter value.", "example": "2020-07-01T00:00:00+01:00" }, "urgency": { "type": "string", "description": "Filters the result, showing only the incidents where urgency matches the filter value.", "example": "high", "enum": [ "high", "low" ] }, "major": { "type": "boolean", "description": "A major incident is defined as any incident that requires a coordinated response, often across multiple teams. https://support.pagerduty.com/docs/operational-reviews#major-incidents", "example": true }, "team_ids": { "type": "array", "description": "An array of team IDs. Only results related to these teams will be returned. Account must have the teams ability to use this parameter.", "items": { "type": "string" }, "example": [ "P373JQQ", "PAECHJV", "P7SYGW6" ] }, "service_ids": { "type": "array", "description": "An array of service IDs. Only results related to these services will be returned.", "items": { "type": "string" }, "example": [ "PC8O0L3", "PX01HJD", "P5FK83M" ] }, "business_service_ids": { "type": "array", "description": "An array of business service IDs. Only incidents related to these business services will be included in the results. If omitted, all services the requestor has access to will be included in the results.", "items": { "type": "string" }, "example": [ "P0200S2", "PEKZXUX", "PUEMDG6" ] }, "priority_ids": { "type": "array", "description": "The priority_ids filter applied to the results.", "items": { "type": "string" }, "example": [ "PITMC5Y", "PEHBBT8", "PB8QADI" ] }, "priority_names": { "type": "array", "description": "The user-defined priority names filter applied to the results.", "items": { "type": "string" }, "example": [ "P1", "P2", "P3" ] } } }, "time_zone": { "type": "string", "description": "The time zone to use for the results and grouping.", "example": "Etc/UTC" }, "aggregate_unit": { "type": "string", "description": "The time unit to aggregate metrics by (day/week/month). Used in conjunction with the service_id.", "example": "month" } } }, "examples": { "Example Request": { "value": { "filters": { "created_at_start": "2020-01-01T00:00:00-05:00", "created_at_end": "2020-01-31T00:00:00-05:00", "urgency": "high", "major": true, "team_ids": [ "PK38K1", "PNVU4U" ], "service_ids": [ "PJ51L1", "PU2D9X" ], "business_service_ids": [ "P0200S2", "PEKZXUX" ], "priority_ids": [ "PZOZQXA", "POTCOTX" ] }, "aggregate_unit": "week", "time_zone": "Etc/UTC" } } } } }, "description": "Parameters and filters to apply to the dataset." }, "description": "Provides aggregated metrics for incidents aggregated into units of time by service.\n\nExample metrics include Seconds to Resolve, Seconds to Engage, Snoozed Seconds, Sleep Hour Interruptions. Some metric definitions can be found in our knowledge base: https://support.pagerduty.com/docs/pagerduty-analytics\nData can be aggregated by day, week or month in addition to by service, or provided just as a collection of aggregates for each service in the dataset for the entire period. If a unit is provided, each row in the returned dataset will include a 'range_start' timestamp.\n\n\n> ### Early Access\n> This endpoint is in Early Access and may change at any time. You must pass in the X-EARLY-ACCESS header to access it.\n\n> A `team_ids` or `service_ids` filter is required for [user-level API keys](https://support.pagerduty.com/docs/using-the-api#section-generating-a-personal-rest-api-key) or keys generated through an OAuth flow. Account-level API keys do not have this requirement.\n", "tags": [ "Analytics" ] }, "parameters": [] }, "/analytics/metrics/incidents/teams": { "post": { "summary": "Get aggregated team data", "operationId": "getAnalyticsMetricsIncidentsTeam", "responses": { "200": { "description": "OK\nCurrently the response only returns data for teams that match the filters and have data.", "content": { "application/json": { "schema": { "type": "object", "properties": { "aggregate_unit": { "type": "string", "description": "The time unit to aggregate metrics by (day/week/month)" }, "filters": { "type": "object", "description": "A collection of filters that were applied to the results.", "properties": { "created_at_start": { "type": "string", "description": "The lower boundary for the created_at range filter applied to the results." }, "created_at_end": { "type": "string", "description": "The upper boundary for the created_at range filter applied to the results." }, "urgency": { "type": "string", "description": "The urgency filter applied to the results.", "enum": [ "high", "low" ] }, "major": { "type": "boolean", "description": "The major incident filter applied to the results." }, "team_ids": { "type": "array", "description": "The team ids filter applied to the results;", "maxItems": 10, "items": { "type": "string" } }, "service_ids": { "type": "array", "description": "The service ids filter applied to the results.", "maxItems": 10, "items": { "type": "string" } }, "business_service_ids": { "type": "array", "description": "The business service ids filter applied to the results.", "items": { "type": "string" } }, "priority_ids": { "type": "array", "description": "The priority_ids filter applied to the results.", "maxItems": 5, "items": { "type": "string" } }, "priority_names": { "type": "array", "description": "The priority_names filter applied to the results.", "maxItems": 5, "items": { "type": "string" } } } }, "timezone": { "type": "string", "description": "The time zone that was used for grouping the results." }, "data": { "$ref": "#/paths/~1analytics~1metrics~1incidents~1all/post/responses/200/content/application~1json/schema/properties/data" } }, "required": [ "aggregate_unit", "timezone", "data" ] }, "examples": { "Example Response": { "value": { "data": [ { "team_id": "PPSCXAN", "team_name": "Best Team A #1", "mean_seconds_to_first_ack": 63, "mean_engaged_seconds": 366, "mean_seconds_to_engage": 81, "mean_seconds_to_mobilize": 41, "mean_seconds_to_resolve": 380, "mean_assignment_count": 1, "mean_engaged_user_count": 1, "total_engaged_seconds": 3591, "total_incident_count": 124, "total_snoozed_seconds": 78, "total_escalation_count": 5, "total_sleep_hour_interruptions": 21, "total_business_hour_interruptions": 81, "total_off_hour_interruptions": 20 }, { "team_id": "PPSCXAN", "team_name": "Best Team A #2", "mean_seconds_to_first_ack": 63, "mean_engaged_seconds": 366, "mean_seconds_to_engage": 81, "mean_seconds_to_mobilize": 41, "mean_seconds_to_resolve": 380, "mean_assignment_count": 1, "mean_engaged_user_count": 1, "total_engaged_seconds": 3591, "total_incident_count": 124, "total_snoozed_seconds": 78, "total_escalation_count": 5, "total_sleep_hour_interruptions": 21, "total_business_hour_interruptions": 81, "total_off_hour_interruptions": 20 } ], "filters": { "created_at_start": "2020-06-17T17:27:27Z", "created_at_end": "2020-06-16T17:27:27Z" }, "aggregate_unit": null, "time_zone": "Etc/UTC" } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "429": { "$ref": "#/components/responses/TooManyRequests" } }, "parameters": [ { "schema": { "type": "string", "default": "analytics-v2", "enum": [ "analytics-v2" ] }, "in": "header", "description": "This header indicates that this API endpoint is __UNDER CONSTRUCTION__ and may change at any time. You __MUST__ pass in this header and the above value. Do not use this endpoint in production, as it may change!\n", "name": "X-EARLY-ACCESS", "required": true }, { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "schema": { "type": "string", "default": "application/json", "enum": [ "application/json" ] }, "in": "header", "name": "Content-Type", "required": true } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "filters": { "type": "object", "description": "Accepts a set of filters to apply to the Incidents before aggregating. Any incidents that do not match the included filters will be omitted from the results", "properties": { "created_at_start": { "type": "string", "description": "Accepts an ISO8601 DateTime string. Any incidents with a created_at less than this value will be omitted from the results. The maximum supported time range in conjunction with created_at_end is one year.", "example": "2020-01-01T00:00:00+05:00" }, "created_at_end": { "type": "string", "description": "Accepts an ISO8601 DateTime string. Any incidents with a created_at greater than or equal to this value will be omitted from the results. The maximum supported time range in conjunction with created_at_start is one year.", "example": "2020-02-01T00:00:00Z" }, "urgency": { "type": "string", "description": "Any incidents whose urgency does not match the provided string will be omitted from the results.", "example": "high", "enum": [ "high", "low" ] }, "major": { "type": "boolean", "description": "A boolean flag including whether results should contain only major incidents, or exclude major incidents. If no value is provided all incidents will be included. You can find more information on the major incident classification here: https://support.pagerduty.com/docs/operational-reviews#major-incidents", "example": true }, "team_ids": { "type": "array", "description": "An array of team IDs. Only incidents related to these teams will be included in the results. Account must have the teams ability to use this parameter. Any teams that the requestor does not have access to will be omitted from the results. If omitted, all teams the requestor has access to will be included in the results.", "example": [ "P373JQQ", "PAECHJV", "P7SYGW6" ], "maxItems": 10, "items": { "type": "string" } }, "service_ids": { "type": "array", "description": "An array of service IDs. Only incidents related to these services will be included in the results. If omitted, all services the requestor has access to will be included in the results.", "example": [ "PC8O0L3", "PX01HJD", "P5FK83M" ], "maxItems": 10, "items": { "type": "string" } }, "business_service_ids": { "type": "array", "description": "An array of business service IDs. Only incidents related to these business services will be included in the results. If omitted, all services the requestor has access to will be included in the results.", "items": { "type": "string" }, "example": [ "P0200S2", "PEKZXUX", "PUEMDG6" ] }, "priority_ids": { "type": "array", "description": "An array of priority IDs. Only incidents with these priorities will be included in the results. If omitted, all teams the requestor has access to will be included in the results.", "example": [ "PITMC5Y", "PEHBBT8", "PB8QADI" ], "maxItems": 5, "items": { "type": "string" } }, "priority_names": { "type": "array", "description": "An array of user-defined priority names. Only incidents with these priorities will be included in the results. If omitted, all teams the requestor has access to will be included in the results.", "example": [ "P1", "P2", "P3" ], "maxItems": 5, "items": { "type": "string" } } } }, "time_zone": { "type": "string", "description": "The time zone to use for the results and grouping.", "example": "Etc/UTC" }, "aggregate_unit": { "type": "string", "description": "The time unit to aggregate metrics by. If no value is provided, the metrics will be aggregated for the entire period.", "example": "day", "enum": [ "day", "week", "month" ] } } }, "examples": { "Example Request": { "value": { "filters": { "created_at_start": "2020-01-01T00:00:00-05:00", "created_at_end": "2020-01-31T00:00:00-05:00", "urgency": "high", "major": true, "team_ids": [ "PK38K1", "PNVU4U" ], "service_ids": [ "PJ51L1", "PU2D9X" ], "business_service_ids": [ "P0200S2", "PEKZXUX" ], "priority_ids": [ "PZOZQXA", "POTCOTX" ] }, "aggregate_unit": "week", "time_zone": "Etc/UTC" } } } } }, "description": "Parameters and filters to apply to the dataset." }, "description": "Provides aggregated metrics for incidents aggregated into units of time by team.\n\nExample metrics include Seconds to Resolve, Seconds to Engage, Snoozed Seconds, Sleep Hour Interruptions. Some metric definitions can be found in our knowledge base: https://support.pagerduty.com/docs/pagerduty-analytics\nData can be aggregated by day, week or month in addition to by team, or provided just as a collection of aggregates for each team in the dataset for the entire period. If a unit is provided, each row in the returned dataset will include a 'range_start' timestamp.\n\n\n> ### Early Access\n> This endpoint is in Early Access and may change at any time. You must pass in the X-EARLY-ACCESS header to access it.\n\n> A `team_ids` or `service_ids` filter is required for [user-level API keys](https://support.pagerduty.com/docs/using-the-api#section-generating-a-personal-rest-api-key) or keys generated through an OAuth flow. Account-level API keys do not have this requirement.\n", "tags": [ "Analytics" ] }, "parameters": [] }, "/analytics/raw/incidents": { "post": { "summary": "Get raw data - multiple incidents", "operationId": "getAnalyticsIncidents", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "first": { "type": "string", "description": "ID of the first incident in the response." }, "last": { "type": "string", "description": "ID of the last incident in the response." }, "limit": { "type": "integer", "description": "Number of results to include in the batch." }, "more": { "type": "boolean", "description": "Indicates if there are more resources available than were returned." }, "filters": { "type": "object", "description": "A collection of filters that were applied to the results.", "properties": { "created_at_start": { "type": "string", "description": "The lower boundary for the created_at range filter applied to the results." }, "created_at_end": { "type": "string", "description": "The upper boundary for the created_at range filter applied to the results." }, "urgency": { "type": "string", "description": "The urgency filter applied to the results.", "enum": [ "high", "low" ] }, "major": { "type": "boolean", "description": "The major incident filter applied to the results." }, "team_ids": { "type": "array", "description": "The team ids filter applied to the results", "maxItems": 10, "items": { "type": "string" } }, "service_ids": { "type": "array", "description": "The service ids filter applied to the results,\nfor up to 10 service ids.", "maxItems": 10, "items": { "type": "string" } }, "business_service_ids": { "type": "array", "description": "The business service ids filter applied to the results.", "items": { "type": "string" } }, "priority_ids": { "type": "array", "description": "The priority_ids filter applied to the results.", "maxItems": 5, "items": { "type": "string" } }, "priority_names": { "type": "array", "description": "The priority_names filter applied to the results.", "maxItems": 5, "items": { "type": "string" } } } }, "timezone": { "type": "string", "description": "The time zone that the results are in." }, "data": { "type": "array", "items": { "$ref": "#/paths/~1analytics~1raw~1incidents~1%7Bid%7D/get/responses/200/content/application~1json/schema" } } }, "required": [ "first", "last", "limit", "more", "timezone", "data" ] }, "examples": { "Example Response": { "value": { "data": [ { "assignment_count": 4, "business_hour_interruptions": 5, "created_at": "2020-05-31T10:05:00", "engaged_seconds": 3510, "engaged_user_count": 10, "escalation_count": 1, "id": "PYC0H08", "major": false, "off_hour_interruptions": 4, "priority_id": "null,", "priority_name": "null,", "resolved_at": "2020-05-31T10:15:00", "seconds_to_engage": 70, "seconds_to_first_ack": 5, "seconds_to_mobilize": 19, "seconds_to_resolve": 3305, "service_id": "PPSCXAN", "sleep_hour_interruptions": 3, "snoozed_seconds": 604, "team_id": null, "urgency": "low" }, { "assignment_count": 1, "business_hour_interruptions": 2, "created_at": "2020-05-31T10:05:00", "engaged_seconds": 521, "engaged_user_count": 6, "escalation_count": 1, "id": "PCOOHCY", "major": false, "off_hour_interruptions": 3, "priority_id": "POTCOTX", "priority_name": "SEV-2", "resolved_at": "2020-05-31T10:15:00", "seconds_to_engage": 24, "seconds_to_first_ack": 48, "seconds_to_mobilize": 122, "seconds_to_resolve": 2029, "service_id": "PPSCXAN", "sleep_hour_interruptions": 1, "snoozed_seconds": 698, "team_id": null, "urgency": "low" } ], "ending_before": null, "filters": {}, "first": "PYC0H08", "last": "PCOOHCY", "limit": 2, "more": true, "starting_after": null, "time_zone": "Etc/UTC" } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "429": { "$ref": "#/components/responses/TooManyRequests" } }, "parameters": [ { "schema": { "type": "string", "default": "analytics-v2", "enum": [ "analytics-v2" ] }, "in": "header", "description": "This header indicates that this API endpoint is __UNDER CONSTRUCTION__ and may change at any time. You __MUST__ pass in this header and the above value. Do not use this endpoint in production, as it may change!\n", "name": "X-EARLY-ACCESS", "required": true }, { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "schema": { "type": "string", "default": "application/json", "enum": [ "application/json" ] }, "in": "header", "name": "Content-Type", "required": true } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "filters": { "type": "object", "description": "Filters the result, only show incidents that match the conditions passed in the filter.", "properties": { "created_at_start": { "type": "string", "description": "Filters the result, showing only the incidents where the creation timestamp is greater than the filter value.", "example": "2020-05-01T00:00:00-04:00" }, "created_at_end": { "type": "string", "description": "Filters the result, showing only the incidents where the creation timestamp is less than the filter value.", "example": "2020-06-01T00:00:00-04:00" }, "urgency": { "type": "string", "description": "Filters the result, showing only the incidents where urgency matches the filter value.", "example": "high" }, "major": { "type": "boolean", "description": "A major incident is defined as any incident that requires a coordinated response, often across multiple teams. https://support.pagerduty.com/docs/operational-reviews#major-incidents", "example": true }, "team_ids": { "type": "array", "description": "An array of team IDs. Only results related to these teams will be returned. Account must have the teams ability to use this parameter.", "items": { "type": "string" }, "example": [ "P373JQQ", "PAECHJV", "P7SYGW6" ] }, "service_ids": { "type": "array", "description": "An array of service IDs. Only results related to these services will be returned.", "items": { "type": "string" }, "example": [ "PC8O0L3", "PX01HJD", "P5FK83M" ] }, "business_service_ids": { "type": "array", "description": "An array of business service IDs. Only incidents related to these business services will be included in the results. If omitted, all services the requestor has access to will be included in the results.", "items": { "type": "string" }, "example": [ "P0200S2", "PEKZXUX", "PUEMDG6" ] }, "priority_ids": { "type": "array", "description": "The priority_ids filter applied to the results.", "items": { "type": "string" }, "example": [ "PITMC5Y", "PEHBBT8", "PB8QADI" ] }, "priority_names": { "type": "array", "description": "The priority_names filter applied to the results.", "items": { "type": "string" }, "example": [ "P1", "P2", "P3" ] } } }, "starting_after": { "type": "string", "description": "Specifies an incident by ID, the paginated results will begin with the incident directly after this one." }, "ending_before": { "type": "string", "description": "Specifies an incident by ID, the paginated results will end with the incident directly before this one." }, "limit": { "type": "integer", "description": "Number of results to include in each batch.\nLimits between 1 to 1000 are accepted.", "example": 20, "minimum": 0, "exclusiveMinimum": true, "maximum": 1000, "exclusiveMaximum": false }, "time_zone": { "type": "string", "description": "The time zone to use for the results.", "example": "Etc/UTC" } } }, "examples": { "Example Request": { "value": { "filters": { "created_at_start": "2020-01-01T00:00:00-05:00", "created_at_end": "2020-01-01T00:00:00-05:00", "urgency": "high", "major": true, "team_ids": [ "PK38K1", "PNVU4U" ], "service_ids": [ "PJ51L1", "PU2D9X" ], "business_service_ids": [ "P0200S2", "PEKZXUX" ], "priority_names": [ "SEV-1", "SEV-2" ] }, "starting_after": "P4UN5A", "limit": 20, "time_zone": "Etc/UTC" } } } } }, "description": "Parameters and filters to apply to the dataset." }, "description": "Provides enriched incident data and metrics for multiple incidents.\n\nExample metrics include Seconds to Resolve, Seconds to Engage, Snoozed Seconds, Sleep Hour Interruptions. Some metric definitions can be found in our knowledge base: https://support.pagerduty.com/docs/pagerduty-analytics\n\n\n> ### Early Access\n> This endpoint is in Early Access and may change at any time. You must pass in the X-EARLY-ACCESS header to access it.\n\n> A `team_ids` or `service_ids` filter is required for [user-level API keys](https://support.pagerduty.com/docs/using-the-api#section-generating-a-personal-rest-api-key) or keys generated through an OAuth flow. Account-level API keys do not have this requirement.\n", "tags": [ "Analytics" ] }, "parameters": [] }, "/analytics/raw/incidents/{id}": { "parameters": [ { "$ref": "#/components/parameters/id" } ], "get": { "summary": "Get raw data - single incident", "tags": [ "Analytics" ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "title": "Analytics Raw Incident", "type": "object", "x-tags": [ "Analytics" ], "properties": { "id": { "type": "string", "description": "Incident Id" }, "team_id": { "type": "string", "description": "ID of the team the incident was assigned to." }, "service_id": { "type": "string", "description": "ID of the service that the incident triggered on." }, "created_at": { "type": "string", "description": "Timestamp of when the incident was created." }, "resolved_at": { "type": "string", "description": "Timestamp of when the incident was resolved." }, "urgency": { "type": "string", "description": "Notification level" }, "major": { "type": "boolean", "description": "A major incident is defined as any incident that requires a coordinated response, often across multiple teams. \nhttps://support.pagerduty.com/docs/operational-reviews#major-incidents" }, "priority_id": { "type": "string", "description": "ID of the incident's priority level." }, "priority_name": { "type": "string", "description": "The user-provided short name of the priority." }, "priority_order": { "type": "integer", "description": "The integer representation of the incident's priority level." }, "seconds_to_resolve": { "type": "integer", "description": "Time from when incident triggered until it was resolved." }, "seconds_to_first_ack": { "type": "integer", "description": "Time between start of an incident, and the first responder to acknowledge." }, "seconds_to_engage": { "type": "integer", "description": "Time between start of an incident, and the first responder to acknowledge, or to accept responder request." }, "seconds_to_mobilize": { "type": "integer", "description": "Time between start of an incident, and the last additional responder to acknowledge. If an incident has one or less responders, the value will be null." }, "engaged_seconds": { "type": "integer", "description": "Total engaged time across all responders for this incident. Engaged time is measured from the time a user engages with an incident (by acknowledging or accepting a responder request) until the incident is resolved. This may include periods in which the incident was snoozed." }, "engaged_user_count": { "type": "integer", "description": "Total number of users who engaged (acknowledged, accepted responder request) in the incident." }, "escalation_count": { "type": "integer", "description": "Total count of instances where an incident is escalated between responders assigned to an escalation policy." }, "assignment_count": { "type": "integer", "description": "Total count of instances where an additional responder, who was not on-call for the incident, is added." }, "business_hour_interruptions": { "type": "integer", "description": "Total number of unique interruptions during business hour.\nBusiness hour: 8am-6pm Mon-Fri, based on the user’s time zone." }, "sleep_hour_interruptions": { "type": "integer", "description": "Total number of unique interruptions during sleep hour.\nSleep hour: 10pm-8am every day, based on the user’s time zone." }, "off_hour_interruptions": { "type": "integer", "description": "Total number of unique interruptions during off hour.\nOff hour: 6pm-10pm Mon-Fri and all day Sat-Sun, based on the user’s time zone." }, "snoozed_seconds": { "type": "integer", "description": "Total seconds the incident has been snoozed for." } } }, "examples": { "Example Response": { "value": { "time_zone": "Etc/UTC", "data": { "id": "PJASD3", "team_id": "PNVU4U", "service_id": "PAQTPI", "created_at": "2019-12-01T21:00:00Z", "resolved_at": "2019-12-01T21:01:00Z", "urgency": "high", "major": "true", "priority_id": "PZOZQXA", "priority_name": "SEV-1", "seconds_to_resolve": 60, "seconds_to_first_ack": 15, "seconds_to_engage": 30, "seconds_to_mobilize": 15, "engaged_seconds": 75, "engaged_user_count": 2, "escalation_count": 0, "assignment_count": 0, "business_hour_interruptions": 0, "sleep_hour_interruptions": 0, "off_hour_interruptions": 2, "snoozed_seconds": 0 } } } } } } }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" } }, "operationId": "getAnalyticsIncidentsById", "description": "Provides enriched incident data and metrics for a single incident.\n\nExample metrics include Seconds to Resolve, Seconds to Engage, Snoozed Seconds, Sleep Hour Interruptions. Some metric definitions can be found in our knowledge base: https://support.pagerduty.com/docs/pagerduty-analytics\n\n\n> ### Early Access\n> This endpoint is in Early Access and may change at any time. You must pass in the X-EARLY-ACCESS header to access it.\n", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "schema": { "type": "string", "default": "analytics-v2", "enum": [ "analytics-v2" ] }, "in": "header", "description": "This header indicates that this API endpoint is __UNDER CONSTRUCTION__ and may change at any time. You __MUST__ pass in this header and the above value. Do not use this endpoint in production, as it may change!\n", "name": "X-EARLY-ACCESS", "required": true } ] } }, "/audit/records": { "description": "List audit records.", "get": { "summary": "List audit records", "tags": [ "Audit" ], "operationId": "listAuditRecords", "description": "List audit trail records matching provided query params or default criteria.\n\nThe returned records are sorted by the `execution_time` from newest to oldest.\n\nSee [`Cursor-based pagination`](https://developer.pagerduty.com/docs/rest-api-v2/pagination/) for instructions on how to paginate through the result set.\n\nOnly admins, account owners, or global API tokens can access this endpoint.\n\nFor other role based access to audit records by resource ID, see the resource's API documentation. \n\nFor more information see the [API Concepts Document](../../docs/CONCEPTS.md#audit-record).\n\n> ### Early Access\n> This endpoint's interface is under development and subject to change. Do not use it in production systems.\n> Your request must set an X-EARLY-ACCESS header with value `audit-early-access` to acknowledge this.\n>\n> Audit records for user and team resources started in August 2020 and records may be purged while the API is in early access.\n", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "name": "since", "in": "query", "description": "The start of the date range over which you want to search. If not specified, defaults to `now() - 24 hours` (past 24 hours)", "schema": { "type": "string", "format": "date-time" } }, { "name": "until", "in": "query", "description": "The end of the date range over which you want to search. If not specified, defaults to `now()`", "schema": { "type": "string", "format": "date-time" } }, { "schema": { "type": "string", "enum": [ "audit-early-access" ] }, "in": "header", "description": "This header indicates that this API endpoint is __UNDER CONSTRUCTION__ and may change at any time. You __MUST__ pass in this header and the above value. Do not use this endpoint in production, as it may change!\n", "name": "X-EARLY-ACCESS", "required": true }, { "name": "resource_types[]", "in": "query", "description": "Resource type filter", "schema": { "type": "array", "items": { "type": "string", "enum": [ "users", "teams", "schedules", "escalation_policies", "services" ], "example": "users" } } }, { "name": "actor_type", "in": "query", "description": "Actor type filter.", "schema": { "type": "string", "example": "user_reference" } }, { "name": "actor_id", "in": "query", "description": "Actor Id filter. Must be qualified by providing the `actor_type` param.", "schema": { "type": "string", "example": "P123456" } }, { "name": "method_type", "in": "query", "description": "Method type filter.", "schema": { "type": "string", "description": "Describes the method used to perform the action:\n\n`browser` -- authenticated user session. Session value is not returned in the `truncated_token` field.\n\n`oauth` -- access token obtained via the OAuth flow. Truncated token value is returned in the `truncated_token` field.\n\n`api_token` -- Pagerduty API token. Truncated token value is returned in the `truncated_token` field.\n\n`identity_provider` -- action performed by an Identity provider on behalf of a user. No value is returned in the `truncated_token` field.\n\n`other` -- Method that does not fall in the predefined categories. Truncated token value MAY be returned in the `truncated_token` field.\n", "enum": [ "browser", "oauth", "api_token", "identity_provider", "other" ] } }, { "name": "method_truncated_token", "in": "query", "description": "Method truncated_token filter. Must be qualified by providing the `method_type` param.", "schema": { "type": "string", "example": "3xyz" } }, { "name": "actions[]", "in": "query", "description": "Action filter", "schema": { "type": "array", "items": { "type": "string" } } } ], "responses": { "200": { "description": "Records matching the query criteria.", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "properties": { "records": { "type": "array", "items": { "type": "object", "readOnly": true, "description": "An Audit Trail record", "properties": { "id": { "type": "string" }, "self": { "type": "string", "nullable": true, "description": "Record URL." }, "execution_time": { "type": "string", "format": "date-time", "description": "The date/time the action executed." }, "execution_context": { "type": "object", "description": "Action execution context", "properties": { "request_id": { "type": "string", "nullable": true, "description": "Request Id" }, "remote_address": { "type": "string", "nullable": true, "description": "remote address" } }, "nullable": true }, "actors": { "type": "array", "nullable": true, "items": { "$ref": "#/components/schemas/Reference" } }, "method": { "type": "object", "description": "The method information", "properties": { "description": { "type": "string", "nullable": true }, "truncated_token": { "description": "Truncated token containing the last 4 chars of the token's actual value.", "type": "string", "nullable": true, "example": "3xyz" }, "type": { "$ref": "#/paths/~1audit~1records/get/parameters/8/schema" } }, "required": [ "type" ] }, "resource": { "$ref": "#/components/schemas/Reference" }, "action": { "type": "string", "example": "create" }, "details": { "type": "object", "nullable": true, "description": "Additional details to provide further information about the action or\nthe resource that has been audited.\n", "properties": { "resource": { "$ref": "#/components/schemas/Reference" }, "fields": { "description": "A set of fields that have been affected.\nThe fields that have not been affected MAY be returned.\n", "type": "array", "nullable": true, "items": { "type": "object", "description": "Information about the affected field.\nWhen available, field's before and after values are returned:\n \n#### Resource creation\n- `value` MAY be returned\n\n#### Resource update\n- `value` MAY be returned\n- `before_value` MAY be returned\n\n#### Resource deletion\n- `before_value` MAY be returned\n", "properties": { "name": { "type": "string", "description": "Name of the resource field", "example": "name" }, "description": { "type": "string", "nullable": true, "description": "Human readable description of the resource field", "example": "First and Last name" }, "value": { "type": "string", "nullable": true, "description": "new or updated value of the field", "example": "Jonathan" }, "before_value": { "type": "string", "nullable": true, "description": "previous or deleted value of the field", "example": "John" } }, "required": [ "name" ] } }, "references": { "description": "A set of references that have been affected.", "type": "array", "nullable": true, "items": { "type": "object", "properties": { "name": { "type": "string", "description": "Name of the reference field", "example": "team_members" }, "description": { "type": "string", "nullable": true, "description": "Human readable description of the references field", "example": "First and Last name" }, "added": { "type": "array", "nullable": true, "items": { "$ref": "#/components/schemas/Reference" } }, "removed": { "type": "array", "nullable": true, "items": { "$ref": "#/components/schemas/Reference" } } }, "required": [ "name" ] } } }, "required": [ "resource" ] } }, "required": [ "id", "execution_time", "method", "resource", "action" ] } }, "response_metadata": { "nullable": true, "anyOf": [ { "type": "object", "properties": { "messages": { "type": "array", "nullable": true, "items": { "type": "string", "example": "Message about the result" } } } } ] } }, "required": [ "records" ] }, { "type": "object", "properties": { "limit": { "type": "integer", "description": "Echoes limit pagination property.", "readOnly": true }, "more": { "type": "boolean", "description": "Indicates if there are additional records to return\nThe `more` field will always be true or false, indicating whether there are more resources matching the query than present\nin the response (because of the request's limit). If `true`, you may want to make subsequent requests with a subsequent\n`pagination_token` until `more` is `false` in order to retrieve all of the resources.\n", "readOnly": true }, "pagination_token": { "type": "string", "description": "Pagination token for the subsequent results.\nSpecifying a `pagination_token` in the query sets the starting point for the result set, allowing you to fetch subsequent\nresources that are not in the initial set of results.\n", "example": "dXNlcjpVMEc5V0ZYTlo=", "readOnly": true, "nullable": true } }, "required": [ "limit", "more", "pagination_token" ] } ] }, "examples": { "response": { "$ref": "#/components/examples/AuditRecordResponseExample" } } } } }, "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" }, "500": { "$ref": "#/components/responses/InternalServerError" } } } }, "/business_services": { "description": "List and create business services.", "get": { "tags": [ "Business Services" ], "operationId": "listBusinessServices", "description": "List existing business services.\n\nBusiness services model capabilities that span multiple technical services and that may be owned by several different teams.\n\nFor more information see the [API Concepts Document](../../docs/CONCEPTS.md#business-services)\n", "summary": "List business services", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "name": "total", "in": "query", "description": "An optional parameter to display the total number of results.", "schema": { "default": false, "type": "boolean" } }, { "name": "offset", "in": "query", "description": "Offset to start pagination search results.", "schema": { "default": 0, "type": "integer" } }, { "name": "limit", "in": "query", "description": "Limit on number of results to load", "schema": { "default": 100, "type": "integer" } } ], "responses": { "200": { "description": "A paginated array of services.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/Pagination" }, { "type": "object", "properties": { "business_services": { "type": "array", "items": { "$ref": "#/components/schemas/BusinessService" } } }, "required": [ "business_services" ] } ] }, "examples": { "response": { "summary": "Response Example", "value": { "business_services": [ { "type": "business_service", "self": "https://api.pagerduty.com/business_services/P3U7V58", "html_url": null, "point_of_contact": "PagerDuty Admin", "name": "stand-alone node", "team": null, "id": "P3U7V58", "description": "Very important business function", "summary": "stand-alone node" }, { "type": "business_service", "self": "https://api.pagerduty.com/business_services/P1L1YEE", "html_url": null, "point_of_contact": "PagerDuty Admin", "name": "Cross-tier business service", "id": "P1L1YEE", "description": "", "summary": "Cross-tier business service", "team": { "id": "PQ9K7I8", "type": "team_reference", "self": "https://api.pagerduty.com/teams/PQ9K7I8" } } ], "limit": 100, "offset": 0, "total": null, "more": false } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" } } }, "post": { "tags": [ "Business Services" ], "operationId": "createBusinessService", "description": "Create a new business service.\n\nBusiness services model capabilities that span multiple technical services and that may be owned by several different teams.\n\nFor more information see the [API Concepts Document](../../docs/CONCEPTS.md#business-services)\n", "summary": "Create a business service", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "business_service": { "type": "object", "description": "The business service to be created", "properties": { "name": { "type": "string", "description": "The name of the business service." }, "description": { "type": "string", "description": "The description of the business service." }, "point_of_contact": { "type": "string", "description": "The owner of the business service." }, "team": { "type": "object", "title": "Team", "description": "Reference to the team that owns the business service.", "properties": { "id": { "type": "string", "description": "The team ID" } } } } } } }, "examples": { "request": { "summary": "Request Example", "value": { "business_service": { "name": "Self-serve mobile checkout", "description": "Checkout service for our mobile clients", "point_of_contact": "PagerDuty Admin", "team": { "id": "P3ZQXDF" } } } } } } } }, "responses": { "200": { "description": "The business service that was created.", "content": { "application/json": { "schema": { "type": "object", "properties": { "business_service": { "$ref": "#/components/schemas/BusinessService" } }, "required": [ "business_service" ] }, "examples": { "response": { "summary": "Response Example", "value": { "business_service": { "id": "P1L1YEE", "type": "business_service", "self": "https://api.pagerduty.com/business_services/P1L1YEE", "html_url": null, "point_of_contact": "PagerDuty Admin", "name": "Self-serve mobile checkout", "description": "Checkout service for our mobile clients.", "summary": "Self-serve mobile checkout", "team": { "id": "P3ZQXDF", "type": "team_reference", "self": "https://api.pagerduty.com/teams/P3ZQXDF" } } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" } } } }, "/business_services/{id}": { "description": "Manage a business service.", "get": { "tags": [ "Business Services" ], "operationId": "getBusinessService", "description": "Get details about an existing business service.\n\nBusiness services model capabilities that span multiple technical services and that may be owned by several different teams.\n\nFor more information see the [API Concepts Document](../../docs/CONCEPTS.md#business-services)\n", "summary": "Get a business service", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "$ref": "#/components/parameters/id" } ], "responses": { "200": { "description": "The service business requested.", "content": { "application/json": { "schema": { "type": "object", "properties": { "business_service": { "$ref": "#/components/schemas/BusinessService" } }, "required": [ "business_service" ] }, "examples": { "response": { "summary": "Response Example", "value": { "business_service": { "id": "P1L1YEE", "type": "business_service", "self": "https://api.pagerduty.com/business_services/P1L1YEE", "html_url": null, "name": "Cross-tier business service", "description": "Business service affected by multiple teams", "point_of_contact": "PagerDuty Admin", "summary": "Cross-tier business services", "team": { "id": "PQ9K7I8", "type": "team_reference", "self": "https://api.pagerduty.com/teams/PQ9K7I8" } } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" } } }, "delete": { "tags": [ "Business Services" ], "operationId": "deleteBusinessService", "description": "Delete an existing business service. \n\nOnce the service is deleted, it will not be accessible from the web UI and new incidents won't be able to be created for this service.\n\nBusiness services model capabilities that span multiple technical services and that may be owned by several different teams.\n\nFor more information see the [API Concepts Document](../../docs/CONCEPTS.md#business-services)\n", "summary": "Delete a business service", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "$ref": "#/components/parameters/id" } ], "responses": { "204": { "description": "The business service was deleted successfully." }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" } } }, "put": { "tags": [ "Business Services" ], "operationId": "updateBusinessService", "description": "Update an existing business service. NOTE that this endpoint also accepts the PATCH verb.\n\nBusiness services model capabilities that span multiple technical services and that may be owned by several different teams.\n\nFor more information see the [API Concepts Document](../../docs/CONCEPTS.md#business-services)\n", "summary": "Update a business service", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "$ref": "#/components/parameters/id" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "business_service": { "type": "object", "description": "The business service to be created", "properties": { "name": { "type": "string", "description": "The name of the business service." }, "description": { "type": "string", "description": "The description of the business service." }, "point_of_contact": { "type": "string", "description": "The owner of the business service." }, "team": { "type": "object", "title": "Team", "description": "Reference to the team that owns the business service.", "properties": { "id": { "type": "string", "description": "The team ID" } } } } } } }, "examples": { "request": { "summary": "Request Example", "value": { "business_service": { "name": "Self-serve mobile checkout", "description": "Checkout service for our mobile clients", "point_of_contact": "PagerDuty Admin", "team": { "id": "P3ZQXDF" } } } } } } } }, "responses": { "200": { "description": "The business service that was updated.", "content": { "application/json": { "schema": { "type": "object", "properties": { "business_service": { "$ref": "#/components/schemas/BusinessService" } }, "required": [ "business_service" ] }, "examples": { "response": { "summary": "Response Example", "value": { "business_service": { "id": "P1L1YEE", "type": "business_service", "self": "https://api.pagerduty.com/business_services/P1L1YEE", "html_url": null, "point_of_contact": "PagerDuty Admin", "name": "Self-serve mobile checkout", "description": "Checkout service for our mobile clients.", "summary": "Self-serve mobile checkout", "team": { "id": "P3ZQXDF", "type": "team_reference", "self": "https://api.pagerduty.com/teams/P3ZQXDF" } } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" } } } }, "/escalation_policies": { "description": "List and create escalation policies.", "get": { "tags": [ "Escalation Policies" ], "operationId": "listEscalationPolicies", "description": "List all of the existing escalation policies.\n\nEscalation policies define which user should be alerted at which time.\n\nFor more information see the [API Concepts Document](../../docs/CONCEPTS.md#escalation-policies)\n", "summary": "List escalation policies", "parameters": [ { "$ref": "#/components/parameters/total" }, { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "name": "query", "in": "query", "description": "Filters the results, showing only the escalation policies whose names contain the query.", "schema": { "type": "string" } }, { "name": "user_ids[]", "in": "query", "description": "Filters the results, showing only escalation policies on which any of the users is a target.", "explode": true, "schema": { "type": "array", "items": { "type": "string" }, "uniqueItems": true } }, { "$ref": "#/components/parameters/team_ids" }, { "$ref": "#/components/parameters/include_escalation_policy" }, { "$ref": "#/components/parameters/sort_by_escalation_policy" } ], "responses": { "200": { "description": "A paginated array of escalation policy objects.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/Pagination" }, { "type": "object", "properties": { "escalation_policies": { "type": "array", "items": { "$ref": "#/components/schemas/EscalationPolicy" } } }, "required": [ "escalation_policies" ] } ] }, "examples": { "response": { "summary": "Response Example", "value": { "escalation_policies": [ { "id": "PANZZEQ", "type": "escalation_policy", "summary": "Engineering Escalation Policy", "on_call_handoff_notifications": "if_has_services", "self": "https://api.pagerduty.com/escalation_policies/PANZZEQ", "html_url": "https://subdomain.pagerduty.com/escalation_policies/PANZZEQ", "name": "Engineering Escalation Policy", "escalation_rules": [ { "id": "PANZZEQ", "escalation_delay_in_minutes": 30, "targets": [ { "id": "PEYSGVF", "summary": "PagerDuty Admin", "type": "user_reference", "self": "https://api.pagerduty.com/users/PEYSGVF", "html_url": "https://subdomain.pagerduty.com/users/PEYSGVF" }, { "id": "PI7DH85", "summary": "Daily Engineering Rotation", "type": "schedule_reference", "self": "https://api.pagerduty.com/schedules/PI7DH85", "html_url": "https://subdomain.pagerduty.com/schedules/PI7DH85" } ] } ], "services": [ { "id": "PIJ90N7", "type": "generic_email_reference", "summary": "My Mail Service", "self": "https://api.pagerduty.com/services/PIJ90N7", "html_url": "https://subdomain.pagerduty.com/services/PIJ90N7" } ], "num_loops": 0, "teams": [ { "id": "PQ9K7I8", "type": "team_reference", "summary": "Engineering", "self": "https://api.pagerduty.com/teams/PQ9K7I8", "html_url": "https://subdomain.pagerduty.com/teams/PQ9K7I8" } ] } ], "limit": 25, "offset": 0, "more": false } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } }, "post": { "tags": [ "Escalation Policies" ], "operationId": "createEscalationPolicy", "description": "Creates a new escalation policy. At least one escalation rule must be provided.\n\nEscalation policies define which user should be alerted at which time.\n\nFor more information see the [API Concepts Document](../../docs/CONCEPTS.md#escalation-policies)\n", "summary": "Create an escalation policy", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "$ref": "#/components/parameters/optional_from_header" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "escalation_policy": { "$ref": "#/components/schemas/EscalationPolicy" } }, "required": [ "escalation_policy" ] }, "examples": { "request": { "summary": "Request Example", "value": { "escalation_policy": { "type": "escalation_policy", "name": "Engineering Escalation Policy", "escalation_rules": [ { "escalation_delay_in_minutes": 30, "targets": [ { "id": "PEYSGVF", "type": "user_reference" } ] } ], "services": [ { "id": "PIJ90N7", "type": "service_reference" } ], "num_loops": 2, "on_call_handoff_notifications": "if_has_services", "teams": [ { "id": "PQ9K7I8", "type": "team_reference" } ], "description": "Here is the ep for the engineering team." } } } } } }, "description": "The escalation policy to be created." }, "responses": { "201": { "description": "The escalation policy that was created.", "content": { "application/json": { "schema": { "type": "object", "properties": { "escalation_policy": { "$ref": "#/components/schemas/EscalationPolicy" } }, "required": [ "escalation_policy" ] }, "examples": { "response": { "summary": "Response Example", "value": { "escalation_policy": { "id": "PT20YPA", "type": "escalation_policy", "summary": "Engineering Escalation Policy", "on_call_handoff_notifications": "if_has_services", "self": "https://api.pagerduty.com/escalation_policies/PT20YPA", "html_url": "https://subdomain.pagerduty.com/escalation_policies/PT20YPA", "name": "Engineering Escalation Policy", "escalation_rules": [ { "id": "PT20YPA", "escalation_delay_in_minutes": 22, "targets": [ { "id": "PXPGF42", "summary": "Earline Greenholt", "type": "user_reference", "self": "https://api.pagerduty.com/users/PXPGF42", "html_url": "https://subdomain.pagerduty.com/users/PXPGF42" }, { "id": "PI7DH85", "summary": "Daily Engineering Rotation", "type": "schedule_reference", "self": "https://api.pagerduty.com/schedules/PI7DH85", "html_url": "https://subdomain.pagerduty.com/schedules/PI7DH85" } ] } ], "services": [ { "id": "PIJ90N7", "type": "generic_email_reference", "summary": "My Mail Service", "self": "https://api.pagerduty.com/services/PIJ90N7", "html_url": "https://subdomain.pagerduty.com/services/PIJ90N7" } ], "num_loops": 2, "teams": [ { "id": "PQ9K7I8", "type": "team_reference", "summary": "Engineering", "self": "https://api.pagerduty.com/teams/PQ9K7I8", "html_url": "https://subdomain.pagerduty.com/teams/PQ9K7I8" } ] } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "402": { "$ref": "#/components/responses/PaymentRequired" }, "403": { "$ref": "#/components/responses/Forbidden" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } } }, "/escalation_policies/{id}": { "description": "Manage an escalation policy.", "get": { "tags": [ "Escalation Policies" ], "operationId": "getEscalationPolicy", "description": "Get information about an existing escalation policy and its rules.\n\nEscalation policies define which user should be alerted at which time.\n\nFor more information see the [API Concepts Document](../../docs/CONCEPTS.md#escalation-policies)\n", "summary": "Get an escalation policy", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "$ref": "#/components/parameters/id" }, { "$ref": "#/components/parameters/include_escalation_policy" } ], "responses": { "200": { "description": "The escalation policy object.", "content": { "application/json": { "schema": { "type": "object", "properties": { "escalation_policy": { "$ref": "#/components/schemas/EscalationPolicy" } }, "required": [ "escalation_policy" ] }, "examples": { "response": { "summary": "Response Example", "value": { "escalation_policy": { "id": "PT20YPA", "type": "escalation_policy", "summary": "Another Escalation Policy", "on_call_handoff_notifications": "if_has_services", "self": "https://api.pagerduty.com/escalation_policies/PT20YPA", "html_url": "https://subdomain.pagerduty.com/escalation_policies/PT20YPA", "name": "Another Escalation Policy", "escalation_rules": [ { "id": "PGHDV41", "escalation_delay_in_minutes": 30, "targets": [ { "id": "PAM4FGS", "summary": "Kyler Kuhn", "type": "user_reference", "self": "https://api.pagerduty.com/users/PAM4FGS", "html_url": "https://subdomain.pagerduty.com/users/PAM4FGS" }, { "id": "PI7DH85", "summary": "Daily Engineering Rotation", "type": "schedule_reference", "self": "https://api.pagerduty.com/schedules/PI7DH85", "html_url": "https://subdomain.pagerduty.com/schedules/PI7DH85" } ] } ], "services": [ { "id": "PIJ90N7", "type": "generic_email_reference", "summary": "My Mail Service", "self": "https://api.pagerduty.com/services/PIJ90N7", "html_url": "https://subdomain.pagerduty.com/services/PIJ90N7" } ], "num_loops": 2, "teams": [ { "id": "PQ9K7I8", "type": "team_reference", "summary": "Engineering", "self": "https://api.pagerduty.com/teams/PQ9K7I8", "html_url": "https://subdomain.pagerduty.com/teams/PQ9K7I8" } ], "description": "This is yet another escalation policy" } } } } } } }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" } } }, "delete": { "tags": [ "Escalation Policies" ], "operationId": "deleteEscalationPolicy", "description": "Deletes an existing escalation policy and rules. The escalation policy must not be in use by any services.\n\nEscalation policies define which user should be alerted at which time.\n\nFor more information see the [API Concepts Document](../../docs/CONCEPTS.md#escalation-policies)\n", "summary": "Delete an escalation policy", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "$ref": "#/components/parameters/id" } ], "responses": { "204": { "description": "The escalation policy was deleted successfully." }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } }, "put": { "tags": [ "Escalation Policies" ], "operationId": "updateEscalationPolicy", "description": "Updates an existing escalation policy and rules.\n\nEscalation policies define which user should be alerted at which time.\n\nFor more information see the [API Concepts Document](../../docs/CONCEPTS.md#escalation-policies)\n", "summary": "Update an escalation policy", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "$ref": "#/components/parameters/id" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "escalation_policy": { "$ref": "#/components/schemas/EscalationPolicy" } }, "required": [ "escalation_policy" ] }, "examples": { "request": { "summary": "Request Example", "value": { "escalation_policy": { "type": "escalation_policy", "name": "Engineering Escalation Policy", "escalation_rules": [ { "escalation_delay_in_minutes": 30, "targets": [ { "id": "PEYSGVF", "type": "user_reference" } ] } ], "services": [ { "id": "PIJ90N7", "type": "service_reference" } ], "num_loops": 2, "on_call_handoff_notifications": "if_has_services", "teams": [ { "id": "PQ9K7I8", "type": "team_reference" } ], "description": "Here is the ep for the engineering team." } } } } } }, "description": "The escalation policy to be updated." }, "responses": { "200": { "description": "The escalation policy that was updated.", "content": { "application/json": { "schema": { "type": "object", "properties": { "escalation_policy": { "$ref": "#/components/schemas/EscalationPolicy" } }, "required": [ "escalation_policy" ] }, "examples": { "response": { "summary": "Response Example", "value": { "escalation_policy": { "id": "PT20YPA", "type": "escalation_policy", "summary": "Another Escalation Policy", "on_call_handoff_notifications": "if_has_services", "self": "https://api.pagerduty.com/escalation_policies/PT20YPA", "html_url": "https://subdomain.pagerduty.com/escalation_policies/PT20YPA", "name": "Another Escalation Policy", "escalation_rules": [ { "id": "PGHDV41", "escalation_delay_in_minutes": 30, "targets": [ { "id": "PAM4FGS", "summary": "Kyler Kuhn", "type": "user_reference", "self": "https://api.pagerduty.com/users/PAM4FGS", "html_url": "https://subdomain.pagerduty.com/users/PAM4FGS" }, { "id": "PI7DH85", "summary": "Daily Engineering Rotation", "type": "schedule_reference", "self": "https://api.pagerduty.com/schedules/PI7DH85", "html_url": "https://subdomain.pagerduty.com/schedules/PI7DH85" } ] } ], "services": [ { "id": "PIJ90N7", "type": "generic_email_reference", "summary": "My Mail Service", "self": "https://api.pagerduty.com/services/PIJ90N7", "html_url": "https://subdomain.pagerduty.com/services/PIJ90N7" } ], "num_loops": 2, "teams": [ { "id": "PQ9K7I8", "type": "team_reference", "summary": "Engineering", "self": "https://api.pagerduty.com/teams/PQ9K7I8", "html_url": "https://subdomain.pagerduty.com/teams/PQ9K7I8" } ], "description": "This is yet another escalation policy" } } } } } } }, "401": { "$ref": "#/components/responses/Unauthorized" }, "402": { "$ref": "#/components/responses/PaymentRequired" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } } }, "/escalation_policies/{id}/audit/records": { "description": "List audit records of changes made to the escalation policy.", "get": { "tags": [ "Escalation Policies" ], "operationId": "listEscalationPolicyAuditRecords", "summary": "List audit records for an escalation policy", "description": "The returned records are sorted by the `execution_time` from newest to oldest.\n\nSee [`Cursor-based pagination`](https://developer.pagerduty.com/docs/rest-api-v2/pagination/) for instructions on how to paginate through the result set.\n\nFor more information see the [API Concepts Document](../../docs/CONCEPTS.md#audit-record).\n\n> ### Early Access\n> This endpoint's interface is under development and subject to change. Do not use it in production systems.\n> Your request must set an X-EARLY-ACCESS header with value `audit-early-access` to acknowledge this.\n>\n> Audit records for escalation policies resource started in August 2020 and records may be purged while the API is in early access.\n", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "$ref": "#/components/parameters/id" }, { "$ref": "#/paths/~1audit~1records/get/parameters/2" }, { "$ref": "#/paths/~1audit~1records/get/parameters/3" }, { "$ref": "#/paths/~1audit~1records/get/parameters/4" } ], "responses": { "200": { "description": "Records matching the query criteria.", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "properties": { "records": { "type": "array", "items": { "$ref": "#/paths/~1audit~1records/get/responses/200/content/application~1json/schema/allOf/0/properties/records/items" } }, "response_metadata": { "nullable": true, "anyOf": [ { "$ref": "#/paths/~1audit~1records/get/responses/200/content/application~1json/schema/allOf/0/properties/response_metadata/anyOf/0" } ] } }, "required": [ "records" ] }, { "$ref": "#/paths/~1audit~1records/get/responses/200/content/application~1json/schema/allOf/1" } ] }, "examples": { "response": { "$ref": "#/components/examples/AuditRecordResponseExample" } } } } }, "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" }, "500": { "$ref": "#/components/responses/InternalServerError" } } } }, "/extension_schemas": { "description": "List extension schemas.", "get": { "tags": [ "Extension Schemas" ], "operationId": "listExtensionSchemas", "description": "List all extension schemas.\n\nA PagerDuty extension vendor represents a specific type of outbound extension such as Generic Webhook, Slack, ServiceNow.\n\nFor more information see the [API Concepts Document](../../docs/CONCEPTS.md#extension-schemas)\n", "summary": "List extension schemas", "parameters": [ { "$ref": "#/components/parameters/total" }, { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" } ], "responses": { "200": { "description": "A paginated array of extension schemas.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/Pagination" }, { "type": "object", "properties": { "extension_schemas": { "type": "array", "items": { "$ref": "#/components/schemas/ExtensionSchema" } } }, "required": [ "extension_schemas" ] } ] }, "examples": { "response": { "summary": "Response Example", "value": { "extension_schemas": [ { "id": "PJFWPEP", "type": "extension_schema", "summary": "Generic Webhook", "self": "https://api.pagerduty.com/extension_schemas/PJFWPEP", "description": "Long description here", "guide_url": "https://developer.pagerduty.com", "icon_url": "https://extension.com/extension.png", "key": "generic_webhook", "label": "Generic Webhook", "logo_url": "https://extension.com/logo.png", "send_types": [ "trigger", "acknowledge", "resolve", "delegate", "escalate", "unacknowledge", "assign" ], "url": "" } ], "limit": 25, "offset": 0, "more": false } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } } }, "/extension_schemas/{id}": { "description": "Get details about one specific extension vendor.", "get": { "tags": [ "Extension Schemas" ], "operationId": "getExtensionSchema", "description": "Get details about one specific extension vendor.\n\nA PagerDuty extension vendor represents a specific type of outbound extension such as Generic Webhook, Slack, ServiceNow.\n\nFor more information see the [API Concepts Document](../../docs/CONCEPTS.md#extension-schemas)\n", "summary": "Get an extension vendor", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "$ref": "#/components/parameters/id" } ], "responses": { "200": { "description": "The extension vendor requested", "content": { "application/json": { "schema": { "type": "object", "properties": { "extension_schema": { "type": "array", "items": { "$ref": "#/components/schemas/ExtensionSchema" } } }, "required": [ "extension_schema" ] }, "examples": { "response": { "summary": "Response Example", "value": { "extension_schema": { "id": "PJFWPEP", "type": "extension_schema", "summary": "Generic Webhook", "self": "https://api.pagerduty.com/extension_schemas/PJFWPEP", "description": "Long description here", "guide_url": "https://developer.pagerduty.com", "icon_url": "https://extension.com/extension.png", "key": "generic_webhook", "label": "Generic Webhook", "logo_url": "https://extension.com/logo.png", "send_types": [ "trigger", "acknowledge", "resolve", "delegate", "escalate", "unacknowledge", "assign" ], "url": "" } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } } }, "/extensions": { "description": "List and create extensions.", "get": { "tags": [ "Extensions" ], "operationId": "listExtensions", "description": "List existing extensions.\n\nExtensions are representations of Extension Schema objects that are attached to Services.\n\nFor more information see the [API Concepts Document](../../docs/CONCEPTS.md#extensions)\n", "summary": "List extensions", "parameters": [ { "$ref": "#/components/parameters/total" }, { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "name": "extension_object_id", "description": "The id of the extension object you want to filter by.", "in": "query", "schema": { "type": "string" } }, { "name": "query", "in": "query", "description": "Filters the result, showing only the extensions whose name matches the query.", "schema": { "type": "string" } }, { "name": "extension_schema_id", "in": "query", "description": "Filter the extensions by extension vendor id.", "schema": { "type": "string" } }, { "name": "include[]", "in": "query", "description": "Array of additional details to include.", "explode": true, "schema": { "type": "array", "items": { "type": "string", "enum": [ "extension_objects", "extension_schemas" ] }, "uniqueItems": true } } ], "responses": { "200": { "description": "A paginated array of extensions.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/Pagination" }, { "type": "object", "properties": { "extensions": { "type": "array", "items": { "$ref": "#/components/schemas/Extension" } } }, "required": [ "extensions" ] } ] }, "examples": { "response": { "summary": "Response Example", "value": { "extensions": [ { "id": "PPGPXHO", "self": "https://api.pagerduty.com/extensions/PPGPXHO", "endpoint_url": "https://example.com/receive_a_pagerduty_webhook", "name": "My Webhook", "summary": "My Webhook", "type": "extension", "extension_schema": { "id": "PJFWPEP", "type": "extension_schema_reference", "summary": "Generic Webhook", "self": "https://api.pagerduty.com/extension_schemas/PJFWPEP" }, "extension_objects": [ { "id": "PIJ90N7", "type": "service_reference", "summary": "My Application Service", "self": "https://api.pagerduty.com/services/PIJ90N7", "html_url": "https://subdomain.pagerduty.com/services/PIJ90N7" } ] } ], "limit": 25, "offset": 0, "more": false } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" } } }, "post": { "tags": [ "Extensions" ], "operationId": "createExtension", "description": "Create a new Extension.\n\nExtensions are representations of Extension Schema objects that are attached to Services.\n\nFor more information see the [API Concepts Document](../../docs/CONCEPTS.md#extensions)\n", "summary": "Create an extension", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "extension": { "$ref": "#/components/schemas/Extension" } }, "required": [ "extension" ] }, "examples": { "request": { "summary": "Request Example", "value": { "extension": { "endpoint_url": "https://example.com/receive_a_pagerduty_webhook", "name": "My Webhook", "extension_schema": { "id": "PJFWPEP", "type": "extension_schema_reference" }, "extension_objects": [ { "id": "PIJ90N7", "type": "service_reference" } ] } } }, "requestCustomHeaders": { "summary": "Request Example with Custom Headers", "value": { "extension": { "endpoint_url": "https://example.com/receive_a_pagerduty_webhook", "name": "My Webhook", "extension_schema": { "id": "PJFWPEP", "type": "extension_schema_reference" }, "extension_objects": [ { "id": "PIJ90N7", "type": "service_reference" } ], "config": { "headers": [ { "name": "Authorization", "value": "Token token=super_secret_token_value" } ] } } } } } } }, "description": "The extension to be created" }, "responses": { "201": { "description": "The extension that was created", "content": { "application/json": { "schema": { "type": "object", "properties": { "extension": { "$ref": "#/components/schemas/Extension" } }, "required": [ "extension" ] }, "examples": { "response": { "summary": "Response Example", "value": { "extension": { "id": "PPGPXHO", "self": "https://api.pagerduty.com/extensions/PPGPXHO", "endpoint_url": "https://example.com/receive_a_pagerduty_webhook", "name": "My Webhook", "summary": "My Webhook", "type": "extension", "extension_schema": { "id": "PJFWPEP", "type": "extension_schema_reference", "summary": "Generic Webhook", "self": "https://api.pagerduty.com/extension_schemas/PJFWPEP" }, "extension_objects": [ { "id": "PIJ90N7", "type": "service_reference", "summary": "My Application Service", "self": "https://api.pagerduty.com/services/PIJ90N7", "html_url": "https://subdomain.pagerduty.com/services/PIJ90N7" } ] } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "402": { "$ref": "#/components/responses/PaymentRequired" }, "403": { "$ref": "#/components/responses/Forbidden" } }, "callbacks": { "webhookV2": { "endpoint_url": { "post": { "tags": [ "Webhooks V2" ], "operationId": "webhookV2", "description": "Receive webhook indicating incident state has changed.", "summary": "Receive webhook", "security": [], "responses": { "200": { "description": "Your server implementation should return this if it successfuly received the webhook." } }, "requestBody": { "description": "Webhook.", "content": { "application/json": { "schema": { "type": "object", "properties": { "messages": { "type": "array", "description": "An array of webhook messages.", "items": { "$ref": "#/components/schemas/WebhookIncidentAction" } } } } } } } } } }, "webhookV1": { "endpoint_url": { "post": { "tags": [ "Webhooks V1" ], "operationId": "webhookV1", "description": "Receive webhook indicating incident state has changed.", "summary": "Receive webhook", "security": [], "responses": { "200": { "description": "Your server implementation should return this if it successfuly received the webhook." } }, "requestBody": { "description": "Webhook.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebhooksV1Message" } } } } } } } } } }, "/extensions/{id}": { "description": "Manage an extension.", "get": { "tags": [ "Extensions" ], "operationId": "getExtension", "description": "Get details about an existing extension.\n\nExtensions are representations of Extension Schema objects that are attached to Services.\n\nFor more information see the [API Concepts Document](../../docs/CONCEPTS.md#extensions)\n", "summary": "Get an extension", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "$ref": "#/components/parameters/id" }, { "name": "include[]", "in": "query", "description": "Array of additional details to include.", "explode": true, "schema": { "type": "array", "items": { "type": "string", "enum": [ "extension_schemas", "extension_objects", "temporarily_disabled" ] }, "uniqueItems": true } } ], "responses": { "200": { "description": "The extension that was requested.", "content": { "application/json": { "schema": { "type": "object", "properties": { "extension": { "$ref": "#/components/schemas/Extension" } }, "required": [ "extension" ] }, "examples": { "response": { "summary": "Response Example", "value": { "extension": { "id": "PPGPXHO", "self": "https://api.pagerduty.com/extensions/PPGPXHO", "endpoint_url": "https://example.com/receive_a_pagerduty_webhook", "name": "My Webhook", "summary": "My Webhook", "type": "extension", "extension_schema": { "id": "PJFWPEP", "type": "extension_schema_reference", "summary": "Generic Webhook", "self": "https://api.pagerduty.com/extension_schemas/PJFWPEP" }, "extension_objects": [ { "id": "PIJ90N7", "type": "service_reference", "summary": "My Application Service", "self": "https://api.pagerduty.com/services/PIJ90N7", "html_url": "https://subdomain.pagerduty.com/services/PIJ90N7" } ], "temporarily_disabled": false } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" } } }, "delete": { "tags": [ "Extensions" ], "operationId": "deleteExtension", "description": "Delete an existing extension. \n\nOnce the extension is deleted, it will not be accessible from the web UI and new incidents won't be able to be created for this extension.\n\nExtensions are representations of Extension Schema objects that are attached to Services.\n\nFor more information see the [API Concepts Document](../../docs/CONCEPTS.md#extensions)\n", "summary": "Delete an extension", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "$ref": "#/components/parameters/id" } ], "responses": { "204": { "description": "The extension was deleted successfully." }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" } } }, "put": { "tags": [ "Extensions" ], "operationId": "updateExtension", "description": "Update an existing extension.\n\nExtensions are representations of Extension Schema objects that are attached to Services.\n\nFor more information see the [API Concepts Document](../../docs/CONCEPTS.md#extensions)\n", "summary": "Update an extension", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "$ref": "#/components/parameters/id" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "extension": { "$ref": "#/components/schemas/Extension" } }, "required": [ "extension" ] }, "examples": { "request": { "summary": "Request Example", "value": { "extension": { "endpoint_url": "https://example.com/receive_a_pagerduty_webhook", "name": "My Webhook", "extension_schema": { "id": "PJFWPEP", "type": "extension_schema_reference" }, "extension_objects": [ { "id": "PIJ90N7", "type": "service_reference" } ] } } }, "requestCustomHeaders": { "summary": "Request Example with Custom Headers", "value": { "extension": { "endpoint_url": "https://example.com/receive_a_pagerduty_webhook", "name": "My Webhook", "extension_schema": { "id": "PJFWPEP", "type": "extension_schema_reference" }, "extension_objects": [ { "id": "PIJ90N7", "type": "service_reference" } ], "config": { "headers": [ { "name": "Authorization", "value": "Token token=super_secret_token_value" } ] } } } } } } }, "description": "The extension to be updated." }, "responses": { "200": { "description": "The extension that was updated.", "content": { "application/json": { "schema": { "type": "object", "properties": { "extension": { "$ref": "#/components/schemas/Extension" } }, "required": [ "extension" ] }, "examples": { "response": { "summary": "Response Example", "value": { "extension": { "id": "PPGPXHO", "self": "https://api.pagerduty.com/extensions/PPGPXHO", "endpoint_url": "https://example.com/receive_a_pagerduty_webhook", "name": "My Webhook", "summary": "My Webhook", "type": "extension", "extension_schema": { "id": "PJFWPEP", "type": "extension_schema_reference", "summary": "Generic Webhook", "self": "https://api.pagerduty.com/extension_schemas/PJFWPEP" }, "extension_objects": [ { "id": "PIJ90N7", "type": "service_reference", "summary": "My Application Service", "self": "https://api.pagerduty.com/services/PIJ90N7", "html_url": "https://subdomain.pagerduty.com/services/PIJ90N7" } ] } } } } } } }, "401": { "$ref": "#/components/responses/Unauthorized" }, "402": { "$ref": "#/components/responses/PaymentRequired" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" } } } }, "/extensions/{id}/enable": { "description": "Enable an extension.", "post": { "tags": [ "Extensions" ], "operationId": "enableExtension", "description": "Enable an extension that is temporarily disabled. (This API does not require a request body.)\n\nExtensions are representations of Extension Schema objects that are attached to Services.\n\nFor more information see the [API Concepts Document](../../docs/CONCEPTS.md#extensions)\n", "summary": "Enable an extension", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "$ref": "#/components/parameters/id" } ], "responses": { "200": { "description": "The extension that was successfully enabled.", "content": { "application/json": { "schema": { "type": "object", "properties": { "extension": { "$ref": "#/components/schemas/Extension" } }, "required": [ "extension" ] }, "examples": { "response": { "summary": "Response Example", "value": { "extension": { "id": "PPGPXHO", "self": "https://api.pagerduty.com/extensions/PPGPXHO", "endpoint_url": "https://example.com/receive_a_pagerduty_webhook", "name": "My Webhook", "summary": "My Webhook", "type": "extension", "extension_schema": { "id": "PJFWPEP", "type": "extension_schema_reference", "summary": "Generic Webhook", "self": "https://api.pagerduty.com/extension_schemas/PJFWPEP" }, "extension_objects": [ { "id": "PIJ90N7", "type": "service_reference", "summary": "My Application Service", "self": "https://api.pagerduty.com/services/PIJ90N7", "html_url": "https://subdomain.pagerduty.com/services/PIJ90N7" } ] } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" } } } }, "/incidents": { "description": "List and update incidents.", "get": { "tags": [ "Incidents" ], "operationId": "listIncidents", "description": "List existing incidents.\n\nAn incident represents a problem or an issue that needs to be addressed and resolved.\n\nFor more information see the [API Concepts Document](../../docs/CONCEPTS.md#incidents)\n", "summary": "List incidents", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "$ref": "#/components/parameters/total" }, { "$ref": "#/components/parameters/since" }, { "$ref": "#/components/parameters/until" }, { "$ref": "#/components/parameters/date_range" }, { "name": "statuses[]", "in": "query", "description": "Return only incidents with the given statuses. (More status codes may be introduced in the future.)", "explode": true, "schema": { "type": "array", "items": { "type": "string", "enum": [ "triggered", "acknowledged", "resolved" ] }, "uniqueItems": true } }, { "$ref": "#/components/parameters/incident_key" }, { "$ref": "#/components/parameters/incident_services" }, { "$ref": "#/components/parameters/team_ids" }, { "$ref": "#/components/parameters/incident_assigned_to_user" }, { "$ref": "#/components/parameters/incident_urgencies" }, { "$ref": "#/components/parameters/time_zone" }, { "name": "sort_by", "in": "query", "description": "Used to specify both the field you wish to sort the results on (incident_number/created_at/resolved_at/urgency), as well as the direction (asc/desc) of the results. The sort_by field and direction should be separated by a colon. A maximum of two fields can be included, separated by a comma. Sort direction defaults to ascending. The account must have the `urgencies` ability to sort by the urgency.", "style": "form", "explode": false, "schema": { "type": "array", "items": { "type": "string" }, "maxItems": 2, "uniqueItems": true } }, { "name": "include[]", "in": "query", "description": "Array of additional details to include.", "explode": true, "schema": { "type": "array", "items": { "type": "string", "enum": [ "users", "services", "first_trigger_log_entries", "escalation_policies", "teams", "assignees", "acknowledgers", "priorities", "conference_bridge" ] }, "uniqueItems": true } } ], "responses": { "200": { "description": "A paginated array of incidents.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/Pagination" }, { "type": "object", "properties": { "incidents": { "type": "array", "items": { "$ref": "#/components/schemas/Incident" } } }, "required": [ "incidents" ] } ] }, "examples": { "response": { "summary": "Response Example", "value": { "incidents": [ { "id": "PT4KHLK", "type": "incident", "summary": "[#1234] The server is on fire.", "self": "https://api.pagerduty.com/incidents/PT4KHLK", "html_url": "https://subdomain.pagerduty.com/incidents/PT4KHLK", "incident_number": 1234, "created_at": "2015-10-06T21:30:42Z", "status": "resolved", "title": "The server is on fire.", "incident_key": "baf7cf21b1da41b4b0221008339ff357", "service": { "id": "PIJ90N7", "type": "generic_email", "summary": "My Mail Service", "self": "https://api.pagerduty.com/services/PIJ90N7", "html_url": "https://subdomain.pagerduty.com/services/PIJ90N7" }, "priority": { "id": "P53ZZH5", "type": "priority_reference", "summary": "P2", "self": "https://api.pagerduty.com/priorities/P53ZZH5" }, "assigned_via": "escalation_policy", "assignments": [], "acknowledgements": [], "last_status_change_at": "2015-10-06T21:38:23Z", "last_status_change_by": { "id": "PXPGF42", "type": "user_reference", "summary": "Earline Greenholt", "self": "https://api.pagerduty.com/users/PXPGF42", "html_url": "https://subdomain.pagerduty.com/users/PXPGF42" }, "first_trigger_log_entry": { "id": "Q02JTSNZWHSEKV", "type": "trigger_log_entry_reference", "summary": "Triggered through the API", "self": "https://api.pagerduty.com/log_entries/Q02JTSNZWHSEKV?incident_id=PT4KHLK", "html_url": "https://subdomain.pagerduty.com/incidents/PT4KHLK/log_entries/Q02JTSNZWHSEKV" }, "escalation_policy": { "id": "PT20YPA", "type": "escalation_policy_reference", "summary": "Another Escalation Policy", "self": "https://api.pagerduty.com/escalation_policies/PT20YPA", "html_url": "https://subdomain.pagerduty.com/escalation_policies/PT20YPA" }, "teams": [ { "id": "PQ9K7I8", "type": "team_reference", "summary": "Engineering", "self": "https://api.pagerduty.com/teams/PQ9K7I8", "html_url": "https://subdomain.pagerduty.com/teams/PQ9K7I8" } ], "urgency": "high", "conference_bridge": { "conference_number": "+1-415-555-1212,,,,1234#", "conference_url": "https://example.com/acb-123" } } ], "limit": 1, "offset": 0, "more": true } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "402": { "$ref": "#/components/responses/PaymentRequired" }, "403": { "$ref": "#/components/responses/Forbidden" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } }, "put": { "tags": [ "Incidents" ], "operationId": "updateIncidents", "description": "Acknowledge, resolve, escalate or reassign one or more incidents.\n\nAn incident represents a problem or an issue that needs to be addressed and resolved.\n\nA maximum of 500 incidents may be updated at a time. If more than this number of incidents are given, the API will respond with status 413 (Request Entity Too Large).\n\nFor more information see the [API Concepts Document](../../docs/CONCEPTS.md#incidents)\n", "summary": "Manage incidents", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "$ref": "#/components/parameters/total" }, { "$ref": "#/components/parameters/from_header" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "incidents": { "type": "array", "description": "An array of incidents, including the parameters to update.", "items": { "properties": { "id": { "type": "string", "description": "The id of the incident to update." }, "type": { "type": "string", "description": "The incident type.", "enum": [ "incident", "incident_reference" ] }, "status": { "type": "string", "description": "The new status of the incident.", "enum": [ "resolved", "acknowledged" ] }, "resolution": { "type": "string", "description": "The resolution for this incident if status is set to resolved." }, "title": { "type": "string", "description": "A succinct description of the nature, symptoms, cause, or effect of the incident." }, "priority": { "$ref": "#/components/schemas/PriorityReference" }, "escalation_level": { "type": "integer", "description": "Escalate the incident to this level in the escalation policy." }, "assignments": { "type": "array", "description": "Assign the incident to these assignees.", "items": { "properties": { "assignee": { "$ref": "#/components/schemas/UserReference" } } } }, "escalation_policy": { "$ref": "#/components/schemas/EscalationPolicyReference" }, "conference_bridge": { "$ref": "#/components/schemas/ConferenceBridge" } }, "required": [ "id", "type" ] } } }, "required": [ "incidents" ] }, "examples": { "incidents": { "summary": "Request Example", "value": { "incidents": [ { "id": "PT4KHLK", "type": "incident_reference", "status": "acknowledged" }, { "id": "PQMF62U", "type": "incident_reference", "priority": { "id": "P53ZZH5", "type": "priority_reference" } }, { "id": "PPVZH9X", "type": "incident_reference", "status": "resolved" }, { "id": "P8JOGX7", "type": "incident_reference", "assignments": [ { "assignee": { "id": "PXPGF42", "type": "user_reference" } } ] } ] } } } } } }, "responses": { "200": { "description": "All of the updates succeeded.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/Pagination" }, { "type": "object", "properties": { "incidents": { "type": "array", "items": { "$ref": "#/components/schemas/Incident" } } }, "required": [ "incidents" ] } ] }, "examples": { "response": { "summary": "Response Example", "value": { "incidents": [ { "id": "PT4KHLK", "type": "incident", "summary": "[#1234] The server is on fire.", "self": "https://api.pagerduty.com/incidents/PT4KHLK", "html_url": "https://subdomain.pagerduty.com/incidents/PT4KHLK", "incident_number": 1234, "created_at": "2015-10-06T21:30:42Z", "status": "resolved", "title": "The server is on fire.", "alert_counts": { "all": 2, "triggered": 0, "resolved": 2 }, "pending_actions": [ { "type": "unacknowledge", "at": "2015-11-10T01:02:52Z" }, { "type": "resolve", "at": "2015-11-10T04:31:52Z" } ], "incident_key": "baf7cf21b1da41b4b0221008339ff357", "service": { "id": "PIJ90N7", "type": "generic_email", "summary": "My Mail Service", "self": "https://api.pagerduty.com/services/PIJ90N7", "html_url": "https://subdomain.pagerduty.com/services/PIJ90N7" }, "assigned_via": "escalation_policy", "assignments": [ { "at": "2015-11-10T00:31:52Z", "assignee": { "id": "PXPGF42", "type": "user_reference", "summary": "Earline Greenholt", "self": "https://api.pagerduty.com/users/PXPGF42", "html_url": "https://subdomain.pagerduty.com/users/PXPGF42" } } ], "acknowledgements": [ { "at": "2015-11-10T00:32:52Z", "acknowledger": { "id": "PXPGF42", "type": "user_reference", "summary": "Earline Greenholt", "self": "https://api.pagerduty.com/users/PXPGF42", "html_url": "https://subdomain.pagerduty.com/users/PXPGF42" } } ], "last_status_change_at": "2015-10-06T21:38:23Z", "last_status_change_by": { "id": "PXPGF42", "type": "user_reference", "summary": "Earline Greenholt", "self": "https://api.pagerduty.com/users/PXPGF42", "html_url": "https://subdomain.pagerduty.com/users/PXPGF42" }, "first_trigger_log_entry": { "id": "Q02JTSNZWHSEKV", "type": "trigger_log_entry_reference", "summary": "Triggered through the API", "self": "https://api.pagerduty.com/log_entries/Q02JTSNZWHSEKV?incident_id=PT4KHLK", "html_url": "https://subdomain.pagerduty.com/incidents/PT4KHLK/log_entries/Q02JTSNZWHSEKV" }, "escalation_policy": { "id": "PT20YPA", "type": "escalation_policy_reference", "summary": "Another Escalation Policy", "self": "https://api.pagerduty.com/escalation_policies/PT20YPA", "html_url": "https://subdomain.pagerduty.com/escalation_policies/PT20YPA" }, "teams": [ { "id": "PQ9K7I8", "type": "team_reference", "summary": "Engineering", "self": "https://api.pagerduty.com/teams/PQ9K7I8", "html_url": "https://subdomain.pagerduty.com/teams/PQ9K7I8" } ], "urgency": "high" } ] } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "413": { "description": "Caller provided a request that is too large to process.", "content": { "application/json": { "schema": { "$ref": "#/paths/~1users~1%7Bid%7D~1notification_subscriptions/post/responses/422/content/application~1json/schema" } } } }, "429": { "$ref": "#/components/responses/TooManyRequests" } } }, "post": { "tags": [ "Incidents" ], "operationId": "createIncident", "description": "Create an incident synchronously without a corresponding event from a monitoring service.\n\nAn incident represents a problem or an issue that needs to be addressed and resolved.\n\nFor more information see the [API Concepts Document](../../docs/CONCEPTS.md#incidents)\n", "summary": "Create an Incident", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "$ref": "#/components/parameters/from_header" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "incident": { "type": "object", "description": "Details of the incident to be created.", "properties": { "type": { "type": "string", "enum": [ "incident" ] }, "title": { "type": "string", "description": "A succinct description of the nature, symptoms, cause, or effect of the incident." }, "service": { "$ref": "#/components/schemas/ServiceReference" }, "priority": { "$ref": "#/components/schemas/PriorityReference" }, "urgency": { "type": "string", "description": "The urgency of the incident", "enum": [ "high", "low" ] }, "body": { "$ref": "#/components/schemas/IncidentBody" }, "incident_key": { "type": "string", "description": "A string which identifies the incident. Sending subsequent requests referencing the same service and with the same incident_key will result in those requests being rejected if an open incident matches that incident_key." }, "assignments": { "type": "array", "description": "Assign the incident to these assignees. Cannot be specified if an escalation policy is given.", "items": { "properties": { "assignee": { "$ref": "#/components/schemas/UserReference" } } } }, "escalation_policy": { "$ref": "#/components/schemas/EscalationPolicyReference" }, "conference_bridge": { "$ref": "#/components/schemas/ConferenceBridge" } }, "required": [ "type", "title", "service" ] } }, "required": [ "incident" ] }, "examples": { "request": { "summary": "Request Example", "value": { "incident": { "type": "incident", "title": "The server is on fire.", "service": { "id": "PWIXJZS", "type": "service_reference" }, "priority": { "id": "P53ZZH5", "type": "priority_reference" }, "urgency": "high", "incident_key": "baf7cf21b1da41b4b0221008339ff357", "body": { "type": "incident_body", "details": "A disk is getting full on this machine. You should investigate what is causing the disk to fill, and ensure that there is an automated process in place for ensuring data is rotated (eg. logs should have logrotate around them). If data is expected to stay on this disk forever, you should start planning to scale up to a larger disk." }, "escalation_policy": { "id": "PT20YPA", "type": "escalation_policy_reference" } } } } } } } }, "responses": { "201": { "description": "The incident object created.", "content": { "application/json": { "schema": { "type": "object", "properties": { "incident": { "$ref": "#/components/schemas/Incident" } }, "required": [ "incident" ] }, "examples": { "response": { "summary": "Response Example", "value": { "incident": { "id": "PT4KHLK", "type": "incident", "title": "The server is on fire.", "summary": "[#1234] The server is on fire.", "self": "https://api.pagerduty.com/incidents/PT4KHLK", "html_url": "https://subdomain.pagerduty.com/incidents/PT4KHLK", "incident_number": 1234, "created_at": "2015-10-06T21:30:42Z", "status": "triggered", "incident_key": "baf7cf21b1da41b4b0221008339ff357", "service": { "id": "PWIXJZS", "type": "generic_email", "summary": "My Mail Service", "self": "https://api.pagerduty.com/services/PWIXJZS", "html_url": "https://subdomain.pagerduty.com/services/PWIXJZS" }, "priority": { "id": "P53ZZH5", "type": "priority_reference", "summary": "P2", "self": "https://api.pagerduty.com/priorities/P53ZZH5" }, "assigned_via": "escalation_policy", "assignments": [ { "at": "2015-11-10T00:31:52Z", "assignee": { "id": "PXPGF42", "type": "user_reference", "summary": "Earline Greenholt", "self": "https://api.pagerduty.com/users/PXPGF42", "html_url": "https://subdomain.pagerduty.com/users/PXPGF42" } } ], "last_status_change_at": "2015-10-06T21:38:23Z", "last_status_change_by": { "id": "PXPGF42", "type": "user_reference", "summary": "Earline Greenholt", "self": "https://api.pagerduty.com/users/PXPGF42", "html_url": "https://subdomain.pagerduty.com/users/PXPGF42" }, "first_trigger_log_entry": { "id": "Q02JTSNZWHSEKV", "type": "trigger_log_entry_reference", "summary": "Triggered through the API", "self": "https://api.pagerduty.com/log_entries/Q02JTSNZWHSEKV?incident_id=PT4KHLK", "html_url": "https://subdomain.pagerduty.com/incidents/PT4KHLK/log_entries/Q02JTSNZWHSEKV" }, "escalation_policy": { "id": "PT20YPA", "type": "escalation_policy_reference", "summary": "Another Escalation Policy", "self": "https://api.pagerduty.com/escalation_policies/PT20YPA", "html_url": "https://subdomain.pagerduty.com/escalation_policies/PT20YPA" }, "teams": [ { "id": "PQ9K7I8", "type": "team_reference", "summary": "Engineering", "self": "https://api.pagerduty.com/teams/PQ9K7I8", "html_url": "https://subdomain.pagerduty.com/teams/PQ9K7I8" } ], "urgency": "high" } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } } }, "/incidents/{id}": { "description": "Get an incident.", "get": { "tags": [ "Incidents" ], "operationId": "getIncident", "description": "Show detailed information about an incident. Accepts either an incident id, or an incident number.\n\nAn incident represents a problem or an issue that needs to be addressed and resolved.\n\nFor more information see the [API Concepts Document](../../docs/CONCEPTS.md#incidents)\n", "summary": "Get an incident", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "name": "id", "in": "path", "description": "Either the id or number of the incident to retrieve.", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "The incident requested.", "content": { "application/json": { "schema": { "type": "object", "properties": { "incident": { "$ref": "#/components/schemas/Incident" } }, "required": [ "incident" ] }, "examples": { "response": { "summary": "Response Example", "value": { "incident": { "id": "PT4KHLK", "type": "incident", "summary": "[#1234] The server is on fire.", "self": "https://api.pagerduty.com/incidents/PT4KHLK", "html_url": "https://subdomain.pagerduty.com/incidents/PT4KHLK", "incident_number": 1234, "created_at": "2015-10-06T21:30:42Z", "status": "acknowledged", "title": "The server is on fire.", "alert_counts": { "all": 2, "triggered": 1, "resolved": 1 }, "pending_actions": [ { "type": "unacknowledge", "at": "2015-11-10T01:02:52Z" }, { "type": "resolve", "at": "2015-11-10T04:31:52Z" } ], "incident_key": "baf7cf21b1da41b4b0221008339ff357", "service": { "id": "PIJ90N7", "type": "generic_email_reference", "summary": "My Mail Service", "self": "https://api.pagerduty.com/services/PIJ90N7", "html_url": "https://subdomain.pagerduty.com/services/PIJ90N7" }, "priority": { "id": "P53ZZH5", "type": "priority_reference", "summary": "P2", "self": "https://api.pagerduty.com/priorities/P53ZZH5" }, "assigned_via": "escalation_policy", "assignments": [ { "at": "2015-11-10T00:31:52Z", "assignee": { "id": "PXPGF42", "type": "user_reference", "summary": "Earline Greenholt", "self": "https://api.pagerduty.com/users/PXPGF42", "html_url": "https://subdomain.pagerduty.com/users/PXPGF42" } } ], "acknowledgements": [ { "at": "2015-11-10T00:32:52Z", "acknowledger": { "id": "PXPGF42", "type": "user_reference", "summary": "Earline Greenholt", "self": "https://api.pagerduty.com/users/PXPGF42", "html_url": "https://subdomain.pagerduty.com/users/PXPGF42" } } ], "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" } } }, "put": { "tags": [ "Incidents" ], "operationId": "updateIncident", "description": "Acknowledge, resolve, escalate or reassign an incident.\n\nAn incident represents a problem or an issue that needs to be addressed and resolved.\n\nFor more information see the [API Concepts Document](../../docs/CONCEPTS.md#incidents)\n", "summary": "Update an incident", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "name": "id", "in": "path", "description": "The id of the incident to update.", "required": true, "schema": { "type": "string" } }, { "$ref": "#/components/parameters/from_header" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "incident": { "type": "object", "description": "The parameters of the incident to update.", "properties": { "type": { "type": "string", "description": "The incident type.", "enum": [ "incident", "incident_reference" ] }, "status": { "type": "string", "description": "The new status of the incident.", "enum": [ "resolved", "acknowledged" ] }, "priority": { "$ref": "#/components/schemas/PriorityReference" }, "resolution": { "type": "string", "description": "The resolution for this incident if status is set to resolved." }, "title": { "type": "string", "description": "The new title of the incident." }, "escalation_level": { "type": "integer", "description": "Escalate the incident to this level in the escalation policy." }, "assignments": { "type": "array", "description": "Assign the incident to these assignees.", "items": { "properties": { "assignee": { "$ref": "#/components/schemas/UserReference" } } } }, "escalation_policy": { "$ref": "#/components/schemas/EscalationPolicyReference" }, "urgency": { "type": "string", "description": "The urgency of the incident.", "enum": [ "high", "low" ] }, "conference_bridge": { "$ref": "#/components/schemas/ConferenceBridge" } }, "required": [ "type" ] } }, "required": [ "incident" ] }, "examples": { "request": { "summary": "Request Example", "value": { "incident": { "type": "incident_reference", "status": "acknowledged" } } } } } } }, "responses": { "200": { "description": "The incident was updated.", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "properties": { "incident": { "$ref": "#/components/schemas/Incident" } }, "required": [ "incident" ] } ] }, "examples": { "response": { "summary": "Response Example", "value": { "incident": { "id": "PT4KHLK", "type": "incident", "summary": "[#1234] The server is on fire.", "self": "https://api.pagerduty.com/incidents/PT4KHLK", "html_url": "https://subdomain.pagerduty.com/incidents/PT4KHLK", "incident_number": 1234, "created_at": "2015-10-06T21:30:42Z", "status": "resolved", "title": "The server is on fire.", "pending_actions": [ { "type": "unacknowledge", "at": "2015-11-10T01:02:52Z" }, { "type": "resolve", "at": "2015-11-10T04:31:52Z" } ], "incident_key": "baf7cf21b1da41b4b0221008339ff357", "service": { "id": "PIJ90N7", "type": "generic_email_reference", "summary": "My Mail Service", "self": "https://api.pagerduty.com/services/PIJ90N7", "html_url": "https://subdomain.pagerduty.com/services/PIJ90N7" }, "priority": { "id": "P53ZZH5", "type": "priority_reference", "summary": "P2", "self": "https://api.pagerduty.com/priorities/P53ZZH5" }, "assigned_via": "escalation_policy", "assignments": [ { "at": "2015-11-10T00:31:52Z", "assignee": { "id": "PXPGF42", "type": "user_reference", "summary": "Earline Greenholt", "self": "https://api.pagerduty.com/users/PXPGF42", "html_url": "https://subdomain.pagerduty.com/users/PXPGF42" } } ], "acknowledgements": [ { "at": "2015-11-10T00:32:52Z", "acknowledger": { "id": "PXPGF42", "type": "user_reference", "summary": "Earline Greenholt", "self": "https://api.pagerduty.com/users/PXPGF42", "html_url": "https://subdomain.pagerduty.com/users/PXPGF42" } } ], "last_status_change_at": "2015-10-06T21:38:23Z", "last_status_change_by": { "id": "PXPGF42", "type": "user_reference", "summary": "Earline Greenholt", "self": "https://api.pagerduty.com/users/PXPGF42", "html_url": "https://subdomain.pagerduty.com/users/PXPGF42" }, "first_trigger_log_entry": { "id": "Q02JTSNZWHSEKV", "type": "trigger_log_entry_reference", "summary": "Triggered through the API", "self": "https://api.pagerduty.com/log_entries/Q02JTSNZWHSEKV?incident_id=PT4KHLK", "html_url": "https://subdomain.pagerduty.com/incidents/PT4KHLK/log_entries/Q02JTSNZWHSEKV" }, "escalation_policy": { "id": "PT20YPA", "type": "escalation_policy_reference", "summary": "Another Escalation Policy", "self": "https://api.pagerduty.com/escalation_policies/PT20YPA", "html_url": "https://subdomain.pagerduty.com/escalation_policies/PT20YPA" }, "teams": [ { "id": "PQ9K7I8", "type": "team_reference", "summary": "Engineering", "self": "https://api.pagerduty.com/teams/PQ9K7I8", "html_url": "https://subdomain.pagerduty.com/teams/PQ9K7I8" } ], "urgency": "high" } } } } } } }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } } }, "/incidents/{id}/alerts": { "description": "List and update alerts.", "get": { "tags": [ "Incidents" ], "operationId": "listIncidentAlerts", "description": "List alerts for the specified incident.\n\nAn incident represents a problem or an issue that needs to be addressed and resolved.\n\nFor more information see the [API Concepts Document](../../docs/CONCEPTS.md#incidents)\n", "summary": "List alerts for an incident", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "$ref": "#/components/parameters/total" }, { "$ref": "#/components/parameters/id" }, { "name": "statuses[]", "in": "query", "description": "Return only alerts with the given statuses. (More status codes may be introduced in the future.)", "explode": true, "schema": { "type": "array", "items": { "type": "string", "enum": [ "triggered", "resolved" ] }, "uniqueItems": true } }, { "$ref": "#/components/parameters/alert_key" }, { "name": "sort_by", "in": "query", "description": "Used to specify both the field you wish to sort the results on (created_at/resolved_at), as well as the direction (asc/desc) of the results. The sort_by field and direction should be separated by a colon. A maximum of two fields can be included, separated by a comma. Sort direction defaults to ascending.", "style": "form", "explode": false, "schema": { "type": "array", "items": { "type": "string", "enum": [ "created_at", "resolved_at", "created_at:asc", "created_at:desc", "resolved_at:asc", "resolved_at:desc" ] }, "maxItems": 2, "uniqueItems": true } }, { "name": "include[]", "in": "query", "description": "Array of additional details to include.", "explode": true, "schema": { "type": "array", "items": { "type": "string", "enum": [ "services", "first_trigger_log_entries", "incidents" ] }, "uniqueItems": true } } ], "responses": { "200": { "description": "A paginated array of the incident's alerts.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/Pagination" }, { "type": "object", "properties": { "alerts": { "type": "array", "items": { "$ref": "#/components/schemas/Alert" } } }, "required": [ "alerts" ] } ] }, "examples": { "response": { "summary": "Response Example", "value": { "alerts": [ { "id": "PT4KHLK", "type": "alert", "summary": "The server is on fire.", "self": "https://api.pagerduty.com/incidents/PT4KHLK/alerts/PXPGF42", "html_url": "https://subdomain.pagerduty.com/alerts/PXPGF42", "created_at": "2015-10-06T21:30:42Z", "status": "resolved", "alert_key": "baf7cf21b1da41b4b0221008339ff357", "service": { "id": "PIJ90N7", "type": "generic_email_reference", "summary": "My Mail Service", "self": "https://api.pagerduty.com/services/PIJ90N7", "html_url": "https://subdomain.pagerduty.com/services/PIJ90N7" }, "body": { "type": "alert_body", "contexts": [ { "type": "link" } ], "details": { "customKey": "Server is on fire!", "customKey2": "Other stuff!" } }, "incident": { "id": "PT4KHLK", "type": "incident_reference" }, "suppressed": false, "severity": "critical", "integration": { "id": "PQ12345", "type": "generic_email_inbound_integration_reference", "summary": "Email Integration", "self": "https://api.pagerduty.com/services/PIJ90N7/integrations/PQ12345", "html_url": "https://subdomain.pagerduty.com/services/PIJ90N7/integrations/PQ12345" } } ], "limit": 1, "offset": 0, "more": true } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } }, "put": { "tags": [ "Incidents" ], "operationId": "updateIncidentAlerts", "description": "Resolve multiple alerts or associate them with different incidents.\n\nAn incident represents a problem or an issue that needs to be addressed and resolved. An alert represents a digital signal that was emitted to PagerDuty by the monitoring systems that detected or identified the issue.\n\nA maximum of 500 alerts may be updated at a time. If more than this number of alerts are given, the API will respond with status 413 (Request Entity Too Large).\n\nFor more information see the [API Concepts Document](../../docs/CONCEPTS.md#incidents)\n", "summary": "Manage alerts", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "$ref": "#/components/parameters/total" }, { "$ref": "#/components/parameters/id" }, { "$ref": "#/components/parameters/from_header" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "alerts": { "type": "array", "description": "An array of alerts, including the parameters to update for each alert.", "items": { "$ref": "#/components/schemas/Alert" } } }, "required": [ "alerts" ] }, "examples": { "request": { "summary": "Request Example", "value": { "alerts": [ { "id": "PPVZH9X", "type": "alert_reference", "status": "resolved" }, { "id": "P8JOGX7", "type": "alert_reference", "incident": { "id": "PPVZH9X", "type": "incident_reference" } } ] } } } } } }, "responses": { "200": { "description": "All of the updates succeeded.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/Pagination" }, { "type": "object", "properties": { "alerts": { "type": "array", "items": { "$ref": "#/components/schemas/Alert" } } }, "required": [ "alerts" ] } ] }, "examples": { "response": { "summary": "Response Example", "value": { "alerts": [ { "id": "PT4KHLK", "type": "alert", "summary": "The server is on fire.", "self": "https://api.pagerduty.com/incidents/PT4KHLK/alerts/PXPGF42", "html_url": "https://subdomain.pagerduty.com/alerts/PXPGF42", "created_at": "2015-10-06T21:30:42Z", "status": "resolved", "alert_key": "baf7cf21b1da41b4b0221008339ff357", "service": { "id": "PIJ90N7", "type": "generic_email_reference", "summary": "My Mail Service", "self": "https://api.pagerduty.com/services/PIJ90N7", "html_url": "https://subdomain.pagerduty.com/services/PIJ90N7" }, "body": { "type": "alert_body", "contexts": [ { "type": "link" } ], "details": { "customKey": "Server is on fire!", "customKey2": "Other stuff!" } }, "incident": { "id": "PPVZH9X", "type": "incident_reference" }, "suppressed": false, "severity": "critical" } ], "limit": 1, "offset": 0, "more": true } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "413": { "$ref": "#/paths/~1incidents/put/responses/413" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } } }, "/incidents/{id}/alerts/{alert_id}": { "description": "Get an alert.", "get": { "tags": [ "Incidents" ], "operationId": "getIncidentAlert", "description": "Show detailed information about an alert. Accepts an alert id.\n\nAn incident represents a problem or an issue that needs to be addressed and resolved.\n\nWhen a service sends an event to PagerDuty, an alert and corresponding incident is triggered in PagerDuty.\n\nFor more information see the [API Concepts Document](../../docs/CONCEPTS.md#incidents)\n", "summary": "Get an alert", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "$ref": "#/components/parameters/id" }, { "name": "alert_id", "in": "path", "description": "The id of the alert to retrieve.", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "The alert requested.", "content": { "application/json": { "schema": { "type": "object", "properties": { "alert": { "$ref": "#/components/schemas/Alert" } }, "required": [ "alert" ] }, "examples": { "response": { "summary": "Response Example", "value": { "alert": { "id": "PT4KHLK", "type": "alert", "summary": "The server is on fire.", "self": "https://api.pagerduty.com/incident/PT4KHLX/alerts/PT4KHLK", "html_url": "https://subdomain.pagerduty.com/alerts/PT4KHLK", "created_at": "2015-10-06T21:30:42Z", "status": "resolved", "alert_key": "baf7cf21b1da41b4b0221008339ff357", "service": { "id": "PIJ90N7", "type": "generic_email_reference", "summary": "My Mail Service", "self": "https://api.pagerduty.com/services/PIJ90N7", "html_url": "https://subdomain.pagerduty.com/services/PIJ90N7" }, "incident": { "id": "PT4KHLX", "type": "incident_reference", "summary": "[#1234] The server is on fire.", "self": "https://api.pagerduty.com/incidents/PT4KHLX", "html_url": "https://subdomain.pagerduty.com/incidents/PT4KHLX" }, "suppressed": false, "severity": "critical", "integration": { "id": "PQ12345", "type": "generic_email_inbound_integration_reference", "summary": "Email Integration", "self": "https://api.pagerduty.com/services/PIJ90N7/integrations/PQ12345", "html_url": "https://subdomain.pagerduty.com/services/PIJ90N7/integrations/PQ12345" } } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } }, "put": { "tags": [ "Incidents" ], "operationId": "updateIncidentAlert", "description": "Resolve an alert or associate an alert with a new parent incident.\n\nAn incident represents a problem or an issue that needs to be addressed and resolved.\n\nWhen a service sends an event to PagerDuty, an alert and corresponding incident is triggered in PagerDuty.\n\nFor more information see the [API Concepts Document](../../docs/CONCEPTS.md#incidents)\n", "summary": "Update an alert", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "$ref": "#/components/parameters/id" }, { "name": "alert_id", "in": "path", "description": "The id of the alert to update.", "required": true, "schema": { "type": "string" } }, { "$ref": "#/components/parameters/from_header" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "alert": { "$ref": "#/components/schemas/Alert" } }, "required": [ "alert" ] }, "examples": { "request": { "summary": "Request Example", "value": { "alert": { "type": "alert", "status": "resolved", "incident": { "id": "PEYSGVF", "type": "incident_reference" }, "body": { "type": "alert_body", "contexts": [ { "type": "link" } ], "details": { "customKey": "Server is on fire!", "customKey2": "Other stuff!" } } } } } } } }, "description": "The parameters of the alert to update." }, "responses": { "200": { "description": "The alert that was updated.", "content": { "application/json": { "schema": { "type": "object", "properties": { "alert": { "$ref": "#/components/schemas/Alert" } }, "required": [ "alert" ] }, "examples": { "request": { "summary": "Request Example", "value": { "alert": { "type": "alert", "status": "resolved", "incident": { "id": "PEYSGVF", "type": "incident_reference" }, "body": { "type": "alert_body", "contexts": [ { "type": "link" } ], "details": { "customKey": "Server is on fire!", "customKey2": "Other stuff!" } } } } } } } } }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } } }, "/incidents/{id}/log_entries": { "description": "List incident log entries for an incident.", "get": { "tags": [ "Incidents" ], "operationId": "listIncidentLogEntries", "description": "List log entries for the specified incident.\n\nAn incident represents a problem or an issue that needs to be addressed and resolved.\n\nA Log Entry are a record of all events on your account.\n\nFor more information see the [API Concepts Document](../../docs/CONCEPTS.md#incidents)\n", "summary": "List log entries for an incident", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "$ref": "#/components/parameters/total" }, { "$ref": "#/components/parameters/id" }, { "$ref": "#/components/parameters/time_zone" }, { "$ref": "#/components/parameters/since" }, { "$ref": "#/components/parameters/until" }, { "$ref": "#/components/parameters/log_entry_is_overview" }, { "$ref": "#/components/parameters/include_log_entry" } ], "responses": { "200": { "description": "A paginated array of the incident's log entries.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/Pagination" }, { "type": "object", "properties": { "log_entries": { "type": "array", "items": { "$ref": "#/components/schemas/LogEntry" } } }, "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": "generic_email_reference", "summary": "My Mail Service", "self": "https://api.pagerduty.com/services/PIJ90N7", "html_url": "https://subdomain.pagerduty.com/services/PIJ90N7" }, "channel": { "type": "api" }, "incident": { "id": "PT4KHLK", "type": "incident_reference", "summary": "[#1234] The server is on fire.", "self": "https://api.pagerduty.com/incidents/PT4KHLK", "html_url": "https://subdomain.pagerduty.com/incidents/PT4KHLK" }, "teams": [ { "id": "PQ9K7I8", "type": "team_reference", "summary": "Engineering", "self": "https://api.pagerduty.com/teams/PQ9K7I8", "html_url": "https://subdomain.pagerduty.com/teams/PQ9K7I8" } ], "contexts": [], "event_details": { "description": "Tasks::SFDCValidator - PD_Data__c - duplicates" } } ] } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } } }, "/incidents/{id}/merge": { "description": "\"Merge\" an array of incidents into a target incident. After the merge is performed the target incident will contain the source incidents's alerts, and the source incidents will be resolved.", "put": { "tags": [ "Incidents" ], "operationId": "mergeIncidents", "description": "Merge a list of source incidents into this incident.\n\nAn incident represents a problem or an issue that needs to be addressed and resolved.\n\nFor more information see the [API Concepts Document](../../docs/CONCEPTS.md#incidents)\n", "summary": "Merge incidents", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "$ref": "#/components/parameters/id" }, { "$ref": "#/components/parameters/from_header" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "source_incidents": { "type": "array", "description": "The source incidents that will be merged into the target incident and resolved.", "items": { "$ref": "#/components/schemas/IncidentReference" } } }, "required": [ "source_incidents" ] }, "examples": { "request": { "summary": "Request Example", "value": { "source_incidents": [ { "id": "P8JOGX7", "type": "incident_reference" }, { "id": "PPVZH9X", "type": "incident_reference" } ] } } } } } }, "responses": { "200": { "description": "The target incident, which now contains all the alerts from the source incident.", "content": { "application/json": { "schema": { "type": "object", "properties": { "incident": { "$ref": "#/components/schemas/IncidentReference" } }, "required": [ "incident" ] }, "examples": { "response": { "summary": "Response Example", "value": { "incident": { "id": "PT4KHLK", "type": "incident", "summary": "[#1234] The server is on fire.", "self": "https://api.pagerduty.com/incidents/PT4KHLK", "html_url": "https://subdomain.pagerduty.com/incidents/PT4KHLK" } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } } }, "/incidents/{id}/notes": { "description": "List and create incident notes.", "get": { "tags": [ "Incidents" ], "operationId": "listIncidentNotes", "description": "List existing notes for the specified incident.\n\nAn incident represents a problem or an issue that needs to be addressed and resolved.\n\nFor more information see the [API Concepts Document](../../docs/CONCEPTS.md#incidents)\n", "summary": "List notes for an incident", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "$ref": "#/components/parameters/id" } ], "responses": { "200": { "description": "An array of notes.", "content": { "application/json": { "schema": { "type": "object", "properties": { "notes": { "type": "array", "items": { "$ref": "#/components/schemas/IncidentNote" } } }, "required": [ "notes" ] }, "examples": { "response": { "summary": "Response Example", "value": { "notes": [ { "id": "PWL7QXS", "user": { "id": "PXPGF42", "type": "user_reference", "summary": "Earline Greenholt", "self": "https://api.pagerduty.com/users/PXPGF42", "html_url": "https://subdomain.pagerduty.com/users/PXPGF42" }, "content": "Firefighters are on the scene.", "created_at": "2013-03-06T15:28:51-05:00" } ] } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } }, "post": { "tags": [ "Incidents" ], "operationId": "createIncidentNote", "description": "Create a new note for the specified incident.\n\nAn incident represents a problem or an issue that needs to be addressed and resolved.\n\nFor more information see the [API Concepts Document](../../docs/CONCEPTS.md#incidents)\n", "summary": "Create a note on an incident", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "$ref": "#/components/parameters/id" }, { "$ref": "#/components/parameters/from_header" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "note": { "$ref": "#/components/schemas/IncidentNote" } }, "required": [ "note" ] }, "examples": { "request": { "summary": "Request Example", "value": { "content": "Firefighters are on the scene." } } } } } }, "responses": { "200": { "description": "The new note.", "content": { "application/json": { "schema": { "type": "object", "properties": { "note": { "$ref": "#/components/schemas/IncidentNote" } }, "required": [ "note" ] }, "examples": { "response": { "summary": "Response Example", "value": { "note": { "id": "PWL7QXS", "user": { "id": "PXPGF42", "type": "user_reference", "summary": "Earline Greenholt", "self": "https://api.pagerduty.com/users/PXPGF42", "html_url": "https://subdomain.pagerduty.com/users/PXPGF42" }, "content": "Firefighters are on the scene.", "created_at": "2013-03-06T15:28:51-05:00" } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } } }, "/incidents/{id}/responder_requests": { "description": "Add responders to an incident.", "post": { "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](../../docs/CONCEPTS.md#incidents)\n", "summary": "Create a responder request for an incident", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "$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" ], "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](../../docs/CONCEPTS.md#incidents)\n", "summary": "Snooze an incident", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "$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." } }, "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", "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": "generic_email", "summary": "My Mail Service", "self": "https://api.pagerduty.com/services/PIJ90N7", "html_url": "https://subdomain.pagerduty.com/services/PIJ90N7" }, "assigned_via": "escalation_policy", "assignments": [ { "at": "2015-11-10T00:31:52Z", "assignee": { "id": "PXPGF42", "type": "user_reference", "summary": "Earline Greenholt", "self": "https://api.pagerduty.com/users/PXPGF42", "html_url": "https://subdomain.pagerduty.com/users/PXPGF42" } } ], "acknowledgements": [ { "at": "2015-11-10T00:32:52Z", "acknowledger": { "id": "PXPGF42", "type": "user_reference", "summary": "Earline Greenholt", "self": "https://api.pagerduty.com/users/PXPGF42", "html_url": "https://subdomain.pagerduty.com/users/PXPGF42" } } ], "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": { "tags": [ "Incidents" ], "operationId": "createIncidentStatusUpdate", "description": "Create a new status update 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](../../docs/CONCEPTS.md#incidents)\n", "summary": "Create a status update on an incident", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "$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." } }, "required": [ "message" ] }, "examples": { "request": { "summary": "Request Example", "value": { "message": "The server fire is spreading." } } } } } }, "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" } } } } } } }, "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": { "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": "#/paths/~1incidents~1%7Bid%7D~1status_updates~1subscribers/post/requestBody/content/application~1json/schema" } } } } ] }, "examples": { "Response": { "value": { "limit": 100, "more": false, "offset": 0, "subscribers": [ { "subscriber_id": "PD1234", "subscriber_type": "user" }, { "subscriber_id": "PD1234", "subscriber_type": "team" } ], "total": 2 } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "422": { "description": "Unprocessable Entity. Some arguments failed validation checks.", "content": { "application/json": { "schema": { "$ref": "#/paths/~1users~1%7Bid%7D~1notification_subscriptions/post/responses/422/content/application~1json/schema" } } } }, "429": { "$ref": "#/components/responses/TooManyRequests" } }, "operationId": "getIncidentNotificationSubscribers", "description": "Retrieve a list of Notification Subscribers on the Incident.\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> Users must be added through `POST /incident/{id}/status_updates/subscribers` to be returned from this endpoint.", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/components/parameters/id" }, { "schema": { "type": "string", "default": "usms-early-access" }, "in": "header", "name": "X-EARLY-ACCESS", "description": "This header indicates that this API endpoint is __UNDER CONSTRUCTION__ and may change at any time. You __MUST__ pass in this header with the value `usms-early-access`. Do not use this endpoint in production, as it may change!", "required": true } ] }, "post": { "summary": "Add notification subscriber", "operationId": "createIncidentNotificationSubscriber", "tags": [ "Incidents" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "subscription": { "$ref": "#/paths/~1users~1%7Bid%7D~1notification_subscriptions/post/responses/200/content/application~1json/schema/properties/subscription" } } }, "examples": { "Response": { "value": { "subscription": { "account_id": "PD1234", "subscribable_id": "PD1234", "subscribable_type": "incident", "subscriber_id": "PD1234", "subscriber_type": "team" } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "422": { "description": "Unprocessable Entity. Some arguments failed validation checks.", "content": { "application/json": { "schema": { "$ref": "#/paths/~1users~1%7Bid%7D~1notification_subscriptions/post/responses/422/content/application~1json/schema" } } } } }, "description": "Subscribe the given entity to Incident Status Update Notifications.\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.", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/components/parameters/id" }, { "schema": { "type": "string", "default": "usms-early-access" }, "in": "header", "name": "X-EARLY-ACCESS", "description": "This header indicates that this API endpoint is __UNDER CONSTRUCTION__ and may change at any time. You __MUST__ pass in this header with the value `usms-early-access`. Do not use this endpoint in production, as it may change!", "required": true } ], "requestBody": { "content": { "application/json": { "schema": { "title": "NotificationSubscriber", "description": "A reference of a subscriber entity.", "type": "object", "properties": { "subscriber_id": { "type": "string", "description": "The ID of the entity being subscribed" }, "subscriber_type": { "type": "string", "description": "The type of the entity being subscribed", "enum": [ "user", "team" ] } }, "example": { "subscriber_id": "PD1234", "subscriber_type": "user" } }, "examples": { "Request": { "value": { "subscriber_id": "PD1234", "subscriber_type": "team" } } } } }, "description": "" } } }, "/incidents/{id}/status_updates/unsubscribe": { "post": { "summary": "Remove notification subscriber", "tags": [ "Incidents" ], "responses": { "204": { "description": "The matching Subscriber was successfully unsubscribed." }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" } }, "operationId": "removeIncidentNotificationSubscriber", "description": "Unsubscribes the matching Subscriber from Incident Status Update Notifications.\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.", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/components/parameters/id" }, { "schema": { "type": "string", "default": "usms-early-access" }, "in": "header", "name": "X-EARLY-ACCESS", "description": "This header indicates that this API endpoint is __UNDER CONSTRUCTION__ and may change at any time. You __MUST__ pass in this header with the value `usms-early-access`. Do not use this endpoint in production, as it may change!", "required": true } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/paths/~1incidents~1%7Bid%7D~1status_updates~1subscribers/post/requestBody/content/application~1json/schema" }, "examples": { "Request": { "value": { "subscriber_id": "PD1234", "subscriber_type": "team" } } } } }, "description": "" } } }, "/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." }, "/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": { "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](../../docs/CONCEPTS.md#log-entries)\n", "summary": "List log entries", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "$ref": "#/components/parameters/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" } ], "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": { "$ref": "#/components/schemas/LogEntry" } } }, "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": "generic_email_reference", "summary": "My Mail Service", "self": "https://api.pagerduty.com/services/PIJ90N7", "html_url": "https://subdomain.pagerduty.com/services/PIJ90N7" }, "channel": { "type": "api" }, "incident": { "id": "PT4KHLK", "type": "incident_reference", "summary": "[#1234] The server is on fire.", "self": "https://api.pagerduty.com/incidents/PT4KHLK", "html_url": "https://subdomain.pagerduty.com/incidents/PT4KHLK" }, "teams": [ { "id": "PQ9K7I8", "type": "team_reference", "summary": "Engineering", "self": "https://api.pagerduty.com/teams/PQ9K7I8", "html_url": "https://subdomain.pagerduty.com/teams/PQ9K7I8" } ], "contexts": [], "event_details": { "description": "Tasks::SFDCValidator - PD_Data__c - duplicates" } } ], "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": { "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](../../docs/CONCEPTS.md#log-entries)\n", "summary": "Get a log entry", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "$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": { "$ref": "#/components/schemas/LogEntry" } }, "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": "generic_email_reference", "summary": "My Mail Service", "self": "https://api.pagerduty.com/services/PIJ90N7", "html_url": "https://subdomain.pagerduty.com/services/PIJ90N7" }, "channel": { "type": "api" }, "incident": { "id": "PT4KHLK", "type": "incident_reference", "summary": "[#1234] The server is on fire.", "self": "https://api.pagerduty.com/incidents/PT4KHLK", "html_url": "https://subdomain.pagerduty.com/incidents/PT4KHLK" }, "teams": [ { "id": "PQ9K7I8", "type": "team_reference", "summary": "Engineering", "self": "https://api.pagerduty.com/teams/PQ9K7I8", "html_url": "https://subdomain.pagerduty.com/teams/PQ9K7I8" } ], "contexts": [], "event_details": { "description": "Tasks::SFDCValidator - PD_Data__c - duplicates" } } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } } }, "/log_entries/{id}/channel": { "description": "Log entry channel information.", "put": { "tags": [ "Log Entries" ], "operationId": "updateLogEntryChannel", "description": "Update an existing incident log entry channel.\n\nFor more information see the [API Concepts Document](../../docs/CONCEPTS.md#log-entries)\n", "summary": "Update log entry channel information.", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "$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": { "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](../../docs/CONCEPTS.md#maintenance-windows)\n", "summary": "List maintenance windows", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "$ref": "#/components/parameters/total" }, { "$ref": "#/components/parameters/team_ids" }, { "$ref": "#/components/parameters/services" }, { "$ref": "#/components/parameters/include_maintenance_window" }, { "name": "filter", "in": "query", "description": "Only return maintenance windows in a given state.", "schema": { "type": "string", "enum": [ "past", "future", "ongoing", "open", "all" ] } }, { "name": "query", "in": "query", "description": "Filters the results, showing only the maintenance windows whose descriptions contain the query.", "schema": { "type": "string" } } ], "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/maintenance_windows#/show/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": "generic_email_reference", "summary": "My Mail Service", "self": "https://api.pagerduty.com/services/PIJ90N7", "html_url": "https://subdomain.pagerduty.com/services/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 } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } }, "post": { "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](../../docs/CONCEPTS.md#maintenance-windows)\n", "summary": "Create a maintenance window", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "$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/maintenance_windows#/show/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": "generic_email_reference", "summary": "My Mail Service", "self": "https://api.pagerduty.com/services/PIJ90N7", "html_url": "https://subdomain.pagerduty.com/services/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": { "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](../../docs/CONCEPTS.md#maintenance-windows)\n", "summary": "Get a maintenance window", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "$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/maintenance_windows#/show/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": "generic_email_reference", "summary": "My Mail Service", "self": "https://api.pagerduty.com/services/PIJ90N7", "html_url": "https://subdomain.pagerduty.com/services/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": { "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](../../docs/CONCEPTS.md#maintenance-windows)\n", "summary": "Delete or end a maintenance window", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "$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": { "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](../../docs/CONCEPTS.md#maintenance-windows)\n", "summary": "Update a maintenance window", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "$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/maintenance_windows#/show/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": "generic_email_reference", "summary": "My Mail Service", "self": "https://api.pagerduty.com/services/PIJ90N7", "html_url": "https://subdomain.pagerduty.com/services/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": { "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](../../docs/CONCEPTS.md#notifications)\n", "summary": "List notifications", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "$ref": "#/components/parameters/total" }, { "$ref": "#/components/parameters/time_zone" }, { "name": "since", "in": "query", "description": "The start of the date range over which you want to search. The time element is optional.", "required": true, "schema": { "type": "string", "format": "date-time" } }, { "name": "until", "in": "query", "description": "The end of the date range over which you want to search. This should be in the same format as since. The size of the date range must be less than 3 months.", "required": true, "schema": { "type": "string", "format": "date-time" } }, { "name": "filter", "in": "query", "description": "Return notification of this type only.", "schema": { "type": "string", "enum": [ "sms_notification", "email_notification", "phone_notification", "push_notification" ] } }, { "name": "include[]", "in": "query", "description": "Array of additional details to include.", "explode": true, "schema": { "type": "array", "items": { "type": "string", "enum": [ "users" ] }, "uniqueItems": true } } ], "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", "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", "summary": "Tim Wright", "self": "https://api.pagerduty.com/users/PT23IWX", "html_url": "https://subdomain.pagerduty.com/users/PT23IWX" } } ], "limit": 100, "offset": 0, "more": false } } } } } }, "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" ], "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](../../docs/CONCEPTS.md#on-calls)\n", "summary": "List all of the on-calls", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "$ref": "#/components/parameters/time_zone" }, { "$ref": "#/components/parameters/total" }, { "name": "include[]", "in": "query", "description": "Array of additional details to include.", "explode": true, "schema": { "type": "array", "items": { "type": "string", "enum": [ "escalation_policies", "users", "schedules" ] }, "uniqueItems": true } }, { "name": "user_ids[]", "in": "query", "description": "Filters the results, showing only on-calls for the specified user IDs.", "explode": true, "schema": { "type": "array", "items": { "type": "string" }, "uniqueItems": true } }, { "name": "escalation_policy_ids[]", "in": "query", "description": "Filters the results, showing only on-calls for the specified escalation policy IDs.", "explode": true, "schema": { "type": "array", "items": { "type": "string" }, "uniqueItems": true } }, { "name": "schedule_ids[]", "in": "query", "description": "Filters the results, showing only on-calls for the specified schedule IDs. If `null` is provided in the array, it includes permanent on-calls due to direct user escalation targets.", "explode": true, "schema": { "type": "array", "items": { "type": "string" }, "uniqueItems": true } }, { "name": "since", "in": "query", "description": "The start of the time range over which you want to search. If an on-call period overlaps with the range, it will be included in the result. Defaults to current time. The search range cannot exceed 3 months.", "schema": { "type": "string", "format": "date-time" } }, { "name": "until", "in": "query", "description": "The end of the time range over which you want to search. If an on-call period overlaps with the range, it will be included in the result. Defaults to current time. The search range cannot exceed 3 months, and the `until` time cannot be before the `since` time.", "schema": { "type": "string", "format": "date-time" } }, { "name": "earliest", "in": "query", "description": "This will filter on-calls such that only the earliest on-call for each combination of escalation policy, escalation level, and user is returned. This is useful for determining when the \"next\" on-calls are for a given set of filters.", "schema": { "type": "boolean" } } ], "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 } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } } }, "/priorities": { "description": "List priorities.", "get": { "tags": [ "Priorities" ], "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](../../docs/CONCEPTS.md#priorities)\n", "summary": "List priorities", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "$ref": "#/components/parameters/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 } } } } } }, "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": { "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](../../docs/CONCEPTS.md#response-plays)\n", "summary": "List Response Plays", "parameters": [ { "name": "query", "in": "query", "description": "Filters the result, showing only the Response Plays whose name matches the query.", "schema": { "type": "string" } }, { "name": "filter_for_manual_run", "in": "query", "description": "When this parameter is present, only those Response Plays that can be run manually will be returned.", "schema": { "type": "boolean" } } ], "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": { "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](../../docs/CONCEPTS.md#response-plays)\n", "summary": "Create a Response Play", "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, "name": "A New Response Play", "description": "A Response Play to add responders.", "subscribers": [], "subscribers_message": null, "responders": [ { "type": "user_reference", "id": "PROW72A" }, { "type": "escalation_policy_reference", "id": "P12TU3X" } ], "responders_message": null, "runnability": "services", "conference_number": null, "conference_url": null } } } } } }, "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": { "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](../../docs/CONCEPTS.md#response-plays)\n", "summary": "Get a Response Play", "parameters": [ { "$ref": "#/components/parameters/id" } ], "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": { "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](../../docs/CONCEPTS.md#response-plays)\n", "summary": "Update a Response Play", "parameters": [ { "$ref": "#/components/parameters/id" } ], "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": null, "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": { "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](../../docs/CONCEPTS.md#response-plays)\n", "summary": "Delete a Response Play", "parameters": [ { "$ref": "#/components/parameters/id" } ], "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": { "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](../../docs/CONCEPTS.md#response-plays)\n", "summary": "Run a response play", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "$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": { "tags": [ "Rulesets" ], "operationId": "listRulesets", "description": "List all rulesets.\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](../../docs/CONCEPTS.md#rulesets)\n", "summary": "List rulesets", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "$ref": "#/components/parameters/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": "#/paths/~1rulesets/post/requestBody/content/application~1json/schema/properties/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 } } } } } }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" } } }, "post": { "tags": [ "Rulesets" ], "operationId": "createRuleset", "description": "Create a new ruleset.\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](../../docs/CONCEPTS.md#rulesets)\n", "summary": "Create a ruleset", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "ruleset": { "type": "object", "properties": { "id": { "type": "string", "readOnly": true, "description": "ID of the ruleset." }, "self": { "type": "string", "format": "url", "description": "the API show URL at which the object is accessible", "readOnly": true }, "type": { "type": "string", "readOnly": true, "enum": [ "global", "default_global" ] }, "name": { "type": "string", "description": "Name of the ruleset." }, "routing_keys": { "type": "array", "readOnly": true, "description": "Routing keys routed to this ruleset.", "items": { "type": "string" } }, "created_at": { "type": "string", "format": "date-time", "readOnly": true, "description": "The date the ruleset was created at." }, "creator": { "type": "object", "readOnly": true, "description": "Reference to the user that has created the ruleset.", "properties": { "id": { "type": "string", "readOnly": true }, "type": { "type": "string", "description": "A string that determines the schema of the object", "readOnly": true }, "self": { "type": "string", "format": "url", "description": "The API show URL at which the object is accessible", "readOnly": true } } }, "updated_at": { "type": "string", "format": "date-time", "readOnly": true, "description": "The date the ruleset was last updated." }, "updater": { "type": "object", "readOnly": true, "description": "Reference to the user that has updated the ruleset last.", "properties": { "id": { "type": "string", "readOnly": true }, "type": { "type": "string", "description": "A string that determines the schema of the object", "readOnly": true }, "self": { "type": "string", "format": "url", "description": "The API show URL at which the object is accessible", "readOnly": true } } }, "team": { "type": "object", "description": "Reference to the team that owns the ruleset. If none is specified, only admins have access.", "properties": { "id": { "type": "string" }, "type": { "type": "string", "description": "A string that determines the schema of the object", "readOnly": true }, "self": { "type": "string", "format": "url", "description": "The API show URL at which the object is accessible", "readOnly": true } }, "required": [ "id", "type" ] } }, "example": { "id": "0e84de00-9511-4380-9f4f-a7b568bb49a0", "name": "MySQL Clusters", "type": "global", "routing_keys": [ "R0212P1QXGEIQE2NMTQ7L7WXD00DWHIN" ], "self": "https://api.pagerduty.com/rulesets/0e84de00-9511-4380-9f4f-a7b568bb49a0", "created_at": "2019-12-24T21:18:52Z", "creator": { "type": "user_reference", "self": "https://api.pagerduty.com/users/PABO808", "id": "PABO808" }, "updated_at": "2019-12-25T14:54:23Z", "updater": { "type": "user_reference", "self": "https://api.pagerduty.com/users/PABO808", "id": "PABO808" }, "team": { "type": "team_reference", "self": "https://api.pagerduty.com/teams/P3ZQXDF", "id": "P3ZQXDF" } }, "required": [ "name" ] } } }, "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": "#/paths/~1rulesets/post/requestBody/content/application~1json/schema/properties/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": { "tags": [ "Rulesets" ], "operationId": "getRuleset", "description": "Get a ruleset.\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](../../docs/CONCEPTS.md#rulesets)\n", "summary": "Get a ruleset", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "$ref": "#/components/parameters/id" } ], "responses": { "200": { "description": "The ruleset object.", "content": { "application/json": { "schema": { "type": "object", "properties": { "ruleset": { "$ref": "#/paths/~1rulesets/post/requestBody/content/application~1json/schema/properties/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": { "tags": [ "Rulesets" ], "operationId": "updateRuleset", "description": "Update a ruleset.\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](../../docs/CONCEPTS.md#rulesets)\n", "summary": "Update a ruleset", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "$ref": "#/components/parameters/id" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "ruleset": { "$ref": "#/paths/~1rulesets/post/requestBody/content/application~1json/schema/properties/ruleset" } }, "required": [ "ruleset" ] }, "examples": { "change_name": { "summary": "Example: Change name", "value": { "name": "MySQL Clusters" } }, "change_team": { "summary": "Example: Change team", "value": { "team": { "id": "PWL7QXS", "type": "team_reference" } } } } } } }, "responses": { "200": { "description": "The ruleset that was updated.", "content": { "application/json": { "schema": { "type": "object", "properties": { "ruleset": { "$ref": "#/paths/~1rulesets/post/requestBody/content/application~1json/schema/properties/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": { "tags": [ "Rulesets" ], "operationId": "deleteRuleset", "description": "Delete a ruleset.\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](../../docs/CONCEPTS.md#rulesets)\n", "summary": "Delete a ruleset", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "$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": { "tags": [ "Rulesets" ], "operationId": "listRulesetEventRules", "description": "List all event rules of a rulesets.\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](../../docs/CONCEPTS.md#rulesets)\n", "summary": "List event rules", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "$ref": "#/components/parameters/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": "#/paths/~1rulesets~1%7Bid%7D~1rules/post/requestBody/content/application~1json/schema/properties/rule" } } } } ] }, "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 } } } } } }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" } } }, "post": { "tags": [ "Rulesets" ], "operationId": "createRulesetEventRule", "description": "Create a new event rule.\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](../../docs/CONCEPTS.md#rulesets)\n", "summary": "Create an event rule", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "$ref": "#/components/parameters/id" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "rule": { "type": "object", "properties": { "id": { "type": "string", "readOnly": true, "description": "ID of the event rule." }, "self": { "type": "string", "format": "url", "description": "the API show URL at which the object is accessible", "readOnly": true }, "position": { "type": "integer", "description": "Position/index of the rule within the ruleset." }, "disabled": { "type": "boolean", "description": "Indicates whether the rule is disabled and would therefore not be evaluated." }, "catch_all": { "type": "boolean", "readOnly": true, "description": "Indicates whether the rule is the last rule of the ruleset that serves as a catch-all. It has limited functionality compared to other rules." }, "conditions": { "type": "object", "description": "Conditions evaluated to check if an event matches this event rule. Is always empty for the catch all rule, though.", "properties": { "operator": { "type": "string", "description": "Operator to combine sub-conditions.", "enum": [ "and", "or" ] }, "subconditions": { "type": "array", "description": "Array of sub-conditions.", "items": { "type": "object", "properties": { "operator": { "type": "string", "description": "The type of operator to apply.", "enum": [ "exists", "nexists", "equals", "nequals", "contains", "ncontains", "matches", "nmatches" ] }, "parameters": { "type": "object", "properties": { "path": { "type": "string", "description": "Path to a field in an event, in dot-notation." }, "value": { "type": "string", "description": "Value to apply to the operator." }, "options": { "type": "object", "description": "Options to configure the operator." } }, "required": [ "value", "path" ] } }, "required": [ "operator", "parameters" ] } } }, "required": [ "operator", "subconditions" ] }, "time_frame": { "description": "Time-based conditions for limiting when the rule is active.", "type": "object", "properties": { "active_between": { "type": "object", "required": [ "start_time", "end_time" ], "description": "A fixed window of time during which the rule is active.", "properties": { "start_time": { "type": "integer", "description": "The start time in milliseconds." }, "end_time": { "type": "integer", "description": "End time in milliseconds." } } }, "scheduled_weekly": { "type": "object", "required": [ "start_time", "duration", "timezone", "weekdays" ], "description": "A reccuring window of time based on the day of the week, during which the rule is active.", "properties": { "start_time": { "type": "integer", "description": "The amount of milliseconds into the day at which the window starts." }, "duration": { "type": "integer", "description": "The duration of the window in milliseconds." }, "timezone": { "type": "string", "description": "The timezone." }, "weekdays": { "type": "array", "description": "An array of day values. Ex [1, 3, 5] is Monday, Wednesday, Friday.", "items": { "type": "integer" } } } } } }, "actions": { "description": "When an event matches this rule, the actions that will be taken to change the resulting alert and incident.", "type": "object", "properties": { "annotate": { "description": "Set a note on the resulting incident.", "type": "object", "required": [ "value" ], "properties": { "value": { "type": "string", "description": "The content of the note." } } }, "event_action": { "description": "Set whether the resulting alert status is trigger or resolve.", "type": "object", "required": [ "value" ], "properties": { "value": { "type": "string", "enum": [ "trigger", "resolve" ] } } }, "extractions": { "type": "array", "description": "Use regular expressions to extract values from event fields to set fields on the resulting alert.", "items": { "type": "object", "required": [ "target", "source", "regex" ], "properties": { "target": { "type": "string", "description": "The alert field that will be set with the value from the regex.", "enum": [ "dedup_key", "description" ] }, "source": { "type": "string", "description": "The path to the event field where the regex will be applied to extract a value." }, "regex": { "type": "string", "description": "A RE2 regular expression. If it contains one or more capture groups, their values will be extracted and appended together. If it contains no capture groups, the whole match is used." } } } }, "priority": { "description": "Set the priority ID for the resulting incident. You can find the priority you want by calling the priorities endpoint.", "type": "object", "required": [ "value" ], "properties": { "value": { "type": "string", "description": "The priority ID." } } }, "route": { "description": "Set the service ID of the target service for the resulting alert. You can find the service you want to route to by calling the services endpoint.", "type": "object", "required": [ "value" ], "properties": { "value": { "type": "string", "description": "The target service's ID." } } }, "severity": { "description": "Set the severity of the resulting alert.", "type": "object", "required": [ "value" ], "properties": { "value": { "type": "string", "enum": [ "info", "warning", "error", "critical" ] } } }, "suppress": { "description": "Set whether the resulting alert is suppressed. Can optionally be used with a threshold where resulting alerts will be suppressed until the threshold is met in window of time.", "type": "object", "required": [ "value" ], "properties": { "value": { "type": "boolean" }, "threshold_value": { "type": "integer", "description": "The number of occurences needed during the window of time to trigger the theshold." }, "threshold_time_unit": { "type": "string", "description": "The time unit for the window of time.", "enum": [ "seconds", "minutes", "hours" ] }, "threshold_time_amount": { "type": "integer", "description": "The amount of time units for the window of time." } } }, "suspend": { "description": "[Early Access] Set the length of time to suspend the resulting alert before triggering.", "type": "object", "required": [ "value" ], "properties": { "value": { "type": "integer", "description": "The amount of time to suspend the alert in seconds." } } } } } }, "example": { "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" } ] } }, "required": [ "actions" ] } }, "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": "#/paths/~1rulesets~1%7Bid%7D~1rules/post/requestBody/content/application~1json/schema/properties/rule" } } }, "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": { "tags": [ "Rulesets" ], "operationId": "getRulesetEventRule", "description": "Get an event rule.\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](../../docs/CONCEPTS.md#rulesets)\n", "summary": "Get an event rule", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "$ref": "#/components/parameters/id" }, { "name": "rule_id", "in": "path", "description": "The id of the event rule to retrieve.", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "The event rule object.", "content": { "application/json": { "schema": { "type": "object", "properties": { "rule": { "$ref": "#/paths/~1rulesets~1%7Bid%7D~1rules/post/requestBody/content/application~1json/schema/properties/rule" } } }, "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" } } }, "put": { "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\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](../../docs/CONCEPTS.md#rulesets)\n", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "$ref": "#/components/parameters/id" }, { "name": "rule_id", "in": "path", "description": "The id of the event rule to update.", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "rule": { "$ref": "#/paths/~1rulesets~1%7Bid%7D~1rules/post/requestBody/content/application~1json/schema/properties/rule" }, "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": { "actions": { "suppress": { "value": true } } } } }, "disable_rule": { "summary": "Example: Disable rule", "value": { "rule": { "disabled": true } } } } } }, "description": "" }, "responses": { "200": { "description": "The event rule that was updated.", "content": { "application/json": { "schema": { "type": "object", "properties": { "rule": { "$ref": "#/paths/~1rulesets~1%7Bid%7D~1rules/post/requestBody/content/application~1json/schema/properties/rule" } } }, "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": { "tags": [ "Rulesets" ], "operationId": "deleteRulesetEventRule", "description": "Delete an event rule.\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](../../docs/CONCEPTS.md#rulesets)\n", "summary": "Delete an event rule", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "$ref": "#/components/parameters/id" }, { "name": "rule_id", "in": "path", "description": "The id of the event rule to delete.", "required": true, "schema": { "type": "string" } } ], "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" ], "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](../../docs/CONCEPTS.md#schedules)\n", "summary": "List schedules", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "$ref": "#/components/parameters/total" }, { "name": "query", "in": "query", "description": "Filters the result, showing only the schedules whose name matches the query.", "schema": { "type": "string" } } ], "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": { "response": { "summary": "Response 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", "summary": "PagerDuty Admin", "self": "https://api.pagerduty.com/users/PEYSGVF", "html_url": "https://subdomain.pagerduty.com/users/PEYSGVF" } ], "schedule_layers": [ { "users": [ { "user": { "id": "PEYSGVF", "type": "user", "summary": "PagerDuty Admin", "self": "https://api.pagerduty.com/users/PEYSGVF", "html_url": "https://subdomain.pagerduty.com/users/PEYSGVF" } } ] } ] } ], "limit": 100, "offset": 0, "more": false } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } }, "post": { "tags": [ "Schedules" ], "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](../../docs/CONCEPTS.md#schedules)\n", "summary": "Create a schedule", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "$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" } } ], "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", "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", "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" ], "operationId": "getSchedule", "description": "Show detailed information about a schedule, including entries for each layer and sub-schedule.", "summary": "Get a schedule", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "$ref": "#/components/parameters/time_zone" }, { "$ref": "#/components/parameters/since" }, { "$ref": "#/components/parameters/until" }, { "$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", "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", "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", "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", "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" ], "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](../../docs/CONCEPTS.md#schedules)\n", "summary": "Delete a schedule", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "$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" ], "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](../../docs/CONCEPTS.md#schedules)\n", "summary": "Update a schedule", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "$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" } } ], "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", "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", "summary": "Regina Phalange", "self": "https://api.pagerduty.com/users/PXPGF42", "html_url": "https://subdomain.pagerduty.com/users/PXPGF42" } } ], "restrictions": [ { "type": "daily", "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": { "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 [API Concepts Document](../../docs/CONCEPTS.md#audit-record).\n\n\n> ### Early Access\n> This endpoint's interface is under development and subject to change. Do not use it in production systems.\n> Your request must set an X-EARLY-ACCESS header with value `audit-early-access` to acknowledge this.\n>\n> Audit records for schedules resource started in August 2020 and records may be purged while the API is in early access.\n", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "$ref": "#/components/parameters/id" }, { "$ref": "#/paths/~1audit~1records/get/parameters/2" }, { "$ref": "#/paths/~1audit~1records/get/parameters/3" }, { "$ref": "#/paths/~1audit~1records/get/parameters/4" } ], "responses": { "200": { "description": "Records matching the query criteria.", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "properties": { "records": { "type": "array", "items": { "$ref": "#/paths/~1audit~1records/get/responses/200/content/application~1json/schema/allOf/0/properties/records/items" } }, "response_metadata": { "nullable": true, "anyOf": [ { "$ref": "#/paths/~1audit~1records/get/responses/200/content/application~1json/schema/allOf/0/properties/response_metadata/anyOf/0" } ] } }, "required": [ "records" ] }, { "$ref": "#/paths/~1audit~1records/get/responses/200/content/application~1json/schema/allOf/1" } ] }, "examples": { "response": { "$ref": "#/components/examples/AuditRecordResponseExample" } } } } }, "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" }, "500": { "$ref": "#/components/responses/InternalServerError" } } } }, "/schedules/{id}/overrides": { "description": "List and create schedule overrides.", "get": { "tags": [ "Schedules" ], "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](../../docs/CONCEPTS.md#schedules)\n", "summary": "List overrides", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "$ref": "#/components/parameters/id" }, { "name": "since", "in": "query", "description": "The start of the date range over which you want to search.", "required": true, "schema": { "type": "string", "format": "date-time" } }, { "name": "until", "in": "query", "description": "The end of the date range over which you want to search.", "required": true, "schema": { "type": "string", "format": "date-time" } }, { "name": "editable", "in": "query", "description": "When this parameter is present, only editable overrides will be returned. The result will only include the id of the override if this parameter is present. Only future overrides are editable.", "schema": { "type": "boolean" } }, { "name": "overflow", "in": "query", "description": "Any on-call schedule entries that pass the date range bounds will be truncated at the bounds, unless the parameter overflow=true is passed. This parameter defaults to false.", "schema": { "type": "boolean" } } ], "responses": { "200": { "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" ], "operationId": "createScheduleOverride", "description": "Create an override for a specific user covering the specified time range. If you create an override on top of an existing one, the last created override will have priority.\n\nA Schedule determines the time periods that users are On-Call.\n\nFor more information see the [API Concepts Document](../../docs/CONCEPTS.md#schedules)\n", "summary": "Create an override", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "$ref": "#/components/parameters/id" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "override": { "$ref": "#/components/schemas/Override" } }, "required": [ "override" ] }, "examples": { "request": { "summary": "Request Example", "value": { "override": { "start": "2012-07-01T00:00:00-04:00", "end": "2012-07-02T00:00:00-04:00", "user": { "id": "PEYSGVF", "type": "user_reference" } } } } } } }, "description": "The override to be created", "required": true }, "responses": { "201": { "description": "The override that was created.", "content": { "application/json": { "schema": { "type": "object", "properties": { "override": { "$ref": "#/components/schemas/Override" } }, "required": [ "override" ] }, "examples": { "response": { "summary": "Response Example", "value": { "override": { "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" } } } }, "/schedules/{id}/overrides/{override_id}": { "description": "Delete a schedule override.", "delete": { "tags": [ "Schedules" ], "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](../../docs/CONCEPTS.md#schedules)\n", "summary": "Delete an override", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "$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" ], "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](../../docs/CONCEPTS.md#schedules)\n", "summary": "List users on call.", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "$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": "P6EJ1EE", "start_delay_in_minutes": 0, "created_at": "2015-12-11T23:38:11.000Z", "contact_method": { "id": "PVMGSML", "type": "email_contact_method_reference", "summary": "Work", "self": "https://api.pagerduty.com/users/PAM4FGS/contact_methods/PVMGSMLL" }, "urgency": "high", "type": "assignment_notification_rule" } ], "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", "start_delay_in_minutes": 0, "created_at": "2015-12-11T23:38:11.000Z", "contact_method": { "id": "PTDVERC", "type": "email_contact_method_reference", "summary": "Default", "self": "https://api.pagerduty.com/users/PXPGF42/contact_methods/PTDVERC" }, "urgency": "low", "type": "assignment_notification_rule" } ], "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" ], "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](../../docs/CONCEPTS.md#schedules)\n", "summary": "Preview a schedule", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "$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" } } ], "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", "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", "summary": "Regina Phalange", "self": "https://api.pagerduty.com/users/PXPGF42", "html_url": "https://subdomain.pagerduty.com/users/PXPGF42" } } ], "restrictions": [ { "type": "daily", "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": { "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\nFor more information see the [API Concepts Document](../../docs/CONCEPTS.md#business-services)\n", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" } ], "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": [ { "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": { "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](../../docs/CONCEPTS.md#business-services)\n", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "$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": [ { "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": { "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](../../docs/CONCEPTS.md#business-services)\n", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" } ], "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": [ { "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": { "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](../../docs/CONCEPTS.md#services)\n", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "$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": [ { "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", "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](../../docs/CONCEPTS.md#services)\n", "summary": "List services", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "$ref": "#/components/parameters/total" }, { "$ref": "#/components/parameters/team_ids" }, { "$ref": "#/components/parameters/time_zone" }, { "$ref": "#/components/parameters/sort_by_service" }, { "name": "query", "in": "query", "description": "Filters the result, showing only the services whose name or service_key matches the query.", "schema": { "type": "string" } }, { "name": "include[]", "in": "query", "description": "Array of additional details to include.", "explode": true, "schema": { "type": "array", "items": { "type": "string", "enum": [ "escalation_policies", "teams", "integrations" ] }, "uniqueItems": true } } ], "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/services/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": "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" } ] } ], "limit": 25, "offset": 0, "more": false } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" } } }, "post": { "tags": [ "Services" ], "operationId": "createService", "description": "Create a new 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](../../docs/CONCEPTS.md#services)\n", "summary": "Create a service", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" } ], "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": "time", "alert_grouping_timeout": 2 } } } } } }, "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/services/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" } ] } } } } } } }, "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", "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](../../docs/CONCEPTS.md#services)\n", "summary": "Get a service", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "$ref": "#/components/parameters/id" }, { "name": "include[]", "in": "query", "description": "Array of additional details to include.", "explode": true, "schema": { "type": "array", "items": { "type": "string", "enum": [ "escalation_policies", "teams" ] }, "uniqueItems": true } } ], "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/services/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" } ] } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" } } }, "delete": { "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](../../docs/CONCEPTS.md#services)\n", "summary": "Delete a service", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "$ref": "#/components/parameters/id" } ], "responses": { "204": { "description": "The service was deleted successfully." }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" } } }, "put": { "tags": [ "Services" ], "description": "Update 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](../../docs/CONCEPTS.md#services)\n", "summary": "Update a service", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "$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": "time", "alert_grouping_timeout": 2 } } } } } }, "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/services/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": "time", "alert_grouping_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" } ] } } } } } } }, "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": { "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 [API Concepts Document](../../docs/CONCEPTS.md#audit-record).\n\n\n> ### Early Access\n> This endpoint's interface is under development and subject to change. Do not use it in production systems.\n> Your request must set an X-EARLY-ACCESS header with value `audit-early-access` to acknowledge this.\n>\n> Audit records for escalation policies resource started in August 2020 and records may be purged while the API is in early access.\n", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "$ref": "#/components/parameters/id" }, { "$ref": "#/paths/~1audit~1records/get/parameters/2" }, { "$ref": "#/paths/~1audit~1records/get/parameters/3" }, { "$ref": "#/paths/~1audit~1records/get/parameters/4" } ], "responses": { "200": { "description": "Records matching the query criteria.", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "properties": { "records": { "type": "array", "items": { "$ref": "#/paths/~1audit~1records/get/responses/200/content/application~1json/schema/allOf/0/properties/records/items" } }, "response_metadata": { "nullable": true, "anyOf": [ { "$ref": "#/paths/~1audit~1records/get/responses/200/content/application~1json/schema/allOf/0/properties/response_metadata/anyOf/0" } ] } }, "required": [ "records" ] }, { "$ref": "#/paths/~1audit~1records/get/responses/200/content/application~1json/schema/allOf/1" } ] }, "examples": { "response": { "$ref": "#/components/examples/AuditRecordResponseExample" } } } } }, "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" }, "500": { "$ref": "#/components/responses/InternalServerError" } } } }, "/services/{id}/integrations": { "description": "Create integrations belonging to a service.", "post": { "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](../../docs/CONCEPTS.md#services)\n", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "$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" } } } }, "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/services/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": { "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](../../docs/CONCEPTS.md#services)\n", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "$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/services/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/services/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": { "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](../../docs/CONCEPTS.md#services)\n", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "$ref": "#/components/parameters/id" }, { "$ref": "#/components/parameters/integration_id" }, { "name": "include[]", "in": "query", "description": "Array of additional details to include.", "explode": true, "schema": { "type": "array", "items": { "type": "string", "enum": [ "services", "vendors" ] }, "uniqueItems": true } } ], "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/services/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" } } } }, "/tags": { "get": { "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](../../docs/CONCEPTS.md#tags)\n", "summary": "List tags", "parameters": [ { "name": "Accept", "description": "The `Accept` header is used as a versioning header.", "in": "header", "required": true, "schema": { "type": "string", "default": "application/vnd.pagerduty+json;version=2" } }, { "name": "Content-Type", "in": "header", "required": true, "schema": { "type": "string", "default": "application/json" } }, { "$ref": "#/components/parameters/total" }, { "name": "query", "in": "query", "description": "Filters the result, showing only the tags whose labels match the query.", "schema": { "type": "string" } } ], "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": { "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](../../docs/CONCEPTS.md#tags)\n", "summary": "Create a tag", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" } ], "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": { "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](../../docs/CONCEPTS.md#tags)\n", "summary": "Get a tag", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "$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": { "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](../../docs/CONCEPTS.md#tags)\n", "summary": "Delete a tag", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "$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": { "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](../../docs/CONCEPTS.md#tags)\n", "summary": "Get connected entities", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "$ref": "#/components/parameters/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": { "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](../../docs/CONCEPTS.md#teams)\n", "summary": "Create a team", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" } ], "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": { "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](../../docs/CONCEPTS.md#teams)\n", "summary": "List teams", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "$ref": "#/components/parameters/total" }, { "name": "query", "in": "query", "description": "Filters the result, showing only the teams whose names or email addresses match the query.", "schema": { "type": "string" } } ], "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 } } } } } }, "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": { "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](../../docs/CONCEPTS.md#teams)\n", "summary": "Get a team", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "$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": { "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](../../docs/CONCEPTS.md#teams)\n", "summary": "Delete a team", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "name": "reassignment_team", "in": "query", "description": "Team to reassign unresolved incident to. \nIf an unresolved incident exists on both the reassignment team and \nthe team being deleted, a duplicate will not be made. If not supplied, \nunresolved incidents will be made account-level.\n", "required": false, "schema": { "type": "string" } }, { "$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": { "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](../../docs/CONCEPTS.md#teams)\n", "summary": "Update a team", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "$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": { "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 [API Concepts Document](../../docs/CONCEPTS.md#audit-record).\n\n\n> ### Early Access\n> This endpoint's interface is under development and subject to change. Do not use it in production systems.\n> Your request must set an X-EARLY-ACCESS header with value `audit-early-access` to acknowledge this.\n>\n> Audit records for user and team resources started in August 2020 and records may be purged while the API is in early access.\n", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "$ref": "#/components/parameters/id" }, { "$ref": "#/paths/~1audit~1records/get/parameters/2" }, { "$ref": "#/paths/~1audit~1records/get/parameters/3" }, { "$ref": "#/paths/~1audit~1records/get/parameters/4" } ], "responses": { "200": { "description": "Records matching the query criteria.", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "properties": { "records": { "type": "array", "items": { "$ref": "#/paths/~1audit~1records/get/responses/200/content/application~1json/schema/allOf/0/properties/records/items" } }, "response_metadata": { "nullable": true, "anyOf": [ { "$ref": "#/paths/~1audit~1records/get/responses/200/content/application~1json/schema/allOf/0/properties/response_metadata/anyOf/0" } ] } }, "required": [ "records" ] }, { "$ref": "#/paths/~1audit~1records/get/responses/200/content/application~1json/schema/allOf/1" } ] }, "examples": { "response": { "$ref": "#/components/examples/AuditRecordResponseExample" } } } } }, "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" }, "500": { "$ref": "#/components/responses/InternalServerError" } } } }, "/teams/{id}/escalation_policies/{escalation_policy_id}": { "description": "Manage an escalation policy for a team.", "delete": { "tags": [ "Teams" ], "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](../../docs/CONCEPTS.md#teams)\n", "summary": "Remove an escalation policy from a team", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "$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" ], "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](../../docs/CONCEPTS.md#teams)\n", "summary": "Add an escalation policy to a team", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "$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": { "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](../../docs/CONCEPTS.md#teams)\n", "summary": "List members of a team", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "$ref": "#/components/parameters/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 } } } } } }, "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}/users/{user_id}": { "description": "Manage team memberships.", "delete": { "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](../../docs/CONCEPTS.md#teams)\n", "summary": "Remove a user from a team", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "$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": { "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](../../docs/CONCEPTS.md#teams)\n", "summary": "Add a user to a team", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "$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" } } } }, "/users": { "description": "List and create users.", "get": { "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](../../docs/CONCEPTS.md#users)\n", "summary": "List users", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "name": "query", "in": "query", "description": "Filters the result, showing only the users whose names or email addresses match the query.", "schema": { "type": "string" } }, { "$ref": "#/components/parameters/team_ids" }, { "$ref": "#/components/parameters/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", "start_delay_in_minutes": 0, "created_at": "2015-12-11T23:38:11.000Z", "contact_method": { "id": "PTDVERC", "type": "email_contact_method_reference", "summary": "Default", "self": "https://api.pagerduty.com/users/PXPGF42/contact_methods/PTDVERC" }, "urgency": "low", "type": "assignment_notification_rule" } ], "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": "P6EJ1EE", "start_delay_in_minutes": 0, "created_at": "2015-12-11T23:38:11.000Z", "contact_method": { "id": "PVMGSML", "type": "email_contact_method_reference", "summary": "Work", "self": "https://api.pagerduty.com/users/PAM4FGS/contact_methods/PVMGSMLL" }, "urgency": "high", "type": "assignment_notification_rule" } ], "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 } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } }, "post": { "tags": [ "Users" ], "operationId": "createUser", "description": "Create a new user. Note that you must also supply a `password` property to create a user--it will not be returned by any API.\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](../../docs/CONCEPTS.md#users)\n", "summary": "Create a user", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "$ref": "#/components/parameters/from_header" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "user": { "$ref": "#/components/schemas/User" } }, "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" } } } } } }, "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", "start_delay_in_minutes": 0, "created_at": "2015-12-11T23:38:11.000Z", "contact_method": { "id": "PTDVERC", "type": "email_contact_method_reference", "summary": "Default", "self": "https://api.pagerduty.com/users/PXPGF42/contact_methods/PTDVERC" }, "urgency": "low", "type": "assignment_notification_rule" } ], "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": { "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](../../docs/CONCEPTS.md#users)\n", "summary": "Get a user", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "$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", "start_delay_in_minutes": 0, "created_at": "2015-12-11T23:38:11.000Z", "contact_method": { "id": "PTDVERC", "type": "email_contact_method_reference", "summary": "Default", "self": "https://api.pagerduty.com/users/PXPGF42/contact_methods/PTDVERC" }, "urgency": "low", "type": "assignment_notification_rule" } ], "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": { "tags": [ "Users" ], "operationId": "deleteUser", "description": "Remove an existing user.\n\nReturns 400 if the user has assigned incidents unless your [pricing plan](https://support.pagerduty.com/docs/offboarding) 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](../../docs/CONCEPTS.md#users)\n", "summary": "Delete a user", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "$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": { "tags": [ "Users" ], "operationId": "updateUser", "description": "Update an existing user. Note that you may also supply a `password` property--it will not be returned by any API.\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](../../docs/CONCEPTS.md#users)\n", "summary": "Update a user", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "$ref": "#/components/parameters/id" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "user": { "$ref": "#/components/schemas/User" } }, "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" } } } } } }, "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", "start_delay_in_minutes": 0, "created_at": "2015-12-11T23:38:11.000Z", "contact_method": { "id": "PTDVERC", "type": "email_contact_method_reference", "summary": "Default", "self": "https://api.pagerduty.com/users/PXPGF42/contact_methods/PTDVERC" }, "urgency": "low", "type": "assignment_notification_rule" } ], "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": { "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 [API Concepts Document](../../docs/CONCEPTS.md#audit-record).\n\n\n> ### Early Access\n> This endpoint's interface is under development and subject to change. Do not use it in production systems.\n> Your request must set an X-EARLY-ACCESS header with value `audit-early-access` to acknowledge this.\n>\n> Audit records for user and team resources started in August 2020 and records may be purged while the API is in early access.\n", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "$ref": "#/components/parameters/id" }, { "$ref": "#/paths/~1audit~1records/get/parameters/2" }, { "$ref": "#/paths/~1audit~1records/get/parameters/3" }, { "$ref": "#/paths/~1audit~1records/get/parameters/4" } ], "responses": { "200": { "description": "Records matching the query criteria.", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "properties": { "records": { "type": "array", "items": { "$ref": "#/paths/~1audit~1records/get/responses/200/content/application~1json/schema/allOf/0/properties/records/items" } }, "response_metadata": { "nullable": true, "anyOf": [ { "$ref": "#/paths/~1audit~1records/get/responses/200/content/application~1json/schema/allOf/0/properties/response_metadata/anyOf/0" } ] } }, "required": [ "records" ] }, { "$ref": "#/paths/~1audit~1records/get/responses/200/content/application~1json/schema/allOf/1" } ] }, "examples": { "response": { "$ref": "#/components/examples/AuditRecordResponseExample" } } } } }, "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" }, "500": { "$ref": "#/components/responses/InternalServerError" } } } }, "/users/{id}/contact_methods": { "description": "List a user's contact methods.", "get": { "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](../../docs/CONCEPTS.md#users)\n", "summary": "List a user's contact methods", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "$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": "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": { "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](../../docs/CONCEPTS.md#users)\n", "summary": "Create a user contact method", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "$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": "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": "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": { "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](../../docs/CONCEPTS.md#users)\n", "summary": "Get a user's contact method", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "$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": "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": { "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](../../docs/CONCEPTS.md#users)\n", "summary": "Delete a user's contact method", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "$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": { "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](../../docs/CONCEPTS.md#users)\n", "summary": "Update a user's contact method", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "$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": "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": "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}/notification_rules": { "description": "List a user's notification rules.", "get": { "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](../../docs/CONCEPTS.md#users)\n", "summary": "List a user's notification rules", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "$ref": "#/components/parameters/id" }, { "name": "include[]", "in": "query", "description": "Array of additional details to include.", "explode": true, "schema": { "type": "array", "items": { "type": "string", "enum": [ "contact_methods" ] }, "uniqueItems": true } } ], "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": "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" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } }, "post": { "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](../../docs/CONCEPTS.md#users)\n", "summary": "Create a user notification rule", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "$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" }, "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": "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" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } } }, "/users/{id}/notification_rules/{notification_rule_id}": { "description": "Manage a user's notification rule.", "get": { "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](../../docs/CONCEPTS.md#users)\n", "summary": "Get a user's notification rule", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "$ref": "#/components/parameters/id" }, { "$ref": "#/components/parameters/user_notification_rule_id" }, { "name": "include[]", "in": "query", "description": "Array of additional details to include.", "explode": true, "schema": { "type": "array", "items": { "type": "string", "enum": [ "contact_methods" ] }, "uniqueItems": true } } ], "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": "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": { "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](../../docs/CONCEPTS.md#users)\n", "summary": "Delete a user's notification rule", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "$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": { "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](../../docs/CONCEPTS.md#users)\n", "summary": "Update a user's notification rule", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "$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" }, "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": "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": { "tags": [ "Users" ], "operationId": "getUserNotificationSubscriptions", "description": "Retrieve a list of Notification Subscriptions the given user has.\n\n\n> ### Early Access\n> This endpoint is in Early Access and may change at any time. You must pass in the X-EARLY-ACCESS header to access it.\n", "summary": "List notification subscriptions", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/components/parameters/id" }, { "name": "X-EARLY-ACCESS", "in": "header", "description": "This header indicates that this API endpoint is __UNDER CONSTRUCTION__ and may change at any time. You __MUST__ pass in this header with the value `usms-early-access`. Do not use this endpoint in production, as it may change!\n", "required": true, "schema": { "type": "string", "enum": [ "usms-early-access" ], "default": "usms-early-access" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "subscriptions": { "type": "array", "items": { "type": "object", "properties": { "subscription": { "$ref": "#/paths/~1users~1%7Bid%7D~1notification_subscriptions/post/responses/200/content/application~1json/schema/properties/subscription" } } } }, "pagination": { "$ref": "#/components/schemas/Pagination" } } }, "examples": { "Response": { "value": { "subscriptions": [ { "subscription": { "subscriber_id": "PD1234", "subscriber_type": "user", "subscribable_id": "PD1234", "subscribable_type": "incident", "account_id": "PD1234" } }, { "subscription": { "subscriber_id": "PD1234", "subscriber_type": "team", "subscribable_id": "PD1234", "subscribable_type": "incident", "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": { "summary": "Create notification subcription", "operationId": "createUserNotificationSubscription", "tags": [ "Users" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "subscription": { "title": "NotificationSubscription", "description": "An object describing the relationship of a NotificationSubscriber and a NotificationSubscribable.", "type": "object", "properties": { "subscriber_id": { "type": "string", "description": "The ID of the entity being subscribed" }, "subscriber_type": { "type": "string", "description": "The type of the entity being subscribed", "enum": [ "user", "team" ] }, "subscribable_id": { "type": "string", "description": "The ID of the entity being subscribed to" }, "subscribable_type": { "type": "string", "description": "The type of the entity being subscribed to", "enum": [ "incident" ] }, "account_id": { "type": "string", "description": "The ID of the account belonging to the subscriber entity" } } } } }, "examples": { "Response": { "value": { "subscription": { "account_id": "PD1234", "subscribable_id": "PD1234", "subscribable_type": "incident", "subscriber_id": "PD1234", "subscriber_type": "user" } } } } } } }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "422": { "description": "Unprocessable Entity. Some arguments failed validation checks.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "code": { "type": "integer", "readOnly": true }, "message": { "type": "string", "readOnly": true, "description": "Error message string" }, "errors": { "type": "array", "readOnly": true, "items": { "type": "string", "readOnly": true, "description": "Human-readable error details" } } }, "example": { "message": "Not Found", "code": 2100 } } } } } } } }, "description": "Create a new Notification Subscription for the given user.\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.", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/components/parameters/id" }, { "schema": { "type": "string", "default": "usms-early-acces" }, "in": "header", "name": "X-EARLY-ACCESS", "description": "This header indicates that this API endpoint is __UNDER CONSTRUCTION__ and may change at any time. You __MUST__ pass in this header with the value `usms-early-access`. Do not use this endpoint in production, as it may change!\n", "required": true } ], "requestBody": { "content": { "application/json": { "schema": { "title": "NotificationSubscribable", "description": "A reference of a subscribable entity.", "type": "object", "properties": { "subscribable_id": { "type": "string", "description": "The ID of the entity to subscribe to" }, "subscribable_type": { "type": "string", "description": "The type of the entity being subscribed to", "enum": [ "incident" ] } }, "example": { "subscribable_id": "PD1234", "subscribable_type": "incident" } }, "examples": { "Request": { "value": { "subscribable_type": "incident", "subscribable_id": "PD1234" } } } } }, "description": "The entity to subscribe to." } } }, "/users/{id}/notification_subscriptions/unsubscribe": { "post": { "summary": "Remove notification subscription", "tags": [ "Users" ], "responses": { "204": { "description": "The Notification Subscription was removed successfully." }, "400": { "$ref": "#/components/responses/ArgumentError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" } }, "operationId": "unsubscribeUserNotificationSubscription", "description": "Unsubscribe the given User from Notifications on the matching subscribable entity.\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.", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/components/parameters/id" }, { "schema": { "type": "string", "default": "usms-early-access" }, "in": "header", "name": "X-EARLY-ACCESS", "description": "This header indicates that this API endpoint is __UNDER CONSTRUCTION__ and may change at any time. You __MUST__ pass in this header with the value `usms-early-access`. Do not use this endpoint in production, as it may change!" } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/paths/~1users~1%7Bid%7D~1notification_subscriptions/post/requestBody/content/application~1json/schema" }, "examples": { "Request": { "value": { "subscribable_type": "incident", "subscribable_id": "PD1234" } } } } }, "description": "" } } }, "/users/{id}/sessions": { "description": "List a user's active sessions.", "get": { "tags": [ "Users" ], "operationId": "getUserSessions", "description": "List active sessions of a 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](../../docs/CONCEPTS.md#users)\n", "summary": "List a user's active sessions", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "$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": { "tags": [ "Users" ], "operationId": "deleteUserSessions", "description": "Delete all user sessions.\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](../../docs/CONCEPTS.md#users)\n", "summary": "Delete all user sessions", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "$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": { "tags": [ "Users" ], "operationId": "getUserSession", "description": "Get details about a user's session.\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](../../docs/CONCEPTS.md#users)\n", "summary": "Get a user's session", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "$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": { "tags": [ "Users" ], "operationId": "deleteUserSession", "description": "Delete a user's session.\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](../../docs/CONCEPTS.md#users)\n", "summary": "Delete a user's session", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "$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": { "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](../../docs/CONCEPTS.md#users)\n", "summary": "List a user's status update notification rules", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "name": "X-EARLY-ACCESS", "in": "header", "description": "This header indicates that this API endpoint is __UNDER CONSTRUCTION__ and may change at any time. You __MUST__ pass in this header and the above value. Do not use this endpoint in production, as it may change!\n", "required": true, "schema": { "type": "string", "default": "status-update-notification-rules", "enum": [ "status-update-notification-rules" ] } }, { "$ref": "#/components/parameters/id" }, { "name": "include[]", "in": "query", "description": "Array of additional details to include.", "explode": true, "schema": { "type": "array", "items": { "type": "string", "enum": [ "contact_methods" ] }, "uniqueItems": true } } ], "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": "#/paths/~1users~1%7Bid%7D~1status_update_notification_rules/post/requestBody/content/application~1json/schema/properties/status_update_notification_rule" } } }, "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": "contact_method_reference", "summary": "Work", "self": "https://api.pagerduty.com/users/PXPGF42/contact_methods/PXPGF42" }, "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": { "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](../../docs/CONCEPTS.md#users)\n", "summary": "Create a user status update notification rule", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "name": "X-EARLY-ACCESS", "in": "header", "description": "This header indicates that this API endpoint is __UNDER CONSTRUCTION__ and may change at any time. You __MUST__ pass in this header and the above value. Do not use this endpoint in production, as it may change!\n", "required": true, "schema": { "type": "string", "default": "status-update-notification-rules", "enum": [ "status-update-notification-rules" ] } }, { "$ref": "#/components/parameters/id" } ], "requestBody": { "content": { "application/json": { "schema": { "properties": { "status_update_notification_rule": { "type": "object", "description": "A rule for contacting the user for Incident Status Updates.", "properties": { "contact_method": { "$ref": "#/components/schemas/ContactMethodReference" } }, "required": [ "contact_method" ], "example": { "contact_method": { "id": "PXPGF42", "type": "email_contact_method_reference" } } } }, "required": [ "status_update_notification_rule" ] }, "examples": { "request": { "summary": "Request Example", "value": { "status_update_notification_rule": { "contact_method": { "id": "PXPGF42", "type": "email_contact_method" } } } } } } }, "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": "#/paths/~1users~1%7Bid%7D~1status_update_notification_rules/post/requestBody/content/application~1json/schema/properties/status_update_notification_rule" } }, "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": "contact_method_reference", "summary": "Work", "self": "https://api.pagerduty.com/users/PXPGF42/contact_methods/PXPGF42" }, "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": { "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](../../docs/CONCEPTS.md#users)\n", "summary": "Get a user's status update notification rule", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "name": "X-EARLY-ACCESS", "in": "header", "description": "This header indicates that this API endpoint is __UNDER CONSTRUCTION__ and may change at any time. You __MUST__ pass in this header and the above value. Do not use this endpoint in production, as it may change!\n", "required": true, "schema": { "type": "string", "default": "status-update-notification-rules", "enum": [ "status-update-notification-rules" ] } }, { "$ref": "#/components/parameters/id" }, { "$ref": "#/components/parameters/user_status_update_notification_rule_id" }, { "name": "include[]", "in": "query", "description": "Array of additional details to include.", "explode": true, "schema": { "type": "array", "items": { "type": "string", "enum": [ "contact_methods" ] }, "uniqueItems": true } } ], "responses": { "200": { "description": "The user's status update notification rule requested.", "content": { "application/json": { "schema": { "type": "object", "properties": { "notification_rule": { "$ref": "#/paths/~1users~1%7Bid%7D~1status_update_notification_rules/post/requestBody/content/application~1json/schema/properties/status_update_notification_rule" } }, "required": [ "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": "contact_method_reference", "summary": "Work", "self": "https://api.pagerduty.com/users/PXPGF42/contact_methods/PXPGF42" }, "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": { "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](../../docs/CONCEPTS.md#users)\n", "summary": "Delete a user's status update notification rule", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "name": "X-EARLY-ACCESS", "in": "header", "description": "This header indicates that this API endpoint is __UNDER CONSTRUCTION__ and may change at any time. You __MUST__ pass in this header and the above value. Do not use this endpoint in production, as it may change!\n", "required": true, "schema": { "type": "string", "default": "status-update-notification-rules", "enum": [ "status-update-notification-rules" ] } }, { "$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": { "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](../../docs/CONCEPTS.md#users)\n", "summary": "Update a user's status update notification rule", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "name": "X-EARLY-ACCESS", "in": "header", "description": "This header indicates that this API endpoint is __UNDER CONSTRUCTION__ and may change at any time. You __MUST__ pass in this header and the above value. Do not use this endpoint in production, as it may change!\n", "required": true, "schema": { "type": "string", "default": "status-update-notification-rules", "enum": [ "status-update-notification-rules" ] } }, { "$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": "#/paths/~1users~1%7Bid%7D~1status_update_notification_rules/post/requestBody/content/application~1json/schema/properties/status_update_notification_rule" } }, "required": [ "status_update_notification_rule" ] }, "examples": { "request": { "summary": "Request Example", "value": { "status_update_notification_rule": { "contact_method": { "id": "PXPGF42", "type": "email_contact_method" } } } } } } }, "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": "#/paths/~1users~1%7Bid%7D~1status_update_notification_rules/post/requestBody/content/application~1json/schema/properties/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": "contact_method_reference", "summary": "Work", "self": "https://api.pagerduty.com/users/PXPGF42/contact_methods/PXPGF42" }, "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](../../docs/CONCEPTS.md#users)\n", "summary": "Get the current user", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "$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": "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", "start_delay_in_minutes": 0, "created_at": "2015-12-11T23:38:11.000Z", "contact_method": { "id": "PTDVERC", "type": "email_contact_method_reference", "summary": "Default", "self": "https://api.pagerduty.com/users/PXPGF42/contact_methods/PTDVERC" }, "urgency": "low", "type": "assignment_notification_rule" } ], "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" }, "429": { "$ref": "#/components/responses/TooManyRequests" } } } }, "/vendors": { "description": "List vendors.", "get": { "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](../../docs/CONCEPTS.md#vendors)\n", "summary": "List vendors", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "$ref": "#/components/parameters/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 } } } } } }, "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": { "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](../../docs/CONCEPTS.md#vendors)\n", "summary": "Get a vendor", "parameters": [ { "$ref": "#/paths/~1tags/get/parameters/0" }, { "$ref": "#/paths/~1tags/get/parameters/1" }, { "$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" } } } } } }