---
title: Get a PagerDuty incident
source: https://docs.newrelic.com/docs/workflow-automation/setup-and-configure/actions-catalog/pagerduty/pagerduty-incident-get
---

For prerequisites, see [PagerDuty incident actions](https://docs.newrelic.com/docs/workflow-automation/setup-and-configure/actions-catalog/pagerduty/pagerduty-incident#prerequisites).

## Get a PagerDuty incident

The action identifier is `pagerduty.incident.get`.

Retrieves the details of a single PagerDuty incident by ID.

### Inputs

The following table describes all available input fields for this action.

| Input          | Type   | Description                                                                          | Example                                                                          |
| -------------- | ------ | ------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------- |
| **token**      | String | **Required.** PagerDuty API token.                                                   | `${{ :secrets:pagerdutyApiToken }}`                                              |
| **incidentId** | String | **Required.** The incident ID to retrieve.                                           | `"Q123456789"`                                                                   |
| **parameters** | Map    | **Optional.** Additional query parameters such as `include[]` for related resources. | `{"include[]": "services"}`                                                      |
| **selectors**  | List   | **Optional.** JQ selectors to extract fields from the output.                        | `[{"name": "incidentId", "expression": ".responseBody | fromjson.incident.id"}]` |

### Outputs

The following table describes all output fields returned by this action.

| Output           | Type    | Description                                  |
| ---------------- | ------- | -------------------------------------------- |
| **success**      | Boolean | `true` on success, `false` on failure.       |
| **response**     | Object  | The incident object.                         |
| **errorMessage** | String  | Error message on failure. `null` on success. |

### Example

The following example retrieves the details of a PagerDuty incident by ID.

| Workflow example                                                                                                                                                                                                                                                                                                  |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ```yaml name: get-pagerduty-incident description: Get the details of a PagerDuty incident steps:   - name: pagerduty_incident_get_1     type: action     action: pagerduty.incident.get     version: 1     inputs:       token: ${{ :secrets:pagerdutyApiToken }}       incidentId: Q1234455677     next: end ``` |
