Spectate API

Maintenance windows

Planned work. While a window runs, alerts on what it covers are muted, and failed checks don't count as downtime by default. Alerts still firing when it ends start their escalation then.


List maintenance windows

GET
https://api.spectate.net/v1
/maintenance-windows

Returns the team's windows, newest first.

List maintenance windows › query Parameters

page
​integer

Page number, from 1.

Default: 1
per_page
​integer

Windows per page, 1 to 100.

Default: 25

List maintenance windows › Responses

Paginated set of MaintenanceWindow

current_page
​integer · min: 1 · required
​MaintenanceWindow[] · 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 maintenance window

POST
https://api.spectate.net/v1
/maintenance-windows

One-off with starts_at and ends_at, or weekly with schedule. Targets must belong to the team (422 otherwise).

Create a maintenance window › Request Body

A new window: one-off with `starts_at` and `ends_at`, or weekly with `schedule`, never both.
name
​string · maxLength: 255 · required

Name, up to 255 characters

Example: Sunday deploys
reason
​string | null · maxLength: 500

Why, for the team; up to 500 characters

starts_at
​string | null · date-time

A one-off window's start

ends_at
​string | null · date-time

A one-off window's end, after starts_at and in the future

​
repeat_until
​string | null · date

A weekly window's last date, in its time zone

covers_everything
​boolean

true: covers everything in the team. Default false

exclude_from_uptime
​boolean

false: failed checks during the window count as downtime. Default true

What it covers, at most 200, from the team. Required unless covers_everything is true

Create a maintenance window › Responses

The new window.

Planned work. While a window runs, alerts on what it covers are muted, and failed checks don't count as downtime unless `exclude_from_uptime` is `false`.
id
​string · uuid · required

Window ID

name
​string · required

Name

Example: Sunday deploys
reason
​string | null · required

Why, for the team; null for none

starts_at
​string | null · date-time · required

A one-off window's start; null for a weekly window

ends_at
​string | null · date-time · required

A one-off window's end; null for a weekly window

​required
repeat_until
​string | null · date · required

A weekly window's last date, in its time zone; null for no last date

covers_everything
​boolean · required

true: covers everything in the team, and targets is ignored

exclude_from_uptime
​boolean · required

true: failed checks during the window don't count as downtime

active
​boolean · required

true while it runs

paused_at
​string | null · date-time · required

When it was paused; null if it isn't. A paused window covers nothing

next_start_at
​string | null · date-time · required

When the current or next occurrence starts; null when none is to come

current_end_at
​string | null · date-time · required

When the running occurrence ends; null when it isn't running

​MaintenanceWindowTarget[] · required

What it covers

created_at
​string · date-time · required

When it was created


Get a maintenance window

GET
https://api.spectate.net/v1
/maintenance-windows/{maintenanceWindow}

Returns the window with what it covers, whether it runs now and when it next starts.

Get a maintenance window › path Parameters

maintenanceWindow
​string · uuid · required

Window ID.

Get a maintenance window › Responses

The window.

Planned work. While a window runs, alerts on what it covers are muted, and failed checks don't count as downtime unless `exclude_from_uptime` is `false`.
id
​string · uuid · required

Window ID

name
​string · required

Name

Example: Sunday deploys
reason
​string | null · required

Why, for the team; null for none

starts_at
​string | null · date-time · required

A one-off window's start; null for a weekly window

ends_at
​string | null · date-time · required

A one-off window's end; null for a weekly window

​required
repeat_until
​string | null · date · required

A weekly window's last date, in its time zone; null for no last date

covers_everything
​boolean · required

true: covers everything in the team, and targets is ignored

exclude_from_uptime
​boolean · required

true: failed checks during the window don't count as downtime

active
​boolean · required

true while it runs

paused_at
​string | null · date-time · required

When it was paused; null if it isn't. A paused window covers nothing

next_start_at
​string | null · date-time · required

When the current or next occurrence starts; null when none is to come

current_end_at
​string | null · date-time · required

When the running occurrence ends; null when it isn't running

​MaintenanceWindowTarget[] · required

What it covers

created_at
​string · date-time · required

When it was created


Update a maintenance window

PATCH
https://api.spectate.net/v1
/maintenance-windows/{maintenanceWindow}

Changes only the fields you send. Moving ends_at extends or shortens a running window.

Update a maintenance window › path Parameters

maintenanceWindow
​string · uuid · required

Window ID.

Update a maintenance window › Request Body

Changes to a window. Sending `schedule` makes it weekly and `starts_at` makes it one-off.
name
​string · maxLength: 255

Name, up to 255 characters

Example: Sunday deploys
reason
​string | null · maxLength: 500

Why, for the team; up to 500 characters

starts_at
​string | null · date-time

A one-off window's start

ends_at
​string | null · date-time

A one-off window's end, in the future. Move it to extend a running window

​
repeat_until
​string | null · date

A weekly window's last date, in its time zone

covers_everything
​boolean

true: covers everything in the team

exclude_from_uptime
​boolean

false: failed checks during the window count as downtime

What it covers, at most 200, from the team; replaces the current list

Update a maintenance window › Responses

The updated window.

Planned work. While a window runs, alerts on what it covers are muted, and failed checks don't count as downtime unless `exclude_from_uptime` is `false`.
id
​string · uuid · required

Window ID

name
​string · required

Name

Example: Sunday deploys
reason
​string | null · required

Why, for the team; null for none

starts_at
​string | null · date-time · required

A one-off window's start; null for a weekly window

ends_at
​string | null · date-time · required

A one-off window's end; null for a weekly window

​required
repeat_until
​string | null · date · required

A weekly window's last date, in its time zone; null for no last date

covers_everything
​boolean · required

true: covers everything in the team, and targets is ignored

exclude_from_uptime
​boolean · required

true: failed checks during the window don't count as downtime

active
​boolean · required

true while it runs

paused_at
​string | null · date-time · required

When it was paused; null if it isn't. A paused window covers nothing

next_start_at
​string | null · date-time · required

When the current or next occurrence starts; null when none is to come

current_end_at
​string | null · date-time · required

When the running occurrence ends; null when it isn't running

​MaintenanceWindowTarget[] · required

What it covers

created_at
​string · date-time · required

When it was created


Delete a maintenance window

DELETE
https://api.spectate.net/v1
/maintenance-windows/{maintenanceWindow}

Alerts it muted that still fire start their escalation within a minute.

Delete a maintenance window › path Parameters

maintenanceWindow
​string · uuid · required

Window ID.

Delete a maintenance window › Responses

No content

No data returned

End a maintenance window now

POST
https://api.spectate.net/v1
/maintenance-windows/{maintenanceWindow}/end

A one-off window ends. A weekly window skips this occurrence and runs again next time. Muted alerts that still fire start their escalation within a minute.

End a maintenance window now › path Parameters

maintenanceWindow
​string · uuid · required

Window ID.

End a maintenance window now › Responses

The window.

Planned work. While a window runs, alerts on what it covers are muted, and failed checks don't count as downtime unless `exclude_from_uptime` is `false`.
id
​string · uuid · required

Window ID

name
​string · required

Name

Example: Sunday deploys
reason
​string | null · required

Why, for the team; null for none

starts_at
​string | null · date-time · required

A one-off window's start; null for a weekly window

ends_at
​string | null · date-time · required

A one-off window's end; null for a weekly window

​required
repeat_until
​string | null · date · required

A weekly window's last date, in its time zone; null for no last date

covers_everything
​boolean · required

true: covers everything in the team, and targets is ignored

exclude_from_uptime
​boolean · required

true: failed checks during the window don't count as downtime

active
​boolean · required

true while it runs

paused_at
​string | null · date-time · required

When it was paused; null if it isn't. A paused window covers nothing

next_start_at
​string | null · date-time · required

When the current or next occurrence starts; null when none is to come

current_end_at
​string | null · date-time · required

When the running occurrence ends; null when it isn't running

​MaintenanceWindowTarget[] · required

What it covers

created_at
​string · date-time · required

When it was created


Pause a maintenance window

POST
https://api.spectate.net/v1
/maintenance-windows/{maintenanceWindow}/pause

It covers nothing until you resume it. For a weekly window this stops the whole schedule.

Pause a maintenance window › path Parameters

maintenanceWindow
​string · uuid · required

Window ID.

Pause a maintenance window › Responses

The window.

Planned work. While a window runs, alerts on what it covers are muted, and failed checks don't count as downtime unless `exclude_from_uptime` is `false`.
id
​string · uuid · required

Window ID

name
​string · required

Name

Example: Sunday deploys
reason
​string | null · required

Why, for the team; null for none

starts_at
​string | null · date-time · required

A one-off window's start; null for a weekly window

ends_at
​string | null · date-time · required

A one-off window's end; null for a weekly window

​required
repeat_until
​string | null · date · required

A weekly window's last date, in its time zone; null for no last date

covers_everything
​boolean · required

true: covers everything in the team, and targets is ignored

exclude_from_uptime
​boolean · required

true: failed checks during the window don't count as downtime

active
​boolean · required

true while it runs

paused_at
​string | null · date-time · required

When it was paused; null if it isn't. A paused window covers nothing

next_start_at
​string | null · date-time · required

When the current or next occurrence starts; null when none is to come

current_end_at
​string | null · date-time · required

When the running occurrence ends; null when it isn't running

​MaintenanceWindowTarget[] · required

What it covers

created_at
​string · date-time · required

When it was created


Resume a maintenance window

POST
https://api.spectate.net/v1
/maintenance-windows/{maintenanceWindow}/resume

It covers what it did before. A one-off window whose time has passed stays over.

Resume a maintenance window › path Parameters

maintenanceWindow
​string · uuid · required

Window ID.

Resume a maintenance window › Responses

The window.

Planned work. While a window runs, alerts on what it covers are muted, and failed checks don't count as downtime unless `exclude_from_uptime` is `false`.
id
​string · uuid · required

Window ID

name
​string · required

Name

Example: Sunday deploys
reason
​string | null · required

Why, for the team; null for none

starts_at
​string | null · date-time · required

A one-off window's start; null for a weekly window

ends_at
​string | null · date-time · required

A one-off window's end; null for a weekly window

​required
repeat_until
​string | null · date · required

A weekly window's last date, in its time zone; null for no last date

covers_everything
​boolean · required

true: covers everything in the team, and targets is ignored

exclude_from_uptime
​boolean · required

true: failed checks during the window don't count as downtime

active
​boolean · required

true while it runs

paused_at
​string | null · date-time · required

When it was paused; null if it isn't. A paused window covers nothing

next_start_at
​string | null · date-time · required

When the current or next occurrence starts; null when none is to come

current_end_at
​string | null · date-time · required

When the running occurrence ends; null when it isn't running

​MaintenanceWindowTarget[] · required

What it covers

created_at
​string · date-time · required

When it was created