Escalation paths

Create an escalation path

Channels and schedules must belong to the team; a branch ends its list of steps (422 with the step's position, for example steps.1.then.0.channel_id). Paging the person on call is part of the Team plan and up, and so are paths besides the default one (403 PLAN_LIMIT_REACHED).

post/escalation-paths

Request

  • Base URL
    https://api.spectate.net/v1
  • Auth
    HTTP bearer

Request body

namestring required

Name, up to 255 characters

descriptionstring nullable

What the path is for, up to 1000 characters

enabledboolean

Whether alerts follow the path. Default true

is_defaultboolean

Make it the team's default path; the current default stops being one. Default false

group_window_minutesinteger nullable

Group alerts on this path within this many minutes, 1 to 1440; null turns grouping off

group_by'all' | 'project' | 'resource' | 'label'

What alerts on an escalation path must share to be grouped.

all <br/> Everything on the path.
project <br/> The same project.
resource <br/> The same monitor, host, domain or alert source.
label <br/> The same value of a label an alert source sent.
group_labelstring nullable

With group_by label: which label

Example request

{
  "name": "On-call engineers",
  "working_hours": {
    "timezone": "Europe/Amsterdam",
    "start_time": "09:00",
    "end_time": "17:00"
  },
  "steps": [
    {
      "key": "first-page",
      "delay_minutes": 5,
      "repage_count": 2,
      "repage_interval_minutes": 5,
      "times": 3,
      "conditions": [
        {
          "key": "env"
        }
      ]
    }
  ]
}

Response

The new escalation path.

idstring uuid required

Escalation path ID

namestring required

Name

descriptionstring nullable required

What the path is for

enabledboolean required

Whether alerts follow the path. Alerts of a disabled path don't escalate

is_defaultboolean required

Whether this is the team's default path, for resources without paths of their own or of their project. One per team

group_window_minutesinteger nullable required

Group alerts on this path within this many minutes, extended with each alert that joins; null: each alert escalates by itself

group_by'all' | 'project' | 'resource' | 'label' required

What alerts on an escalation path must share to be grouped.

all <br/> Everything on the path.
project <br/> The same project.
resource <br/> The same monitor, host, domain or alert source.
label <br/> The same value of a label an alert source sent.
group_labelstring nullable required

With group_by label: which label

created_atstring date-time required

When the path was created

Example response

{
  "name": "On-call engineers",
  "working_hours": {
    "timezone": "Europe/Amsterdam",
    "start_time": "09:00",
    "end_time": "17:00",
    "description": "Mon–Fri 09:00–17:00 (Europe/Amsterdam)"
  },
  "steps": [
    {
      "key": "notify_on_call-1",
      "delay_minutes": 5,
      "channel": {
        "name": "On-call email"
      },
      "schedule": {
        "name": "Primary"
      },
      "rotation": {
        "name": "Primary"
      },
      "users": [
        {
          "name": "Jane Doe",
          "email": "jane@example.com"
        }
      ],
      "conditions": [
        {
          "key": "env",
          "description": "Severity is Critical or High"
        }
      ]
    }
  ],
  "warnings": [
    {
      "message": "Channel Ops Slack is disabled and will be skipped."
    }
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.