REST API áttekintés

API · v1.4.0

Maintenances

6 végpont. Az útvonalak a saját példánya /api/v1 címéhez képest értendők; a hitelesítést az áttekintő oldal írja le.

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.

Paraméterek

NévHelyTípusLeírás
workspacekötelezőpathstring

The workspace slug

statequeryactive | upcoming | past | all
cursorquerystring

Opaque cursor taken from meta.next_cursor of the previous page; omit it for the first page.

limitqueryinteger

Page size.

Válaszok

  • 200
  • 422 Validation error
  • 404 Not found
  • 403 Authorization error
  • 401 Unauthenticated

POST /workspaces/{workspace}/maintenances

Paraméterek

NévHelyTípusLeírás
workspacekötelezőpathstring

The workspace slug

Kéréstörzs

NévTípus
titlekötelezőstring
descriptionstring | null
strategykötelezőMaintenanceStrategy (once, interval, weekly, monthly, cron)
timezonestring | null
starts_atstring | null
ends_atstring | null
start_timestring | null
duration_minutesinteger | null
every_daysinteger | null
weekdayslist<integer> | null
month_dayslist<integer> | null
cronstring | null
valid_fromstring | null
valid_untilstring | null
activeboolean
monitor_idskötelezőlist<integer>
status_page_idslist<integer>

Válaszok

  • 201
  • 404 Not found
  • 403 Authorization error
  • 401 Unauthenticated
  • 422 Validation error

GET /workspaces/{workspace}/maintenances/{maintenance}

Paraméterek

NévHelyTípusLeírás
workspacekötelezőpathstring

The workspace slug

maintenancekötelezőpathinteger

The maintenance ID

Válaszok

  • 200
  • 404 Not found
  • 403 Authorization error
  • 401 Unauthenticated

PATCH /workspaces/{workspace}/maintenances/{maintenance}

Paraméterek

NévHelyTípusLeírás
workspacekötelezőpathstring

The workspace slug

maintenancekötelezőpathinteger

The maintenance ID

Kéréstörzs

NévTípus
titlestring
descriptionstring | null
strategyMaintenanceStrategy (once, interval, weekly, monthly, cron)
timezonestring | null
starts_atstring | null
ends_atstring | null
start_timestring | null
duration_minutesinteger | null
every_daysinteger | null
weekdayslist<integer> | null
month_dayslist<integer> | null
cronstring | null
valid_fromstring | null
valid_untilstring | null
activeboolean
monitor_idslist<integer>
status_page_idslist<integer>

Válaszok

  • 200
  • 404 Not found
  • 403 Authorization error
  • 401 Unauthenticated
  • 422 Validation error

DELETE /workspaces/{workspace}/maintenances/{maintenance}

Paraméterek

NévHelyTípusLeírás
workspacekötelezőpathstring

The workspace slug

maintenancekötelezőpathinteger

The maintenance ID

Válaszok

  • 204 No content
  • 404 Not found
  • 403 Authorization error
  • 401 Unauthenticated

POST /workspaces/{workspace}/maintenances/{maintenance}/end

Ends a one-off maintenance now. Recurring ones are switched off with active: false instead

Paraméterek

NévHelyTípusLeírás
workspacekötelezőpathstring

The workspace slug

maintenancekötelezőpathinteger

The maintenance ID

Válaszok

  • 200
  • 422 Validation error
  • 404 Not found
  • 403 Authorization error
  • 401 Unauthenticated