# PagerDuty

> Run incident response from workflows: open, acknowledge, resolve and reassign PagerDuty incidents, add notes and status updates, send alert events, see who is on call, and pause services for maintenance.

App · 24 actions. Web page: https://docs.lodol.com/docs/integrations/pagerduty

## Actions

### Acknowledge incident

Acknowledge an incident, so PagerDuty stops paging people about it.

**Inputs**

- Incident ID (`incident_id`, text, required): The incident's id (such as PT4KHLK) or number, from a trigger, 'Find incidents' or 'Create incident'.

**Outputs**

- `incident` (object): The incident

**Example output**

```json
{
  "incident": {
    "alert_count": 2,
    "assignee_ids": [
      "PXPGF42"
    ],
    "assignee_names": [
      "Earline Greenholt"
    ],
    "assignees": "Earline Greenholt",
    "created_at": "2015-10-06T21:30:42Z",
    "escalation_policy_id": "PT20YPA",
    "escalation_policy_name": "Another Escalation Policy",
    "html_url": "https://subdomain.pagerduty.com/incidents/PT4KHLK",
    "id": "PT4KHLK",
    "incident_key": "baf7cf21b1da41b4b0221008339ff357",
    "incident_number": 1234,
    "last_changed_by": "Earline Greenholt",
    "last_status_change_at": "2015-10-06T21:38:23Z",
    "priority": "P2",
    "priority_id": "P53ZZH5",
    "resolved_at": "",
    "service_id": "PIJ90N7",
    "service_name": "My Mail Service",
    "status": "acknowledged",
    "team_names": [
      "Engineering"
    ],
    "title": "The server is on fire.",
    "urgency": "high"
  }
}
```

### Add note to incident

Add a note to an incident's timeline, for the responders.

**Inputs**

- Incident ID (`incident_id`, text, required): The incident's id (such as PT4KHLK) or number, from a trigger, 'Find incidents' or 'Create incident'.
- Note (`note`, text, required): What to add.

**Outputs**

- `note` (object): The note

**Example output**

```json
{
  "note": {
    "content": "Firefighters are on the scene.",
    "created_at": "2013-03-06T15:28:51-05:00",
    "created_display": "Mar 6, 2013, 8:28 PM UTC",
    "id": "PWL7QXS",
    "user_id": "PXPGF42",
    "user_name": "Earline Greenholt"
  }
}
```

### Create incident

Open an incident on a service. PagerDuty notifies whoever is on call for it, or the people you assign.

**Inputs**

- Service (`service_id`, text, required): Pick a service, or give its id from an earlier step.
- Title (`title`, text, required): What is wrong, in a line.
- Urgency (`urgency`, text): High urgency pages people at once; low urgency notifies them the quiet way. Leave empty for the service's own rule. One of: `high` (High (pages people)), `low`.
- Details (`details`, text): More about the problem, shown on the incident.
- Priority (`priority_id`, text): How important it is, such as P1. Only if your account uses priorities.
- Escalation policy (`escalation_policy_id`, text): Who to page, and in what order, instead of the service's own policy.
- Assign to (`assignee_ids`, list): People to assign it to directly, instead of an escalation policy.
- Duplicate check key (`incident_key`, text): A key of your own. While an open incident on the service has it, PagerDuty refuses a second one.

**Outputs**

- `incident` (object): The incident

**Example output**

```json
{
  "incident": {
    "alert_count": 2,
    "assignee_ids": [
      "PXPGF42"
    ],
    "assignee_names": [
      "Earline Greenholt"
    ],
    "assignees": "Earline Greenholt",
    "created_at": "2015-10-06T21:30:42Z",
    "escalation_policy_id": "PT20YPA",
    "escalation_policy_name": "Another Escalation Policy",
    "html_url": "https://subdomain.pagerduty.com/incidents/PT4KHLK",
    "id": "PT4KHLK",
    "incident_key": "baf7cf21b1da41b4b0221008339ff357",
    "incident_number": 1234,
    "last_changed_by": "Earline Greenholt",
    "last_status_change_at": "2015-10-06T21:38:23Z",
    "priority": "P2",
    "priority_id": "P53ZZH5",
    "resolved_at": "",
    "service_id": "PIJ90N7",
    "service_name": "My Mail Service",
    "status": "triggered",
    "team_names": [
      "Engineering"
    ],
    "title": "The server is on fire.",
    "urgency": "high"
  }
}
```

### Create maintenance window

Pause services for planned work: while the window is open, PagerDuty opens no incidents on them and pages nobody.

**Inputs**

- Services (`service_ids`, list, required): The services to pause.
- Ends (`end_time`, date and time, required): When the window closes.
- Starts (`start_time`, date and time): When the window opens. Defaults to now.
- Description (`description`, text): What the work is, such as Database upgrade.

**Outputs**

- `maintenance_window` (object): The maintenance window

**Example output**

```json
{
  "maintenance_window": {
    "created_by": "Earline Greenholt",
    "description": "Immanentizing the eschaton",
    "end_time": "2015-11-09T22:00:00-05:00",
    "html_url": "https://subdomain.pagerduty.com/service-directory/maintenance-windows/PW98YIO",
    "id": "PW98YIO",
    "service_ids": [
      "PIJ90N7"
    ],
    "service_names": [
      "My Mail Service"
    ],
    "start_time": "2015-11-09T20:00:00-05:00"
  }
}
```

### Delete maintenance window

Remove a maintenance window that hasn't started, or end one that is under way.

**Inputs**

- Maintenance window ID (`maintenance_window_id`, text, required): The window's id, from 'Create maintenance window'.

**Outputs**

- `deleted` (true/false): True once it is gone
- `maintenance_window_id` (text): The maintenance window removed

**Example output**

```json
{
  "deleted": true,
  "maintenance_window_id": "PW98YIO"
}
```

### Find incidents

Find incidents, newest first, by status, urgency, service and when they were opened.

**Inputs**

- Status (`statuses`, list): Only incidents in these states. Leave empty for all. One or more of: `triggered` (Triggered (not yet acknowledged)), `acknowledged`, `resolved`.
- Urgency (`urgency`, text): Only high or only low urgency incidents. One of: `high` (High (pages people)), `low`.
- Services (`service_ids`, list): Only incidents on these services.
- Opened after (`since`, date and time): Only incidents opened at or after this time. Leave both times empty to search every date.
- Opened before (`until`, date and time): Only incidents opened before this time. The range can be at most six months.
- Page size (`limit`, number): How many to return, 1 to 100. Defaults to 25. From 1 to 100.
- Skip (`offset`, number): How many to skip, to get a later page. Use 'next_offset' from the page before. At least 0.

**Outputs**

- `count` (number): How many are returned
- `has_more` (true/false): Whether there are more
- `incidents` (list): The incidents
- `next_offset` (number): What to skip to get the next page

**Example output**

```json
{
  "count": 1,
  "has_more": false,
  "incidents": [
    {
      "alert_count": 2,
      "assignee_ids": [
        "PXPGF42"
      ],
      "assignee_names": [
        "Earline Greenholt"
      ],
      "assignees": "Earline Greenholt",
      "created_at": "2015-10-06T21:30:42Z",
      "escalation_policy_id": "PT20YPA",
      "escalation_policy_name": "Another Escalation Policy",
      "html_url": "https://subdomain.pagerduty.com/incidents/PT4KHLK",
      "id": "PT4KHLK",
      "incident_key": "baf7cf21b1da41b4b0221008339ff357",
      "incident_number": 1234,
      "last_changed_by": "Earline Greenholt",
      "last_status_change_at": "2015-10-06T21:38:23Z",
      "priority": "P2",
      "priority_id": "P53ZZH5",
      "resolved_at": "",
      "service_id": "PIJ90N7",
      "service_name": "My Mail Service",
      "status": "triggered",
      "team_names": [
        "Engineering"
      ],
      "title": "The server is on fire.",
      "urgency": "high"
    }
  ],
  "next_offset": 0
}
```

### Get incident

Get one incident: its status, urgency, service and who it is assigned to.

**Inputs**

- Incident ID (`incident_id`, text, required): The incident's id (such as PT4KHLK) or number, from a trigger, 'Find incidents' or 'Create incident'.

**Outputs**

- `incident` (object): The incident

**Example output**

```json
{
  "incident": {
    "alert_count": 2,
    "assignee_ids": [
      "PXPGF42"
    ],
    "assignee_names": [
      "Earline Greenholt"
    ],
    "assignees": "Earline Greenholt",
    "created_at": "2015-10-06T21:30:42Z",
    "escalation_policy_id": "PT20YPA",
    "escalation_policy_name": "Another Escalation Policy",
    "html_url": "https://subdomain.pagerduty.com/incidents/PT4KHLK",
    "id": "PT4KHLK",
    "incident_key": "baf7cf21b1da41b4b0221008339ff357",
    "incident_number": 1234,
    "last_changed_by": "Earline Greenholt",
    "last_status_change_at": "2015-10-06T21:38:23Z",
    "priority": "P2",
    "priority_id": "P53ZZH5",
    "resolved_at": "",
    "service_id": "PIJ90N7",
    "service_name": "My Mail Service",
    "status": "triggered",
    "team_names": [
      "Engineering"
    ],
    "title": "The server is on fire.",
    "urgency": "high"
  }
}
```

### Get incident timeline

List what happened to an incident: when it was triggered, who was notified, acknowledged, reassigned and resolved it.

**Inputs**

- Incident ID (`incident_id`, text, required): The incident's id (such as PT4KHLK) or number, from a trigger, 'Find incidents' or 'Create incident'.
- Important changes only (`important_only`, true/false): Leave on for the main changes; turn off to also list every notification sent. Default: `true`.
- Page size (`limit`, number): How many to return, 1 to 100. Defaults to 25. From 1 to 100.
- Skip (`offset`, number): How many to skip, to get a later page. Use 'next_offset' from the page before. At least 0.

**Outputs**

- `count` (number): How many are returned
- `has_more` (true/false): Whether there are more
- `log_entries` (list): What happened
- `next_offset` (number): What to skip to get the next page

**Example output**

```json
{
  "count": 1,
  "has_more": false,
  "log_entries": [
    {
      "agent_name": "My Mail Service",
      "channel": "api",
      "created_at": "2015-11-07T00:14:20Z",
      "created_display": "Nov 7, 2015, 12:14 AM UTC",
      "id": "Q02JTSNZWHSEKV",
      "summary": "Triggered through the API",
      "type": "trigger"
    }
  ],
  "next_offset": 0
}
```

### Get schedule

Get an on-call schedule and its shifts: who is on call when, for the next seven days unless you give a range.

**Inputs**

- Schedule (`schedule_id`, text, required): Pick a schedule, or give its id.
- From (`since`, date and time): The start of the shifts to show. Defaults to now.
- To (`until`, date and time): The end of the shifts to show. Defaults to a week later.

**Outputs**

- `count` (number): How many shifts
- `schedule` (object): The schedule
- `shifts` (list): Who is on call when

**Example output**

```json
{
  "count": 1,
  "schedule": {
    "description": "Rotation schedule for engineering",
    "html_url": "https://subdomain.pagerduty.com/schedules/PI7DH85",
    "id": "PI7DH85",
    "name": "Daily Engineering Rotation",
    "time_zone": "America/New_York",
    "user_names": [
      "Regina Phalange"
    ]
  },
  "shifts": [
    {
      "end": "2015-11-10T17:00:00-05:00",
      "start": "2015-11-10T08:00:00-05:00",
      "user_id": "PXPGF42",
      "user_name": "Regina Phalange"
    }
  ]
}
```

### Get service

Get one service, with its escalation policy and its Events API V2 integration key for 'Send alert event'.

**Inputs**

- Service (`service_id`, text, required): Pick a service, or give its id from an earlier step.

**Outputs**

- `service` (object): The service

**Example output**

```json
{
  "service": {
    "created_at": "2015-11-06T11:12:51-05:00",
    "description": "The mail service",
    "escalation_policy_id": "PT20YPA",
    "escalation_policy_name": "Another Escalation Policy",
    "events_integration_key": "e93facc04764012d7bfb002500d5d1a6",
    "html_url": "https://subdomain.pagerduty.com/service-directory/PIJ90N7",
    "id": "PIJ90N7",
    "last_incident_at": "2015-10-06T21:30:42Z",
    "name": "My Application Service",
    "status": "active",
    "team_names": [
      "Engineering"
    ]
  }
}
```

### List escalation policies

List escalation policies: who gets paged, in what order.

**Inputs**

- Name contains (`search`, text): Only those whose name contains these words.
- Page size (`limit`, number): How many to return, 1 to 100. Defaults to 25. From 1 to 100.
- Skip (`offset`, number): How many to skip, to get a later page. Use 'next_offset' from the page before. At least 0.

**Outputs**

- `count` (number): How many are returned
- `escalation_policies` (list): The escalation policies
- `has_more` (true/false): Whether there are more
- `next_offset` (number): What to skip to get the next page

**Example output**

```json
{
  "count": 1,
  "escalation_policies": [
    {
      "description": "Pages engineering",
      "html_url": "https://subdomain.pagerduty.com/escalation_policies/PANZZEQ",
      "id": "PANZZEQ",
      "levels": 1,
      "name": "Engineering Escalation Policy",
      "repeats": 0,
      "service_names": [
        "My Mail Service"
      ],
      "team_names": [
        "Engineering"
      ]
    }
  ],
  "has_more": false,
  "next_offset": 0
}
```

### List incident alerts

List the alerts grouped into an incident, with the details the monitoring tool sent.

**Inputs**

- Incident ID (`incident_id`, text, required): The incident's id (such as PT4KHLK) or number, from a trigger, 'Find incidents' or 'Create incident'.
- Status (`status`, text): Only triggered or only resolved alerts. One of: `triggered`, `resolved`.
- Page size (`limit`, number): How many to return, 1 to 100. Defaults to 25. From 1 to 100.
- Skip (`offset`, number): How many to skip, to get a later page. Use 'next_offset' from the page before. At least 0.

**Outputs**

- `alerts` (list): The alerts
- `count` (number): How many are returned
- `has_more` (true/false): Whether there are more
- `next_offset` (number): What to skip to get the next page

**Example output**

```json
{
  "alerts": [
    {
      "alert_key": "baf7cf21b1da41b4b0221008339ff357",
      "created_at": "2015-10-06T21:30:42Z",
      "details": {
        "customKey": "Server is on fire!",
        "customKey2": "Other stuff!"
      },
      "html_url": "https://subdomain.pagerduty.com/alerts/PXPGF42",
      "id": "PT4KHLK",
      "service_name": "My Mail Service",
      "severity": "critical",
      "status": "resolved",
      "summary": "The server is on fire."
    }
  ],
  "count": 1,
  "has_more": false,
  "next_offset": 0
}
```

### List incident notes

List the notes on an incident.

**Inputs**

- Incident ID (`incident_id`, text, required): The incident's id (such as PT4KHLK) or number, from a trigger, 'Find incidents' or 'Create incident'.

**Outputs**

- `count` (number): How many are returned
- `notes` (list): The notes

**Example output**

```json
{
  "count": 1,
  "notes": [
    {
      "content": "Firefighters are on the scene.",
      "created_at": "2013-03-06T15:28:51-05:00",
      "created_display": "Mar 6, 2013, 8:28 PM UTC",
      "id": "PWL7QXS",
      "user_id": "PXPGF42",
      "user_name": "Earline Greenholt"
    }
  ]
}
```

### List schedules

List on-call schedules and the people on them.

**Inputs**

- Name contains (`search`, text): Only those whose name contains these words.
- Page size (`limit`, number): How many to return, 1 to 100. Defaults to 25. From 1 to 100.
- Skip (`offset`, number): How many to skip, to get a later page. Use 'next_offset' from the page before. At least 0.

**Outputs**

- `count` (number): How many are returned
- `has_more` (true/false): Whether there are more
- `next_offset` (number): What to skip to get the next page
- `schedules` (list): The schedules

**Example output**

```json
{
  "count": 1,
  "has_more": false,
  "next_offset": 0,
  "schedules": [
    {
      "description": "Rotation schedule for engineering",
      "html_url": "https://subdomain.pagerduty.com/schedules/PI7DH85",
      "id": "PI7DH85",
      "name": "Daily Engineering Rotation",
      "time_zone": "America/New_York",
      "user_names": [
        "PagerDuty Admin"
      ]
    }
  ]
}
```

### List services

List services by name, with the escalation policy each one pages.

**Inputs**

- Name contains (`search`, text): Only those whose name contains these words.
- Page size (`limit`, number): How many to return, 1 to 100. Defaults to 25. From 1 to 100.
- Skip (`offset`, number): How many to skip, to get a later page. Use 'next_offset' from the page before. At least 0.

**Outputs**

- `count` (number): How many are returned
- `has_more` (true/false): Whether there are more
- `next_offset` (number): What to skip to get the next page
- `services` (list): The services

**Example output**

```json
{
  "count": 1,
  "has_more": false,
  "next_offset": 0,
  "services": [
    {
      "created_at": "2015-11-06T11:12:51-05:00",
      "description": "The mail service",
      "escalation_policy_id": "PT20YPA",
      "escalation_policy_name": "Another Escalation Policy",
      "events_integration_key": "",
      "html_url": "https://subdomain.pagerduty.com/service-directory/PIJ90N7",
      "id": "PIJ90N7",
      "last_incident_at": "2015-10-06T21:30:42Z",
      "name": "My Application Service",
      "status": "active",
      "team_names": [
        "Engineering"
      ]
    }
  ]
}
```

### List teams

List the teams in your PagerDuty account.

**Inputs**

- Name contains (`search`, text): Only those whose name contains these words.
- Page size (`limit`, number): How many to return, 1 to 100. Defaults to 25. From 1 to 100.
- Skip (`offset`, number): How many to skip, to get a later page. Use 'next_offset' from the page before. At least 0.

**Outputs**

- `count` (number): How many are returned
- `has_more` (true/false): Whether there are more
- `next_offset` (number): What to skip to get the next page
- `teams` (list): The teams

**Example output**

```json
{
  "count": 1,
  "has_more": false,
  "next_offset": 0,
  "teams": [
    {
      "description": "All engineering",
      "html_url": "https://subdomain.pagerduty.com/teams/PQ9K7I8",
      "id": "PQ9K7I8",
      "name": "Engineering"
    }
  ]
}
```

### List users

List the people in your PagerDuty account, with their emails and roles.

**Inputs**

- Name contains (`search`, text): Only those whose name contains these words.
- Page size (`limit`, number): How many to return, 1 to 100. Defaults to 25. From 1 to 100.
- Skip (`offset`, number): How many to skip, to get a later page. Use 'next_offset' from the page before. At least 0.

**Outputs**

- `count` (number): How many are returned
- `has_more` (true/false): Whether there are more
- `next_offset` (number): What to skip to get the next page
- `users` (list): The users

**Example output**

```json
{
  "count": 1,
  "has_more": false,
  "next_offset": 0,
  "users": [
    {
      "email": "125.greenholt.earline@graham.name",
      "html_url": "https://subdomain.pagerduty.com/users/PXPGF42",
      "id": "PXPGF42",
      "job_title": "Director of Engineering",
      "name": "Earline Greenholt",
      "role": "admin",
      "time_zone": "America/Lima"
    }
  ]
}
```

### Reassign incident

Hand an incident to other people, or to an escalation policy. PagerDuty notifies them.

**Inputs**

- Incident ID (`incident_id`, text, required): The incident's id (such as PT4KHLK) or number, from a trigger, 'Find incidents' or 'Create incident'.
- People (`user_ids`, list): Who to assign it to. Leave empty to use a policy.
- Escalation policy (`escalation_policy_id`, text): A policy to assign it to, instead of people.

**Outputs**

- `incident` (object): The incident

**Example output**

```json
{
  "incident": {
    "alert_count": 2,
    "assignee_ids": [
      "PXPGF42"
    ],
    "assignee_names": [
      "Earline Greenholt"
    ],
    "assignees": "Earline Greenholt",
    "created_at": "2015-10-06T21:30:42Z",
    "escalation_policy_id": "PT20YPA",
    "escalation_policy_name": "Another Escalation Policy",
    "html_url": "https://subdomain.pagerduty.com/incidents/PT4KHLK",
    "id": "PT4KHLK",
    "incident_key": "baf7cf21b1da41b4b0221008339ff357",
    "incident_number": 1234,
    "last_changed_by": "Earline Greenholt",
    "last_status_change_at": "2015-10-06T21:38:23Z",
    "priority": "P2",
    "priority_id": "P53ZZH5",
    "resolved_at": "",
    "service_id": "PIJ90N7",
    "service_name": "My Mail Service",
    "status": "triggered",
    "team_names": [
      "Engineering"
    ],
    "title": "The server is on fire.",
    "urgency": "high"
  }
}
```

### Resolve incident

Resolve an incident, optionally saying how it was fixed.

**Inputs**

- Incident ID (`incident_id`, text, required): The incident's id (such as PT4KHLK) or number, from a trigger, 'Find incidents' or 'Create incident'.
- Resolution (`resolution`, text): How it was fixed, added to the incident as a note.

**Outputs**

- `incident` (object): The incident

**Example output**

```json
{
  "incident": {
    "alert_count": 2,
    "assignee_ids": [
      "PXPGF42"
    ],
    "assignee_names": [
      "Earline Greenholt"
    ],
    "assignees": "Earline Greenholt",
    "created_at": "2015-10-06T21:30:42Z",
    "escalation_policy_id": "PT20YPA",
    "escalation_policy_name": "Another Escalation Policy",
    "html_url": "https://subdomain.pagerduty.com/incidents/PT4KHLK",
    "id": "PT4KHLK",
    "incident_key": "baf7cf21b1da41b4b0221008339ff357",
    "incident_number": 1234,
    "last_changed_by": "Earline Greenholt",
    "last_status_change_at": "2015-10-06T21:38:23Z",
    "priority": "P2",
    "priority_id": "P53ZZH5",
    "resolved_at": "2015-10-06T21:38:23Z",
    "service_id": "PIJ90N7",
    "service_name": "My Mail Service",
    "status": "resolved",
    "team_names": [
      "Engineering"
    ],
    "title": "The server is on fire.",
    "urgency": "high"
  }
}
```

### Send alert event

Send an alert to a service the way a monitoring tool does: trigger it (PagerDuty opens or adds to an incident), or later acknowledge or resolve it with its key.

**Inputs**

- Integration key (`routing_key`, text, required): The service's Events API V2 integration key, from its Integrations tab or 'Get service'.
- Action (`event_action`, text): Trigger a new alert, or acknowledge or resolve one. One of: `trigger` (Trigger an alert (default)), `acknowledge` (Acknowledge an alert), `resolve` (Resolve an alert). Default: `trigger`.
- Summary (`summary`, text): What is wrong, in a line. Needed to trigger.
- Severity (`severity`, text): How bad it is. Defaults to Error. One of: `critical`, `error` (Error (default)), `warning`, `info`. Default: `error`.
- Source (`source`, text): The system that has the problem. Defaults to Lodol.
- Alert key (`dedup_key`, text): Alerts with the same key are one alert. Needed to acknowledge or resolve; leave empty on a trigger for a new one.
- Component (`component`, text): The part of the system affected, such as database.
- Group (`group`, text): A grouping of systems, such as prod.
- Details (`details`, object): Anything else to show on the alert: text or named values.

**Outputs**

- `dedup_key` (text): The alert's key, to acknowledge or resolve it later
- `message` (text): PagerDuty's answer
- `status` (text): success when PagerDuty accepted it

**Example output**

```json
{
  "dedup_key": "srv01/HTTP",
  "message": "Event processed",
  "status": "success"
}
```

### Send status update

Post a status update on an incident, emailed to the people subscribed to it. Needs a plan with status updates.

**Inputs**

- Incident ID (`incident_id`, text, required): The incident's id (such as PT4KHLK) or number, from a trigger, 'Find incidents' or 'Create incident'.
- Message (`message`, text, required): The update.
- Email subject (`subject`, text): The email's subject. Leave empty for PagerDuty's own.

**Outputs**

- `status_update` (object): The status update

**Example output**

```json
{
  "status_update": {
    "created_at": "2013-03-06T15:28:51-05:00",
    "id": "PWL7QXS",
    "message": "The server fire is spreading.",
    "sender_name": "Earline Greenholt",
    "subject": "Server Fire Update"
  }
}
```

### Snooze incident

Snooze an acknowledged incident: it goes back to triggered, and pages again, after the time you give.

**Inputs**

- Incident ID (`incident_id`, text, required): The incident's id (such as PT4KHLK) or number, from a trigger, 'Find incidents' or 'Create incident'.
- Minutes (`minutes`, number): How long to snooze it, up to a week. Defaults to 60. From 1 to 10080. Default: `60`.

**Outputs**

- `incident` (object): The incident

**Example output**

```json
{
  "incident": {
    "alert_count": 2,
    "assignee_ids": [
      "PXPGF42"
    ],
    "assignee_names": [
      "Earline Greenholt"
    ],
    "assignees": "Earline Greenholt",
    "created_at": "2015-10-06T21:30:42Z",
    "escalation_policy_id": "PT20YPA",
    "escalation_policy_name": "Another Escalation Policy",
    "html_url": "https://subdomain.pagerduty.com/incidents/PT4KHLK",
    "id": "PT4KHLK",
    "incident_key": "baf7cf21b1da41b4b0221008339ff357",
    "incident_number": 1234,
    "last_changed_by": "Earline Greenholt",
    "last_status_change_at": "2015-10-06T21:38:23Z",
    "priority": "P2",
    "priority_id": "P53ZZH5",
    "resolved_at": "",
    "service_id": "PIJ90N7",
    "service_name": "My Mail Service",
    "status": "acknowledged",
    "team_names": [
      "Engineering"
    ],
    "title": "The server is on fire.",
    "urgency": "high"
  }
}
```

### Update incident

Change an incident's title, urgency or priority, or escalate it to another level of its escalation policy.

**Inputs**

- Incident ID (`incident_id`, text, required): The incident's id (such as PT4KHLK) or number, from a trigger, 'Find incidents' or 'Create incident'.
- Title (`title`, text): A new title. Leave empty to keep it.
- Urgency (`urgency`, text): A new urgency. Leave empty to keep it. One of: `high` (High (pages people)), `low`.
- Priority (`priority_id`, text): How important it is, such as P1. Only if your account uses priorities.
- Escalate to level (`escalation_level`, number): Page the people on this level of the escalation policy, such as 2. From 1 to 20.

**Outputs**

- `incident` (object): The incident

**Example output**

```json
{
  "incident": {
    "alert_count": 2,
    "assignee_ids": [
      "PXPGF42"
    ],
    "assignee_names": [
      "Earline Greenholt"
    ],
    "assignees": "Earline Greenholt",
    "created_at": "2015-10-06T21:30:42Z",
    "escalation_policy_id": "PT20YPA",
    "escalation_policy_name": "Another Escalation Policy",
    "html_url": "https://subdomain.pagerduty.com/incidents/PT4KHLK",
    "id": "PT4KHLK",
    "incident_key": "baf7cf21b1da41b4b0221008339ff357",
    "incident_number": 1234,
    "last_changed_by": "Earline Greenholt",
    "last_status_change_at": "2015-10-06T21:38:23Z",
    "priority": "P2",
    "priority_id": "P53ZZH5",
    "resolved_at": "",
    "service_id": "PIJ90N7",
    "service_name": "My Mail Service",
    "status": "triggered",
    "team_names": [
      "Engineering"
    ],
    "title": "The server is on fire.",
    "urgency": "high"
  }
}
```

### Who is on call

List who is on call now, or in a time range, with their email and escalation level. Narrow it to schedules or policies.

**Inputs**

- Schedules (`schedule_ids`, list): Only people on call through these schedules.
- Escalation policies (`escalation_policy_ids`, list): Only people on call for these policies.
- From (`since`, date and time): Leave both times empty for who is on call right now.
- To (`until`, date and time): The end of the time range.
- Page size (`limit`, number): How many to return, 1 to 100. Defaults to 25. From 1 to 100.
- Skip (`offset`, number): How many to skip, to get a later page. Use 'next_offset' from the page before. At least 0.

**Outputs**

- `count` (number): How many are returned
- `has_more` (true/false): Whether there are more
- `next_offset` (number): What to skip to get the next page
- `oncalls` (list): The people on call

**Example output**

```json
{
  "count": 1,
  "has_more": false,
  "next_offset": 0,
  "oncalls": [
    {
      "end": "2015-03-07T15:28:51-05:00",
      "escalation_level": 2,
      "escalation_policy_id": "PT20YPA",
      "escalation_policy_name": "Engineering Escalation Policy",
      "schedule_id": "PI7DH85",
      "schedule_name": "Daily Engineering Rotation",
      "start": "2015-03-06T15:28:51-05:00",
      "user_email": "125.greenholt.earline@graham.name",
      "user_id": "PT23IWX",
      "user_name": "Tim Wright"
    }
  ]
}
```
