API · v1.4.0
Maintenances
6 endpoints. Paths are relative to /api/v1 on your own instance; authentication is described on the overview page.
GET /workspaces/{workspace}/maintenances
Lists the maintenances of the workspace
state narrows the list: active windows in progress, upcoming ones with a later window, past ones that will not run again, all (default) everything. The state is computed from each schedule, so the narrowed lists select the matching ids first and then paginate them.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
workspacerequired | path | string | The workspace slug |
state | query | active | upcoming | past | all | |
cursor | query | string | Opaque cursor taken from |
limit | query | integer | Page size. |
Responses
200422Validation error404Not found403Authorization error401Unauthenticated
POST /workspaces/{workspace}/maintenances
Parameters
| Name | In | Type | Description |
|---|---|---|---|
workspacerequired | path | string | The workspace slug |
Request body
| Name | Type |
|---|---|
titlerequired | string |
description | string | null |
strategyrequired | MaintenanceStrategy (once, interval, weekly, monthly, cron) |
timezone | string | null |
starts_at | string | null |
ends_at | string | null |
start_time | string | null |
duration_minutes | integer | null |
every_days | integer | null |
weekdays | list<integer> | null |
month_days | list<integer> | null |
cron | string | null |
valid_from | string | null |
valid_until | string | null |
active | boolean |
monitor_idsrequired | list<integer> |
status_page_ids | list<integer> |
Responses
201404Not found403Authorization error401Unauthenticated422Validation error
GET /workspaces/{workspace}/maintenances/{maintenance}
Parameters
| Name | In | Type | Description |
|---|---|---|---|
workspacerequired | path | string | The workspace slug |
maintenancerequired | path | integer | The maintenance ID |
Responses
200404Not found403Authorization error401Unauthenticated
PATCH /workspaces/{workspace}/maintenances/{maintenance}
Parameters
| Name | In | Type | Description |
|---|---|---|---|
workspacerequired | path | string | The workspace slug |
maintenancerequired | path | integer | The maintenance ID |
Request body
| Name | Type |
|---|---|
title | string |
description | string | null |
strategy | MaintenanceStrategy (once, interval, weekly, monthly, cron) |
timezone | string | null |
starts_at | string | null |
ends_at | string | null |
start_time | string | null |
duration_minutes | integer | null |
every_days | integer | null |
weekdays | list<integer> | null |
month_days | list<integer> | null |
cron | string | null |
valid_from | string | null |
valid_until | string | null |
active | boolean |
monitor_ids | list<integer> |
status_page_ids | list<integer> |
Responses
200404Not found403Authorization error401Unauthenticated422Validation error
DELETE /workspaces/{workspace}/maintenances/{maintenance}
Parameters
| Name | In | Type | Description |
|---|---|---|---|
workspacerequired | path | string | The workspace slug |
maintenancerequired | path | integer | The maintenance ID |
Responses
204No content404Not found403Authorization error401Unauthenticated
POST /workspaces/{workspace}/maintenances/{maintenance}/end
Ends a one-off maintenance now. Recurring ones are switched off with active: false instead
Parameters
| Name | In | Type | Description |
|---|---|---|---|
workspacerequired | path | string | The workspace slug |
maintenancerequired | path | integer | The maintenance ID |
Responses
200422Validation error404Not found403Authorization error401Unauthenticated