InTouch Hub · Blue Isle Software

PagerDuty

Query and create PagerDuty incidents and services via the PagerDuty REST API.

Provided free and as is, without warranty of any kind — including merchantability, fitness for a particular purpose, and the accuracy or completeness of any result. See the licence. You are responsible for checking what this produces before relying on it.

agreementdeveloper-devopsdevopsemailincidentincidentsleveloncallservicestatus

PagerDuty

Query and create PagerDuty incidents and services through the official PagerDuty REST API (https://api.pagerduty.com). Standard-library Python only — no external dependencies.

What it does

Branches on an operation input and makes one authenticated REST call. Every request sends:

Authorization: Token token=<apiKey>
Accept: application/vnd.pagerduty+json;version=2

The full JSON response body is returned in result, and the HTTP status in status. Non-2xx responses are returned (not thrown) so callers can inspect PagerDuty's error payload; transport failures fail the step.

Operations

operation Method & endpoint Required inputs
list_incidents GET /incidents apiKey (optional: statuses, limit)
get_incident GET /incidents/{id} apiKey, incidentId
list_services GET /services apiKey (optional: limit)
get_service GET /services/{id} apiKey, serviceId
create_incident POST /incidents apiKey, serviceId, title, from (optional: urgency)

Notes: - list_incidents statuses is a comma-separated filter: triggered,acknowledged,resolved. - create_incident also sends a From: <email> header (a valid PagerDuty user email) and Content-Type: application/json, as PagerDuty requires for writes. - urgency (create) is optional: high or low.

Getting the apiKey

Use a PagerDuty REST API access key:

The key is passed verbatim into the Authorization: Token token=<apiKey> header. Treat it as a secret.

Usage examples

List the most recent triggered/acknowledged incidents:

pagerduty apiKey=<KEY> operation=list_incidents statuses=triggered,acknowledged limit=10

Open a new high-urgency incident on a service:

pagerduty apiKey=<KEY> operation=create_incident \
  serviceId=PIJ90N7 \
  title="Checkout latency over SLO" \
  [email protected] \
  urgency=high

Look up a single incident by ID:

pagerduty apiKey=<KEY> operation=get_incident incidentId=PT4KHLK

Publishes

The keys a later task may reference as {{taskName.key}}. Referencing anything not listed here resolves to nothing at run time.

Input Properties

Every property this tool accepts, from its own tool.iml.

Property Type Required Default Description
apiKey string yes DEPRECATED — bind an API Key credential to the task with credentialName instead. A key pasted here is stored in the workflow definition in clear and appears in every export of it. Still honoured for workflows built before the change.
operation string yes One of: list_incidents, get_incident, list_services, get_service, create_incident
incidentId string no Incident ID (e.g. PT4KHLK). Required for get_incident.
serviceId string no Service ID (e.g. PIJ90N7). Required for get_service and create_incident.
title string no Incident title/summary. Required for create_incident.
from string no Email address of a valid PagerDuty user, sent as the 'From' header. Required for create_incident.
urgency string no Optional incident urgency for create_incident: 'high' or 'low'.
statuses string no Optional comma-separated incident status filter for list_incidents: triggered, acknowledged, resolved.
limit string no 25 Optional page size for list operations (1-100).