> ## Documentation Index
> Fetch the complete documentation index at: https://docs.blinkops.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 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 ![API Concepts Document](https://developer.pagerduty.com/api-reference/ZG9jOjI3NDc5Nzc-api-concepts#incidents).

## Basic Parameters

<div className="integrations-table">
  | 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.<br />Defaults to all urgencies. Account must have the `urgencies` ability to do this.                                                                                                                                                                                                                                                                                    |
</div>

## Advanced Parameters

<div className="integrations-table">
  | 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.<br />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](https://developer.pagerduty.com/docs/rest-api-v2/pagination/) 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. |
</div>

## Example Output

```json theme={"dark"}
{
	"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
}
```

## Workflow Library Example

[List Incidents with Pagerduty and Send Results Via Email](https://library.blinkops.com/workflows/list-incidents-with-pagerduty-and-send-results-via-email)

<div className="iframe-wrapper">
  <div className="iframe-media">
    <img src="https://mintcdn.com/blinkops-2/ojHYuDeYX5FWuN8a/img/Icons/play-box.svg?fit=max&auto=format&n=ojHYuDeYX5FWuN8a&q=85&s=b8af968e71438a9499c3223c9bd29fb2" alt="Workflow Library" width="16" height="16" data-path="img/Icons/play-box.svg" />

    Preview this Workflow on desktop
  </div>

  <iframe className="iframe" src="https://library.blinkops.com/workflows/list-incidents-with-pagerduty-and-send-results-via-email/canvas" />
</div>
