REST API áttekintés

API · v1.4.0

Monitors

14 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}/monitors

Paraméterek

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

The workspace slug

typequeryMonitorType (http, tcp, ping, dns, tls, domain, push, cron, group)
statusqueryMonitorStatus (up, down, degraded, maintenance, pending, paused)
tagqueryinteger
qquerystring
parent_idquerystring
activequerytrue | false | 1 | 0
beatsqueryinteger
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}/monitors

Paraméterek

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

The workspace slug

Kéréstörzs

NévTípus
typekötelezőMonitorType (http, tcp, ping, dns, tls, domain, push, cron, group)
namekötelezőstring
descriptionstring | null
activeboolean
interval_secondsinteger
timeout_secondsinteger
retriesinteger
retry_interval_secondsinteger
degraded_threshold_msinteger | null
invertedboolean
parent_idinteger | null
tagslist<object>
configobject
secretsobject
notification_channel_idslist<integer>
alertingobject

Válaszok

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

POST /workspaces/{workspace}/monitors/bulk

Paraméterek

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

The workspace slug

Kéréstörzs

NévTípus
actionkötelezőpause | resume | delete | tag | untag | notify | unnotify
idskötelezőlist<integer>
tag_idinteger
channel_idinteger

Válaszok

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

GET /workspaces/{workspace}/monitors/{monitor}

Paraméterek

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

The workspace slug

monitorkötelezőpathinteger

The monitor ID

Válaszok

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

PATCH /workspaces/{workspace}/monitors/{monitor}

Paraméterek

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

The workspace slug

monitorkötelezőpathinteger

The monitor ID

Kéréstörzs

NévTípus
typeMonitorType (http, tcp, ping, dns, tls, domain, push, cron, group)
namestring
descriptionstring | null
activeboolean
interval_secondsinteger
timeout_secondsinteger
retriesinteger
retry_interval_secondsinteger
degraded_threshold_msinteger | null
invertedboolean
parent_idinteger | null
tagslist<object>
configobject
secretsobject
notification_channel_idslist<integer>
alertingobject

Válaszok

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

DELETE /workspaces/{workspace}/monitors/{monitor}

Paraméterek

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

The workspace slug

monitorkötelezőpathinteger

The monitor ID

Válaszok

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

GET /workspaces/{workspace}/monitors/{monitor}/alerts

List one monitor's alerts, newest first. Filters: kind, since (ISO 8601, inclusive)

Paraméterek

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

The workspace slug

monitorkötelezőpathinteger

The monitor ID

kindqueryAlertKind (down, up, degraded, still_down, flapping, stable, expiring, renewed, changed, test)
sincequerystring
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}/monitors/{monitor}/check

Paraméterek

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

The workspace slug

monitorkötelezőpathinteger

The monitor ID

Válaszok

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

GET /workspaces/{workspace}/monitors/{monitor}/events

List the monitor's events (status changes and changes of watched values), newest first. Filter: kind

Paraméterek

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

The workspace slug

monitorkötelezőpathinteger

The monitor ID

kindquerystatus_changed | changed
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}/monitors/{monitor}/pause

Paraméterek

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

The workspace slug

monitorkötelezőpathinteger

The monitor ID

Válaszok

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

POST /workspaces/{workspace}/monitors/{monitor}/push-token

Paraméterek

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

The workspace slug

monitorkötelezőpathinteger

The monitor ID

Válaszok

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

GET /workspaces/{workspace}/monitors/{monitor}/results

List the monitor's raw check results, newest first. Raw results are kept for RETENTION_RAW_HOURS. Filters: from, to (ISO 8601), status

Paraméterek

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

The workspace slug

monitorkötelezőpathinteger

The monitor ID

fromquerystring
toquerystring
statusqueryMonitorStatus (up, down, degraded, maintenance, pending, paused)
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}/monitors/{monitor}/resume

Paraméterek

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

The workspace slug

monitorkötelezőpathinteger

The monitor ID

Válaszok

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

GET /workspaces/{workspace}/monitors/{monitor}/rollups

List the monitor's rollups of one bucket size, oldest first. Day buckets start at midnight in the workspace timezone. availability is (up + degraded + pending) / (total - maintenance), or null when every check fell into maintenance. Filters: bucket (required), from, to (ISO 8601, applied to the bucket start)

Paraméterek

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

The workspace slug

monitorkötelezőpathinteger

The monitor ID

bucketkötelezőqueryminute | hour | day
fromquerystring
toquerystring
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