List Incidents
List existing incidents.
An incident represents a problem or an issue that needs to be addressed and resolved.
For more information see the .
Basic Parameters
Parameter | Description |
---|---|
Include | Array of additional details to include. |
Sort By | Used to specify both the field you wish to sort the results on (incident_number/created_at/resolved_at/urgency), as well as the direction (asc/desc) of the results. The sort_by field and direction should be separated by a colon. A maximum of two fields can be included, separated by a comma. Sort direction defaults to ascending. The account must have the urgencies ability to sort by the urgency. |
Statuses | Return only incidents with the given statuses. (More status codes may be introduced in the future.). |
Urgencies | Urgencies of the incidents to be returned. Defaults to all urgencies. Account must have the urgencies ability to do this. |
Advanced Parameters
Parameter | Description |
---|---|
Date Range | When set to all, the since and until parameters and defaults are ignored. |
Incident Key | Incident de-duplication key. Incidents with child alerts do not have an incident key; querying by incident key will return incidents whose alerts have alert_key matching the given incident key. |
Limit | The number of results per page. |
Offset | Offset to start pagination search results. |
Service IDs | Returns only the incidents associated with the passed service(s). This expects one or more service IDs. |
Since | The start of the date range over which you want to search. Maximum range is 6 months and default is 1 month. |
Team IDs | A comma separated list of team IDs. Only results related to these teams will be returned. Account must have the teams ability to use this parameter. |
Time Zone | Time zone in which dates in the result will be rendered. |
Total | By default the total field in pagination responses is set to null to provide the fastest possible response times. Set total to true for this field to be populated. See our Pagination Docs for more information. |
Until | The end of the date range over which you want to search. Maximum range is 6 months and default is 1 month. |
User IDs | 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. |
Example Output
{
"summary": "Response Example",
"value": {
"incidents": [
{
"acknowledgements": [],
"assigned_via": "escalation_policy",
"assignments": [],
"conference_bridge": {
"conference_number": "+1-415-555-1212,,,,1234#",
"conference_url": "https://example.com/acb-123"
},
"created_at": "2015-10-06T21:30:42Z",
"escalation_policy": {
"html_url": "https://subdomain.pagerduty.com/escalation_policies/PT20YPA",
"id": "PT20YPA",
"self": "https://api.pagerduty.com/escalation_policies/PT20YPA",
"summary": "Another Escalation Policy",
"type": "escalation_policy_reference"
},
"first_trigger_log_entry": {
"html_url": "https://subdomain.pagerduty.com/incidents/PT4KHLK/log_entries/Q02JTSNZWHSEKV",
"id": "Q02JTSNZWHSEKV",
"self": "https://api.pagerduty.com/log_entries/Q02JTSNZWHSEKV?incident_id=PT4KHLK",
"summary": "Triggered through the API",
"type": "trigger_log_entry_reference"
},
"html_url": "https://subdomain.pagerduty.com/incidents/PT4KHLK",
"id": "PT4KHLK",
"incident_key": "baf7cf21b1da41b4b0221008339ff357",
"incident_number": 1234,
"last_status_change_at": "2015-10-06T21:38:23Z",
"last_status_change_by": {
"html_url": "https://subdomain.pagerduty.com/users/PXPGF42",
"id": "PXPGF42",
"self": "https://api.pagerduty.com/users/PXPGF42",
"summary": "Earline Greenholt",
"type": "user_reference"
},
"priority": {
"id": "P53ZZH5",
"self": "https://api.pagerduty.com/priorities/P53ZZH5",
"summary": "P2",
"type": "priority_reference"
},
"self": "https://api.pagerduty.com/incidents/PT4KHLK",
"service": {
"html_url": "https://subdomain.pagerduty.com/services/PIJ90N7",
"id": "PIJ90N7",
"self": "https://api.pagerduty.com/services/PIJ90N7",
"summary": "My Mail Service",
"type": "service_reference"
},
"status": "resolved",
"summary": "[#1234] The server is on fire.",
"teams": [
{
"html_url": "https://subdomain.pagerduty.com/teams/PQ9K7I8",
"id": "PQ9K7I8",
"self": "https://api.pagerduty.com/teams/PQ9K7I8",
"summary": "Engineering",
"type": "team_reference"
}
],
"title": "The server is on fire.",
"type": "incident",
"urgency": "high"
}
],
"limit": 1,
"more": true,
"offset": 0
}
}
Workflow Library Example
List Incidents with Pagerduty and Send Results Via Email