---
url: https://salimhamed.github.io/jigs/api/steps/pagerduty.md
---
# steps/pagerduty

Low-level PagerDuty operations for factory-owned steps. Workflow code calls
their `#jigs/steps` wrappers.

See [Triage a PagerDuty incident](https://salimhamed.github.io/jigs/guide/pagerduty-incidents).

## Create and update

### postIncidentNote() {#postincidentnote}

```ts
function postIncidentNote(__namedParameters, metadata): Promise<{
  noteId: string;
}>;
```

Add a plain-text note to the incident, ending in a line that names the run.

#### Parameters

| Parameter | Type |
| :------ | :------ |
| `__namedParameters` | { `content`: `string`; `incidentId`: `string`; `installationName`: `string`; } |
| `__namedParameters.content` | `string` |
| `__namedParameters.incidentId` | `string` |
| `__namedParameters.installationName` | `string` |
| `metadata` | [`RunMetadata`](../steps.md#runmetadata) |

#### Returns

`Promise`<{
`noteId`: `string`;
}>

#### Remarks

The note is attributed to the from user set on the PagerDuty installation in the hub.
PagerDuty shows markup as literal text, so write plain sentences.

## Read

### fetchIncidentSnapshot() {#fetchincidentsnapshot}

```ts
function fetchIncidentSnapshot(__namedParameters): Promise<IncidentSnapshot>;
```

Read the incident once: its number, title, status, urgency, creation time, URL, service,
assignees and escalation policy.

#### Parameters

| Parameter | Type |
| :------ | :------ |
| `__namedParameters` | { `incidentId`: `string`; `installationName`: `string`; } |
| `__namedParameters.incidentId` | `string` |
| `__namedParameters.installationName` | `string` |

#### Returns

`Promise`<[`IncidentSnapshot`](../jigs.md#incidentsnapshot)>
