Spectate API

Projects group monitors and hosts, for example per product or environment, and give them shared escalation paths. Every team has a default project that new monitors and hosts join when no project is given.


List projects

GET
https://api.spectate.net/v1
/projects

Returns the team's projects, the default project first, then by name.

List projects › query Parameters

page
​integer

Page number, from 1.

Default: 1
per_page
​integer

Projects per page, 1 to 100.

Default: 25

List projects › Responses

Paginated set of Project

current_page
​integer · min: 1 · required
​Project[] · required
first_page_url
​string | null · required
from
​integer | null · min: 1 · required
last_page_url
​string | null · required
last_page
​integer · min: 1 · required
​object[] · required

Generated paginator links.

next_page_url
​string | null · required
path
​string | null · required

Base path for paginator generated URLs.

per_page
​integer · min: 0 · required

Number of items shown per page.

prev_page_url
​string | null · required
to
​integer | null · min: 1 · required

Number of the last item in the slice.

total
​integer · min: 0 · required

Total number of items being paginated.


Create a project

POST
https://api.spectate.net/v1
/projects

Plans limit the number of projects: over the limit the request fails with 403 PLAN_LIMIT_REACHED. Escalation paths must belong to the team (422 otherwise).

Create a project › Request Body

A new project.
name
​string · maxLength: 255 · required

Project name

Example: Production
escalation_path_ids
​string[] · unique

Escalation paths for alerts of the project's monitors and hosts. Leave out for none

Create a project › Responses

The new project.

A project: a group of monitors and hosts that share escalation paths. Every team has one default project, which can't be deleted.
id
​string · uuid · required

Project ID

name
​string · required

Project name

Example: Production
is_default
​boolean · required

Whether this is the team's default project, which new monitors and hosts join when no project is given. It can't be deleted

​EscalationPathReference[] · required

Escalation paths that alerts of this project's monitors and hosts follow, unless a monitor or host sets its own

created_at
​string · date-time · required

When the project was created


Get a project

GET
https://api.spectate.net/v1
/projects/{project}

Returns the project with the escalation paths its monitors and hosts use by default.

Get a project › path Parameters

project
​string · uuid · required

Project ID.

Get a project › Responses

The project.

A project: a group of monitors and hosts that share escalation paths. Every team has one default project, which can't be deleted.
id
​string · uuid · required

Project ID

name
​string · required

Project name

Example: Production
is_default
​boolean · required

Whether this is the team's default project, which new monitors and hosts join when no project is given. It can't be deleted

​EscalationPathReference[] · required

Escalation paths that alerts of this project's monitors and hosts follow, unless a monitor or host sets its own

created_at
​string · date-time · required

When the project was created


Update a project

PATCH
https://api.spectate.net/v1
/projects/{project}

Changes only the fields you send. escalation_path_ids replaces the project's paths; send [] to remove them all.

Update a project › path Parameters

project
​string · uuid · required

Project ID.

Update a project › Request Body

Changes to a project; fields left out keep their value.
name
​string · maxLength: 255

Project name

Example: Production
escalation_path_ids
​string[] · unique

Escalation paths for alerts of the project's monitors and hosts; replaces the current list. Send [] for none

Update a project › Responses

The updated project.

A project: a group of monitors and hosts that share escalation paths. Every team has one default project, which can't be deleted.
id
​string · uuid · required

Project ID

name
​string · required

Project name

Example: Production
is_default
​boolean · required

Whether this is the team's default project, which new monitors and hosts join when no project is given. It can't be deleted

​EscalationPathReference[] · required

Escalation paths that alerts of this project's monitors and hosts follow, unless a monitor or host sets its own

created_at
​string · date-time · required

When the project was created


Delete a project

DELETE
https://api.spectate.net/v1
/projects/{project}

Its monitors and hosts are kept, without a project; they follow the team's default escalation path until you give them another. The default project can't be deleted (409 DEFAULT_PROJECT).

Delete a project › path Parameters

project
​string · uuid · required

Project ID.

Delete a project › Responses

No content

No data returned