Skip to content

Instantly share code, notes, and snippets.

@steverice
Last active September 14, 2017 17:49
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save steverice/44dca2fec85c13810f1c102bacedfa1e to your computer and use it in GitHub Desktop.
Save steverice/44dca2fec85c13810f1c102bacedfa1e to your computer and use it in GitHub Desktop.
PagerDuty API Swagger
{
"swagger": "2.0",
"info": {
"title": "PagerDuty API",
"description": "The PagerDuty API provides programmatic access to entities within a PagerDuty account. It is designed around [RESTful principles](https://en.wikipedia.org/wiki/Representational_state_transfer) with a path structure based on resources and their relationships.\n\nAll requests and responses are serialized in [JSON](https://en.wikipedia.org/wiki/JSON), including error responses.\n\nSchema are designed to be reusable across requests and across endpoints.\n\nMore sophisticated API clients should treat PagerDuty resources as unique objects keyed by the `id` field that can be used in any API request involving resources of that type.\n\nEvery resource contains a `type` field that identifies the schema it uses.\n\n## Rate limiting\n\nEach account and authentication mechanism is limited to the number of API requests it can make every minute. API requests that exceed the API rate limit will return an [HTTP status code](error_codes.html#http_responses) of 429. Different requests may affect your rate limit differently, so clients should always be prepared to be rate limited and respond appropriately.\n\n## Read-Only API Keys\n\nAPI requests made with read-only keys attempting to access endpoints with methods other than `GET` will return an [HTTP status code](error_codes.html#http_responses) of 403.\n\n## Error Codes\n\nMost APIs will return an error code from an unsuccessful call. They are described [here](error_codes.html).\n",
"version": "2.0"
},
"host": "api.pagerduty.com",
"schemes": ["https"],
"security": [{
"api_key": []
}],
"securityDefinitions": {
"api_key": {
"type": "apiKey",
"name": "Authorization",
"in": "header",
"description": "The Api Key with format `Token token=<API_KEY>`"
}
},
"consumes": ["application/json"],
"produces": ["application/vnd.pagerduty+json;version=2"],
"tags": [{
"name": "API Reference",
"description": "The API reference documentation provides all the nitty-gritty details of the endpoints available in the REST API.\nSee parameters you can specify, request and response schemas, as well as examples for every PagerDuty REST API endpoint.\n\nFind the endpoint you're looking for in the left navigation column.\nThen, consult the description in the middle column to learn about [parameters](#parameters) that can be specified with the request, possible [responses](#response-messages) to the request, and to [try out](#try-it-out-) a request.\nIn the right column, see examples and [schema definitions](#schemas) of what you can expect in a successful response.\nFor `PUT` and `POST` endpoints, examples and [schema definitions](#schemas) are available for request bodies as well.\n\n##### Parameters\n\nSee the names, [types](https://v2.developer.pagerduty.com/docs/types), possible values, and location of every parameter accepted by the endpoint.\n\n**Query parameters** located *in query* should be specified in the query string when making a request.\n**Body parameters** located *in body* should be specified in JSON format within the request body.\nBody parameters are typically only used with `POST` and `PUT` endpoints.\n**Header parameters** located *in header* should be specified as [standard HTTP headers](https://en.wikipedia.org/wiki/List_of_HTTP_header_fields) in the header section of the request.\n\n##### Schemas\n\nSchemas show the name, [type](https://v2.developer.pagerduty.com/docs/types), description, and possible values for every property in each [resource schema](https://v2.developer.pagerduty.com/docs/resource-schemas).\nProperties which are **read only** cannot be set as part of a request and will be generated by the server. Properties which are not **optional** are required, and *must* be specified in requests.\n\n##### Response Messages\n\nSee the possible [HTTP status codes](https://en.wikipedia.org/wiki/List_of_HTTP_status_codes) that can be returned by the endpoint if the request did not complete successfully.\nOften, the response body for an unsuccessful request will contain one or more [error messages](https://v2.developer.pagerduty.com/docs/errors) that indicate what was wrong with the request in more detail.\n\n##### Try it out!\n\nTo test an endpoint against the live API, fill out at the endpoint's parameters and click the \"Try\" button.\nYou'll see the details of the request that was made and the response returned from the server.\n\nBy default, all requests will be made against the read-only \"webdemo\" PagerDuty account.\nProvide your own [API token](https://v2.developer.pagerduty.com/docs/authentication#api-token-authentication) in the \"API Token\" field in the left column and your requests will be sent to your account instead.\nRemember this is the **live API** — modify your own account with care.\n\n##### Learn more\n\nTo read about general PagerDuty API topics, including:\n- [Authentication](https://v2.developer.pagerduty.com/v2/docs/authentication)\n- [Versioning](https://v2.developer.pagerduty.com/v2/docs/versioning)\n- [Endpoints](https://v2.developer.pagerduty.com/v2/docs/endpoints)\n- [Types](https://v2.developer.pagerduty.com/v2/docs/types)\n- [Filtering](https://v2.developer.pagerduty.com/v2/docs/filtering)\n- [Sorting](https://v2.developer.pagerduty.com/v2/docs/sorting)\n- [Pagination](https://v2.developer.pagerduty.com/v2/docs/pagination)\n- [Resource Schemas](https://v2.developer.pagerduty.com/v2/docs/resource-schemas)\n- [Resource References](https://v2.developer.pagerduty.com/v2/docs/references)\n- [Includes](https://v2.developer.pagerduty.com/v2/docs/includes)\n- [Errors](https://v2.developer.pagerduty.com/v2/docs/errors)\n\n[consult the REST API Guide](https://v2.developer.pagerduty.com/docs/rest-api).\n"
}, {
"name": "Abilities",
"description": "This describes your account's abilities by feature name, like `\"teams\"`.\nAn ability may be available to your account based on things like your pricing plan or account state.\n"
}, {
"name": "Add-ons",
"description": "Third-party developers can write their own add-ons to PagerDuty's UI, to add HTML to the product.\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"
}, {
"name": "Escalation Policies",
"description": "Escalation policies make sure the right people are alerted at the right time.\n\nAn escalation policy determines what [user](#resource_Users) or [schedule](#resource_Schedules) will be [notified](#resource_Notifications) first, second, and so on when an [incident](#resource_Incidents) is triggered.\nEscalation policies are used by one or more [services](#resource_Services).\n\n#### Escalation Rules\n\nAn escalation policy is made up of multiple [escalation rules](#!/Escalation_Policies/get_escalation_policies_id_escalation_rules).\nEach escalation rule represents a level of [on-call](#resource_On-Calls) duty.\nIt specifies one or more [users](#resource_Users) or [schedules](#resource_Schedules) to be notified when an unacknowledged [incident](#resource_Incidents) reaches that [escalation rule](#!/Escalation_Policies/get_escalation_policies_id_escalation_rules).\n\nThe first [escalation rule](#!/Escalation_Policies/get_escalation_policies_id_escalation_rules) in the escalation policy is the [user](#resource_Users) that will be [notified](#resource_Notifications) first about the triggered [incident](#resource_Incidents).\n\nIf no [on-call](#resource_On-Calls) [user](#resource_Users) for a given [escalation rule](#!/Escalation_Policies/get_escalation_policies_id_escalation_rules) has not acknowledged an [incident](#resource_Incidents) before the [escalation rule](#!/Escalation_Policies/get_escalation_policies_id_escalation_rules)'s escalation delay has elapsed, the [incident](#resource_Incidents) escalates to the next [escalation rule](#!/Escalation_Policies/get_escalation_policies_id_escalation_rules).\n\n[*Read more about escalation policies in the PagerDuty Knowledge Base*](https://support.pagerduty.com/hc/en-us/articles/202828950-What-is-an-Escalation-Policy-).\n"
}, {
"name": "Incidents",
"description": "An incident is a normalized, de-duplicated event generated by a PagerDuty [integration](#!/Services/get_services_id_integrations_integration_id).\nIt can be thought of as a problem or an issue within your [service](#resource_Services) that needs to be addressed and resolved.\n\nIncidents can be `triggered`, `acknowledged`, or `resolved`, and are assigned to a user based on the [service](#resource_Services)'s [escalation policy](#resource_Escalation_Policies).\n\nA triggered incident prompts a [notification](#resource_Notifications) to be sent to the currently [on-call](#resource_On-Calls) [user(s)](#resource_Users) as defined in the escalation policy used by the [service](#resource_Services).\nIncidents are triggered through the [Events API](https://v2.developer.pagerduty.com/docs/events-api).\n\nUpdates to an incident generate [log entries](#resource_Log_Entries) that capture the changes to an incident over time, whether these changes were prompted by a [user](#resource_Users), an [integration](#resource_Integrations), or were performed automatically.\n\n[*Read more about incidents in the PagerDuty Knowledge Base*](https://support.pagerduty.com/hc/en-us/articles/202829250-What-Is-an-Incident-).\n"
}, {
"name": "Log Entries",
"description": "PagerDuty keeps a log of all the events that happen to an [incident](#resource_Incidents).\nThese are exposed as log entries.\nLog entries give you more insight into how your [team](#resource_Teams) or organization is handling your [incidents](#resource_Incidents).\n\nLog entry data includes details about the event(s) that affected the [incident](#resource_Incidents) throughout its lifecycle, such as:\n- the data contained in events sent by the [integration](#!/Services/get_services_id_integrations_integration_id)\n- what [users](#resource_Users) were [notified](#resource_Notifications) and when\n- how they were [notified](#resource_Notifications)\n- what [user(s)](#resource_Users) acknowledged or resolved the [incident](#resource_Incidents)\n- any automatic actions that occurred to the [incident](#resource_Incidents)\n- other manual [user](#resource_Users) actions, such as a reassignment or a note\n\nLog entries cannot be created directly through the API; they are a result of other actions. The API provides read-only access to the log entries generated by PagerDuty.\n"
}, {
"name": "Maintenance Windows",
"description": "A maintenance window is used to temporarily disable one or more [services](#resource_Services) for a set period of time.\nNo [incidents](#resource_Incidents) will be triggered and no [notifications](#resource_Notifications) will be received while a [service](#resource_Services) is disabled by a maintenance window.\n\nMaintenance windows are specified to start at a certain time and end after they have begun.\nOnce started, a maintenance window cannot be deleted; it can only be ended immediately to re-enable the [service](#resource_Services).\n\n[*Read more about maintenance windows in the PagerDuty Knowledge Base*](https://support.pagerduty.com/hc/en-us/articles/202830350-Putting-a-service-in-maintenance-mode).\n"
}, {
"name": "Notifications",
"description": "When an [incident](#resource_Incidents) is triggered or escalated, it creates a notification.\n\nNotifications are messages containing the details of the [incident](#resource_Incidents), and can be sent through SMS, email, phone calls, and push notifications.\n\nNotifications cannot be created directly through the API; they are a result of other actions.\nThe API provides read-only access to the notifications generated by PagerDuty.\n\n[*Read more about notifications in the PagerDuty Knowledge Base*](https://support.pagerduty.com/hc/en-us/articles/202828840-What-is-an-Alert-Notification-).\n"
}, {
"name": "On-Calls",
"description": "An on-call represents a contiguous unit of time for which a [user](#resource_Users) will be on call for a given [escalation policy](#resource_Escalation_Policies) and [escalation rule](#!/Escalation_Policies/get_escalation_policies_id_escalation_rules).\nThis may be the result of that [user](#resource_Users) always being on call for the [escalation rule](#!/Escalation_Policies/get_escalation_policies_id_escalation_rules), or a block of time during which the computed result of a [schedule](#resource_Schedules) on that [escalation rule](#!/Escalation_Policies/get_escalation_policies_id_escalation_rules) puts the user on call.\n\nDuring an on-call, the [user](#resource_Users) is expected to bear responsibility for responding to any [notifications](#resource_Notifications) he or she receives and working to resolve the associated [incident(s)](#resource_Incidents).\n\nOn-calls cannot be created directly through the API; they are the computed result of how [escalation policies](#resource_Escalation_Policies) and [schedules](#resource_Schedules) are configured.\nThe API provides read-only access to the on-calls generated by PagerDuty.\n"
}, {
"name": "Schedules",
"description": "An on-call schedule determines the time periods that users are [on call](#resource_On-Calls).\nOnly [on-call](#resource_On-Calls) [users](#resource_Users) are eligible to receive [notifications](#resource_Notifications) from [incidents](#resource_Incidents).\n\nThe details of the on-call schedule specify which single [user](#resource_Users) is [on call](#resource_On-Calls) for that schedule at any given point in time.\nAn on-call schedule consists of one or more [schedule layers](https://support.pagerduty.com/hc/en-us/articles/202830250-Scheduling-Layers) that rotate a group of [users](#resource_Users) through the same shift at a set interval.\n\nRestrictions on each schedule layer limit on-call responsibility for that layer to certain times of the day or week.\nThe period of time during which a [user](#resource_Users) is present on a schedule layer is called a schedule layer entry.\n\nThe ordered composition of schedule layers, combined with any schedule layer entries from the override layer, known as [overrides](#!/Schedules/get_schedules_id_overrides), results in the final schedule layer.\nThe final schedule layer represents the computed set of schedule layer entries that put [users](#resource_Users) [on call](#resource_On-Calls) for the schedule, and cannot be modified directly.\n\nSchedules are used by [escalation policies](#resource_Escalation_Policies) as an escalation target for a given [escalation rule](#!/Escalation_Policies/get_escalation_policies_id_escalation_rules).\n\n[*Read more about on-call schedules in the PagerDuty Knowledge Base*](https://support.pagerduty.com/hc/en-us/sections/200550790-On-Call-Schedules).\n"
}, {
"name": "Services",
"description": "A PagerDuty service represents something you monitor (like a web service, email service, or database service).\nIt is a container for related [incidents](#resource_Incidents) that associates them with [escalation policies](#resource_Escalation_Policies).\n\nA service is the focal point for [incident](#resource_Incidents) management; services specify the configuration for the behavior of [incidents](#resource_Incidents) triggered on them.\nThis behavior includes specifying urgency and performing automated actions based on time of day, [incident](#resource_Incidents) duration, and other factors.\n\n#### Integrations\n\nAn integration is an endpoint (like Nagios, email, or an API call) that generates events, which are normalized and de-duplicated by PagerDuty to create [incidents](#resource_Incidents).\nIntegrations feed events into services and provide event management functionality such as filtering and de-duplication.\n\n[*Read more about services in the PagerDuty Knowledge Base*](https://support.pagerduty.com/hc/en-us/sections/200550800-Services).\n"
}, {
"name": "Teams",
"description": "A team is a collection of [users](#resource_Users) and [escalation policies](#resource_Escalation_Policies) that represent a group of people within an organization.\n\nTeams can be used throughout the API and PagerDuty applications to filter information to only what is relevant for one or more teams.\n\nThe account must have the teams ability to use the following endpoints.\n\n[*Read more about teams in the PagerDuty Knowledge Base*](https://support.pagerduty.com/hc/en-us/articles/204072090-How-to-Create-Teams-in-PagerDuty-).\n"
}, {
"name": "Users",
"description": "PagerDuty users are members of a PagerDuty account that have the ability to interact with [incidents](#resource_Incidents) and other data on the account.\n\nUsers are fundamental agents of different types of actions in PagerDuty. A user can, among other things:\n- acknowlege, reassign, snooze, escalate, and resolve [incidents](#resource_Incidents)\n- configure [services](#resource_Services), [escalation policies](#resource_Escalation_Policies), [integrations](#!/Services/get_services_id_integrations_integration_id), [on-call schedules](#resource_Schedules), [teams](#resource_Teams), and more\n- go [on call](#resource_On-Calls) for one or more [schedules](#resource_Schedules) or [escalation policies](#resource_Escalation_Policies)\n- receive [notifications](#resource_Notifications)\n\nDepending on a user's role, he or she may have access to different parts of the account's data.\n\n[*Read more about users in the PagerDuty Knowledge Base*](https://support.pagerduty.com/hc/en-us/sections/200550780-Users).\n"
}, {
"name": "Vendors",
"description": "A PagerDuty vendor represents a specific type of integration. AWS Cloudwatch, Splunk, Datadog, etc are all examples of vendors\nthat can be integrated in PagerDuty by making an [integration](#!/Services/get_services_id_integrations_integration_id).\n\nVendored integrations (when compared to generic email and API integrations) are automatically configured with the right API or email\nfiltering settings for inbound events from that vendor. Some vendors also have associated integration guides\non the PagerDuty support site.\n"
}],
"paths": {
"/api_reference": {
"x-description": "Introduction to the PagerDuty REST API Reference.",
"get": {
"tags": ["API Reference"],
"summary": "REST API Reference",
"description": "REST API Reference.",
"responses": {
"200": {
"description": ""
}
}
}
},
"/abilities": {
"x-description": "List your account's abilities.",
"get": {
"tags": ["Abilities"],
"description": "List all of your account's abilities, by name.",
"summary": "List abilities",
"responses": {
"200": {
"description": "An array of ability names.",
"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": {
"application/json": {
"abilities": ["teams", "read_only_users", "service_support_hours", "urgencies"]
}
}
},
"401": {
"$ref": "#/responses/Unauthorized"
},
"403": {
"$ref": "#/responses/Forbidden"
},
"429": {
"$ref": "#/responses/TooManyRequests"
}
}
}
},
"/abilities/{id}": {
"x-description": "Get an ability.",
"get": {
"tags": ["Abilities"],
"description": "Test whether your account has a given ability.",
"summary": "Test an ability",
"parameters": [{
"$ref": "#/parameters/id"
}],
"responses": {
"204": {
"description": "The account has the requested ability."
},
"401": {
"$ref": "#/responses/Unauthorized"
},
"402": {
"$ref": "#/responses/PaymentRequired"
},
"403": {
"$ref": "#/responses/Forbidden"
},
"404": {
"$ref": "#/responses/NotFound"
},
"429": {
"$ref": "#/responses/TooManyRequests"
}
}
}
},
"/addons": {
"x-description": "List and add add-ons to your account.",
"get": {
"tags": ["Add-ons"],
"description": "List all of the add-ons installed on your account.",
"summary": "List installed add-ons",
"parameters": [{
"$ref": "#/parameters/include_addon"
}, {
"name": "service_ids[]",
"in": "query",
"description": "Filters the results, showing only add-ons for the given services",
"type": "array",
"collectionFormat": "multi",
"uniqueItems": true,
"items": {
"type": "string"
}
}, {
"name": "filter",
"in": "query",
"description": "Filters the results, showing only add-ons of the given type",
"type": "string",
"enum": ["full_page_addon", "incident_show_addon"]
}],
"responses": {
"200": {
"description": "A paginated array of installed add-ons.",
"schema": {
"allOf": [{
"$ref": "#/definitions/Pagination"
}, {
"type": "object",
"properties": {
"addons": {
"type": "array",
"items": {
"$ref": "#/definitions/Addon"
}
}
},
"required": ["addons"]
}]
},
"examples": {
"application/json": {
"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,
"total": null
}
}
},
"400": {
"$ref": "#/responses/ArgumentError"
},
"401": {
"$ref": "#/responses/Unauthorized"
},
"403": {
"$ref": "#/responses/Forbidden"
},
"429": {
"$ref": "#/responses/TooManyRequests"
}
}
},
"post": {
"tags": ["Add-ons"],
"description": "Install an add-on for your account.",
"summary": "Install an add-on",
"parameters": [{
"name": "addon",
"in": "body",
"description": "The add-on to be installed.",
"schema": {
"type": "object",
"properties": {
"addon": {
"$ref": "#/definitions/Addon"
}
},
"required": ["addon"]
}
}],
"responses": {
"201": {
"description": "The add-on that was installed.",
"schema": {
"type": "object",
"properties": {
"addon": {
"$ref": "#/definitions/Addon"
}
},
"required": ["addon"]
},
"examples": {
"application/json": {
"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": "#/responses/ArgumentError"
},
"401": {
"$ref": "#/responses/Unauthorized"
},
"403": {
"$ref": "#/responses/Forbidden"
},
"429": {
"$ref": "#/responses/TooManyRequests"
}
}
}
},
"/addons/{id}": {
"x-description": "Get an add-on.",
"get": {
"tags": ["Add-ons"],
"description": "Get details about an existing add-on.",
"summary": "Get an add-on",
"parameters": [{
"$ref": "#/parameters/id"
}],
"responses": {
"200": {
"description": "The requested add-on.",
"schema": {
"type": "object",
"properties": {
"addon": {
"$ref": "#/definitions/Addon"
}
},
"required": ["addon"]
},
"examples": {
"application/json": {
"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": "#/responses/ArgumentError"
},
"401": {
"$ref": "#/responses/Unauthorized"
},
"403": {
"$ref": "#/responses/Forbidden"
},
"404": {
"$ref": "#/responses/NotFound"
},
"429": {
"$ref": "#/responses/TooManyRequests"
}
}
},
"delete": {
"tags": ["Add-ons"],
"description": "Remove an existing add-on.",
"summary": "Delete an add-on",
"parameters": [{
"$ref": "#/parameters/id"
}],
"responses": {
"204": {
"description": "The add-on was deleted successfully."
},
"401": {
"$ref": "#/responses/Unauthorized"
},
"403": {
"$ref": "#/responses/Forbidden"
},
"404": {
"$ref": "#/responses/NotFound"
},
"429": {
"$ref": "#/responses/TooManyRequests"
}
}
},
"put": {
"tags": ["Add-ons"],
"description": "Update an existing add-on.",
"summary": "Update an add-on",
"parameters": [{
"name": "addon",
"in": "body",
"description": "The add-on to be updated.",
"schema": {
"type": "object",
"properties": {
"addon": {
"$ref": "#/definitions/Addon"
}
},
"required": ["addon"]
}
}, {
"$ref": "#/parameters/id"
}],
"responses": {
"200": {
"description": "The add-on that was updated.",
"schema": {
"type": "object",
"properties": {
"addon": {
"$ref": "#/definitions/Addon"
}
},
"required": ["addon"]
},
"examples": {
"application/json": {
"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": "#/responses/ArgumentError"
},
"401": {
"$ref": "#/responses/Unauthorized"
},
"403": {
"$ref": "#/responses/Forbidden"
},
"404": {
"$ref": "#/responses/NotFound"
},
"429": {
"$ref": "#/responses/TooManyRequests"
}
}
}
},
"/escalation_policies": {
"x-description": "List and create escalation policies.",
"get": {
"tags": ["Escalation Policies"],
"description": "List all of the existing escalation policies.",
"summary": "List escalation policies",
"parameters": [{
"name": "query",
"in": "query",
"description": "Filters the results, showing only the escalation policies whose names contain the query.",
"type": "string"
}, {
"name": "user_ids[]",
"in": "query",
"description": "Filters the results, showing only escalation policies on which any of the users is a target.",
"type": "array",
"collectionFormat": "multi",
"uniqueItems": true,
"items": {
"type": "string"
}
}, {
"$ref": "#/parameters/team_ids"
}, {
"$ref": "#/parameters/include_escalation_policy"
}, {
"$ref": "#/parameters/sort_by_escalation_policy"
}],
"responses": {
"200": {
"description": "A paginated array of escalation policy objects.",
"schema": {
"allOf": [{
"$ref": "#/definitions/Pagination"
}, {
"type": "object",
"properties": {
"escalation_policies": {
"type": "array",
"items": {
"$ref": "#/definitions/EscalationPolicy"
}
}
},
"required": ["escalation_policies"]
}]
},
"examples": {
"application/json": {
"escalation_policies": [{
"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",
"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"
}],
"description": null
}],
"limit": 25,
"offset": 0,
"more": false,
"total": null
}
}
},
"400": {
"$ref": "#/responses/ArgumentError"
},
"401": {
"$ref": "#/responses/Unauthorized"
},
"403": {
"$ref": "#/responses/Forbidden"
},
"429": {
"$ref": "#/responses/TooManyRequests"
}
}
},
"post": {
"tags": ["Escalation Policies"],
"description": "Creates a new escalation policy. There must be at least one existing escalation rule added to create a new escalation policy.",
"summary": "Create an escalation policy",
"parameters": [{
"$ref": "#/parameters/optional_from_header"
}, {
"name": "escalation_policy",
"in": "body",
"description": "The escalation policy to be created.",
"schema": {
"type": "object",
"properties": {
"escalation_policy": {
"$ref": "#/definitions/EscalationPolicy"
}
},
"required": ["escalation_policy"]
}
}],
"responses": {
"201": {
"description": "The escalation policy that was created.",
"schema": {
"type": "object",
"properties": {
"escalation_policy": {
"$ref": "#/definitions/EscalationPolicy"
}
},
"required": ["escalation_policy"]
},
"examples": {
"application/json": {
"escalation_policy": {
"id": "PT20YPA",
"type": "escalation_policy",
"summary": "Engineering Escalation Policy",
"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"
}],
"description": null
}
}
}
},
"400": {
"$ref": "#/responses/ArgumentError"
},
"401": {
"$ref": "#/responses/Unauthorized"
},
"402": {
"$ref": "#/responses/PaymentRequired"
},
"403": {
"$ref": "#/responses/Forbidden"
},
"429": {
"$ref": "#/responses/TooManyRequests"
}
}
}
},
"/escalation_policies/{id}": {
"x-description": "Manage an escalation policy.",
"get": {
"tags": ["Escalation Policies"],
"description": "Get information about an existing escalation policy and its rules.",
"summary": "Get an escalation policy",
"parameters": [{
"$ref": "#/parameters/id"
}, {
"$ref": "#/parameters/include_escalation_policy"
}],
"responses": {
"200": {
"description": "The escalation policy object.",
"schema": {
"type": "object",
"properties": {
"escalation_policy": {
"$ref": "#/definitions/EscalationPolicy"
}
},
"required": ["escalation_policy"]
},
"examples": {
"application/json": {
"escalation_policy": {
"id": "PT20YPA",
"type": "escalation_policy",
"summary": "Another Escalation Policy",
"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": "#/responses/Unauthorized"
},
"403": {
"$ref": "#/responses/Forbidden"
},
"404": {
"$ref": "#/responses/NotFound"
}
}
},
"delete": {
"tags": ["Escalation Policies"],
"description": "Deletes an existing escalation policy and rules. The escalation policy must not be in use by any services.",
"summary": "Delete an escalation policy",
"parameters": [{
"$ref": "#/parameters/id"
}],
"responses": {
"204": {
"description": "The escalation policy was deleted successfully."
},
"401": {
"$ref": "#/responses/Unauthorized"
},
"403": {
"$ref": "#/responses/Forbidden"
},
"404": {
"$ref": "#/responses/NotFound"
},
"429": {
"$ref": "#/responses/TooManyRequests"
}
}
},
"put": {
"tags": ["Escalation Policies"],
"description": "Updates an existing escalation policy and rules.",
"summary": "Update an escalation policy",
"parameters": [{
"name": "escalation_policy",
"in": "body",
"description": "The escalation policy to be updated.",
"schema": {
"type": "object",
"properties": {
"escalation_policy": {
"$ref": "#/definitions/EscalationPolicy"
}
},
"required": ["escalation_policy"]
}
}, {
"$ref": "#/parameters/id"
}],
"responses": {
"200": {
"description": "The escalation policy that was updated.",
"schema": {
"type": "object",
"properties": {
"escalation_policy": {
"$ref": "#/definitions/EscalationPolicy"
}
},
"required": ["escalation_policy"]
},
"examples": {
"application/json": {
"escalation_policy": {
"id": "PT20YPA",
"type": "escalation_policy",
"summary": "Another Escalation Policy",
"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": "#/responses/Unauthorized"
},
"402": {
"$ref": "#/responses/PaymentRequired"
},
"403": {
"$ref": "#/responses/Forbidden"
},
"404": {
"$ref": "#/responses/NotFound"
},
"429": {
"$ref": "#/responses/TooManyRequests"
}
}
}
},
"/escalation_policies/{id}/escalation_rules": {
"x-description": "List and manage rules for an escalation policy."
},
"/escalation_policies/{id}/escalation_rules/{escalation_rule_id}": {
"x-description": "Manage a rule for an escalation policy."
},
"/incidents": {
"x-description": "List and update incidents.",
"get": {
"tags": ["Incidents"],
"description": "List existing incidents.",
"summary": "List incidents",
"parameters": [{
"$ref": "#/parameters/since"
}, {
"$ref": "#/parameters/until"
}, {
"$ref": "#/parameters/date_range"
}, {
"name": "statuses[]",
"in": "query",
"description": "Return only incidents with the given statuses. (More status codes may be introduced in the future.)",
"type": "array",
"collectionFormat": "multi",
"uniqueItems": true,
"items": {
"type": "string"
},
"enum": ["triggered", "acknowledged", "resolved"]
}, {
"$ref": "#/parameters/incident_key"
}, {
"$ref": "#/parameters/incident_services"
}, {
"$ref": "#/parameters/team_ids"
}, {
"$ref": "#/parameters/incident_assigned_to_user"
}, {
"$ref": "#/parameters/incident_urgencies"
}, {
"$ref": "#/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_on/resolved_on/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.",
"collectionFormat": "csv",
"type": "array",
"uniqueItems": true,
"maxItems": 2,
"items": {
"type": "string"
}
}, {
"name": "include[]",
"in": "query",
"description": "Array of additional details to include.",
"type": "array",
"collectionFormat": "multi",
"uniqueItems": true,
"items": {
"type": "string"
},
"enum": ["users", "services", "first_trigger_log_entries", "escalation_policies", "teams", "assignees", "acknowledgers"]
}],
"responses": {
"200": {
"description": "A paginated array of incidents.",
"schema": {
"allOf": [{
"$ref": "#/definitions/Pagination"
}, {
"type": "object",
"properties": {
"incidents": {
"type": "array",
"items": {
"$ref": "#/definitions/Incident"
}
}
},
"required": ["incidents"]
}]
},
"examples": {
"application/json": {
"incidents": [{
"id": "PT4KHLK",
"type": "incident",
"summary": "The server is on fire.",
"self": "https://api.pagerduty.com/incidents/PT4KHLK",
"html_url": "https://subdomain.pagerduty.com/incidents/PT4KHLK",
"incident_number": 1234,
"created_at": "2015-10-06T21:30:42Z",
"status": "resolved",
"pending_actions": [{
"type": "unacknowledge",
"at": "2015-11-10T01:02:52Z"
}, {
"type": "resolve",
"at": "2015-11-10T04:31:52Z"
}],
"incident_key": "baf7cf21b1da41b4b0221008339ff357",
"service": {
"id": "PIJ90N7",
"type": "generic_email",
"summary": "My Mail Service",
"self": "https://api.pagerduty.com/services/PIJ90N7",
"html_url": "https://subdomain.pagerduty.com/services/PIJ90N7"
},
"assignments": [{
"at": "2015-11-10T00:31:52Z",
"assignee": {
"id": "PXPGF42",
"type": "user_reference",
"summary": "Earline Greenholt",
"self": "https://api.pagerduty.com/users/PXPGF42",
"html_url": "https://subdomain.pagerduty.com/users/PXPGF42"
}
}],
"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"
}],
"limit": 1,
"offset": 0,
"total": null,
"more": true
}
}
},
"400": {
"$ref": "#/responses/ArgumentError"
},
"401": {
"$ref": "#/responses/Unauthorized"
},
"402": {
"$ref": "#/responses/PaymentRequired"
},
"403": {
"$ref": "#/responses/Forbidden"
},
"429": {
"$ref": "#/responses/TooManyRequests"
}
}
},
"put": {
"tags": ["Incidents"],
"description": "Acknowledge, resolve, escalate or reassign one or more incidents.",
"summary": "Manage incidents",
"parameters": [{
"$ref": "#/parameters/from_header"
}, {
"name": "payload",
"in": "body",
"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."
},
"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": "#/definitions/UserReference",
"description": "User that was assigned."
}
}
}
},
"escalation_policy": {
"$ref": "#/definitions/EscalationPolicyReference",
"description": "Delegate this incident to the specified escalation policy. This restarts the incident's escalation following the new policy."
}
},
"required": ["id", "type"]
}
}
},
"required": ["incidents"],
"example": {
"incidents": [{
"id": "PT4KHLK",
"type": "incident_reference",
"status": "acknowledged"
}, {
"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.",
"schema": {
"allOf": [{
"$ref": "#/definitions/Pagination"
}, {
"type": "object",
"properties": {
"incidents": {
"type": "array",
"items": {
"$ref": "#/definitions/Incident"
}
}
},
"required": ["incidents"]
}]
},
"examples": {
"application/json": {
"incidents": [{
"id": "PT4KHLK",
"type": "incident",
"summary": "The server is on fire.",
"self": "https://api.pagerduty.com/incidents/PT4KHLK",
"html_url": "https://subdomain.pagerduty.com/incidents/PT4KHLK",
"incident_number": 1234,
"created_at": "2015-10-06T21:30:42Z",
"status": "resolved",
"pending_actions": [{
"type": "unacknowledge",
"at": "2015-11-10T01:02:52Z"
}, {
"type": "resolve",
"at": "2015-11-10T04:31:52Z"
}],
"incident_key": "baf7cf21b1da41b4b0221008339ff357",
"service": {
"id": "PIJ90N7",
"type": "generic_email",
"summary": "My Mail Service",
"self": "https://api.pagerduty.com/services/PIJ90N7",
"html_url": "https://subdomain.pagerduty.com/services/PIJ90N7"
},
"assignments": [{
"at": "2015-11-10T00:31:52Z",
"assignee": {
"id": "PXPGF42",
"type": "user_reference",
"summary": "Earline Greenholt",
"self": "https://api.pagerduty.com/users/PXPGF42",
"html_url": "https://subdomain.pagerduty.com/users/PXPGF42"
}
}],
"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": "#/responses/ArgumentError"
},
"401": {
"$ref": "#/responses/Unauthorized"
},
"403": {
"$ref": "#/responses/Forbidden"
},
"429": {
"$ref": "#/responses/TooManyRequests"
}
}
}
},
"/incidents/count": {
"x-description": "Get a count of incidents matching a set of criteria such as service, status, and time. Counts may be fetched per status."
},
"/incidents/{id}": {
"x-description": "Get an incident.",
"get": {
"tags": ["Incidents"],
"description": "Show detailed information about an incident. Accepts either an incident id, or an incident number.",
"summary": "Get an incident",
"parameters": [{
"name": "id",
"in": "path",
"description": "Either the id or number of the incident to retrieve.",
"type": "string",
"required": true
}],
"responses": {
"200": {
"description": "The incident requested.",
"schema": {
"type": "object",
"properties": {
"incident": {
"$ref": "#/definitions/Incident"
}
},
"required": ["incident"]
},
"examples": {
"application/json": {
"incident": {
"id": "PT4KHLK",
"type": "incident",
"summary": "The server is on fire.",
"self": "https://api.pagerduty.com/incidents/PT4KHLK",
"html_url": "https://subdomain.pagerduty.com/incidents/PT4KHLK",
"incident_number": 1234,
"created_at": "2015-10-06T21:30:42Z",
"status": "resolved",
"pending_actions": [{
"type": "unacknowledge",
"at": "2015-11-10T01:02:52Z"
}, {
"type": "resolve",
"at": "2015-11-10T04:31:52Z"
}],
"incident_key": "baf7cf21b1da41b4b0221008339ff357",
"service": {
"id": "PIJ90N7",
"type": "generic_email_reference",
"summary": "My Mail Service",
"self": "https://api.pagerduty.com/services/PIJ90N7",
"html_url": "https://subdomain.pagerduty.com/services/PIJ90N7"
},
"assignments": [{
"at": "2015-11-10T00:31:52Z",
"assignee": {
"id": "PXPGF42",
"type": "user_reference",
"summary": "Earline Greenholt",
"self": "https://api.pagerduty.com/users/PXPGF42",
"html_url": "https://subdomain.pagerduty.com/users/PXPGF42"
}
}],
"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": "#/responses/ArgumentError"
},
"401": {
"$ref": "#/responses/Unauthorized"
},
"403": {
"$ref": "#/responses/Forbidden"
},
"404": {
"$ref": "#/responses/NotFound"
},
"429": {
"$ref": "#/responses/TooManyRequests"
}
}
},
"put": {
"tags": ["Incidents"],
"description": "Acknowledge, resolve, escalate or reassign an incident.",
"summary": "Update an incident",
"parameters": [{
"name": "id",
"in": "path",
"description": "The id of the incident to update.",
"type": "string",
"required": true
}, {
"$ref": "#/parameters/from_header"
}, {
"name": "payload",
"in": "body",
"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"]
},
"resolution": {
"type": "string",
"description": "The resolution for this incident if status is set to resolved."
},
"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": "#/definitions/UserReference",
"description": "User that was assigned."
}
}
}
},
"escalation_policy": {
"$ref": "#/definitions/EscalationPolicyReference",
"description": "Delegate this incident to the specified escalation policy. This restarts the incident's escalation following the new policy."
}
},
"required": ["type"]
}
},
"required": ["incident"],
"example": {
"incident": {
"type": "incident_reference",
"status": "acknowledged"
}
}
}
}],
"responses": {
"200": {
"description": "The incident was updated.",
"schema": {
"allOf": [{
"type": "object",
"properties": {
"incident": {
"type": "object",
"$ref": "#/definitions/Incident"
}
},
"required": ["incident"]
}]
},
"examples": {
"application/json": {
"incident": {
"id": "PT4KHLK",
"type": "incident",
"summary": "The server is on fire.",
"self": "https://api.pagerduty.com/incidents/PT4KHLK",
"html_url": "https://subdomain.pagerduty.com/incidents/PT4KHLK",
"incident_number": 1234,
"created_at": "2015-10-06T21:30:42Z",
"status": "resolved",
"pending_actions": [{
"type": "unacknowledge",
"at": "2015-11-10T01:02:52Z"
}, {
"type": "resolve",
"at": "2015-11-10T04:31:52Z"
}],
"incident_key": "baf7cf21b1da41b4b0221008339ff357",
"service": {
"id": "PIJ90N7",
"type": "generic_email",
"summary": "My Mail Service",
"self": "https://api.pagerduty.com/services/PIJ90N7",
"html_url": "https://subdomain.pagerduty.com/services/PIJ90N7"
},
"assignments": [{
"at": "2015-11-10T00:31:52Z",
"assignee": {
"id": "PXPGF42",
"type": "user_reference",
"summary": "Earline Greenholt",
"self": "https://api.pagerduty.com/users/PXPGF42",
"html_url": "https://subdomain.pagerduty.com/users/PXPGF42"
}
}],
"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": "#/responses/Unauthorized"
},
"403": {
"$ref": "#/responses/Forbidden"
},
"404": {
"$ref": "#/responses/NotFound"
},
"429": {
"$ref": "#/responses/TooManyRequests"
}
}
}
},
"/incidents/{id}/log_entries": {
"x-description": "List incident log entries for an incident.",
"get": {
"tags": ["Incidents"],
"description": "List log entries for the specified incident.",
"summary": "List log entries for the incident",
"parameters": [{
"$ref": "#/parameters/id"
}, {
"$ref": "#/parameters/time_zone"
}, {
"$ref": "#/parameters/log_entry_is_overview"
}, {
"$ref": "#/parameters/include_log_entry"
}],
"responses": {
"200": {
"description": "A paginated array of the incident's log entries.",
"schema": {
"allOf": [{
"$ref": "#/definitions/Pagination"
}, {
"type": "object",
"properties": {
"log_entries": {
"type": "array",
"items": {
"$ref": "#/definitions/LogEntry"
}
}
},
"required": ["log_entries"]
}]
},
"examples": {
"application/json": {
"log_entries": {
"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": "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": "#/responses/ArgumentError"
},
"401": {
"$ref": "#/responses/Unauthorized"
},
"403": {
"$ref": "#/responses/Forbidden"
},
"404": {
"$ref": "#/responses/NotFound"
},
"429": {
"$ref": "#/responses/TooManyRequests"
}
}
}
},
"/incidents/{id}/grouped_log_entries": {
"x-description": "List grouped incident log entries for an incident."
},
"/incidents/{id}/notes": {
"x-description": "List and create incident notes.",
"get": {
"tags": ["Incidents"],
"description": "List existing notes for the specified incident.",
"summary": "List existing notes for the specified incident",
"parameters": [{
"$ref": "#/parameters/id"
}],
"responses": {
"200": {
"description": "An array of notes.",
"schema": {
"type": "object",
"properties": {
"notes": {
"type": "array",
"items": {
"$ref": "#/definitions/IncidentNote"
}
}
},
"required": ["notes"]
},
"examples": {
"application/json": {
"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": "#/responses/ArgumentError"
},
"401": {
"$ref": "#/responses/Unauthorized"
},
"403": {
"$ref": "#/responses/Forbidden"
},
"404": {
"$ref": "#/responses/NotFound"
},
"429": {
"$ref": "#/responses/TooManyRequests"
}
}
},
"post": {
"tags": ["Incidents"],
"description": "Create a new note for the specified incident.",
"summary": "Create a new note for the specified incident",
"parameters": [{
"$ref": "#/parameters/id"
}, {
"$ref": "#/parameters/from_header"
}, {
"name": "payload",
"in": "body",
"schema": {
"type": "object",
"properties": {
"note": {
"$ref": "#/definitions/IncidentNote"
}
},
"required": ["note"]
}
}],
"responses": {
"200": {
"description": "The new note.",
"schema": {
"type": "object",
"properties": {
"note": {
"$ref": "#/definitions/IncidentNote"
}
},
"required": ["note"]
},
"examples": {
"application/json": {
"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": "#/responses/ArgumentError"
},
"401": {
"$ref": "#/responses/Unauthorized"
},
"403": {
"$ref": "#/responses/Forbidden"
},
"404": {
"$ref": "#/responses/NotFound"
},
"429": {
"$ref": "#/responses/TooManyRequests"
}
}
}
},
"/incidents/{id}/snooze": {
"x-description": "\"Snooze\" an incident. This suspends the acknowledgement timeout and auto-resolution for a given amount of time.",
"post": {
"tags": ["Incidents"],
"description": "Snooze an incident.",
"summary": "Snooze an incident",
"parameters": [{
"$ref": "#/parameters/id"
}, {
"$ref": "#/parameters/from_header"
}, {
"name": "payload",
"in": "body",
"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"],
"example": {
"duration": 3600
}
}
}],
"responses": {
"201": {
"description": "The incident that was successfully snoozed.",
"schema": {
"type": "object",
"properties": {
"incident": {
"$ref": "#/definitions/Incident"
}
},
"required": ["incident"]
},
"examples": {
"application/json": {
"incident": {
"id": "PT4KHLK",
"type": "incident",
"summary": "The server is on fire.",
"self": "https://api.pagerduty.com/incidents/PT4KHLK",
"html_url": "https://subdomain.pagerduty.com/incidents/PT4KHLK",
"incident_number": 1234,
"created_at": "2015-10-06T21:30:42Z",
"status": "resolved",
"pending_actions": [{
"type": "unacknowledge",
"at": "2015-11-10T01:02:52Z"
}, {
"type": "resolve",
"at": "2015-11-10T04:31:52Z"
}],
"incident_key": "baf7cf21b1da41b4b0221008339ff357",
"service": {
"id": "PIJ90N7",
"type": "generic_email",
"summary": "My Mail Service",
"self": "https://api.pagerduty.com/services/PIJ90N7",
"html_url": "https://subdomain.pagerduty.com/services/PIJ90N7"
},
"assignments": [{
"at": "2015-11-10T00:31:52Z",
"assignee": {
"id": "PXPGF42",
"type": "user_reference",
"summary": "Earline Greenholt",
"self": "https://api.pagerduty.com/users/PXPGF42",
"html_url": "https://subdomain.pagerduty.com/users/PXPGF42"
}
}],
"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": "#/responses/ArgumentError"
},
"401": {
"$ref": "#/responses/Unauthorized"
},
"403": {
"$ref": "#/responses/Forbidden"
},
"404": {
"$ref": "#/responses/NotFound"
},
"429": {
"$ref": "#/responses/TooManyRequests"
}
}
}
},
"/log_entries": {
"x-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"],
"description": "List all of the incident log entries across the entire account.",
"summary": "List log entries",
"parameters": [{
"$ref": "#/parameters/time_zone"
}, {
"$ref": "#/parameters/since"
}, {
"$ref": "#/parameters/until"
}, {
"$ref": "#/parameters/log_entry_is_overview"
}, {
"$ref": "#/parameters/include_log_entry"
}],
"responses": {
"200": {
"description": "A paginated array of log entries.",
"schema": {
"allOf": [{
"$ref": "#/definitions/Pagination"
}, {
"type": "object",
"properties": {
"log_entries": {
"type": "array",
"items": {
"$ref": "#/definitions/LogEntry"
}
}
},
"required": ["log_entries"]
}]
},
"examples": {
"application/json": {
"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": "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,
"total": null,
"more": true
}
}
},
"400": {
"$ref": "#/responses/ArgumentError"
},
"401": {
"$ref": "#/responses/Unauthorized"
},
"403": {
"$ref": "#/responses/Forbidden"
},
"429": {
"$ref": "#/responses/TooManyRequests"
}
}
}
},
"/log_entries/{id}": {
"x-description": "Get a single log entry by ID.",
"get": {
"tags": ["Log Entries"],
"description": "Get details for a specific incident log entry. This method provides additional information you can use to get at raw event data.",
"summary": "Get a log entry",
"parameters": [{
"$ref": "#/parameters/time_zone"
}, {
"$ref": "#/parameters/id"
}, {
"$ref": "#/parameters/include_log_entry"
}],
"responses": {
"200": {
"description": "A single log entry.",
"schema": {
"type": "object",
"properties": {
"log_entry": {
"$ref": "#/definitions/LogEntry"
}
},
"required": ["log_entry"]
},
"examples": {
"application/json": {
"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": "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": "#/responses/ArgumentError"
},
"401": {
"$ref": "#/responses/Unauthorized"
},
"403": {
"$ref": "#/responses/Forbidden"
},
"404": {
"$ref": "#/responses/NotFound"
},
"429": {
"$ref": "#/responses/TooManyRequests"
}
}
}
},
"/maintenance_windows": {
"x-description": "List and create maintenance windows.",
"get": {
"tags": ["Maintenance Windows"],
"description": "List existing maintenance windows, optionally filtered by service and/or team, or whether they are from the past, present or future.",
"summary": "List maintenance windows",
"parameters": [{
"$ref": "#/parameters/team_ids"
}, {
"$ref": "#/parameters/services"
}, {
"$ref": "#/parameters/include_maintenance_window"
}, {
"name": "filter",
"in": "query",
"description": "Only return maintenance windows in a given state.",
"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.",
"type": "string"
}],
"responses": {
"200": {
"description": "A paginated array of maintenance windows.",
"schema": {
"allOf": [{
"$ref": "#/definitions/Pagination"
}, {
"type": "object",
"properties": {
"maintenance_windows": {
"type": "array",
"items": {
"$ref": "#/definitions/MaintenanceWindow"
}
}
},
"required": ["maintenance_windows"]
}]
},
"examples": {
"application/json": {
"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,
"total": null,
"more": false
}
}
},
"400": {
"$ref": "#/responses/ArgumentError"
},
"401": {
"$ref": "#/responses/Unauthorized"
},
"403": {
"$ref": "#/responses/Forbidden"
},
"429": {
"$ref": "#/responses/TooManyRequests"
}
}
},
"post": {
"tags": ["Maintenance Windows"],
"description": "Create a new maintenance window for the specified services. No new incidents will be created for a service that is in maintenance.",
"summary": "Create a maintenance window",
"parameters": [{
"$ref": "#/parameters/from_header"
}, {
"name": "maintenance_window",
"in": "body",
"description": "The maintenance window object.",
"schema": {
"type": "object",
"properties": {
"maintenance_window": {
"$ref": "#/definitions/MaintenanceWindow"
}
},
"required": ["maintenance_window"]
}
}],
"responses": {
"201": {
"description": "The maintenance window that was created.",
"schema": {
"type": "object",
"properties": {
"maintenance_window": {
"$ref": "#/definitions/MaintenanceWindow"
}
},
"required": ["maintenance_window"]
},
"examples": {
"application/json": {
"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": "#/responses/ArgumentError"
},
"401": {
"$ref": "#/responses/Unauthorized"
},
"403": {
"$ref": "#/responses/Forbidden"
},
"429": {
"$ref": "#/responses/TooManyRequests"
}
}
}
},
"/maintenance_windows/{id}": {
"x-description": "Manage a maintenance window.",
"get": {
"tags": ["Maintenance Windows"],
"description": "Get an existing maintenance window.",
"summary": "Get a maintenance window",
"parameters": [{
"$ref": "#/parameters/id"
}, {
"$ref": "#/parameters/include_maintenance_window"
}],
"responses": {
"200": {
"description": "The maintenance window that was updated.",
"schema": {
"type": "object",
"properties": {
"maintenance_window": {
"$ref": "#/definitions/MaintenanceWindow"
}
},
"required": ["maintenance_window"]
},
"examples": {
"application/json": {
"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": "#/responses/Unauthorized"
},
"403": {
"$ref": "#/responses/Forbidden"
},
"404": {
"$ref": "#/responses/NotFound"
},
"429": {
"$ref": "#/responses/TooManyRequests"
}
}
},
"delete": {
"tags": ["Maintenance Windows"],
"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.",
"summary": "Delete or end a maintenance window",
"parameters": [{
"$ref": "#/parameters/id"
}],
"responses": {
"204": {
"description": "The maintenance window was deleted successfully."
},
"401": {
"$ref": "#/responses/Unauthorized"
},
"403": {
"$ref": "#/responses/Forbidden"
},
"404": {
"$ref": "#/responses/NotFound"
},
"405": {
"description": "The maintenance window can't be deleted because it has already ended."
},
"429": {
"$ref": "#/responses/TooManyRequests"
}
}
},
"put": {
"tags": ["Maintenance Windows"],
"description": "Update an existing maintenance window.",
"summary": "Update a maintenance window",
"parameters": [{
"name": "maintenance_window",
"in": "body",
"description": "The maintenance window to be updated.",
"schema": {
"type": "object",
"properties": {
"maintenance_window": {
"$ref": "#/definitions/MaintenanceWindow"
}
},
"required": ["maintenance_window"]
}
}, {
"$ref": "#/parameters/id"
}],
"responses": {
"200": {
"description": "The maintenance window that was updated.",
"schema": {
"type": "object",
"properties": {
"maintenance_window": {
"$ref": "#/definitions/MaintenanceWindow"
}
},
"required": ["maintenance_window"]
},
"examples": {
"application/json": {
"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": "#/responses/ArgumentError"
},
"401": {
"$ref": "#/responses/Unauthorized"
},
"403": {
"$ref": "#/responses/Forbidden"
},
"404": {
"$ref": "#/responses/NotFound"
},
"429": {
"$ref": "#/responses/TooManyRequests"
}
}
}
},
"/notifications": {
"x-description": "List notifications that have been delivered to responders.",
"get": {
"tags": ["Notifications"],
"description": "List notifications for a given time range, optionally filtered by type (sms_notification, email_notification, phone_notification, or push_notification).",
"summary": "List notifications",
"parameters": [{
"$ref": "#/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.",
"type": "string",
"required": true,
"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.",
"type": "string",
"required": true,
"format": "date-time"
}, {
"name": "filter",
"in": "query",
"description": "Return notification of this type only.",
"type": "string",
"enum": ["sms_notification", "email_notification", "phone_notification", "push_notification"]
}, {
"name": "include[]",
"in": "query",
"description": "Array of additional details to include.",
"type": "array",
"collectionFormat": "multi",
"uniqueItems": true,
"items": {
"type": "string"
},
"enum": ["users"]
}],
"responses": {
"200": {
"description": "A paginated array of notifications.",
"schema": {
"allOf": [{
"$ref": "#/definitions/Pagination"
}, {
"type": "object",
"properties": {
"notifications": {
"type": "array",
"items": {
"$ref": "#/definitions/Notification"
}
}
},
"required": ["notifications"]
}]
},
"examples": {
"application/json": {
"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",
"address": null,
"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,
"total": null,
"more": false
}
}
},
"400": {
"$ref": "#/responses/ArgumentError"
},
"401": {
"$ref": "#/responses/Unauthorized"
},
"403": {
"$ref": "#/responses/Forbidden"
},
"429": {
"$ref": "#/responses/TooManyRequests"
}
}
}
},
"/oncalls": {
"x-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"],
"description": "List the on-call entries during a given time range.",
"summary": "List all of the on-calls",
"parameters": [{
"$ref": "#/parameters/time_zone"
}, {
"name": "include[]",
"in": "query",
"description": "Array of additional details to include.",
"type": "array",
"collectionFormat": "multi",
"uniqueItems": true,
"items": {
"type": "string"
},
"enum": ["escalation_policies", "users", "schedules"]
}, {
"name": "user_ids[]",
"in": "query",
"type": "array",
"uniqueItems": true,
"description": "Filters the results, showing only on-calls for the specified user IDs.",
"collectionFormat": "multi",
"items": {
"type": "string"
}
}, {
"name": "escalation_policy_ids[]",
"in": "query",
"type": "array",
"uniqueItems": true,
"description": "Filters the results, showing only on-calls for the specified escalation policy IDs.",
"collectionFormat": "multi",
"items": {
"type": "string"
}
}, {
"name": "schedule_ids[]",
"in": "query",
"type": "array",
"uniqueItems": true,
"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.",
"collectionFormat": "multi",
"items": {
"type": "string"
}
}, {
"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.",
"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.",
"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.",
"type": "boolean"
}],
"responses": {
"200": {
"description": "A paginated array of on-call objects.",
"schema": {
"allOf": [{
"$ref": "#/definitions/Pagination"
}, {
"type": "object",
"properties": {
"oncalls": {
"type": "array",
"items": {
"$ref": "#/definitions/Oncall"
}
}
},
"required": ["oncalls"]
}]
},
"examples": {
"application/json": {
"oncalls": [{
"user": {
"id": "PT23IWX",
"type": "user_reference",
"summary": "Tim Wright",
"self": "https://api.pagerduty.com/users/PT23IWX",
"html_url": "https://subdomain.pagerduty.com/users/PT23IWX"
},
"schedule": {
"id": "PI7DH85",
"type": "schedule_reference",
"summary": "Daily Engineering Rotation",
"self": "https://api.pagerduty.com/schedules/PI7DH85",
"html_url": "https://subdomain.pagerduty.com/schedules/PI7DH85"
},
"escalation_policy": {
"id": "PT20YPA",
"type": "escalation_policy_reference",
"summary": "Engineering Escalation Policy",
"self": "https://api.pagerduty.com/escalation_policies/PT20YPA",
"html_url": "https://subdomain.pagerduty.com/escalation_policies/PT20YPA"
},
"escalation_level": 2,
"start": "2015-03-06T15:28:51-05:00",
"end": "2015-03-07T15:28:51-05:00"
}],
"limit": 25,
"offset": 0,
"more": false,
"total": null
}
}
},
"400": {
"$ref": "#/responses/ArgumentError"
},
"401": {
"$ref": "#/responses/Unauthorized"
},
"403": {
"$ref": "#/responses/Forbidden"
},
"429": {
"$ref": "#/responses/TooManyRequests"
}
}
}
},
"/schedules": {
"x-description": "List and create on-call schedules.",
"get": {
"tags": ["Schedules"],
"description": "List the on-call schedules.",
"summary": "List schedules",
"parameters": [{
"name": "query",
"in": "query",
"description": "Filters the result, showing only the schedules whose name matches the query.",
"type": "string"
}],
"responses": {
"200": {
"description": "A paginated array of schedule objects.",
"schema": {
"allOf": [{
"$ref": "#/definitions/Pagination"
}, {
"type": "object",
"properties": {
"schedules": {
"type": "array",
"items": {
"$ref": "#/definitions/Schedule"
}
}
},
"required": ["schedules"]
}]
},
"examples": {
"application/json": {
"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"
}]
}],
"limit": 100,
"offset": 0,
"total": null,
"more": false
}
}
},
"400": {
"$ref": "#/responses/ArgumentError"
},
"401": {
"$ref": "#/responses/Unauthorized"
},
"403": {
"$ref": "#/responses/Forbidden"
},
"429": {
"$ref": "#/responses/TooManyRequests"
}
}
},
"post": {
"tags": ["Schedules"],
"description": "Create a new on-call schedule.",
"summary": "Create a schedule",
"parameters": [{
"$ref": "#/parameters/schedule_overflow"
}, {
"name": "schedule",
"in": "body",
"description": "The schedule to be created.",
"schema": {
"type": "object",
"properties": {
"schedule": {
"$ref": "#/definitions/Schedule"
}
},
"required": ["schedule"]
}
}],
"responses": {
"201": {
"description": "The schedule object created.",
"schema": {
"type": "object",
"properties": {
"schedule": {
"$ref": "#/definitions/Schedule"
}
},
"required": ["schedule"]
},
"examples": {
"application/json": {
"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"
}],
"schedule_layers": [{
"name": "Layer 1",
"rendered_schedule_entries": [],
"rendered_coverage_percentage": null,
"id": "PG68P1M",
"start": "2015-11-06T20:00:00-05:00",
"end": null,
"rotation_virtual_start": "2015-11-06T20:00:00-05:00",
"rotation_turn_length_seconds": 86400,
"users": [{
"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": [],
"rendered_coverage_percentage": null
},
"final_schedule": {
"name": "Final Schedule",
"rendered_schedule_entries": [],
"rendered_coverage_percentage": null
}
}
}
}
},
"400": {
"$ref": "#/responses/ArgumentError"
},
"401": {
"$ref": "#/responses/Unauthorized"
},
"403": {
"$ref": "#/responses/Forbidden"
},
"429": {
"$ref": "#/responses/TooManyRequests"
}
}
}
},
"/schedules/preview": {
"x-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"],
"description": "Preview what an on-call schedule would look like without saving it.",
"summary": "Preview a schedule",
"parameters": [{
"$ref": "#/parameters/since"
}, {
"$ref": "#/parameters/until"
}, {
"$ref": "#/parameters/schedule_overflow"
}, {
"name": "schedule",
"in": "body",
"description": "The schedule to be previewed.",
"schema": {
"type": "object",
"properties": {
"schedule": {
"$ref": "#/definitions/Schedule"
}
},
"required": ["schedule"]
}
}],
"responses": {
"200": {
"description": "What the schedule will look like if posted.",
"schema": {
"type": "object",
"properties": {
"schedule": {
"$ref": "#/definitions/Schedule"
}
},
"required": ["schedule"]
},
"examples": {
"application/json": {
"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"
}],
"schedule_layers": [{
"name": "Layer 1",
"rendered_schedule_entries": [],
"rendered_coverage_percentage": null,
"id": "PG68P1M",
"start": "2015-11-06T20:00:00-05:00",
"end": null,
"rotation_virtual_start": "2015-11-06T20:00:00-05:00",
"rotation_turn_length_seconds": 86400,
"users": [{
"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": [],
"rendered_coverage_percentage": null
},
"final_schedule": {
"name": "Final Schedule",
"rendered_schedule_entries": [],
"rendered_coverage_percentage": null
}
}
}
}
},
"400": {
"$ref": "#/responses/ArgumentError"
},
"401": {
"$ref": "#/responses/Unauthorized"
},
"403": {
"$ref": "#/responses/Forbidden"
},
"429": {
"$ref": "#/responses/TooManyRequests"
}
}
}
},
"/schedules/{id}": {
"x-description": "Manage an on-call schedule.",
"get": {
"tags": ["Schedules"],
"description": "Show detailed information about a schedule, including entries for each layer and sub-schedule.",
"summary": "Get a schedule",
"parameters": [{
"$ref": "#/parameters/time_zone"
}, {
"$ref": "#/parameters/since"
}, {
"$ref": "#/parameters/until"
}, {
"$ref": "#/parameters/id"
}],
"responses": {
"200": {
"description": "The schedule object.",
"schema": {
"type": "object",
"properties": {
"schedule": {
"$ref": "#/definitions/Schedule"
}
},
"required": ["schedule"]
},
"examples": {
"application/json": {
"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"
}],
"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",
"end": null,
"rotation_virtual_start": "2015-11-06T20:00:00-05:00",
"rotation_turn_length_seconds": 86400,
"users": [{
"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": "#/responses/ArgumentError"
},
"401": {
"$ref": "#/responses/Unauthorized"
},
"403": {
"$ref": "#/responses/Forbidden"
},
"404": {
"$ref": "#/responses/NotFound"
},
"429": {
"$ref": "#/responses/TooManyRequests"
}
}
},
"delete": {
"tags": ["Schedules"],
"description": "Delete an on-call schedule.",
"summary": "Delete a schedule",
"parameters": [{
"$ref": "#/parameters/id"
}],
"responses": {
"204": {
"description": "The schedule was deleted successfully."
},
"400": {
"$ref": "#/responses/ArgumentError"
},
"401": {
"$ref": "#/responses/Unauthorized"
},
"403": {
"$ref": "#/responses/Forbidden"
},
"404": {
"$ref": "#/responses/NotFound"
},
"429": {
"$ref": "#/responses/TooManyRequests"
}
}
},
"put": {
"tags": ["Schedules"],
"description": "Update an existing on-call schedule.",
"summary": "Update a schedule",
"parameters": [{
"$ref": "#/parameters/id"
}, {
"$ref": "#/parameters/schedule_overflow"
}, {
"name": "schedule",
"in": "body",
"description": "The schedule to be updated.",
"schema": {
"type": "object",
"properties": {
"schedule": {
"$ref": "#/definitions/Schedule"
}
},
"required": ["schedule"]
}
}],
"responses": {
"200": {
"description": "The updated schedule.",
"schema": {
"type": "object",
"properties": {
"schedule": {
"$ref": "#/definitions/Schedule"
}
},
"required": ["schedule"]
},
"examples": {
"application/json": {
"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"
}],
"schedule_layers": [{
"name": "Layer 1",
"rendered_schedule_entries": [],
"rendered_coverage_percentage": null,
"id": "PG68P1M",
"start": "2015-11-06T20:00:00-05:00",
"end": null,
"rotation_virtual_start": "2015-11-06T20:00:00-05:00",
"rotation_turn_length_seconds": 86400,
"users": [{
"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": [],
"rendered_coverage_percentage": null
},
"final_schedule": {
"name": "Final Schedule",
"rendered_schedule_entries": [],
"rendered_coverage_percentage": null
}
}
}
}
},
"400": {
"$ref": "#/responses/ArgumentError"
},
"401": {
"$ref": "#/responses/Unauthorized"
},
"403": {
"$ref": "#/responses/Forbidden"
},
"404": {
"$ref": "#/responses/NotFound"
},
"429": {
"$ref": "#/responses/TooManyRequests"
}
}
}
},
"/schedules/{id}/overrides": {
"x-description": "List and create schedule overrides.",
"get": {
"tags": ["Schedules"],
"description": "List overrides for a given time range.",
"summary": "List overrides",
"parameters": [{
"$ref": "#/parameters/id"
}, {
"name": "since",
"in": "query",
"description": "The start of the date range over which you want to search.",
"type": "string",
"format": "date-time",
"required": true
}, {
"name": "until",
"in": "query",
"description": "The end of the date range over which you want to search.",
"type": "string",
"format": "date-time",
"required": true
}, {
"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.",
"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.",
"type": "boolean"
}],
"responses": {
"200": {
"description": "The collection of override objects returned by the query.",
"schema": {
"type": "object",
"properties": {
"overrides": {
"type": "array",
"items": {
"$ref": "#/definitions/Override"
}
}
},
"required": ["overrides"]
},
"examples": {
"application/json": {
"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://acme.pagerduty.com/api/v1/users/PEYSGVF",
"html_url": "https://acme.pagerduty.com/users/PEYSGVF"
}
}]
}
}
},
"400": {
"$ref": "#/responses/ArgumentError"
},
"401": {
"$ref": "#/responses/Unauthorized"
},
"403": {
"$ref": "#/responses/Forbidden"
},
"404": {
"$ref": "#/responses/NotFound"
},
"429": {
"$ref": "#/responses/TooManyRequests"
}
}
},
"post": {
"tags": ["Schedules"],
"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.",
"summary": "Create an override",
"parameters": [{
"$ref": "#/parameters/id"
}, {
"name": "override",
"in": "body",
"description": "The override to be created",
"required": true,
"schema": {
"type": "object",
"properties": {
"override": {
"$ref": "#/definitions/Override"
}
},
"required": ["override"]
}
}],
"responses": {
"201": {
"description": "The override that was created.",
"schema": {
"type": "object",
"properties": {
"override": {
"$ref": "#/definitions/Override"
}
},
"required": ["override"]
},
"examples": {
"application/json": {
"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://acme.pagerduty.com/api/v1/users/PEYSGVF",
"html_url": "https://acme.pagerduty.com/users/PEYSGVF"
}
}
}
}
},
"400": {
"$ref": "#/responses/ArgumentError"
},
"401": {
"$ref": "#/responses/Unauthorized"
},
"403": {
"$ref": "#/responses/Forbidden"
},
"404": {
"$ref": "#/responses/NotFound"
},
"429": {
"$ref": "#/responses/TooManyRequests"
}
}
}
},
"/schedules/{id}/overrides/{override_id}": {
"x-description": "Delete a schedule override.",
"delete": {
"tags": ["Schedules"],
"description": "Remove an override. You cannot remove a past override. If 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. If the override is truncated, the status code will be 200 OK, as opposed to a 204 No Content for a successful delete.",
"summary": "Delete an override",
"parameters": [{
"$ref": "#/parameters/id"
}, {
"$ref": "#/parameters/schedule_override_id"
}],
"responses": {
"200": {
"description": "The override was truncated."
},
"204": {
"description": "The override was deleted successfully."
},
"401": {
"$ref": "#/responses/Unauthorized"
},
"403": {
"$ref": "#/responses/Forbidden"
},
"404": {
"$ref": "#/responses/NotFound"
},
"429": {
"$ref": "#/responses/TooManyRequests"
}
}
}
},
"/schedules/{id}/users": {
"x-description": "List the users on call for a given schedule.",
"get": {
"tags": ["Schedules"],
"description": "List all of the users on call in a given schedule for a given time range.",
"summary": "List users on call",
"parameters": [{
"$ref": "#/parameters/id"
}, {
"$ref": "#/parameters/since"
}, {
"$ref": "#/parameters/until"
}],
"responses": {
"200": {
"description": "The users on the given schedule.",
"schema": {
"type": "object",
"properties": {
"users": {
"type": "array",
"readOnly": true,
"items": {
"$ref": "#/definitions/User"
}
}
},
"required": ["users"]
},
"examples": {
"application/json": {
"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",
"label": "Work",
"address": "126_dvm_kyler_kuhn@beahan.name",
"type": "email_contact_method",
"send_short_email": true
}],
"notification_rules": [{
"id": "P6EJ1EE",
"start_delay_in_minutes": 0,
"created_at": "2015-12-11T23:38:11.000Z",
"contact_method": {
"id": "PVMGSML",
"label": "Work",
"address": "126_dvm_kyler_kuhn@beahan.name",
"type": "email_contact_method",
"send_short_email": true
},
"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",
"label": "Default",
"address": "125.greenholt.earline@graham.name",
"type": "email_contact_method",
"send_short_email": false
}],
"notification_rules": [{
"id": "P8GRWKK",
"start_delay_in_minutes": 0,
"created_at": "2015-12-11T23:38:11.000Z",
"contact_method": {
"id": "PTDVERC",
"label": "Default",
"address": "125.greenholt.earline@graham.name",
"type": "email_contact_method",
"send_short_email": false
},
"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": "#/responses/ArgumentError"
},
"401": {
"$ref": "#/responses/Unauthorized"
},
"403": {
"$ref": "#/responses/Forbidden"
},
"404": {
"$ref": "#/responses/NotFound"
},
"429": {
"$ref": "#/responses/TooManyRequests"
}
}
}
},
"/services": {
"x-description": "List and create services.",
"get": {
"tags": ["Services"],
"description": "List existing services.",
"summary": "List services",
"parameters": [{
"$ref": "#/parameters/team_ids"
}, {
"$ref": "#/parameters/time_zone"
}, {
"$ref": "#/parameters/sort_by_service"
}, {
"name": "query",
"in": "query",
"description": "Filters the result, showing only the services whose name or service_key matches the query.",
"type": "string"
}, {
"name": "include[]",
"in": "query",
"description": "Array of additional details to include.",
"type": "array",
"collectionFormat": "multi",
"uniqueItems": true,
"items": {
"type": "string"
},
"enum": ["escalation_policies", "teams", "integrations"]
}],
"responses": {
"200": {
"description": "A paginated array of services.",
"schema": {
"allOf": [{
"$ref": "#/definitions/Pagination"
}, {
"type": "object",
"properties": {
"services": {
"type": "array",
"items": {
"$ref": "#/definitions/Service"
}
}
},
"required": ["services"]
}]
},
"examples": {
"application/json": {
"services": [{
"id": "PIJ90N7",
"summary": "My Application Service",
"self": "https://api.pagerduty.com/services/PIJ90N7",
"html_url": "https://subdomain.pagerduty.com/services/PIJ90N7",
"name": "My Application Service",
"description": null,
"auto_resolve_timeout": 14400,
"acknowledgement_timeout": 600,
"created_at": "2015-11-06T11:12:51-05:00",
"status": "active",
"last_incident_timestamp": null,
"integrations": [{
"id": "PQ12345",
"type": "generic_email_inbound_integration_reference",
"summary": "Email Integration",
"self": "https://api.pagerduty.com/services/PIJ90N7/integrations/PQ12345",
"html_url": "https://subdomain.pagerduty.com/services/PIJ90N7/integrations/PQ12345"
}],
"escalation_policy": {
"id": "PT20YPA",
"type": "escalation_policy_reference",
"summary": "Another Escalation Policy",
"self": "https://api.pagerduty.com/escalation_policies/PT20YPA",
"html_url": "https://subdomain.pagerduty.com/escalation_policies/PT20YPA"
},
"teams": [{
"id": "PQ9K7I8",
"type": "team_reference",
"summary": "Engineering",
"self": "https://api.pagerduty.com/teams/PQ9K7I8",
"html_url": "https://subdomain.pagerduty.com/teams/PQ9K7I8"
}],
"incident_urgency_rule": {
"type": "use_support_hours",
"during_support_hours": {
"type": "constant",
"urgency": "high"
},
"outside_support_hours": {
"type": "constant",
"urgency": "low"
}
},
"support_hours": {
"type": "fixed_time_per_day",
"time_zone": "America/Lima",
"start_time": "09:00:00",
"end_time": "17:00:00",
"days_of_week": [1, 2, 3, 4, 5]
},
"scheduled_actions": [{
"type": "urgency_change",
"at": {
"type": "named_time",
"name": "support_hours_start"
},
"to_urgency": "high"
}]
}],
"limit": 25,
"offset": 0,
"total": null,
"more": false
}
}
},
"400": {
"$ref": "#/responses/ArgumentError"
},
"401": {
"$ref": "#/responses/Unauthorized"
},
"403": {
"$ref": "#/responses/Forbidden"
}
}
},
"post": {
"tags": ["Services"],
"description": "Create a new service.",
"summary": "Create a service",
"parameters": [{
"name": "service",
"in": "body",
"description": "The service to be created",
"schema": {
"type": "object",
"properties": {
"service": {
"$ref": "#/definitions/Service"
}
},
"required": ["service"]
}
}],
"responses": {
"201": {
"description": "The service that was created",
"schema": {
"type": "object",
"properties": {
"service": {
"$ref": "#/definitions/Service"
}
},
"required": ["service"]
},
"examples": {
"application/json": {
"service": {
"id": "PIJ90N7",
"summary": "My Application Service",
"self": "https://api.pagerduty.com/services/PIJ90N7",
"html_url": "https://subdomain.pagerduty.com/services/PIJ90N7",
"name": "My Application Service",
"description": null,
"auto_resolve_timeout": 14400,
"acknowledgement_timeout": 600,
"created_at": "2015-11-06T11:12:51-05:00",
"status": "active",
"last_incident_timestamp": null,
"integrations": [{
"id": "PQ12345",
"type": "generic_email_inbound_integration_reference",
"summary": "Email Integration",
"self": "https://api.pagerduty.com/services/PIJ90N7/integrations/PQ12345",
"html_url": "https://subdomain.pagerduty.com/services/PIJ90N7/integrations/PQ12345"
}],
"escalation_policy": {
"id": "PT20YPA",
"type": "escalation_policy_reference",
"summary": "Another Escalation Policy",
"self": "https://api.pagerduty.com/escalation_policies/PT20YPA",
"html_url": "https://subdomain.pagerduty.com/escalation_policies/PT20YPA"
},
"teams": [{
"id": "PQ9K7I8",
"type": "team_reference",
"summary": "Engineering",
"self": "https://api.pagerduty.com/teams/PQ9K7I8",
"html_url": "https://subdomain.pagerduty.com/teams/PQ9K7I8"
}],
"incident_urgency_rule": {
"type": "use_support_hours",
"during_support_hours": {
"type": "constant",
"urgency": "high"
},
"outside_support_hours": {
"type": "constant",
"urgency": "low"
}
},
"support_hours": {
"type": "fixed_time_per_day",
"time_zone": "America/Lima",
"start_time": "09:00:00",
"end_time": "17:00:00",
"days_of_week": [1, 2, 3, 4, 5]
},
"scheduled_actions": [{
"type": "urgency_change",
"at": {
"type": "named_time",
"name": "support_hours_start"
},
"to_urgency": "high"
}]
}
}
}
},
"400": {
"$ref": "#/responses/ArgumentError"
},
"401": {
"$ref": "#/responses/Unauthorized"
},
"402": {
"$ref": "#/responses/PaymentRequired"
},
"403": {
"$ref": "#/responses/Forbidden"
}
}
}
},
"/services/{id}": {
"x-description": "Manage a service.",
"get": {
"tags": ["Services"],
"description": "Get details about an existing service.",
"summary": "Get a service",
"parameters": [{
"$ref": "#/parameters/id"
}, {
"name": "include[]",
"in": "query",
"description": "Array of additional details to include.",
"type": "array",
"collectionFormat": "multi",
"uniqueItems": true,
"items": {
"type": "string"
},
"enum": ["escalation_policies", "teams"]
}],
"responses": {
"200": {
"description": "The service requested.",
"schema": {
"type": "object",
"properties": {
"service": {
"$ref": "#/definitions/Service"
}
},
"required": ["service"]
},
"examples": {
"application/json": {
"service": {
"id": "PIJ90N7",
"summary": "My Application Service",
"self": "https://api.pagerduty.com/services/PIJ90N7",
"html_url": "https://subdomain.pagerduty.com/services/PIJ90N7",
"name": "My Application Service",
"description": null,
"auto_resolve_timeout": 14400,
"acknowledgement_timeout": 600,
"created_at": "2015-11-06T11:12:51-05:00",
"status": "active",
"last_incident_timestamp": null,
"integrations": [{
"id": "PQ12345",
"type": "generic_email_inbound_integration_reference",
"summary": "Email Integration",
"self": "https://api.pagerduty.com/services/PIJ90N7/integrations/PQ12345",
"html_url": "https://subdomain.pagerduty.com/services/PIJ90N7/integrations/PQ12345"
}],
"escalation_policy": {
"id": "PT20YPA",
"type": "escalation_policy_reference",
"summary": "Another Escalation Policy",
"self": "https://api.pagerduty.com/escalation_policies/PT20YPA",
"html_url": "https://subdomain.pagerduty.com/escalation_policies/PT20YPA"
},
"teams": [{
"id": "PQ9K7I8",
"type": "team_reference",
"summary": "Engineering",
"self": "https://api.pagerduty.com/teams/PQ9K7I8",
"html_url": "https://subdomain.pagerduty.com/teams/PQ9K7I8"
}],
"incident_urgency_rule": {
"type": "use_support_hours",
"during_support_hours": {
"type": "constant",
"urgency": "high"
},
"outside_support_hours": {
"type": "constant",
"urgency": "low"
}
},
"support_hours": {
"type": "fixed_time_per_day",
"time_zone": "America/Lima",
"start_time": "09:00:00",
"end_time": "17:00:00",
"days_of_week": [1, 2, 3, 4, 5]
},
"scheduled_actions": [{
"type": "urgency_change",
"at": {
"type": "named_time",
"name": "support_hours_start"
},
"to_urgency": "high"
}]
}
}
}
},
"400": {
"$ref": "#/responses/ArgumentError"
},
"401": {
"$ref": "#/responses/Unauthorized"
},
"403": {
"$ref": "#/responses/Forbidden"
},
"404": {
"$ref": "#/responses/NotFound"
}
}
},
"delete": {
"tags": ["Services"],
"description": "Delete an existing service. Once 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.",
"summary": "Delete a service",
"parameters": [{
"$ref": "#/parameters/id"
}],
"responses": {
"204": {
"description": "The service was deleted successfully."
},
"401": {
"$ref": "#/responses/Unauthorized"
},
"403": {
"$ref": "#/responses/Forbidden"
}
}
},
"put": {
"tags": ["Services"],
"description": "Update an existing service.",
"summary": "Update a service",
"parameters": [{
"name": "service",
"in": "body",
"description": "The service to be updated.",
"schema": {
"type": "object",
"properties": {
"service": {
"$ref": "#/definitions/Service"
}
},
"required": ["service"]
}
}, {
"$ref": "#/parameters/id"
}],
"responses": {
"200": {
"description": "The service that was updated.",
"schema": {
"type": "object",
"properties": {
"service": {
"$ref": "#/definitions/Service"
}
},
"required": ["service"]
},
"examples": {
"application/json": {
"service": {
"id": "PIJ90N7",
"summary": "My Application Service",
"self": "https://api.pagerduty.com/services/PIJ90N7",
"html_url": "https://subdomain.pagerduty.com/services/PIJ90N7",
"name": "My Application Service",
"description": null,
"auto_resolve_timeout": 14400,
"acknowledgement_timeout": 600,
"created_at": "2015-11-06T11:12:51-05:00",
"status": "active",
"last_incident_timestamp": null,
"integrations": [{
"id": "PQ12345",
"type": "generic_email_inbound_integration_reference",
"summary": "Email Integration",
"self": "https://api.pagerduty.com/services/PIJ90N7/integrations/PQ12345",
"html_url": "https://subdomain.pagerduty.com/services/PIJ90N7/integrations/PQ12345"
}],
"escalation_policy": {
"id": "PT20YPA",
"type": "escalation_policy_reference",
"summary": "Another Escalation Policy",
"self": "https://api.pagerduty.com/escalation_policies/PT20YPA",
"html_url": "https://subdomain.pagerduty.com/escalation_policies/PT20YPA"
},
"teams": [{
"id": "PQ9K7I8",
"type": "team_reference",
"summary": "Engineering",
"self": "https://api.pagerduty.com/teams/PQ9K7I8",
"html_url": "https://subdomain.pagerduty.com/teams/PQ9K7I8"
}],
"incident_urgency_rule": {
"type": "use_support_hours",
"during_support_hours": {
"type": "constant",
"urgency": "high"
},
"outside_support_hours": {
"type": "constant",
"urgency": "low"
}
},
"support_hours": {
"type": "fixed_time_per_day",
"time_zone": "America/Lima",
"start_time": "09:00:00",
"end_time": "17:00:00",
"days_of_week": [1, 2, 3, 4, 5]
},
"scheduled_actions": [{
"type": "urgency_change",
"at": {
"type": "named_time",
"name": "support_hours_start"
},
"to_urgency": "high"
}]
}
}
}
},
"401": {
"$ref": "#/responses/Unauthorized"
},
"402": {
"$ref": "#/responses/PaymentRequired"
},
"403": {
"$ref": "#/responses/Forbidden"
},
"404": {
"$ref": "#/responses/NotFound"
}
}
}
},
"/services/{id}/integrations": {
"x-description": "Create integrations belonging to a service.",
"post": {
"tags": ["Services"],
"summary": "Create a new integration",
"description": "Create a new integration belonging to a service.",
"parameters": [{
"name": "integration",
"in": "body",
"description": "The integration to be created",
"schema": {
"type": "object",
"properties": {
"integration": {
"$ref": "#/definitions/Integration"
}
},
"required": ["integration"]
}
}, {
"$ref": "#/parameters/id"
}],
"responses": {
"201": {
"description": "The integration that was created.",
"schema": {
"type": "object",
"properties": {
"integration": {
"$ref": "#/definitions/Integration"
}
},
"required": ["integration"]
},
"examples": {
"application/json": {
"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": null,
"integration_email": "my-email-based-integration@subdomain.pagerduty.com"
}
}
}
},
"400": {
"$ref": "#/responses/ArgumentError"
},
"401": {
"$ref": "#/responses/Unauthorized"
},
"403": {
"$ref": "#/responses/Forbidden"
},
"429": {
"$ref": "#/responses/TooManyRequests"
}
}
}
},
"/services/{id}/integrations/{integration_id}": {
"x-description": "View or update integrations belonging to a service.",
"put": {
"tags": ["Services"],
"summary": "Update an existing integration",
"description": "Update an integration belonging to a service.",
"parameters": [{
"name": "integration",
"in": "body",
"description": "The integration to be updated",
"schema": {
"type": "object",
"properties": {
"integration": {
"$ref": "#/definitions/Integration"
}
},
"required": ["integration"]
}
}, {
"$ref": "#/parameters/id"
}, {
"$ref": "#/parameters/integration_id"
}],
"responses": {
"200": {
"description": "The integration that was updated.",
"schema": {
"type": "object",
"properties": {
"integration": {
"$ref": "#/definitions/Integration"
}
},
"required": ["integration"]
},
"examples": {
"application/json": {
"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": null,
"integration_email": "my-email-based-integration@subdomain.pagerduty.com"
}
}
}
},
"400": {
"$ref": "#/responses/ArgumentError"
},
"401": {
"$ref": "#/responses/Unauthorized"
},
"403": {
"$ref": "#/responses/Forbidden"
},
"404": {
"$ref": "#/responses/NotFound"
},
"429": {
"$ref": "#/responses/TooManyRequests"
}
}
},
"get": {
"tags": ["Services"],
"summary": "View an integration",
"description": "Get details about an integration belonging to a service.",
"parameters": [{
"$ref": "#/parameters/id"
}, {
"$ref": "#/parameters/integration_id"
}, {
"name": "include[]",
"in": "query",
"description": "Array of additional details to include.",
"type": "array",
"collectionFormat": "multi",
"uniqueItems": true,
"items": {
"type": "string"
},
"enum": ["services", "vendors"]
}],
"responses": {
"200": {
"description": "The integration that was requested.",
"schema": {
"type": "object",
"properties": {
"integration": {
"$ref": "#/definitions/Integration"
}
},
"required": ["integration"]
},
"examples": {
"application/json": {
"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",
"html_url": null
},
"integration_email": "my-email-based-integration@subdomain.pagerduty.com"
}
}
}
},
"401": {
"$ref": "#/responses/Unauthorized"
},
"403": {
"$ref": "#/responses/Forbidden"
},
"404": {
"$ref": "#/responses/NotFound"
},
"429": {
"$ref": "#/responses/TooManyRequests"
}
}
}
},
"/services/{id}/integrations/{integration_id}/regenerate_key": {
"x-description": "Regenerate the integration key for an integration."
},
"/teams": {
"x-description": "List or create teams.",
"post": {
"tags": ["Teams"],
"description": "Create a new team.",
"summary": "Create a team",
"parameters": [{
"name": "team",
"in": "body",
"description": "The team to be created.",
"schema": {
"type": "object",
"properties": {
"team": {
"$ref": "#/definitions/Team"
}
},
"required": ["team"]
}
}],
"responses": {
"201": {
"description": "The team that was created.",
"schema": {
"type": "object",
"properties": {
"team": {
"$ref": "#/definitions/Team"
}
},
"required": ["team"]
},
"examples": {
"application/json": {
"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"
}
}
}
},
"400": {
"$ref": "#/responses/ArgumentError"
},
"401": {
"$ref": "#/responses/Unauthorized"
},
"402": {
"$ref": "#/responses/PaymentRequired"
},
"403": {
"$ref": "#/responses/Forbidden"
},
"429": {
"$ref": "#/responses/TooManyRequests"
}
}
},
"get": {
"tags": ["Teams"],
"description": "List teams of your PagerDuty account, optionally filtered by a search query.",
"summary": "List teams",
"parameters": [{
"name": "query",
"in": "query",
"description": "Filters the result, showing only the teams whose names or email addresses match the query.",
"type": "string"
}],
"responses": {
"200": {
"description": "A paginated array of teams.",
"schema": {
"allOf": [{
"$ref": "#/definitions/Pagination"
}, {
"type": "object",
"properties": {
"teams": {
"type": "array",
"items": {
"$ref": "#/definitions/Team"
}
}
},
"required": ["teams"]
}]
},
"examples": {
"application/json": {
"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,
"total": null,
"more": false
}
}
},
"400": {
"$ref": "#/responses/ArgumentError"
},
"401": {
"$ref": "#/responses/Unauthorized"
},
"402": {
"$ref": "#/responses/PaymentRequired"
},
"403": {
"$ref": "#/responses/Forbidden"
},
"429": {
"$ref": "#/responses/TooManyRequests"
}
}
}
},
"/teams/{id}": {
"x-description": "Manage a team.",
"get": {
"tags": ["Teams"],
"description": "Get details about an existing team.",
"summary": "Get a team",
"parameters": [{
"$ref": "#/parameters/id"
}],
"responses": {
"200": {
"description": "The team requested.",
"schema": {
"type": "object",
"properties": {
"team": {
"$ref": "#/definitions/Team"
}
},
"required": ["team"]
},
"examples": {
"application/json": {
"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"
}
}
}
},
"400": {
"$ref": "#/responses/ArgumentError"
},
"401": {
"$ref": "#/responses/Unauthorized"
},
"402": {
"$ref": "#/responses/PaymentRequired"
},
"403": {
"$ref": "#/responses/Forbidden"
},
"404": {
"$ref": "#/responses/NotFound"
},
"429": {
"$ref": "#/responses/TooManyRequests"
}
}
},
"delete": {
"tags": ["Teams"],
"description": "Remove an existing team.",
"summary": "Delete a team",
"parameters": [{
"$ref": "#/parameters/id"
}],
"responses": {
"204": {
"description": "The team was deleted successfully."
},
"401": {
"$ref": "#/responses/Unauthorized"
},
"402": {
"$ref": "#/responses/PaymentRequired"
},
"403": {
"$ref": "#/responses/Forbidden"
},
"429": {
"$ref": "#/responses/TooManyRequests"
}
}
},
"put": {
"tags": ["Teams"],
"description": "Update an existing team.",
"summary": "Update a team",
"parameters": [{
"name": "team",
"in": "body",
"description": "The team to be updated.",
"schema": {
"type": "object",
"properties": {
"team": {
"$ref": "#/definitions/Team"
}
},
"required": ["team"]
}
}, {
"$ref": "#/parameters/id"
}],
"responses": {
"200": {
"description": "The team that was updated.",
"schema": {
"type": "object",
"properties": {
"team": {
"$ref": "#/definitions/Team"
}
},
"required": ["team"]
},
"examples": {
"application/json": {
"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"
}
}
}
},
"401": {
"$ref": "#/responses/Unauthorized"
},
"402": {
"$ref": "#/responses/PaymentRequired"
},
"403": {
"$ref": "#/responses/Forbidden"
},
"404": {
"$ref": "#/responses/NotFound"
},
"429": {
"$ref": "#/responses/TooManyRequests"
}
}
}
},
"/teams/{id}/escalation_policies/{escalation_policy_id}": {
"x-description": "Manage an escalation policy for a team.",
"delete": {
"tags": ["Teams"],
"description": "Remove an escalation policy from a team.",
"summary": "Remove an escalation policy from a team",
"parameters": [{
"$ref": "#/parameters/id"
}, {
"$ref": "#/parameters/team_escalation_policy_id"
}],
"responses": {
"204": {
"description": "The escalation policy was removed from the team."
},
"400": {
"$ref": "#/responses/ArgumentError"
},
"401": {
"$ref": "#/responses/Unauthorized"
},
"402": {
"$ref": "#/responses/PaymentRequired"
},
"403": {
"$ref": "#/responses/Forbidden"
},
"404": {
"$ref": "#/responses/NotFound"
},
"429": {
"$ref": "#/responses/TooManyRequests"
}
}
},
"put": {
"tags": ["Teams"],
"description": "Add an escalation policy to a team.",
"summary": "Add an escalation policy to a team",
"parameters": [{
"$ref": "#/parameters/id"
}, {
"$ref": "#/parameters/team_escalation_policy_id"
}],
"responses": {
"204": {
"description": "The escalation policy was added to the team."
},
"400": {
"$ref": "#/responses/ArgumentError"
},
"401": {
"$ref": "#/responses/Unauthorized"
},
"402": {
"$ref": "#/responses/PaymentRequired"
},
"403": {
"$ref": "#/responses/Forbidden"
},
"404": {
"$ref": "#/responses/NotFound"
},
"429": {
"$ref": "#/responses/TooManyRequests"
}
}
}
},
"/teams/{id}/users/{user_id}": {
"x-description": "Manage team memberships.",
"delete": {
"tags": ["Teams"],
"description": "Remove a user from a team.",
"summary": "Remove a user from a team",
"parameters": [{
"$ref": "#/parameters/id"
}, {
"$ref": "#/parameters/team_user_id"
}],
"responses": {
"204": {
"description": "The user was removed to the team."
},
"400": {
"$ref": "#/responses/ArgumentError"
},
"401": {
"$ref": "#/responses/Unauthorized"
},
"402": {
"$ref": "#/responses/PaymentRequired"
},
"403": {
"$ref": "#/responses/Forbidden"
},
"404": {
"$ref": "#/responses/NotFound"
},
"429": {
"$ref": "#/responses/TooManyRequests"
}
}
},
"put": {
"tags": ["Teams"],
"description": "Add a user to a team.",
"summary": "Add a user to a team",
"parameters": [{
"$ref": "#/parameters/id"
}, {
"$ref": "#/parameters/team_user_id"
}],
"responses": {
"204": {
"description": "The user was added to the team."
},
"401": {
"$ref": "#/responses/Unauthorized"
},
"402": {
"$ref": "#/responses/PaymentRequired"
},
"403": {
"$ref": "#/responses/Forbidden"
},
"404": {
"$ref": "#/responses/NotFound"
},
"429": {
"$ref": "#/responses/TooManyRequests"
}
}
}
},
"/users": {
"x-description": "List and create users.",
"get": {
"tags": ["Users"],
"description": "List users of your PagerDuty account, optionally filtered by a search query.",
"summary": "List users",
"parameters": [{
"name": "query",
"in": "query",
"description": "Filters the result, showing only the users whose names or email addresses match the query.",
"type": "string"
}, {
"$ref": "#/parameters/team_ids"
}, {
"$ref": "#/parameters/include_user"
}],
"responses": {
"200": {
"description": "A paginated array of users.",
"schema": {
"allOf": [{
"$ref": "#/definitions/Pagination"
}, {
"type": "object",
"properties": {
"users": {
"type": "array",
"items": {
"$ref": "#/definitions/User"
}
}
},
"required": ["users"]
}]
},
"examples": {
"application/json": {
"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",
"label": "Default",
"address": "125.greenholt.earline@graham.name",
"type": "email_contact_method",
"send_short_email": false
}],
"notification_rules": [{
"id": "P8GRWKK",
"start_delay_in_minutes": 0,
"created_at": "2015-12-11T23:38:11.000Z",
"contact_method": {
"id": "PTDVERC",
"label": "Default",
"address": "125.greenholt.earline@graham.name",
"type": "email_contact_method",
"send_short_email": false
},
"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",
"label": "Work",
"address": "126_dvm_kyler_kuhn@beahan.name",
"type": "email_contact_method",
"send_short_email": true
}],
"notification_rules": [{
"id": "P6EJ1EE",
"start_delay_in_minutes": 0,
"created_at": "2015-12-11T23:38:11.000Z",
"contact_method": {
"id": "PVMGSML",
"label": "Work",
"address": "126_dvm_kyler_kuhn@beahan.name",
"type": "email_contact_method",
"send_short_email": true
},
"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,
"total": null,
"more": false
}
}
},
"400": {
"$ref": "#/responses/ArgumentError"
},
"401": {
"$ref": "#/responses/Unauthorized"
},
"403": {
"$ref": "#/responses/Forbidden"
},
"429": {
"$ref": "#/responses/TooManyRequests"
}
}
},
"post": {
"tags": ["Users"],
"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.",
"summary": "Create a user",
"parameters": [{
"$ref": "#/parameters/from_header"
}, {
"name": "user",
"in": "body",
"description": "The user to be created.",
"schema": {
"type": "object",
"properties": {
"user": {
"$ref": "#/definitions/User"
}
},
"required": ["user"]
}
}],
"responses": {
"201": {
"description": "The user that was created.",
"schema": {
"type": "object",
"properties": {
"user": {
"$ref": "#/definitions/User"
}
},
"required": ["user"]
},
"examples": {
"application/json": {
"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",
"label": "Default",
"address": "125.greenholt.earline@graham.name",
"type": "email_contact_method",
"send_short_email": false
}],
"notification_rules": [{
"id": "P8GRWKK",
"start_delay_in_minutes": 0,
"created_at": "2015-12-11T23:38:11.000Z",
"contact_method": {
"id": "PTDVERC",
"label": "Default",
"address": "125.greenholt.earline@graham.name",
"type": "email_contact_method",
"send_short_email": false
},
"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": "#/responses/ArgumentError"
},
"401": {
"$ref": "#/responses/Unauthorized"
},
"402": {
"$ref": "#/responses/PaymentRequired"
},
"403": {
"$ref": "#/responses/Forbidden"
},
"429": {
"$ref": "#/responses/TooManyRequests"
}
}
}
},
"/users/{id}": {
"x-description": "Manage a user.",
"get": {
"tags": ["Users"],
"description": "Get details about an existing user.",
"summary": "Get a user",
"parameters": [{
"$ref": "#/parameters/id"
}, {
"$ref": "#/parameters/include_user"
}],
"responses": {
"200": {
"description": "The user requested.",
"schema": {
"type": "object",
"properties": {
"user": {
"$ref": "#/definitions/User"
}
},
"required": ["user"]
},
"examples": {
"application/json": {
"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",
"label": "Default",
"address": "125.greenholt.earline@graham.name",
"type": "email_contact_method",
"send_short_email": false
}],
"notification_rules": [{
"id": "P8GRWKK",
"start_delay_in_minutes": 0,
"created_at": "2015-12-11T23:38:11.000Z",
"contact_method": {
"id": "PTDVERC",
"label": "Default",
"address": "125.greenholt.earline@graham.name",
"type": "email_contact_method",
"send_short_email": false
},
"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": "#/responses/ArgumentError"
},
"401": {
"$ref": "#/responses/Unauthorized"
},
"403": {
"$ref": "#/responses/Forbidden"
},
"404": {
"$ref": "#/responses/NotFound"
},
"429": {
"$ref": "#/responses/TooManyRequests"
}
}
},
"delete": {
"tags": ["Users"],
"description": "Remove an existing user.",
"summary": "Delete a user",
"parameters": [{
"$ref": "#/parameters/id"
}],
"responses": {
"204": {
"description": "The user was deleted successfully."
},
"401": {
"$ref": "#/responses/Unauthorized"
},
"403": {
"$ref": "#/responses/Forbidden"
},
"404": {
"$ref": "#/responses/NotFound"
},
"429": {
"$ref": "#/responses/TooManyRequests"
}
}
},
"put": {
"tags": ["Users"],
"description": "Update an existing user. Note that you may also supply a `password` property--it will not be returned by any API.",
"summary": "Update a user",
"parameters": [{
"name": "user",
"in": "body",
"description": "The user to be updated.",
"schema": {
"type": "object",
"properties": {
"user": {
"$ref": "#/definitions/User"
}
},
"required": ["user"]
}
}, {
"$ref": "#/parameters/id"
}],
"responses": {
"200": {
"description": "The user that was updated.",
"schema": {
"type": "object",
"properties": {
"user": {
"$ref": "#/definitions/User"
}
},
"required": ["user"]
},
"examples": {
"application/json": {
"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",
"label": "Default",
"address": "125.greenholt.earline@graham.name",
"type": "email_contact_method",
"send_short_email": false
}],
"notification_rules": [{
"id": "P8GRWKK",
"start_delay_in_minutes": 0,
"created_at": "2015-12-11T23:38:11.000Z",
"contact_method": {
"id": "PTDVERC",
"label": "Default",
"address": "125.greenholt.earline@graham.name",
"type": "email_contact_method",
"send_short_email": false
},
"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": "#/responses/ArgumentError"
},
"401": {
"$ref": "#/responses/Unauthorized"
},
"402": {
"$ref": "#/responses/PaymentRequired"
},
"403": {
"$ref": "#/responses/Forbidden"
},
"404": {
"$ref": "#/responses/NotFound"
},
"429": {
"$ref": "#/responses/TooManyRequests"
}
}
}
},
"/users/{id}/resend_invite": {
"x-description": "Resend an invitation to a user. Clients may need this if the invitation was lost, or to remind a user to join."
},
"/users/{id}/contact_methods": {
"x-description": "List a user's contact methods.",
"get": {
"tags": ["Users"],
"description": "List contact methods of your PagerDuty user.",
"summary": "List a user's contact methods",
"parameters": [{
"$ref": "#/parameters/id"
}],
"responses": {
"200": {
"description": "A list of contact methods.",
"schema": {
"type": "object",
"properties": {
"contact_methods": {
"type": "array",
"items": {
"$ref": "#/definitions/ContactMethod"
}
}
},
"required": ["contact_methods"]
},
"examples": {
"application/json": {
"contact_methods": [{
"id": "PXPGF42",
"type": "contact_method",
"summary": "Work",
"self": "https://api.pagerduty.com/users/PXPGF42/contact_method/PXPGF42",
"html_url": null,
"label": "Work",
"address": "grady.haylie.126@hickle.net",
"send_short_email": false
}]
}
}
},
"400": {
"$ref": "#/responses/ArgumentError"
},
"401": {
"$ref": "#/responses/Unauthorized"
},
"403": {
"$ref": "#/responses/Forbidden"
},
"429": {
"$ref": "#/responses/TooManyRequests"
}
}
},
"post": {
"tags": ["Users"],
"description": "Create a new contact method.",
"summary": "Create a user contact method",
"parameters": [{
"$ref": "#/parameters/id"
}, {
"name": "contact_method",
"in": "body",
"description": "The contact method to be created.",
"schema": {
"type": "object",
"properties": {
"contact_method": {
"$ref": "#/definitions/ContactMethod"
}
},
"required": ["contact_method"]
}
}],
"responses": {
"201": {
"description": "The contact method that was created.",
"schema": {
"type": "object",
"properties": {
"contact_method": {
"$ref": "#/definitions/ContactMethod"
}
},
"required": ["contact_method"]
},
"examples": {
"application/json": {
"contact_method": {
"id": "PXPGF42",
"type": "contact_method",
"summary": "Work",
"self": "https://api.pagerduty.com/users/PXPGF42/contact_method/PXPGF42",
"html_url": null,
"label": "Work",
"address": "grady.haylie.126@hickle.net",
"send_short_email": false
}
}
}
},
"400": {
"$ref": "#/responses/ArgumentError"
},
"401": {
"$ref": "#/responses/Unauthorized"
},
"403": {
"$ref": "#/responses/Forbidden"
},
"429": {
"$ref": "#/responses/TooManyRequests"
}
}
}
},
"/users/{id}/contact_methods/{contact_method_id}": {
"x-description": "Manage a user's contact method.",
"get": {
"tags": ["Users"],
"description": "Get details about a user's contact method.",
"summary": "Get a user's contact method",
"parameters": [{
"$ref": "#/parameters/id"
}, {
"$ref": "#/parameters/user_contact_method_id"
}],
"responses": {
"200": {
"description": "The user's contact method requested.",
"schema": {
"type": "object",
"properties": {
"contact_method": {
"$ref": "#/definitions/ContactMethod"
}
},
"required": ["contact_method"]
},
"examples": {
"application/json": {
"contact_method": {
"id": "PXPGF42",
"type": "contact_method",
"summary": "Work",
"self": "https://api.pagerduty.com/users/PXPGF42/contact_method/PXPGF42",
"html_url": null,
"label": "Work",
"address": "grady.haylie.126@hickle.net",
"send_short_email": false
}
}
}
},
"400": {
"$ref": "#/responses/ArgumentError"
},
"401": {
"$ref": "#/responses/Unauthorized"
},
"403": {
"$ref": "#/responses/Forbidden"
},
"404": {
"$ref": "#/responses/NotFound"
},
"429": {
"$ref": "#/responses/TooManyRequests"
}
}
},
"delete": {
"tags": ["Users"],
"description": "Remove a user's contact method.",
"summary": "Delete a user's contact method",
"parameters": [{
"$ref": "#/parameters/id"
}, {
"$ref": "#/parameters/user_contact_method_id"
}],
"responses": {
"204": {
"description": "The contact method was deleted successfully."
},
"401": {
"$ref": "#/responses/Unauthorized"
},
"403": {
"$ref": "#/responses/Forbidden"
},
"404": {
"$ref": "#/responses/NotFound"
},
"429": {
"$ref": "#/responses/TooManyRequests"
}
}
},
"put": {
"tags": ["Users"],
"description": "Update a user's contact method.",
"summary": "Update a user's contact method",
"parameters": [{
"$ref": "#/parameters/id"
}, {
"$ref": "#/parameters/user_contact_method_id"
}, {
"name": "user",
"in": "body",
"description": "The user's contact method to be updated.",
"schema": {
"type": "object",
"properties": {
"contact_method": {
"$ref": "#/definitions/ContactMethod"
}
},
"required": ["contact_method"]
}
}],
"responses": {
"200": {
"description": "The user's contact method that was updated.",
"schema": {
"type": "object",
"properties": {
"contact_method": {
"$ref": "#/definitions/ContactMethod"
}
},
"required": ["contact_method"]
},
"examples": {
"application/json": {
"contact_method": {
"id": "PXPGF42",
"type": "contact_method",
"summary": "Work",
"self": "https://api.pagerduty.com/users/PXPGF42/contact_method/PXPGF42",
"html_url": null,
"label": "Work",
"address": "grady.haylie.126@hickle.net",
"send_short_email": false
}
}
}
},
"400": {
"$ref": "#/responses/ArgumentError"
},
"401": {
"$ref": "#/responses/Unauthorized"
},
"403": {
"$ref": "#/responses/Forbidden"
},
"404": {
"$ref": "#/responses/NotFound"
},
"429": {
"$ref": "#/responses/TooManyRequests"
}
}
}
},
"/users/{id}/notification_rules": {
"x-description": "List a user's notification rules.",
"get": {
"tags": ["Users"],
"description": "List notification rules of your PagerDuty user.",
"summary": "List a user's notification rules",
"parameters": [{
"$ref": "#/parameters/id"
}, {
"name": "include[]",
"in": "query",
"description": "Array of additional details to include.",
"type": "array",
"collectionFormat": "multi",
"uniqueItems": true,
"items": {
"type": "string"
},
"enum": ["contact_methods"]
}],
"responses": {
"200": {
"description": "A list of notification rules.",
"schema": {
"type": "object",
"properties": {
"notification_rules": {
"type": "array",
"items": {
"$ref": "#/definitions/NotificationRule"
}
}
},
"required": ["notification_rules"]
},
"examples": {
"application/json": {
"notification_rules": [{
"id": "PXPGF42",
"type": "assignment_notification_rule",
"summary": "Work",
"self": "https://api.pagerduty.com/users/PXPGF42/notification_rules/PPSCXAN",
"html_url": null,
"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",
"html_url": null
},
"created_at": "2016-02-01T16:06:27-05:00",
"urgency": "high"
}]
}
}
},
"400": {
"$ref": "#/responses/ArgumentError"
},
"401": {
"$ref": "#/responses/Unauthorized"
},
"403": {
"$ref": "#/responses/Forbidden"
},
"429": {
"$ref": "#/responses/TooManyRequests"
}
}
},
"post": {
"tags": ["Users"],
"description": "Create a new notification rule.",
"summary": "Create a user notification rule",
"parameters": [{
"$ref": "#/parameters/id"
}, {
"name": "notification_rule",
"in": "body",
"description": "The notification rule to be created.",
"schema": {
"type": "object",
"properties": {
"notification_rule": {
"$ref": "#/definitions/NotificationRule"
}
},
"required": ["notification_rule"]
}
}],
"responses": {
"201": {
"description": "The notification rule that was created.",
"schema": {
"type": "object",
"properties": {
"notification_rule": {
"$ref": "#/definitions/NotificationRule"
}
},
"required": ["notification_rule"]
},
"examples": {
"application/json": {
"notification_rule": {
"id": "PXPGF42",
"type": "assignment_notification_rule",
"summary": "Work",
"self": "https://api.pagerduty.com/users/PXPGF42/notification_rules/PPSCXAN",
"html_url": null,
"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",
"html_url": null
},
"created_at": "2016-02-01T16:06:27-05:00",
"urgency": "high"
}
}
}
},
"400": {
"$ref": "#/responses/ArgumentError"
},
"401": {
"$ref": "#/responses/Unauthorized"
},
"402": {
"$ref": "#/responses/PaymentRequired"
},
"403": {
"$ref": "#/responses/Forbidden"
},
"429": {
"$ref": "#/responses/TooManyRequests"
}
}
}
},
"/users/{id}/notification_rules/{notification_rule_id}": {
"x-description": "Manage a user's notification rule.",
"get": {
"tags": ["Users"],
"description": "Get details about a user's notification rule.",
"summary": "Get a user's notification rule",
"parameters": [{
"$ref": "#/parameters/id"
}, {
"$ref": "#/parameters/user_notification_rule_id"
}, {
"name": "include[]",
"in": "query",
"description": "Array of additional details to include.",
"type": "array",
"collectionFormat": "multi",
"uniqueItems": true,
"items": {
"type": "string"
},
"enum": ["contact_methods"]
}],
"responses": {
"200": {
"description": "The user's notification rule requested.",
"schema": {
"type": "object",
"properties": {
"notification_rule": {
"$ref": "#/definitions/NotificationRule"
}
},
"required": ["notification_rule"]
},
"examples": {
"application/json": {
"notification_rule": {
"id": "PXPGF42",
"type": "assignment_notification_rule",
"summary": "Work",
"self": "https://api.pagerduty.com/users/PXPGF42/notification_rules/PPSCXAN",
"html_url": null,
"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",
"html_url": null
},
"created_at": "2016-02-01T16:06:27-05:00",
"urgency": "high"
}
}
}
},
"400": {
"$ref": "#/responses/ArgumentError"
},
"401": {
"$ref": "#/responses/Unauthorized"
},
"403": {
"$ref": "#/responses/Forbidden"
},
"404": {
"$ref": "#/responses/NotFound"
},
"429": {
"$ref": "#/responses/TooManyRequests"
}
}
},
"delete": {
"tags": ["Users"],
"description": "Remove a user's notification rule.",
"summary": "Delete a user's notification rule",
"parameters": [{
"$ref": "#/parameters/id"
}, {
"$ref": "#/parameters/user_notification_rule_id"
}],
"responses": {
"204": {
"description": "The notification rule was deleted successfully."
},
"401": {
"$ref": "#/responses/Unauthorized"
},
"403": {
"$ref": "#/responses/Forbidden"
},
"404": {
"$ref": "#/responses/NotFound"
},
"429": {
"$ref": "#/responses/TooManyRequests"
}
}
},
"put": {
"tags": ["Users"],
"description": "Update a user's notification rule.",
"summary": "Update a user's notification rule",
"parameters": [{
"$ref": "#/parameters/id"
}, {
"$ref": "#/parameters/user_notification_rule_id"
}, {
"name": "notification_rule",
"in": "body",
"description": "The user's notification rule to be updated.",
"schema": {
"type": "object",
"properties": {
"notification_rule": {
"$ref": "#/definitions/NotificationRule"
}
},
"required": ["notification_rule"]
}
}],
"responses": {
"200": {
"description": "The user's notification rule that was updated.",
"schema": {
"type": "object",
"properties": {
"notification_rule": {
"$ref": "#/definitions/NotificationRule"
}
},
"required": ["notification_rule"]
},
"examples": {
"application/json": {
"notification_rule": {
"id": "PXPGF42",
"type": "assignment_notification_rule",
"summary": "Work",
"self": "https://api.pagerduty.com/users/PXPGF42/notification_rules/PPSCXAN",
"html_url": null,
"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",
"html_url": null
},
"created_at": "2016-02-01T16:06:27-05:00",
"urgency": "high"
}
}
}
},
"400": {
"$ref": "#/responses/ArgumentError"
},
"401": {
"$ref": "#/responses/Unauthorized"
},
"402": {
"$ref": "#/responses/PaymentRequired"
},
"403": {
"$ref": "#/responses/Forbidden"
},
"404": {
"$ref": "#/responses/NotFound"
},
"429": {
"$ref": "#/responses/TooManyRequests"
}
}
}
},
"/vendors": {
"x-description": "List vendors.",
"get": {
"tags": ["Vendors"],
"description": "List all vendors.",
"summary": "List vendors",
"responses": {
"200": {
"description": "A paginated array of vendors.",
"schema": {
"allOf": [{
"$ref": "#/definitions/Pagination"
}, {
"type": "object",
"properties": {
"vendors": {
"type": "array",
"items": {
"$ref": "#/definitions/Vendor"
}
}
},
"required": ["vendors"]
}]
},
"examples": {
"application/json": {
"vendors": [{
"id": "PZQ6AUS",
"type": "vendor",
"summary": "Amazon CloudWatch",
"self": "https://api.pagerduty.com/vendors/PZQ6AUS",
"html_url": null,
"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,
"total": null,
"more": false
}
}
},
"400": {
"$ref": "#/responses/ArgumentError"
},
"401": {
"$ref": "#/responses/Unauthorized"
},
"403": {
"$ref": "#/responses/Forbidden"
},
"429": {
"$ref": "#/responses/TooManyRequests"
}
}
}
},
"/vendors/{id}": {
"x-description": "Get details about one specific vendor.",
"get": {
"tags": ["Vendors"],
"description": "Get details about one specific vendor.",
"summary": "Get a vendor",
"parameters": [{
"$ref": "#/parameters/id"
}],
"responses": {
"200": {
"description": "The vendor requested",
"schema": {
"type": "object",
"properties": {
"vendor": {
"type": "array",
"items": {
"$ref": "#/definitions/Vendor"
}
}
},
"required": ["vendor"]
},
"examples": {
"application/json": {
"vendor": {
"id": "PZQ6AUS",
"type": "vendor",
"summary": "Amazon CloudWatch",
"self": "https://api.pagerduty.com/vendors/PZQ6AUS",
"html_url": null,
"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": "#/responses/ArgumentError"
},
"401": {
"$ref": "#/responses/Unauthorized"
},
"403": {
"$ref": "#/responses/Forbidden"
},
"404": {
"$ref": "#/responses/NotFound"
},
"429": {
"$ref": "#/responses/TooManyRequests"
}
}
}
}
},
"parameters": {
"id": {
"name": "id",
"type": "string",
"in": "path",
"required": true
},
"team_user_id": {
"name": "user_id",
"type": "string",
"in": "path",
"description": "The user ID on the team.",
"required": true
},
"team_escalation_policy_id": {
"name": "escalation_policy_id",
"type": "string",
"in": "path",
"description": "The escalation policy ID on the team.",
"required": true
},
"escalation_policy_escalation_rule_id": {
"name": "escalation_rule_id",
"type": "string",
"in": "path",
"description": "The escalation rule ID on the escalation policy.",
"required": true
},
"include_addon": {
"name": "include[]",
"in": "query",
"description": "Array of additional details to include.",
"type": "array",
"collectionFormat": "multi",
"uniqueItems": true,
"items": {
"type": "string"
},
"enum": ["services"]
},
"include_escalation_policy": {
"name": "include[]",
"in": "query",
"description": "Array of additional details to include.",
"type": "array",
"collectionFormat": "multi",
"uniqueItems": true,
"items": {
"type": "string"
},
"enum": ["services", "teams", "targets"]
},
"include_log_entry": {
"name": "include[]",
"in": "query",
"description": "Array of additional details to include.",
"type": "array",
"collectionFormat": "multi",
"uniqueItems": true,
"items": {
"type": "string"
},
"enum": ["incidents", "services", "channels", "teams"]
},
"include_user": {
"name": "include[]",
"in": "query",
"description": "Array of additional details to include.",
"type": "array",
"collectionFormat": "multi",
"uniqueItems": true,
"items": {
"type": "string"
},
"enum": ["contact_methods", "notification_rules", "teams"]
},
"include_maintenance_window": {
"name": "include[]",
"in": "query",
"description": "Array of additional details to include.",
"type": "array",
"collectionFormat": "multi",
"uniqueItems": true,
"items": {
"type": "string"
},
"enum": ["teams", "services", "users"]
},
"sort_by_escalation_policy": {
"name": "sort_by",
"in": "query",
"type": "string",
"default": "name",
"description": "Used to specify the field you wish to sort the results on.",
"enum": ["name", "name:asc", "name:desc"]
},
"sort_by_service": {
"name": "sort_by",
"in": "query",
"type": "string",
"default": "name",
"description": "Used to specify the field you wish to sort the results on.",
"enum": ["name", "name:asc", "name:desc"]
},
"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- 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",
"type": "boolean",
"default": false
},
"schedule_override_id": {
"name": "override_id",
"type": "string",
"in": "path",
"description": "The override ID on the schedule.",
"required": true
},
"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.",
"type": "array",
"collectionFormat": "multi",
"uniqueItems": true,
"items": {
"type": "string"
}
},
"time_zone": {
"name": "time_zone",
"in": "query",
"description": "Time zone in which dates in the result will be rendered.",
"format": "tzinfo",
"type": "string",
"default": "UTC"
},
"services": {
"name": "service_ids[]",
"in": "query",
"description": "An array of service IDs. Only results related to these services will be returned.",
"collectionFormat": "multi",
"type": "array",
"items": {
"type": "string"
}
},
"integration_id": {
"name": "integration_id",
"type": "string",
"in": "path",
"description": "The integration ID on the service.",
"required": true
},
"log_entry_is_overview": {
"name": "is_overview",
"in": "query",
"description": "If `true`, will return a subset of log entries that show only the most important changes to the incident.",
"required": false,
"type": "boolean",
"default": false
},
"since": {
"name": "since",
"in": "query",
"description": "The start of the date range over which you want to search.",
"type": "string",
"format": "date-time"
},
"until": {
"name": "until",
"in": "query",
"description": "The end of the date range over which you want to search.",
"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.",
"type": "string",
"enum": ["all"]
},
"incident_key": {
"name": "incident_key",
"in": "query",
"description": "Incident de-duplication key.",
"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.",
"type": "array",
"collectionFormat": "multi",
"uniqueItems": true,
"items": {
"type": "string"
}
},
"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.",
"type": "array",
"collectionFormat": "multi",
"uniqueItems": true,
"items": {
"type": "string"
}
},
"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.",
"type": "array",
"collectionFormat": "multi",
"uniqueItems": true,
"items": {
"type": "string"
},
"enum": ["high", "low"]
},
"from_header": {
"name": "From",
"in": "header",
"type": "string",
"format": "email",
"description": "The email address of the user making the request.",
"required": true
},
"optional_from_header": {
"name": "From",
"in": "header",
"type": "string",
"format": "email",
"description": "The email address of the user making the request. This is optional, and is only used for change tracking.",
"required": false
},
"user_contact_method_id": {
"name": "contact_method_id",
"type": "string",
"in": "path",
"description": "The contact method ID on the user.",
"required": true
},
"user_notification_rule_id": {
"name": "notification_rule_id",
"type": "string",
"in": "path",
"description": "The notification rule ID on the user.",
"required": true
}
},
"definitions": {
"AddonReference": {
"allOf": [{
"$ref": "#/definitions/Reference"
}, {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": ["full_page_addon", "full_page_addon_reference", "incident_show_addon", "incident_show_addon_reference"]
}
}
}]
},
"Addon": {
"allOf": [{
"$ref": "#/definitions/AddonReference"
}, {
"type": "object",
"properties": {
"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": ["name", "src"]
}],
"example": {
"type": "full_page_addon",
"name": "Internal Status Page",
"src": "https://intranet.example.com/status"
}
},
"IncidentAddon": {
"allOf": [{
"$ref": "#/definitions/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": "#/definitions/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"]
}
}
},
"IncidentUrgencyRule": {
"allOf": [{
"$ref": "#/definitions/IncidentUrgencyType"
}, {
"type": "object",
"properties": {
"during_support_hours": {
"$ref": "#/definitions/IncidentUrgencyType",
"description": "Incidents' urgency during support hours"
},
"outside_support_hours": {
"$ref": "#/definitions/IncidentUrgencyType",
"description": "Incidents' urgency outside support hours"
}
}
}]
},
"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": {
"type": "object",
"discriminator": "type",
"required": ["type"],
"properties": {
"id": {
"type": "string",
"readOnly": true
},
"summary": {
"type": "string",
"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.",
"readOnly": true
},
"type": {
"type": "string",
"description": "A string that determines the schema of the object. This must be the standard name for the entity, suffixed by `_reference` if the object is a reference.",
"readOnly": true
},
"self": {
"type": "string",
"format": "url",
"description": "the API show URL at which the object is accessible",
"readOnly": true
},
"html_url": {
"type": "string",
"format": "url",
"description": "a URL at which the entity is uniquely displayed in the Web app",
"readOnly": true
}
}
},
"IncidentNote": {
"type": "object",
"properties": {
"id": {
"type": "string",
"readOnly": true
},
"user": {
"description": "The user who submitted the note",
"readOnly": true,
"$ref": "#/definitions/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": {
"description": "The user the notification was sent to.",
"readOnly": true,
"$ref": "#/definitions/UserReference"
}
}
},
"Context": {
"type": "object",
"discriminator": "type",
"properties": {
"type": {
"type": "string",
"description": "The type of context being attached to the incident.",
"enum": ["link", "image"]
}
},
"required": ["type"]
},
"LinkContext": {
"allOf": [{
"$ref": "#/definitions/Context"
}, {
"type": "object",
"properties": {
"href": {
"type": "string",
"description": "The link being attached to the incident"
},
"text": {
"type": "string",
"description": "The text that will be displayed as the link."
}
},
"required": ["href"]
}]
},
"ImageContext": {
"allOf": [{
"$ref": "#/definitions/Context"
}, {
"type": "object",
"properties": {
"src": {
"type": "string",
"format": "secure-url",
"description": "The source of the image being attached to the incident"
},
"href": {
"type": "string",
"format": "url",
"description": "Optional link for the image"
},
"alt": {
"type": "string",
"description": "Optional alt text for the image"
}
},
"required": ["src"]
}]
},
"Channel": {
"type": "object",
"discriminator": "type",
"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"
}
},
"required": ["type"]
},
"NagiosChannel": {
"allOf": [{
"$ref": "#/definitions/Channel"
}, {
"type": "object",
"properties": {
"summary": {
"type": "string",
"description": "Same as `host`"
},
"host": {
"type": "string",
"description": "Nagios host"
},
"service": {
"type": "string",
"description": "Nagios service that created the event, if applicable"
},
"state": {
"type": "string",
"description": "State that caused the event"
},
"details": {
"type": "object",
"description": "Additional details of the incident, if any"
}
},
"required": ["summary", "host", "service", "state", "details"]
}]
},
"ApiChannel": {
"allOf": [{
"$ref": "#/definitions/Channel"
}, {
"type": "object",
"properties": {
"summary": {
"type": "string",
"description": "Same as `description`"
},
"service_key": {
"type": "string",
"description": "API service key"
},
"description": {
"type": "string",
"description": "Description of the event"
},
"incident_key": {
"type": "string",
"description": "Incident de-duplicating string"
},
"details": {
"type": "object",
"description": "Additional details of the incident, if any"
}
},
"required": ["summary", "service_key", "description", "incident_key", "details"]
}]
},
"EmailChannel": {
"allOf": [{
"$ref": "#/definitions/Channel"
}, {
"type": "object",
"properties": {
"summary": {
"type": "string",
"description": "Same as `subject`"
},
"to": {
"type": "string",
"description": "To address of the email"
},
"from": {
"type": "string",
"description": "From address of the email"
},
"subject": {
"type": "string",
"description": "Subject of the email"
},
"body": {
"type": "string",
"description": "Body of the email"
},
"body_content_type": {
"type": "string",
"description": "Content type of the email body. Will be `text/plain` or `text/html`",
"enum": ["text/plain", "text/html"]
},
"raw_url": {
"type": "string",
"format": "url",
"description": "URL for raw text of email"
},
"html_url": {
"type": "string",
"format": "url",
"description": "URL for html rendered version of the email. Only present if `content_type` is `text/html`"
}
},
"required": ["to", "from", "subject", "body", "body_content_type", "raw_url", "html_url"]
}]
},
"WebTriggerChannel": {
"allOf": [{
"$ref": "#/definitions/Channel"
}, {
"type": "object",
"properties": {
"summary": {
"type": "string",
"description": "Same as `subject`"
},
"subject": {
"type": "string",
"description": "Subject of the web trigger"
},
"details": {
"type": "string",
"description": "Details about the web trigger"
}
},
"required": ["summary", "subject", "details"]
}]
},
"WebsiteChannel": {
"allOf": [{
"$ref": "#/definitions/Channel"
}, {
"type": "object",
"properties": {
"duration": {
"type": "string",
"description": "For snooze log entries, this is the number of seconds that the incident was snoozed for."
}
}
}]
},
"TriggerLogEntry": {
"allOf": [{
"$ref": "#/definitions/LogEntry"
}, {
"$ref": "#/definitions/TriggerLogEntryReference"
}]
},
"TriggerLogEntryReference": {
"allOf": [{
"$ref": "#/definitions/LogEntryReference"
}, {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": ["trigger_log_entry", "trigger_log_entry_reference"]
}
}
}]
},
"UnacknowledgeLogEntry": {
"allOf": [{
"$ref": "#/definitions/LogEntry"
}, {
"$ref": "#/definitions/UnacknowledgeLogEntryReference"
}]
},
"UnacknowledgeLogEntryReference": {
"allOf": [{
"$ref": "#/definitions/LogEntryReference"
}, {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": ["unacknowledge_log_entry", "unacknowledge_log_entry_reference"]
}
}
}]
},
"ResolveLogEntry": {
"allOf": [{
"$ref": "#/definitions/LogEntry"
}, {
"$ref": "#/definitions/ResolveLogEntryReference"
}]
},
"ResolveLogEntryReference": {
"allOf": [{
"$ref": "#/definitions/LogEntryReference"
}, {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": ["resolve_log_entry", "resolve_log_entry_reference"]
}
}
}]
},
"AnnotateLogEntry": {
"allOf": [{
"$ref": "#/definitions/LogEntry"
}, {
"$ref": "#/definitions/AnnotateLogEntryReference"
}]
},
"AnnotateLogEntryReference": {
"allOf": [{
"$ref": "#/definitions/LogEntryReference"
}, {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": ["annotate_log_entry", "annotate_log_entry_reference"]
}
}
}]
},
"ReachTriggerLimitLogEntry": {
"allOf": [{
"$ref": "#/definitions/LogEntry"
}, {
"$ref": "#/definitions/ReachTriggerLimitLogEntryReference"
}]
},
"ReachTriggerLimitLogEntryReference": {
"allOf": [{
"$ref": "#/definitions/LogEntryReference"
}, {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": ["reach_trigger_limit_log_entry", "reach_trigger_limit_log_entry_reference"]
}
}
}]
},
"RepeatEscalationPathLogEntry": {
"allOf": [{
"$ref": "#/definitions/LogEntry"
}, {
"$ref": "#/definitions/RepeatEscalationPathLogEntryReference"
}]
},
"RepeatEscalationPathLogEntryReference": {
"allOf": [{
"$ref": "#/definitions/LogEntryReference"
}, {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": ["repeat_escalation_path_log_entry", "repeat_escalation_path_log_entry_reference"]
}
}
}]
},
"ExhaustEscalationPathLogEntry": {
"allOf": [{
"$ref": "#/definitions/LogEntry"
}, {
"$ref": "#/definitions/ExhaustEscalationPathLogEntryReference"
}]
},
"ExhaustEscalationPathLogEntryReference": {
"allOf": [{
"$ref": "#/definitions/LogEntryReference"
}, {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": ["exhaust_escalation_path_log_entry", "exhaust_escalation_path_log_entry_reference"]
}
}
}]
},
"NotifyLogEntryReference": {
"allOf": [{
"$ref": "#/definitions/LogEntryReference"
}, {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": ["notify_log_entry", "notify_log_entry_reference"]
}
}
}]
},
"NotifyLogEntry": {
"allOf": [{
"$ref": "#/definitions/LogEntry"
}, {
"$ref": "#/definitions/NotifyLogEntryReference"
}, {
"type": "object",
"properties": {
"created_at": {
"type": "string",
"format": "date-time",
"readOnly": true,
"description": "Time at which the log entry was created"
},
"user": {
"$ref": "#/definitions/UserReference",
"description": "User who was notified"
},
"notification": {
"$ref": "#/definitions/LogEntryNotification",
"description": "Object representing the notification itself"
}
}
}]
},
"LogEntryNotification": {
"type": "object",
"properties": {
"type": {
"type": "string",
"description": "Type of notification.",
"enum": ["phone", "sms", "ios_push_notification", "android_push_notification", "email"]
},
"status": {
"type": "string",
"readOnly": true,
"description": "The result status of the notification.",
"enum": ["in_progress", "success", "blocked", "busy", "failed", "bounced", "no_answer", "bad_address", "address_not_allowed"]
},
"address": {
"type": "string",
"description": "The address to which the notification was sent. I.e., an email address, phone number, or smartphone name"
}
}
},
"AcknowledgeLogEntry": {
"allOf": [{
"$ref": "#/definitions/LogEntry"
}, {
"$ref": "#/definitions/AcknowledgeLogEntryReference"
}, {
"type": "object",
"properties": {
"acknowledgement_timeout": {
"type": "integer",
"description": "Duration for which the acknowledgement lasts, in seconds. Services can contain an `acknowledgement_timeout` property, which specifies the length of time acknowledgements should last for. Each time an incident is acknowledged, this timeout is copied into the acknowledgement log entry. This property is optional, as older log entries may not contain it. It may also be `null`, as acknowledgements can be performed on incidents whose services have no `acknowledgement_timeout` set."
}
}
}]
},
"AcknowledgeLogEntryReference": {
"allOf": [{
"$ref": "#/definitions/LogEntryReference"
}, {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": ["acknowledge_log_entry", "acknowledge_log_entry_reference"]
}
}
}]
},
"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": "#/definitions/LogEntry"
}, {
"$ref": "#/definitions/SnoozeLogEntryReference"
}, {
"type": "object",
"properties": {
"changed_actions": {
"type": "array",
"items": {
"$ref": "#/definitions/IncidentAction"
}
}
}
}]
},
"SnoozeLogEntryReference": {
"allOf": [{
"$ref": "#/definitions/LogEntryReference"
}, {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": ["snooze_log_entry", "snooze_log_entry_reference"]
}
}
}]
},
"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": "type",
"required": ["type", "at"]
},
"UrgencyChangeIncidentAction": {
"type": "object",
"allOf": [{
"$ref": "#/definitions/IncidentAction"
}, {
"type": "object",
"properties": {
"to": {
"type": "string",
"enum": ["high", "low"],
"description": "Urgency that the incident will change to when the 'at' time is reached."
}
}
}]
},
"AssignLogEntry": {
"allOf": [{
"$ref": "#/definitions/LogEntry"
}, {
"$ref": "#/definitions/AssignLogEntryReference"
}, {
"type": "object",
"properties": {
"assigned_user": {
"$ref": "#/definitions/UserReference",
"description": "The user to which the incident is assigned."
}
}
}]
},
"AssignLogEntryReference": {
"allOf": [{
"$ref": "#/definitions/LogEntryReference"
}, {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": ["assign_log_entry", "assign_log_entry_reference"]
}
}
}]
},
"EscalateLogEntry": {
"allOf": [{
"$ref": "#/definitions/LogEntry"
}, {
"$ref": "#/definitions/EscalateLogEntryReference"
}, {
"type": "object",
"properties": {
"assigned_user": {
"$ref": "#/definitions/UserReference",
"description": "The user to which the incident is assigned."
}
}
}]
},
"EscalateLogEntryReference": {
"allOf": [{
"$ref": "#/definitions/LogEntryReference"
}, {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": ["escalate_log_entry", "escalate_log_entry_reference"]
}
}
}]
},
"LogEntryReference": {
"allOf": [{
"$ref": "#/definitions/Reference"
}, {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": ["acknowledge_log_entry", "acknowledge_log_entry_reference", "annotate_log_entry", "annotate_log_entry_reference", "assign_log_entry", "assign_log_entry_reference", "escalate_log_entry", "escalate_log_entry_reference", "exhaust_escalation_path_log_entry", "exhaust_escalation_path_log_entry_reference", "notify_log_entry", "notify_log_entry_reference", "reach_trigger_limit_log_entry", "reach_trigger_limit_log_entry_reference", "repeat_escalation_path_log_entry", "repeat_escalation_path_log_entry_reference", "resolve_log_entry", "resolve_log_entry_reference", "snooze_log_entry", "snooze_log_entry_reference", "trigger_log_entry", "trigger_log_entry_reference", "unacknowledge_log_entry", "unacknowledge_log_entry_reference"]
}
}
}]
},
"LogEntry": {
"allOf": [{
"$ref": "#/definitions/LogEntryReference"
}, {
"type": "object",
"properties": {
"created_at": {
"type": "string",
"format": "date-time",
"readOnly": true,
"description": "Time at which the log entry was created."
},
"channel": {
"readOnly": true,
"description": "The channel field represents the means by which the action was carried out.",
"$ref": "#/definitions/Channel"
},
"agent": {
"readOnly": true,
"$ref": "#/definitions/Agent"
},
"note": {
"type": "string",
"readOnly": true,
"description": "Optional field containing a note, if one was included with the ILE."
},
"contexts": {
"type": "array",
"readOnly": true,
"description": "Contexts to be included with the incident trigger such as links to graphs or images.",
"items": {
"$ref": "#/definitions/Context"
}
},
"service": {
"readOnly": true,
"description": "Will be a reference unless included",
"$ref": "#/definitions/ServiceReference"
},
"incident": {
"readOnly": true,
"description": "Will be a reference unless included",
"$ref": "#/definitions/IncidentReference"
},
"teams": {
"type": "array",
"readOnly": true,
"description": "Will consist of references unless included",
"items": {
"$ref": "#/definitions/TeamReference"
}
},
"event_details": {
"type": "object",
"readOnly": true,
"properties": {
"description": {
"type": "string",
"description": "Additional details about the event."
}
}
}
}
}]
},
"Agent": {
"allOf": [{
"$ref": "#/definitions/Reference"
}, {
"type": "object",
"description": "The agent (user, service or integration) that created or modified the ILE.",
"properties": {
"type": {
"enum": ["user", "service", "integration", "user_reference", "service_reference", "integration_reference"],
"type": "string"
}
},
"readOnly": true
}]
},
"NotificationRuleReference": {
"allOf": [{
"$ref": "#/definitions/Reference"
}, {
"type": "object",
"properties": {
"type": {
"type": "string",
"description": "The type of notification rule.",
"readOnly": true,
"enum": ["assignment_notification_rule"]
}
}
}]
},
"NotificationRule": {
"allOf": [{
"$ref": "#/definitions/NotificationRuleReference"
}, {
"type": "object",
"description": "A rule for contacting the user.",
"properties": {
"start_delay_in_minutes": {
"type": "integer",
"description": "The delay before firing the rule, in minutes.",
"minimum": 0
},
"contact_method": {
"$ref": "#/definitions/ContactMethodReference",
"description": "The contact method invoked by the rule."
},
"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"
},
"urgency": "high"
}
},
"ContactMethodReference": {
"allOf": [{
"$ref": "#/definitions/Reference"
}, {
"type": "object",
"properties": {
"type": {
"type": "string",
"description": "The type of contact method.",
"enum": ["email_contact_method", "phone_contact_method", "push_notification_contact_method", "sms_contact_method"]
}
}
}]
},
"ContactMethod": {
"allOf": [{
"$ref": "#/definitions/ContactMethodReference"
}, {
"type": "object",
"description": "The method to contact a user.",
"properties": {
"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": "type",
"required": ["type", "label", "address"]
}]
},
"EmailContactMethod": {
"allOf": [{
"$ref": "#/definitions/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": {
"allOf": [{
"$ref": "#/definitions/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": {
"allOf": [{
"$ref": "#/definitions/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": "#/definitions/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"
}
}]
},
"UserReference": {
"allOf": [{
"$ref": "#/definitions/Reference"
}, {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": ["user", "user_reference"]
}
}
}]
},
"User": {
"allOf": [{
"$ref": "#/definitions/UserReference"
}, {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "The name of the user.",
"maxLength": 100
},
"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`.",
"type": "string",
"enum": ["admin", "limited_user", "owner", "read_only_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": "#/definitions/TeamReference"
}
},
"contact_methods": {
"type": "array",
"readOnly": true,
"description": "The list of contact methods for the user.",
"items": {
"$ref": "#/definitions/ContactMethodReference"
}
},
"notification_rules": {
"readOnly": true,
"type": "array",
"description": "The list of notification rules for the user.",
"items": {
"$ref": "#/definitions/NotificationRule"
}
}
},
"required": ["name", "email"],
"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": "#/definitions/Reference"
}, {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": ["team", "team_reference"]
}
}
}]
},
"Team": {
"allOf": [{
"$ref": "#/definitions/TeamReference"
}, {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "The name of the team.",
"maxLength": 100
},
"description": {
"type": "string",
"description": "The description of the team.",
"maxLength": 1024
}
},
"required": ["name"],
"example": {
"type": "team",
"name": "Engineering",
"description": "The engineering team"
}
}]
},
"IncidentReference": {
"allOf": [{
"$ref": "#/definitions/Reference"
}, {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": ["incident", "incident_reference"]
}
}
}]
},
"Incident": {
"allOf": [{
"$ref": "#/definitions/IncidentReference"
}, {
"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"]
},
"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": "#/definitions/IncidentAction"
}
},
"incident_key": {
"type": "string",
"readOnly": true,
"description": "The incident's de-duplication key."
},
"service": {
"$ref": "#/definitions/ServiceReference",
"description": "The PagerDuty service that the incident belongs to."
},
"assignments": {
"type": "array",
"description": "List of all assignments for this incident.",
"items": {
"$ref": "#/definitions/Assignment"
}
},
"acknowledgements": {
"type": "array",
"description": "List of all acknowledgements for this incident.",
"items": {
"$ref": "#/definitions/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": "#/definitions/Agent",
"readOnly": true,
"description": "The user or service which is responsible for the incident's last status change. If the incident is in the acknowledged or resolved status, this will be the user that took the first acknowledged or resolved action. If the incident was automatically resolved (say through the Events API), or if the incident is in the triggered state, this will be the incident's service."
},
"first_trigger_log_entry": {
"$ref": "#/definitions/LogEntryReference",
"readOnly": true,
"description": "The first trigger log entry for the incident."
},
"escalation_policy": {
"$ref": "#/definitions/EscalationPolicyReference",
"description": "The escalation policy that the incident is currently following."
},
"teams": {
"type": "array",
"description": "The teams involved in the incident’s lifecycle.",
"items": {
"$ref": "#/definitions/TeamReference"
}
},
"urgency": {
"type": "string",
"enum": ["high", "low"],
"description": "The current urgency of the incident."
}
}
}]
},
"EscalationPolicyReference": {
"allOf": [{
"$ref": "#/definitions/Reference"
}, {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": ["escalation_policy", "escalation_policy_reference"]
}
}
}]
},
"EscalationPolicy": {
"allOf": [{
"$ref": "#/definitions/EscalationPolicyReference"
}, {
"type": "object",
"properties": {
"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
},
"repeat_enabled": {
"type": "boolean",
"description": "Whether or not to allow this policy to repeat its escalation rules after the last rule is finished.",
"default": false
},
"escalation_rules": {
"type": "array",
"items": {
"$ref": "#/definitions/EscalationRule"
}
},
"services": {
"type": "array",
"items": {
"$ref": "#/definitions/ServiceReference"
},
"minLength": 0
},
"teams": {
"type": "array",
"description": "Teams associated with the policy. Account must have the `teams` ability to use this parameter.",
"items": {
"$ref": "#/definitions/TeamReference"
},
"minLength": 0
}
},
"required": ["name", "escalation_rules"],
"example": {
"type": "escalation_policy",
"name": "Engineering Escalation Policy",
"escalation_rules": [{
"escalation_delay_in_minutes": 30,
"targets": [{
"id": "PEYSGVF",
"type": "user_reference"
}]
}],
"repeat_enabled": true,
"services": [{
"id": "PIJ90N7",
"type": "service_reference"
}],
"num_loops": 2,
"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": "#/definitions/EscalationTarget"
}
}
},
"required": ["escalation_delay_in_minutes", "targets"],
"example": {
"escalation_delay_in_minutes": 30,
"targets": [{
"id": "PAM4FGS",
"type": "user_reference"
}, {
"id": "PI7DH85",
"type": "schedule_reference"
}]
}
},
"EscalationTarget": {
"allOf": [{
"$ref": "#/definitions/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"
}
}
}]
},
"GenericEventsApiIntegration": {
"allOf": [{
"$ref": "#/definitions/ApiBasedIntegration"
}, {
"$ref": "#/definitions/GenericEventsApiIntegrationReference"
}]
},
"GenericEventsApiIntegrationReference": {
"allOf": [{
"$ref": "#/definitions/IntegrationReference"
}, {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": ["generic_events_api_inbound_integration", "generic_events_api_inbound_integration_reference"]
}
}
}]
},
"AwsCloudwatchIntegration": {
"allOf": [{
"$ref": "#/definitions/ApiBasedIntegration"
}, {
"$ref": "#/definitions/AwsCloudwatchIntegrationReference"
}]
},
"AwsCloudwatchIntegrationReference": {
"allOf": [{
"$ref": "#/definitions/IntegrationReference"
}, {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": ["aws_cloudwatch_inbound_integration", "aws_cloudwatch_inbound_integration_reference"]
}
}
}]
},
"EventTransformerApiIntegration": {
"allOf": [{
"$ref": "#/definitions/ApiBasedIntegration"
}, {
"$ref": "#/definitions/EventTransformerApiIntegrationReference"
}]
},
"EventTransformerApiIntegrationReference": {
"allOf": [{
"$ref": "#/definitions/IntegrationReference"
}, {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": ["event_transformer_api_inbound_integration", "event_transformer_api_inbound_integration_reference"]
}
}
}]
},
"NagiosIntegration": {
"allOf": [{
"$ref": "#/definitions/ApiBasedIntegration"
}, {
"$ref": "#/definitions/NagiosIntegrationReference"
}]
},
"NagiosIntegrationReference": {
"allOf": [{
"$ref": "#/definitions/IntegrationReference"
}, {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": ["nagios_inbound_integration", "nagios_inbound_integration_reference"]
}
}
}]
},
"GenericEmailIntegration": {
"allOf": [{
"$ref": "#/definitions/GenericEmailIntegrationReference"
}, {
"$ref": "#/definitions/EmailBasedIntegration"
}]
},
"GenericEmailIntegrationReference": {
"allOf": [{
"$ref": "#/definitions/IntegrationReference"
}, {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": ["generic_email_inbound_integration", "generic_email_inbound_integration_reference"]
}
}
}]
},
"KeynoteIntegration": {
"allOf": [{
"$ref": "#/definitions/EmailBasedIntegration"
}, {
"$ref": "#/definitions/KeynoteIntegrationReference"
}, {
"type": "object",
"properties": {
"severity_filter": {
"type": "string",
"description": "Specifies what severity levels will create a new open incident. It can be one of:\n\n- `critical`: Incidents are created when an alarm enters the critical state.\n- `critical_or_warning`: Incidents are created when an alarm enters the critical **or** warning state.\n",
"enum": ["critical", "critical_or_warning"]
}
}
}]
},
"KeynoteIntegrationReference": {
"allOf": [{
"$ref": "#/definitions/IntegrationReference"
}, {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": ["keynote_inbound_integration", "keynote_inbound_integration_reference"]
}
}
}]
},
"PingdomIntegration": {
"allOf": [{
"$ref": "#/definitions/EmailBasedIntegration"
}, {
"$ref": "#/definitions/PingdomIntegrationReference"
}]
},
"PingdomIntegrationReference": {
"allOf": [{
"$ref": "#/definitions/IntegrationReference"
}, {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": ["pingdom_inbound_integration", "pingdom_inbound_integration_reference"]
}
}
}]
},
"HpSiteScopeIntegration": {
"allOf": [{
"$ref": "#/definitions/EmailBasedIntegration"
}, {
"$ref": "#/definitions/HpSiteScopeIntegrationReference"
}]
},
"HpSiteScopeIntegrationReference": {
"allOf": [{
"$ref": "#/definitions/IntegrationReference"
}, {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": ["hp_site_scope", "hp_site_scope_reference"]
}
}
}]
},
"SqlMonitorIntegration": {
"allOf": [{
"$ref": "#/definitions/EmailBasedIntegration"
}, {
"$ref": "#/definitions/SqlMonitorIntegrationReference"
}, {
"type": "object",
"properties": {
"severity_filter": {
"type": "string",
"description": "Specifies what severity levels will create a new open incident. It can be one of:\n\n- `on_any`: Incidents are created for alerts of any severity.\n- `on_high`: Incidents are created for alerts with high severity.\n- `on_medium_high`: Incidents are created for with high or medium severity.\n",
"enum": ["on_any", "on_high", "on_medium_high"]
}
}
}]
},
"SqlMonitorIntegrationReference": {
"allOf": [{
"$ref": "#/definitions/IntegrationReference"
}, {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": ["sql_monitor_inbound_integration", "sql_monitor_inbound_integration_reference"]
}
}
}]
},
"ApiBasedIntegration": {
"allOf": [{
"$ref": "#/definitions/Integration"
}, {
"type": "object",
"properties": {
"integration_key": {
"type": "string",
"description": "This is the unique key used to route events to this integration when received via the PagerDuty Events API."
}
}
}]
},
"EmailBasedIntegration": {
"allOf": [{
"$ref": "#/definitions/Integration"
}, {
"type": "object",
"properties": {
"integration_email": {
"type": "string",
"description": "This is the unique fully-qualified email address used for routing emails to this integration for processing."
}
}
}]
},
"ServiceReference": {
"allOf": [{
"$ref": "#/definitions/Reference"
}, {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": ["service", "service_reference"]
}
}
}]
},
"Service": {
"allOf": [{
"$ref": "#/definitions/ServiceReference"
}, {
"type": "object",
"properties": {
"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\" is the feature is disabled."
},
"acknowledgement_timeout": {
"type": "integer",
"description": "Time in seconds that an incident changes to the Triggered State after being Acknowledged. Value is \"null\" is the feature is disabled."
},
"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- `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": "#/definitions/EscalationPolicyReference",
"description": "The escalation policy used by this service."
},
"teams": {
"type": "array",
"readOnly": true,
"description": "The set of teams associated with this service.",
"items": {
"$ref": "#/definitions/TeamReference",
"description": "The set of teams whose maintenance windows will be returned"
}
},
"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": "#/definitions/IntegrationReference",
"description": "The integrations that belong to this service."
}
},
"incident_urgency_rule": {
"$ref": "#/definitions/IncidentUrgencyRule",
"description": "The default urgency for new incidents. Account must have the `urgencies` ability to assign a incident urgency rule."
},
"support_hours": {
"$ref": "#/definitions/SupportHours",
"description": "The support hours for the service. May be used to define the incidents' urgency. Account must have the `service_support_hours` ability to assign support hours."
},
"scheduled_actions": {
"type": "array",
"description": "An array containing scheduled actions for the service.",
"items": {
"$ref": "#/definitions/ScheduledAction",
"description": "A scheduled action for the service."
}
},
"addons": {
"type": "array",
"description": "The array of add-ons associated with this service.",
"readOnly": true,
"items": {
"$ref": "#/definitions/AddonReference"
}
}
},
"example": {
"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"
}]
}
}]
},
"Integration": {
"allOf": [{
"$ref": "#/definitions/IntegrationReference"
}, {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "The name of this integration."
},
"service": {
"$ref": "#/definitions/ServiceReference",
"description": "The PagerDuty service that the integration belongs to."
},
"created_at": {
"type": "string",
"format": "date-time",
"readOnly": true,
"description": "The date/time when this integration was created."
},
"vendor": {
"$ref": "#/definitions/VendorReference",
"description": "The vendor that this integration integrates with, if applicable. This can only be set on creation"
}
}
}]
},
"IntegrationReference": {
"allOf": [{
"$ref": "#/definitions/Reference"
}, {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": ["aws_cloudwatch_inbound_integration", "aws_cloudwatch_inbound_integration_reference", "cloudkick_inbound_integration", "cloudkick_inbound_integration_reference", "event_transformer_api_inbound_integration", "event_transformer_api_inbound_integration_reference", "generic_email_inbound_integration", "generic_email_inbound_integration_reference", "generic_events_api_inbound_integration", "generic_events_api_inbound_integration_reference", "keynote_inbound_integration", "keynote_inbound_integration_reference", "nagios_inbound_integration", "nagios_inbound_integration_reference", "pingdom_inbound_integration", "pingdom_inbound_integration_reference", "sql_monitor_inbound_integration", "sql_monitor_inbound_integration_reference"]
}
}
}]
},
"MaintenanceWindowReference": {
"allOf": [{
"$ref": "#/definitions/Reference"
}, {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": ["maintenance_window", "maintenance_window_reference"]
}
}
}]
},
"MaintenanceWindow": {
"allOf": [{
"$ref": "#/definitions/MaintenanceWindowReference"
}, {
"type": "object",
"properties": {
"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": "#/definitions/UserReference",
"readOnly": true
},
"services": {
"type": "array",
"items": {
"$ref": "#/definitions/ServiceReference"
}
},
"teams": {
"type": "array",
"items": {
"$ref": "#/definitions/TeamReference"
},
"readOnly": true
}
},
"required": ["start_time", "end_time", "services"],
"example": {
"type": "maintenance_window",
"start_time": "2015-11-09T20:00:00-05:00",
"end_time": "2015-11-09T22:00:00-05:00",
"description": "Immanentizing the eschaton",
"services": [{
"id": "PIJ90N7",
"type": "service_reference"
}]
}
}]
},
"ScheduleReference": {
"allOf": [{
"$ref": "#/definitions/Reference"
}, {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": ["schedule", "schedule_reference"]
}
}
}]
},
"Schedule": {
"allOf": [{
"$ref": "#/definitions/ScheduleReference"
}, {
"type": "object",
"properties": {
"schedule_layers": {
"type": "array",
"description": "A list of schedule layers.",
"items": {
"$ref": "#/definitions/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": {
"readOnly": true,
"$ref": "#/definitions/SubSchedule",
"description": "The final layer is a special layer that contains the result of all of the previous layers put together. This layer cannot be edited."
},
"overrides_subschedule": {
"readOnly": true,
"$ref": "#/definitions/SubSchedule",
"description": "The override layer is a special layer where all of the override entries are stored."
},
"escalation_policies": {
"type": "array",
"readOnly": true,
"description": "An array of all of the escalation policies that uses this schedule.",
"items": {
"$ref": "#/definitions/EscalationPolicyReference"
}
},
"users": {
"type": "array",
"readOnly": true,
"description": "An array of all of the users on the schedule.",
"items": {
"$ref": "#/definitions/UserReference"
}
}
},
"required": ["schedule_layers", "time_zone"],
"example": {
"name": "Daily Engineering Rotation",
"type": "schedule",
"time_zone": "America/New_York",
"description": "Rotation schedule for engineering",
"schedule_layers": [{
"name": "Night Shift",
"start": "2015-11-06T20:00:00-05:00",
"end": "2016-11-06T20:00:00-05:00",
"rotation_virtual_start": "2015-11-06T20:00:00-05:00",
"rotation_turn_length_seconds": 86400,
"users": [{
"id": "PXPGF42",
"type": "user"
}],
"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": "#/definitions/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": "#/definitions/UserReference"
}
},
"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": "#/definitions/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": "#/definitions/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": {
"description": "The entry's user.",
"readOnly": true,
"$ref": "#/definitions/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"]
},
"Override": {
"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": "#/definitions/UserReference",
"description": "The user who will be on call for the duration of the override."
}
},
"required": ["start", "end", "user"],
"example": {
"start": "2012-07-01T00:00:00-04:00",
"end": "2012-07-02T00:00:00-04:00",
"user": {
"id": "PEYSGVF",
"type": "user_reference"
}
}
},
"Restriction": {
"type": "object",
"properties": {
"type": {
"type": "string",
"description": "Specify the types of `restriction`.",
"enum": ["daily_restriction", "weekly_restriction"]
},
"duration_seconds": {
"type": "integer",
"description": "The duration of the restriction in seconds."
},
"start_time_of_day": {
"type": "string",
"format": "partial-time",
"description": "The start time in HH:mm:ss format."
}
},
"discriminator": "type",
"required": ["type", "duration_seconds", "start_time_of_day"]
},
"WeeklyRestriction": {
"allOf": [{
"$ref": "#/definitions/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
}
}
},
"Error": {
"type": "object",
"properties": {
"error": {
"$ref": "#/definitions/ErrorObject"
}
}
},
"ErrorObject": {
"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
}
},
"Assignment": {
"type": "object",
"properties": {
"at": {
"type": "string",
"format": "date-time",
"description": "Time at which the assignment was created."
},
"assignee": {
"$ref": "#/definitions/UserReference",
"description": "User that was assigned."
}
},
"required": ["at", "assignee"]
},
"Acknowledgement": {
"type": "object",
"properties": {
"at": {
"type": "string",
"format": "date-time",
"description": "Time at which the acknowledgement was created."
},
"acknowledger": {
"$ref": "#/definitions/Acknowledger",
"description": "User or service that acknowledged."
}
},
"required": ["at", "acknowledger"]
},
"Acknowledger": {
"allOf": [{
"$ref": "#/definitions/Reference"
}, {
"description": "The acknowledger represents the entity that made the acknowledgement for an incident.",
"type": "object",
"properties": {
"type": {
"enum": ["user", "service", "user_reference", "service_reference"],
"type": "string"
}
}
}]
},
"Oncall": {
"type": "object",
"properties": {
"escalation_policy": {
"$ref": "#/definitions/EscalationPolicyReference",
"readOnly": true,
"description": "The escalation policy for the on-call."
},
"user": {
"$ref": "#/definitions/UserReference",
"readOnly": true,
"description": "The user for the on-call."
},
"schedule": {
"$ref": "#/definitions/ScheduleReference",
"readOnly": true,
"description": "The schedule for the on-call."
},
"escalation_level": {
"type": "integer",
"readOnly": true,
"description": "The escalation level for the on-call."
},
"start": {
"type": "string",
"format": "date-time",
"readOnly": true,
"description": "The start of the on-call. If `null`, the on-call is a permanent user on-call."
},
"end": {
"type": "string",
"format": "date-time",
"readOnly": true,
"description": "The end of the on-call. If `null`, the user does not go off-call."
}
},
"example": {
"user": {
"id": "PT23IWX",
"type": "user_reference",
"summary": "Tim Wright",
"self": "https://api.pagerduty.com/users/PT23IWX",
"html_url": "https://subdomain.pagerduty.com/users/PT23IWX"
},
"schedule": {
"id": "PI7DH85",
"type": "schedule_reference",
"summary": "Daily Engineering Rotation",
"self": "https://api.pagerduty.com/schedules/PI7DH85",
"html_url": "https://subdomain.pagerduty.com/schedules/PI7DH85"
},
"escalation_policy": {
"id": "PT20YPA",
"type": "escalation_policy_reference",
"summary": "Engineering Escalation Policy",
"self": "https://api.pagerduty.com/escalation_policies/PT20YPA",
"html_url": "https://subdomain.pagerduty.com/escalation_policies/PT20YPA"
},
"escalation_level": 2,
"start": "2015-03-06T15:28:51-05:00",
"end": "2015-03-07T15:28:51-05:00"
}
},
"VendorReference": {
"allOf": [{
"$ref": "#/definitions/Reference"
}, {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": ["vendor", "vendor_reference"]
}
}
}]
},
"Vendor": {
"allOf": [{
"$ref": "#/definitions/VendorReference"
}, {
"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/"
}
}]
}
},
"responses": {
"ArgumentError": {
"description": "Caller provided invalid arguments. Please review the response for error details. Retrying with the same arguments will *not* work.",
"schema": {
"$ref": "#/definitions/Error"
}
},
"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",
"schema": {
"$ref": "#/definitions/Error"
}
},
"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",
"schema": {
"$ref": "#/definitions/Error"
}
},
"NotFound": {
"description": "The requested resource was not found.",
"schema": {
"$ref": "#/definitions/Error"
}
},
"TooManyRequests": {
"description": "Too many requests have been made, the rate limit has been reached.",
"schema": {
"$ref": "#/definitions/Error"
}
},
"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",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment