### Create Note Response Example
Source: https://developer.pagerduty.com/api-reference/9529ec706026d-create-a-note-on-an-incident
This is an example of a successful response when creating a note. It includes the note's ID, user details, content, and timestamps.
```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"
},
"channel": {
"summary": "The PagerDuty website or APIs"
},
"content": "Firefighters are on the scene.",
"created_at": "2013-03-06T15:28:51-05:00",
"updated_at": "2023-10-01T12:00:00-05:00"
}
}
```
--------------------------------
### List Notification Subscribers Response Example
Source: https://developer.pagerduty.com/api-reference/150361638bfdf-list-notification-subscribers
This is an example of a successful response when listing notification subscribers. It includes pagination details and a list of subscribers with their subscription information.
```json
{
"limit": 100,
"more": false,
"offset": 0,
"subscribers": [
{
"subscriber_id": "PD1234",
"subscriber_type": "user",
"has_indirect_subscription": false,
"subscribed_via": null
},
{
"subscriber_id": "PD1234",
"subscriber_type": "team",
"has_indirect_subscription": true,
"subscribed_via": [
{
"id": "PD1234",
"type": "business_service"
}
]
}
],
"account_id": "PD1234",
"total": 2
}
```
--------------------------------
### Responder Request Response Example
Source: https://developer.pagerduty.com/api-reference/6850764326ee2-create-a-responder-request-for-an-incident
This is an example of a successful response when creating a responder request. It includes details about the incident, the requester, and the targets that the request was sent to.
```json
{
"responder_request": {
"incident": {
"id": "PXP12GZ",
"type": "incident_reference",
"summary": "Ongoing Incident in Mailroom",
"self": "https://api.pagerduty.com/incidents/PXP12GZ",
"html_url": "https://subdomain.pagerduty.com/incidents/PXP12GZ"
},
"requester": {
"id": "P09TT3C",
"type": "user_reference",
"summary": "Jane Doe",
"self": "https://api.pagerduty.com/users/P09TT3C",
"html_url": "https://subdomain.pagerduty.com/users/P09TT3C"
},
"requested_at": "2018-08-16T14:55:17-07:00",
"message": "Please help with issue - join bridge at +1(234)-567-8910",
"responder_request_targets": [
{
"responder_request_target": {
"type": "user",
"id": "PL7A2O4",
"incidents_responders": [
{
"state": "pending",
"user": {
"id": "PL7A2O4",
"type": "user_reference",
"summary": "Lee Turner",
"self": "https://api.pagerduty.com/users/PL7A2O4",
"html_url": "https://subdomain.pagerduty.com/users/PL7A2O4",
"avatar_url": "https://secure.gravatar.com/avatar/51c673f51f6b483b24c889bbafbd2a67.png?d=mm&r=PG"
},
"incident": {
"id": "PXP12GZ",
"type": "incident_reference",
"summary": "Ongoing Incident in Mailroom",
"self": "https://api.pagerduty.com/incidents/PXP12GZ",
"html_url": "https://subdomain.pagerduty.com/incidents/PXP12GZ"
},
"updated_at": "2018-08-09T14:40:48-07:00",
"message": "Please help with issue - join bridge at +1(234)-567-8910",
"requester": {
"id": "P09TT3C",
"type": "user_reference",
"summary": "Jane Doe",
"self": "https://api.pagerduty.com/users/P09TT3C",
"html_url": "https://subdomain.pagerduty.com/users/P09TT3C",
"avatar_url": "https://secure.gravatar.com/avatar/1c747247b75acc1f724e2784c838b3f8.png?d=mm&r=PG"
},
"requested_at": "2018-08-09T21:40:49Z"
}
]
}
}
]
}
}
```
--------------------------------
### Incident Alerts Response Example
Source: https://developer.pagerduty.com/api-reference/4bc42e7ac0c59-list-alerts-for-an-incident
This is an example of a successful response when listing alerts for an incident. It includes details for each alert, pagination information, and the total number of alerts.
```json
{
"alerts": [
{
"id": "PT4KHLK",
"type": "alert",
"summary": "The server is on fire.",
"self": "https://api.pagerduty.com/incidents/PT4KHLK/alerts/PXPGF42",
"html_url": "https://subdomain.pagerduty.com/alerts/PXPGF42",
"created_at": "2015-10-06T21:30:42Z",
"status": "resolved",
"alert_key": "baf7cf21b1da41b4b0221008339ff357",
"service": {
"id": "PIJ90N7",
"type": "service_reference",
"summary": "My Mail Service",
"self": "https://api.pagerduty.com/services/PIJ90N7",
"html_url": "https://subdomain.pagerduty.com/service-directory/PIJ90N7"
},
"body": {
"type": "alert_body",
"contexts": [
{
"type": "link"
}
],
"details": {
"customKey": "Server is on fire!",
"customKey2": "Other stuff!"
}
},
"incident": {
"id": "PT4KHLK",
"type": "incident_reference"
},
"suppressed": false,
"severity": "critical",
"integration": {
"id": "PQ12345",
"type": "generic_email_inbound_integration_reference",
"summary": "Email Integration",
"self": "https://api.pagerduty.com/services/PIJ90N7/integrations/PQ12345",
"html_url": "https://subdomain.pagerduty.com/services/PIJ90N7/integrations/PQ12345"
}
}
],
"limit": 1,
"offset": 0,
"more": true
}
```
--------------------------------
### Incident Notes Response Example
Source: https://developer.pagerduty.com/api-reference/a1ac30885eb7a-list-notes-for-an-incident
This is an example of a successful response when listing notes for an incident. It includes details about the note's author, content, and timestamps.
```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"
},
"channel": {
"summary": "The PagerDuty website or APIs"
},
"content": "Firefighters are on the scene.",
"created_at": "2013-03-06T15:28:51-05:00",
"updated_at": "2023-10-01T12:00:00-05:00"
},
{
"id": "PCQC25",
"user": {
"id": "PXPGF42",
"type": "bot_user_reference",
"summary": "A Global Event Rule",
"self": "https://api.pagerduty.com/users/PXPGF42",
"html_url": "https://subdomain.pagerduty.com/event-rules/global/0e84de00-9511-4380-9f4f-a7b568bb49a0/rules/14e56445-ebab-4dd0-ba9d-fc28a41b7e7b"
},
"channel": {
"id": "14e56445-ebab-4dd0-ba9d-fc28a41b7e7b",
"type": "event_rule_reference",
"summary": "A Global Event Rule",
"self": "https://api.pagerduty.com/rulesets/0e84de00-9511-4380-9f4f-a7b568bb49a0/rules/14e56445-ebab-4dd0-ba9d-fc28a41b7e7b",
"html_url": "https://subdomain.pagerduty.com/event-rules/global/0e84de00-9511-4380-9f4f-a7b568bb49a0/rules/14e56445-ebab-4dd0-ba9d-fc28a41b7e7b"
},
"content": "Initial alert information indicates a 1-alarm fire",
"created_at": "2013-03-06T15:28:42-05:00",
"updated_at": "2023-10-01T12:00:00-05:00"
}
]
}
```
--------------------------------
### List Schedules Query Parameters
Source: https://developer.pagerduty.com/api-reference
Documentation for `team_ids[]` query parameter for `GET /schedules` and `GET /v3/schedules`.
```APIDOC
## GET /schedules
### Description
Lists schedules. Supports filtering by `team_ids[]`.
### Method
GET
### Endpoint
/schedules
### Parameters
#### Query Parameters
- **team_ids[]** (array) - Optional - Filter schedules by team IDs.
## GET /v3/schedules
### Description
Lists schedules (v3). Supports filtering by `team_ids[]`, `query`, and `total`.
### Method
GET
### Endpoint
/v3/schedules
### Parameters
#### Query Parameters
- **team_ids[]** (array) - Optional - Filter schedules by team IDs.
- **query** (string) - Optional - A query string to search schedules.
- **total** (boolean) - Optional - Whether to include the total count of schedules.
```
--------------------------------
### Status Update Response Example
Source: https://developer.pagerduty.com/api-reference/594c9ed714b93-create-a-status-update-on-an-incident
This is an example of a successful response when creating a status update. It includes the details of the created status update, such as its ID, message, sender, and creation timestamp.
```json
{
"status_update": {
"id": "PWL7QXS",
"message": "The server fire is spreading.",
"sender": {
"id": "PXPGF42",
"type": "user_reference",
"summary": "Earline Greenholt",
"self": "https://api.pagerduty.com/users/PXPGF42",
"html_url": "https://subdomain.pagerduty.com/users/PXPGF42"
},
"created_at": "2013-03-06T15:28:51-05:00",
"html_message": "
Server is still on fire
",
"subject": "Server Fire Update"
}
}
```
--------------------------------
### Response Body Example
Source: https://developer.pagerduty.com/api-reference/2e71be39dc590-list-business-services-impacted-by-the-given-incident
This is an example of the JSON response body when successfully retrieving impacted business services. It includes pagination details and a list of services with their impact status.
```json
{
"limit": 100,
"next_cursor": null,
"services": [
{
"id": "PD1234",
"name": "Web API",
"type": "business_service",
"status": "impacted"
},
{
"id": "PF9KMXH",
"name": "Analytics Backend",
"type": "business_service",
"status": "impacted"
}
]
}
```
--------------------------------
### GET /services/{id}?include[]=integrations
Source: https://developer.pagerduty.com/api-reference
Added `integrations` as an option for the `include[]` query parameter to the Get a Service endpoint.
```APIDOC
## GET /services/{id}
### Description
Retrieves details for a specific service, with an option to include integrations.
### Method
GET
### Endpoint
/services/{id}
### Query Parameters
- **include[]** (string) - Optional - Specifies related data to include. `integrations` can be included.
```
--------------------------------
### Cancel Responder Requests Response Example (All Cancelled)
Source: https://developer.pagerduty.com/api-reference/4c912c8cf8077-cancel-responder-requests-for-an-incident
This is an example of a successful response when all responder requests for the specified targets have been cancelled. Each target in the response includes its result.
```json
{
"responder_request_targets": [
{
"type": "user_reference",
"id": "PJ25ZYX",
"result": "cancelled"
},
{
"type": "escalation_policy_reference",
"id": "PEP12AB",
"result": "cancelled"
}
]
}
```
--------------------------------
### PagerDuty Incident Response Example
Source: https://developer.pagerduty.com/api-reference/8a0e1aa2ec666-update-an-incident
This is an example of a successful response when updating an incident. It includes details about the incident's ID, status, timestamps, associated services, assignments, and more.
```json
{
"incident": {
"id": "PT4KHLK",
"type": "incident",
"summary": "[#1234] The server is on fire.",
"self": "https://api.pagerduty.com/incidents/PT4KHLK",
"html_url": "https://subdomain.pagerduty.com/incidents/PT4KHLK",
"incident_number": 1234,
"created_at": "2015-10-06T21:30:42Z",
"updated_at": "2015-10-06T21:40:23Z",
"status": "resolved",
"title": "The server is on fire.",
"pending_actions": [
{
"type": "unacknowledge",
"at": "2015-11-10T01:02:52Z"
},
{
"type": "resolve",
"at": "2015-11-10T04:31:52Z"
}
],
"incident_key": "baf7cf21b1da41b4b0221008339ff357",
"service": {
"id": "PIJ90N7",
"type": "service_reference",
"summary": "My Mail Service",
"self": "https://api.pagerduty.com/services/PIJ90N7",
"html_url": "https://subdomain.pagerduty.com/service-directory/PIJ90N7"
},
"priority": {
"id": "P53ZZH5",
"type": "priority_reference",
"summary": "P2",
"self": "https://api.pagerduty.com/priorities/P53ZZH5"
},
"assigned_via": "escalation_policy",
"assignments": [
{
"at": "2015-11-10T00:31:52Z",
"assignee": {
"id": "PXPGF42",
"type": "user_reference",
"summary": "Earline Greenholt",
"self": "https://api.pagerduty.com/users/PXPGF42",
"html_url": "https://subdomain.pagerduty.com/users/PXPGF42"
}
}
],
"acknowledgements": [
{
"at": "2015-11-10T00:32:52Z",
"acknowledger": {
"id": "PXPGF42",
"type": "user_reference",
"summary": "Earline Greenholt",
"self": "https://api.pagerduty.com/users/PXPGF42",
"html_url": "https://subdomain.pagerduty.com/users/PXPGF42"
}
}
],
"resolved_at": "2015-10-06T21:38:23Z",
"last_status_change_at": "2015-10-06T21:38:23Z",
"last_status_change_by": {
"id": "PXPGF42",
"type": "user_reference",
"summary": "Earline Greenholt",
"self": "https://api.pagerduty.com/users/PXPGF42",
"html_url": "https://subdomain.pagerduty.com/users/PXPGF42"
},
"first_trigger_log_entry": {
"id": "Q02JTSNZWHSEKV",
"type": "trigger_log_entry_reference",
"summary": "Triggered through the API",
"self": "https://api.pagerduty.com/log_entries/Q02JTSNZWHSEKV?incident_id=PT4KHLK",
"html_url": "https://subdomain.pagerduty.com/incidents/PT4KHLK/log_entries/Q02JTSNZWHSEKV"
},
"incident_type": {
"name": "major_incident"
},
"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"
}
}
```
--------------------------------
### Account Abilities Response Example
Source: https://developer.pagerduty.com/api-reference/9def78ed82b74-list-abilities
This is an example of a successful response from the PagerDuty API when listing account abilities. The response body contains an array of strings, where each string represents an ability your account possesses.
```json
{
"abilities": [
"teams",
"read_only_users",
"service_support_hours",
"urgencies"
]
}
```
--------------------------------
### Get Alert Request (cURL)
Source: https://developer.pagerduty.com/api-reference/592e890ae8c99-get-an-alert
Use this cURL command to make a GET request to retrieve a specific alert. Ensure you replace placeholders with actual IDs and your API key.
```shell
curl --request GET \
--url https://api.pagerduty.com/incidents/{id}/alerts/{alert_id} \
--header 'Accept: application/json' \
--header 'Authorization: 123' \
--header 'Content-Type: application/json'
```
--------------------------------
### List Schedules Endpoint with Includes
Source: https://developer.pagerduty.com/api-reference
Added 'includes' parameter to the list schedules endpoint with an example.
```APIDOC
## GET /schedules
### Description
Retrieves a list of schedules, with the option to include additional details.
### Method
GET
### Endpoint
/schedules
### Query Parameters
- **includes** (array) - Optional - Specifies additional data to include in the response, such as 'users'.
```
--------------------------------
### GET /tags
Source: https://developer.pagerduty.com/api-reference
Retrieves a list of tags. The documentation for the query parameter matching behavior has been clarified.
```APIDOC
## GET /tags
### Description
Retrieves a list of all available tags.
### Method
GET
### Endpoint
/tags
### Parameters
#### Query Parameters
- **query** (string) - Optional - A string to filter tags by. Matching behavior is documented separately.
### Response
#### Success Response (200 OK)
- **tags** (array) - An array of tag objects.
#### Response Example
```json
{
"tags": [
{
"id": "TAGXXXXXX",
"text": "production"
}
]
}
```
```
--------------------------------
### GET /business_services/{id}
Source: https://developer.pagerduty.com/api-reference
Retrieves details for a specific business service. Includes team information.
```APIDOC
## GET /business_services/{id}
### Description
Retrieves detailed information about a specific business service, including associated teams.
### Method
GET
### Endpoint
/business_services/{id}
### Parameters
#### Path Parameters
- **id** (string) - Required - The ID of the business service.
### Response
#### Success Response (200 OK)
- **business_service** (object) - The business service object.
- **teams** (array) - An array of team objects associated with the business service.
#### Response Example
```json
{
"business_service": {
"id": "BXXXXXX",
"name": "E-commerce Platform",
"teams": [
{
"id": "TXXXXXX",
"name": "Platform Team"
}
]
}
}
```
```
--------------------------------
### Get Schedules
Source: https://developer.pagerduty.com/api-reference/f1a95bb9397ba-changelog
Endpoint for retrieving schedule information. Details how 'since' and 'until' parameters function.
```http
GET /schedules
```
--------------------------------
### Sample MCP Client Configuration
Source: https://developer.pagerduty.com/api-reference/d71edf8527b5e-pager-duty-mcp-api
Example configuration for MCP clients, such as Microsoft VSCode, to connect to the PagerDuty MCP API. It specifies the server URL and authentication headers.
```json
{
"servers": {
"pagerduty-mcp": {
"url": "https://mcp.pagerduty.com/mcp",
"type": "http",
"headers": {
"Authorization": "Token token=${input:pagerduty-api-key}"
}
}
},
"inputs": [
{
"type": "promptString",
"id": "pagerduty-api-key",
"description": "PagerDuty API Key",
"password": true
}
]
}
```
--------------------------------
### POST /schedules
Source: https://developer.pagerduty.com/api-reference
Removed ended layer in schedule create example to guide users away from creating schedules with layers that are no longer in effect.
```APIDOC
## POST /schedules
### Description
Creates a new schedule. The example has been updated to exclude ended layers.
### Method
POST
### Endpoint
/schedules
```
--------------------------------
### Create OAuth Client for Webhook Subscriptions
Source: https://developer.pagerduty.com/api-reference/f1a95bb9397ba-changelog
Endpoint for creating new OAuth clients specifically for webhook subscriptions.
```bash
POST /webhook_subscriptions/oauth_clients
```
--------------------------------
### Merge Incidents API Response Example
Source: https://developer.pagerduty.com/api-reference/1204a0b134c9a-merge-incidents
This is an example of a successful response when merging incidents. It returns the target incident object with its details.
```json
{
"incident": {
"id": "PT4KHLK",
"type": "incident_reference",
"summary": "[#1234] The server is on fire.",
"self": "https://api.pagerduty.com/incidents/PT4KHLK",
"html_url": "https://subdomain.pagerduty.com/incidents/PT4KHLK"
}
}
```
--------------------------------
### Services, Business Services, and Service Dependencies Limits
Source: https://developer.pagerduty.com/api-reference
Added product limit documentation for Services, Business Services, and Service Dependencies.
```APIDOC
## Product Limits for Services
### Description
Documentation has been updated to include product limits for Services, Business Services, and Service Dependencies.
```
--------------------------------
### List Service Custom Field Options
Source: https://developer.pagerduty.com/api-reference/f1a95bb9397ba-changelog
Retrieves the field options for a specific service custom field. Requires the X-EARLY-ACCESS header.
```bash
GET /services/custom_fields/{field_id}/field_options
```
--------------------------------
### List Service Custom Fields
Source: https://developer.pagerduty.com/api-reference/f1a95bb9397ba-changelog
Retrieves a list of all custom fields configured for services. Requires the X-EARLY-ACCESS header.
```bash
GET /services/custom_fields
```
--------------------------------
### List Account Abilities (cURL)
Source: https://developer.pagerduty.com/api-reference/9def78ed82b74-list-abilities
Use this cURL command to make a GET request to the PagerDuty API to list all abilities available to your account. Ensure you include the correct Authorization header.
```shell
curl --request GET \
--url https://api.pagerduty.com/abilities \
--header 'Accept: application/json' \
--header 'Authorization: 123' \
--header 'Content-Type: application/json'
```
--------------------------------
### Incident Response Example
Source: https://developer.pagerduty.com/api-reference/9d0b4b12e36f9-list-incidents
This is an example of a successful response when retrieving incident details from the PagerDuty API. It includes various fields such as ID, summary, status, service details, and timestamps.
```json
{
"incidents": [
{
"id": "PT4KHLK",
"type": "incident",
"summary": "[#1234] The server is on fire.",
"self": "https://api.pagerduty.com/incidents/PT4KHLK",
"html_url": "https://subdomain.pagerduty.com/incidents/PT4KHLK",
"incident_number": 1234,
"title": "The server is on fire.",
"created_at": "2015-10-06T21:30:42Z",
"updated_at": "2015-10-06T21:40:23Z",
"status": "resolved",
"incident_key": "baf7cf21b1da41b4b0221008339ff357",
"service": {
"id": "PIJ90N7",
"type": "service_reference",
"summary": "My Mail Service",
"self": "https://api.pagerduty.com/services/PIJ90N7",
"html_url": "https://subdomain.pagerduty.com/service-directory/PIJ90N7"
},
"assignments": [],
"assigned_via": "escalation_policy",
"last_status_change_at": "2015-10-06T21:38:23Z",
"resolved_at": "2015-10-06T21:38:23Z",
"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"
},
"alert_counts": {
"all": 2,
"triggered": 0,
"resolved": 2
},
"is_mergeable": true,
"incident_type": {
"name": "incident_default"
},
"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"
}
],
"pending_actions": [],
"acknowledgements": [],
"alert_grouping": {
"grouping_type": "advanced",
"started_at": "2015-10-06T21:30:42Z",
"ended_at": null,
"alert_grouping_active": true
},
"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"
},
"priority": {
"id": "P53ZZH5",
"type": "priority_reference",
"summary": "P2",
"self": "https://api.pagerduty.com/priorities/P53ZZH5"
},
"resolve_reason": null,
"conference_bridge": {
"conference_number": "+1-415-555-1212,,,,1234#",
"conference_url": "https://example.com/acb-123"
},
"incidents_responders": [],
"responder_requests": [],
"urgency": "high"
}
],
"limit": 1,
"offset": 0,
"more": true
}
```
--------------------------------
### List Abilities
Source: https://developer.pagerduty.com/api-reference/9def78ed82b74-list-abilities
Retrieves a list of all abilities available to your account. Abilities describe your account's capabilities by feature name, such as 'teams'.
```APIDOC
## GET /abilities
### Description
Lists all of your account's abilities, by name. Abilities describe your account's capabilities by feature name. An ability may be available to your account based on things like your pricing plan or account state.
### Method
GET
### Endpoint
https://api.pagerduty.com/abilities
### Parameters
#### Query Parameters
None
#### Headers
- **Accept** (string) - Required - The `Accept` header is used as a versioning header. Default: `application/vnd.pagerduty+json;version=2`
- **Authorization** (string) - Required - API Key for authentication.
- **Content-Type** (string) - Required - Allowed value: `application/json`. Default: `application/json`
### Request Example
```shell
curl --request GET \
--url https://api.pagerduty.com/abilities \
--header 'Accept: application/json' \
--header 'Authorization: YOUR_API_KEY' \
--header 'Content-Type: application/json'
```
### Response
#### Success Response (200)
- **abilities** (array[string]) - Required - The set of abilities your account has.
#### Response Example
```json
{
"abilities": [
"teams",
"read_only_users",
"service_support_hours",
"urgencies"
]
}
```
```
--------------------------------
### Create User
Source: https://developer.pagerduty.com/api-reference/f1a95bb9397ba-changelog
Endpoint for creating a new user. Note: A password property is not required.
```http
POST /users
```
--------------------------------
### Get Outlier Incident Request
Source: https://developer.pagerduty.com/api-reference/bc1ec9fb359f8-get-outlier-incident
Use this cURL command to make a GET request to the PagerDuty API to retrieve outlier incident information. Ensure you replace `{id}` with the actual incident ID and provide your API key.
```curl
curl --request GET \
--url https://api.pagerduty.com/incidents/{id}/outlier_incident \
--header 'Accept: application/json' \
--header 'Authorization: 123' \
--header 'Content-Type: application/json'
```
--------------------------------
### Test Account Ability with cURL
Source: https://developer.pagerduty.com/api-reference/990c1ce2c2201-test-an-ability
Use this cURL command to test if your account possesses a specific ability. Ensure you replace `{id}` with the actual ability ID and provide your authorization token.
```shell
curl --request GET \
--url https://api.pagerduty.com/abilities/{id} \
--header 'Accept: application/json' \
--header 'Authorization: 123' \
--header 'Content-Type: application/json'
```
--------------------------------
### GET /response_plays
Source: https://developer.pagerduty.com/api-reference
Retrieves a list of response plays.
```APIDOC
## GET /response_plays
### Description
Retrieves a list of available response plays.
### Method
GET
### Endpoint
/response_plays
### Response
#### Success Response (200 OK)
- **response_plays** (array) - An array of response play objects.
#### Response Example
```json
{
"response_plays": [
{
"id": "RPXXXXXX",
"name": "Investigate Incident"
}
]
}
```
```
--------------------------------
### POST /response_plays
Source: https://developer.pagerduty.com/api-reference
Creates a new response play.
```APIDOC
## POST /response_plays
### Description
Creates a new response play.
### Method
POST
### Endpoint
/response_plays
### Request Body
- **response_play** (object) - Required - The details of the response play.
- **name** (string) - Required - The name of the response play.
- **description** (string) - Optional - A description of the response play.
### Request Example
```json
{
"response_play": {
"name": "New Response Play",
"description": "This is a newly created response play."
}
}
```
### Response
#### Success Response (201 Created)
- **response_play** (object) - The newly created response play object.
#### Response Example
```json
{
"response_play": {
"id": "RPYYYYYY",
"name": "New Response Play",
"description": "This is a newly created response play."
}
}
```
```
--------------------------------
### Get an alert
Source: https://developer.pagerduty.com/api-reference/4c912c8cf8077-cancel-responder-requests-for-an-incident
Retrieve details for a specific alert.
```APIDOC
## GET /alerts/:id
### Description
Get an alert.
### Method
GET
### Endpoint
/alerts/:id
```
--------------------------------
### Get an incident
Source: https://developer.pagerduty.com/api-reference/4c912c8cf8077-cancel-responder-requests-for-an-incident
Retrieve details for a specific incident.
```APIDOC
## GET /incidents/:id
### Description
Get an incident.
### Method
GET
### Endpoint
/incidents/:id
```
--------------------------------
### User Management with Licensing
Source: https://developer.pagerduty.com/api-reference
Updates to user creation and update endpoints to support assigning licenses.
```APIDOC
## POST /users
### Description
Assigns a License to a User when it is first created.
### Method
POST
### Endpoint
/users
```
```APIDOC
## PUT /users/:id
### Description
Assigns a new License to an existing User.
### Method
PUT
### Endpoint
/users/:id
```
--------------------------------
### Get Custom Field Values (cURL)
Source: https://developer.pagerduty.com/api-reference/85a33d421d50b-get-custom-field-values
Use this cURL command to make a GET request to the PagerDuty API to retrieve custom field values for an incident. Ensure you replace `{id}` with the actual incident ID and provide a valid authorization token.
```curl
curl --request GET \
--url https://api.pagerduty.com/incidents/{id}/custom_fields/values \
--header 'Accept: application/json' \
--header 'Authorization: 123'
```
--------------------------------
### User Creation
Source: https://developer.pagerduty.com/api-reference
Create a new user in PagerDuty.
```APIDOC
## POST /users
### Description
Creates a new user. The `password` property is not required.
### Method
POST
### Endpoint
/users
### Parameters
#### Request Body
- **user** (object) - Required - The user object.
- **name** (string) - Required - The name of the user.
- **email** (string) - Required - The email address of the user.
- **time_zone** (string) - Required - The time zone of the user.
- **password** (string) - Optional - The password for the user.
### Request Example
{
"user": {
"name": "Example User",
"email": "user@example.com",
"time_zone": "America/New_York"
}
}
### Response
#### Success Response (201)
- **user** (object) - The created user object.
### Response Example
{
"user": {
"id": "PXXXXXX",
"name": "Example User",
"email": "user@example.com",
"time_zone": "America/New_York",
"created_at": "2022-01-31T10:00:00Z"
}
}
```
--------------------------------
### Enable Webhook Subscription
Source: https://developer.pagerduty.com/api-reference
Added an Early-Access endpoint for enabling a webhook subscription.
```APIDOC
## POST /webhook_subscriptions/{id}/enable
### Description
Enables a specific webhook subscription.
### Method
POST
### Endpoint
/webhook_subscriptions/{id}/enable
```
--------------------------------
### Get Related Incidents - cURL Request
Source: https://developer.pagerduty.com/api-reference/a9390e225931d-get-related-incidents
Use this cURL command to make a GET request to the PagerDuty API to retrieve related incidents for a specific incident ID. Ensure you replace `{id}` with the actual incident ID and provide a valid authorization token.
```curl
curl --request GET \
--url https://api.pagerduty.com/incidents/{id}/related_incidents \
--header 'Accept: application/json' \
--header 'Authorization: 123' \
--header 'Content-Type: application/json'
```
--------------------------------
### Create Service Custom Field
Source: https://developer.pagerduty.com/api-reference/f1a95bb9397ba-changelog
Creates a new custom field for services. Requires the X-EARLY-ACCESS header.
```bash
POST /services/custom_fields
```
--------------------------------
### Get an Incident
Source: https://developer.pagerduty.com/api-reference/9d0b4b12e36f9-list-incidents
Retrieves details for a specific incident by its ID.
```APIDOC
## GET /incidents/{id}
### Description
Retrieves details for a specific incident by its ID.
### Method
GET
### Endpoint
/incidents/{id}
### Parameters
#### Path Parameters
- **id** (string) - Required - The ID of the incident to retrieve.
### Response
#### Success Response (200)
- **data** (object) - The incident object.
- **id** (string) - The ID of the incident.
- **type** (string) - The resource type, "incident".
- **attributes** (object) - The incident attributes.
- **title** (string) - The title of the incident.
- **description** (string) - The description of the incident.
- **status** (string) - The status of the incident.
- **created_at** (datetime) - The timestamp when the incident was created.
- **updated_at** (datetime) - The timestamp when the incident was last updated.
- **resolved_at** (datetime) - The timestamp when the incident was resolved.
- **last_status_change_at** (datetime) - The timestamp of the last status change.
- **first_trigger_at** (datetime) - The timestamp of the first trigger.
- **num_cdot_events** (integer) - The number of related events.
- **service** (object) - The service associated with the incident.
- **id** (string) - The ID of the service.
- **name** (string) - The name of the service.
- **html_url** (string) - The URL to the service.
- **assigned_to_user** (object) - The user assigned to the incident.
- **id** (string) - The ID of the user.
- **name** (string) - The name of the user.
- **email** (string) - The email of the user.
- **assigned_to_group** (object) - The group assigned to the incident.
- **id** (string) - The ID of the group.
- **name** (string) - The name of the group.
- **resolve_reason** (string) - The reason for resolving the incident.
- **links** (object)
- **self** (string) - The URL to the incident.
#### Response Example
{
"data": {
"id": "PI9XYZ1",
"type": "incident",
"attributes": {
"title": "High CPU Usage on Web Server",
"description": "CPU usage has been consistently above 90% for the last hour.",
"status": "triggered",
"created_at": "2023-10-27T10:00:00Z",
"updated_at": "2023-10-27T10:05:00Z",
"resolved_at": null,
"last_status_change_at": "2023-10-27T10:00:00Z",
"first_trigger_at": "2023-10-27T10:00:00Z",
"num_cdot_events": 5,
"service": {
"id": "P12345",
"name": "Web Servers",
"html_url": "https://app.pagerduty.com/services/P12345"
},
"assigned_to_user": {
"id": "PU1234",
"name": "Alice Smith",
"email": "alice.smith@example.com"
},
"assigned_to_group": {
"id": "PG5678",
"name": "Operations Team"
},
"resolve_reason": null
},
"links": {
"self": "https://api.pagerduty.com/incidents/PI9XYZ1"
}
}
}
```
--------------------------------
### Get Related Incidents
Source: https://developer.pagerduty.com/api-reference/4c912c8cf8077-cancel-responder-requests-for-an-incident
Retrieve a list of related incidents.
```APIDOC
## GET /incidents/related/:id
### Description
Get Related Incidents.
### Method
GET
### Endpoint
/incidents/related/:id
```
--------------------------------
### Create an Incident
Source: https://developer.pagerduty.com/api-reference/4c912c8cf8077-cancel-responder-requests-for-an-incident
Create a new incident.
```APIDOC
## POST /incidents
### Description
Create an Incident.
### Method
POST
### Endpoint
/incidents
```
--------------------------------
### Templates API
Source: https://developer.pagerduty.com/api-reference
Documentation for the Templates API has been added.
```APIDOC
## Templates API
### Description
Provides access to Templates functionality.
### Note:
Specific endpoints and details are available in the full API documentation.
```
--------------------------------
### Get Past Incidents
Source: https://developer.pagerduty.com/api-reference/4c912c8cf8077-cancel-responder-requests-for-an-incident
Retrieve a list of past incidents.
```APIDOC
## GET /incidents/past
### Description
Get Past Incidents.
### Method
GET
### Endpoint
/incidents/past
```
--------------------------------
### Get Outlier Incident
Source: https://developer.pagerduty.com/api-reference/4c912c8cf8077-cancel-responder-requests-for-an-incident
Retrieve information about an outlier incident.
```APIDOC
## GET /incidents/outlier/:id
### Description
Get Outlier Incident.
### Method
GET
### Endpoint
/incidents/outlier/:id
```