> Documentation index for AI agents: https://docs.pagerduty.com/llms.txt

# Get Past Incidents

`GET https://api.pagerduty.com/incidents/{id}/past_incidents`

Past Incidents returns Incidents within the past 6 months that have similar metadata and were generated on the same Service as the parent Incident. By default, 5 Past Incidents are returned. Note: This feature is currently available as part of the Event Intelligence package or Digital Operations plan only.

For more information see the [API Concepts Document](https://docs.pagerduty.com/developer/api-concepts#past_incidents)

Scoped OAuth requires: `incidents.read`

## Authorization

- **api_key** (apiKey) — `Authorization` header. The API Key with format `Token token=<API_KEY>`

## Path parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `id` | string | yes | The ID of the resource. |

## Query parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `limit` | integer |  | The number of results to be returned in the response. Default: `5`. Minimum: 1. Maximum: 999. |
| `total` | boolean |  | By default the `total` field in the response body is set to `null` to provide the fastest possible response times. Set `total` to `true` for this field to be populated with the total number of Past Incidents. Default: `false`. |

## Header parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `Accept` | string | yes | The `Accept` header is used as a versioning header. Default: `application/vnd.pagerduty+json;version=2`. |

## Response 200

OK

### `application/json`

| Field | Type | Required | Description |
|---|---|---|---|
| `past_incidents` | array of object |  | Aggregate of past incidents. |
| `past_incidents[].incident` | object |  | Incident model reference. |
| `past_incidents[].incident.id` | string |  | The globally unique identifier of the incident. |
| `past_incidents[].incident.created_at` | string |  | The date/time the incident was first triggered. |
| `past_incidents[].incident.self` | string |  | The URL at which the object is accessible. |
| `past_incidents[].incident.title` | string |  | The description of the nature, symptoms, cause, or effect of the incident. |
| `past_incidents[].score` | number |  | The computed similarity score associated with the incident and parent incident. |
| `total` | number |  | The total number of Past Incidents if the total parameter was set in the request. |
| `limit` | number |  | The maximum number of Incidents requested. |

Example: Response Example

```json
{
  "past_incidents": [
    {
      "incident": {
        "id": "PFBE9I2",
        "created_at": "2020-11-04T16:08:15Z",
        "self": "https://api.pagerduty.com/incidents/PFBE9I2",
        "title": "Things are so broken!"
      },
      "score": 46.8249
    },
    {
      "incident": {
        "id": "P1J6V6M",
        "created_at": "2020-10-22T17:18:14Z",
        "self": "https://api.pagerduty.com/incidents/P1J6V6M",
        "title": "Things are so broken!"
      },
      "score": 46.8249
    },
    {
      "incident": {
        "id": "P6HPX5N",
        "created_at": "2020-10-06T22:01:13Z",
        "self": "https://api.pagerduty.com/incidents/P6HPX5N",
        "title": "You forgot to feed the cat!"
      },
      "score": 0
    }
  ],
  "total": 3,
  "limit": 5
}
```

## Response 400

Caller provided invalid arguments. Please review the response for error details. Retrying with the same arguments will *not* work.

### `application/json`

| Field | Type | Required | Description |
|---|---|---|---|
| `error` | object |  |  |
| `error.code` | integer |  | Read-only. |
| `error.message` | string |  | Error message string. Read-only. |
| `error.errors` | array of string |  | Read-only. |

## Response 403

Caller is not authorized to view the requested resource.
While your authentication is valid, the authenticated user or token does not have permission to perform this action.

### `application/json`

| Field | Type | Required | Description |
|---|---|---|---|
| `error` | object |  |  |
| `error.code` | integer |  | Read-only. |
| `error.message` | string |  | Error message string. Read-only. |
| `error.errors` | array of string |  | Read-only. |

## Response 404

The requested resource was not found.

### `application/json`

| Field | Type | Required | Description |
|---|---|---|---|
| `error` | object |  |  |
| `error.code` | integer |  | Read-only. |
| `error.message` | string |  | Error message string. Read-only. |
| `error.errors` | array of string |  | Read-only. |

## Response 500

Internal Server Error the PagerDuty server experienced an error.

### `application/json`

| Field | Type | Required | Description |
|---|---|---|---|
| `error` | object |  |  |
| `error.code` | integer |  | Read-only. |
| `error.message` | string |  | Error message string. Read-only. |
| `error.errors` | array of string |  | Read-only. |

## Developer Agreement

Your access to and use of the PagerDuty Developer Services is governed by the [PagerDuty Developer Agreement](https://docs.pagerduty.com/developer/pagerduty-developer-agreement).
