{"_id":"56c51da4ba4a540d0091b9b7","githubsync":"","user":"564e5788230d7c1700c9073e","version":{"_id":"564e5a9b1560880d008d30dc","project":"564e5930c3553e0d003e53d0","__v":27,"createdAt":"2015-11-19T23:26:19.166Z","releaseDate":"2015-11-19T23:26:19.166Z","categories":["564e5a9b1560880d008d30dd","566318e1f5ca460d00f41896","56631d08cd54d50d005015fa","56631d2a81ad7417006a202c","5668ba19fbd7680d009375f4","5668cb8b10bda80d00797ed9","5668cb9d10bda80d00797eda","56830d8a3f94e00d004e2a7a","56830d9072bb720d0091f594","56830d94cb4d190d0027698e","56830dc44aecbd0d00a464c5","569e90f3c9b43e0d00c4bab1","56a96d338791090d00113bab","56b12d8336d2580d00247877","56c36bf0a869d017002ea55b","56c36bf93d30210d00ea84bb","56c77749b935671700ff0304","56c7ab9e5652c217008e091a","56cb8bdad5c6241d00ef5e61","58aefce02470660f00b54539","58aefd0bebd7370f0078b954","59ca65ca4337830026edf24f","5c33cd9eb47ba20051ac8d64","5c33df728bec1d0063431c34","5c4783ef523219027055513a","5c4f35033400f3010203a999","5d1d0c9f19c3a0003aeb525a"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"Foundation","version_clean":"2.0.0","version":"2"},"parentDoc":null,"project":"564e5930c3553e0d003e53d0","__v":15,"category":{"_id":"56a96d338791090d00113bab","__v":13,"pages":["56a96d492bb3910d000ee931","56c3cec2106c12170020db96","56c51da4ba4a540d0091b9b7","56c51dc3ba4a540d0091b9b9","56c51eb916c7190d00ff7b19","56c51ec2d7b9ed19008d1752","56c51eec668eb01900719bcd","56c51effba4a540d0091b9bb","56c51f1cf7c4da0d00614b02","56c51f2a8dc1c51900abc142","56c51f367de3580d00bdaf2a","56c67b6270e7660d004a8985","56c67b7cfd00bb0d0016daad"],"project":"564e5930c3553e0d003e53d0","version":"564e5a9b1560880d008d30dc","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2016-01-28T01:21:55.716Z","from_sync":false,"order":3,"slug":"patterns","title":"REST API"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-02-18T01:25:56.099Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":0,"body":"The REST API provides a way for third parties to connect to a PagerDuty account and access or manipulate configuration data on that account. It is not for connecting your monitoring tools to send events to PagerDuty; for that, use the [Events API](doc:events-api-v2).\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"What and Where\"\n}\n[/block]\nThis API is designed around RESTful principles. It's based on managing [resources](doc:resource-schemas) via the HTTP methods `GET`, `POST`, `PUT`, and `DELETE`.\n\nAll requests to the REST API are made to the same host:\n\n```\napi.pagerduty.com\n```\n\nBased on the [authentication](doc:authentication) that you provide, you'll receive data for the associated account.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"How\"\n}\n[/block]\nOnly JSON is supported in the REST API. Other content types are currently not supported and may produce unpredictable results. Request bodies should supply JSON data and responses will come back as JSON.\n\nConsult the topics on the left to learn more about the conventions of the REST API.\n\nIf you're comfortable with the layout and structure of the API, or want to get started right away, head over to the [API Reference](page:api-reference). The reference documentation contains a comprehensive set of REST API [endpoints](doc:endpoints), parameters, and responses. You'll be able to find the resources you need and try making requests right from your browser!\n[block:api-header]\n{\n  \"title\": \"HTTP Request Headers\"\n}\n[/block]\nThe following headers should be set as applicable when making HTTP requests to the REST API:\n\n* `Accept`: to optionally specify a different API version than the version of the API token; see [Versioning](doc:versioning).\n* `Authorization`: required for all requests; see [Authentication](doc:authentication).\n* `Content-Type`: required when making a `POST` or `PUT` request. The MIME media type should be `application/json`.\n* `From`: the email address of the user to record as having taken the action. Should be used when [creating a user](https://api-reference.pagerduty.com/#!/Users/post_users) or when performing [Incident Creation](doc:incident-creation-api) in the REST API.\n[block:api-header]\n{\n  \"title\": \"TLS\"\n}\n[/block]\nConnecting to the PagerDuty REST API requires using [TLS (Transport Layer Security)](https://en.wikipedia.org/wiki/Transport_Layer_Security).\n\nCurrently, our REST API supports TLS protocol versions 1.1 and 1.2; using version 1.2 is recommended.\n\nOur server certificate is signed by DigiCert. Client systems will need to have the **DigiCert Global Root CA** certificate in their local trust store (this is often already the case). CA certificates, if needed, can be [obtained from DigiCert](https://www.digicert.com/digicert-root-certificates.htm).","excerpt":"","slug":"rest-api","type":"basic","title":"REST API v2 Overview"}

REST API v2 Overview


The REST API provides a way for third parties to connect to a PagerDuty account and access or manipulate configuration data on that account. It is not for connecting your monitoring tools to send events to PagerDuty; for that, use the [Events API](doc:events-api-v2). [block:api-header] { "type": "basic", "title": "What and Where" } [/block] This API is designed around RESTful principles. It's based on managing [resources](doc:resource-schemas) via the HTTP methods `GET`, `POST`, `PUT`, and `DELETE`. All requests to the REST API are made to the same host: ``` api.pagerduty.com ``` Based on the [authentication](doc:authentication) that you provide, you'll receive data for the associated account. [block:api-header] { "type": "basic", "title": "How" } [/block] Only JSON is supported in the REST API. Other content types are currently not supported and may produce unpredictable results. Request bodies should supply JSON data and responses will come back as JSON. Consult the topics on the left to learn more about the conventions of the REST API. If you're comfortable with the layout and structure of the API, or want to get started right away, head over to the [API Reference](page:api-reference). The reference documentation contains a comprehensive set of REST API [endpoints](doc:endpoints), parameters, and responses. You'll be able to find the resources you need and try making requests right from your browser! [block:api-header] { "title": "HTTP Request Headers" } [/block] The following headers should be set as applicable when making HTTP requests to the REST API: * `Accept`: to optionally specify a different API version than the version of the API token; see [Versioning](doc:versioning). * `Authorization`: required for all requests; see [Authentication](doc:authentication). * `Content-Type`: required when making a `POST` or `PUT` request. The MIME media type should be `application/json`. * `From`: the email address of the user to record as having taken the action. Should be used when [creating a user](https://api-reference.pagerduty.com/#!/Users/post_users) or when performing [Incident Creation](doc:incident-creation-api) in the REST API. [block:api-header] { "title": "TLS" } [/block] Connecting to the PagerDuty REST API requires using [TLS (Transport Layer Security)](https://en.wikipedia.org/wiki/Transport_Layer_Security). Currently, our REST API supports TLS protocol versions 1.1 and 1.2; using version 1.2 is recommended. Our server certificate is signed by DigiCert. Client systems will need to have the **DigiCert Global Root CA** certificate in their local trust store (this is often already the case). CA certificates, if needed, can be [obtained from DigiCert](https://www.digicert.com/digicert-root-certificates.htm).