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

# PagerDuty triggered incidents

> Mount PagerDuty triggered incidents on your app.

Follow the [REST mounting guide](https://docs.bijection.com/integrations/native-rest.md#mount-and-bind).
Pass the receiver below as `receivers.provider`, bound with `providerEndpoint`
from `@bijectionhq/app-rest` and sealed `Authorization` header auth with prefix `Token token=` and an account API key.

```ts theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
export const remote = providerEndpoint(
  "pagerduty/service.incidents.observations",
  "https://api.pagerduty.com",
  "/incidents",
  auth,
  data,
);
```

Bind the mount under the same `data` label as the receiver. As the mount's operator, call `source.initialize`.

```ts theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
{ profile: { mode: "provider", provider: "pagerduty/service.incidents.observations", limit: 25, selection: "PSVC123" } }
```

Set `selection` to one service ID. The source publishes the first page of its triggered incidents by incident ID. Each poll requests the first page again. A larger roster is partially observed. Resolution, removal or an absent incident leaves its previous row in place.

Up to 100 records and 36 KiB per response. The bundled parser is required. Rows and their next position
commit together. Review failures through `source.health`.

## Incident windows and on-call schedules

Use `providerEndpoint(mode, origin, path, auth, data)` with
`https://api.pagerduty.com` or `https://api.eu.pagerduty.com`. Bind the
receiver as `receivers.provider` and bind `data` to the same protected `data` label. Seal credentials with `incidents.read` or `schedules.read`
access for the corresponding mode.

| Mode | Reviewed path | Record key |
| - | - | - |
| `pagerduty.service.incidents.window` | `/incidents` | Incident ID |
| `pagerduty.schedules.observations` | `/schedules` | Schedule ID |

Initialize with `{ profile: { mode: "provider", provider: mode, limit: 25 } }`.
For the incident window add `selection` as the service ID and `start`
and `end` as absolute UTC instants with second precision. The window can span
up to 30 days and includes all visible incident statuses. Schedules list
the on-call schedule metadata visible to the credential.

Each page accepts 1–100 requested rows and 36 KiB. The app follows the
provider's offset and `more` flag, with a 10,000-result traversal bound.
At a terminal page the next poll starts again. Concurrent changes can
shift positions. Missing records remain published.

[Incidents](https://docs.pagerduty.com/developer/api/reference/rest/incidents/list-incidents) ·
[Schedules](https://docs.pagerduty.com/developer/api/reference/rest/schedules/list-schedules)

## Incident log entries

Bind `pagerDutyLogEntries(origin, incidentId, auth, data)` as
`receivers.provider` at the same protected `data` label. Seal a credential
that can read the incident and its log entries. Initialize with
`{ profile: { mode: "pagerDutyLogEntries", incidentId: "PT4KHLK", limit: 25 } }`,
using the same incident ID in the receiver and profile.

Read the first captured payload for each log entry ID in
`occurrences.list` or `occurrences.get`. The feed walks provider offsets,
using the supplied pagination metadata when present and probing after a full
page when the response contains only log entries. It restarts at the end
and retains prior events. The page and traversal bounds above apply.
[Incident log entry API](https://docs.pagerduty.com/developer/api/reference/rest/incidents/list-incident-log-entries)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.