Skip to content
v1
Docs

API reference

Services

Monitored services: HTTP, TCP and API checks, their results, their scans and the parameters a check takes.

Its operations need the scopes services.edit, services.view, services.delete or alarms.edit.

The Service object

Attributes

  • uuidstring

    The service’s uuid.

  • namestring

    The service’s name.

  • stepsarray of objects

    The service’s steps, in order. A step has uuid (assigned when it is first saved, kept across edits), name, type (http, grpc, websocket, tcp, udp, icmp, dns, tls, smtp or wait), method, scheme, host, port, path (no query string), auth (only its type), options (the ones its type uses, filled in), assertions (at most 20), extract (at most 10), on_success, on_failure, repeat and keep_evidence (whether the step keeps what its server answered as evidence). Header names and values, bodies, cookies, query strings, payloads, messages, metadata and authentication fields are never returned.

  • variablesarray of objects

    The values generated for each run ({{var.name}}): each {name, generator, …}, never a value.

  • runobject

    The whole run: its budget in seconds and its fast retry.

  • live_versioninteger

    The number of the version that is live: every save writes a new one, kept for ever.

  • check_interval_secondsinteger

    Seconds between two checks.

  • activeboolean

    Whether monitoring is switched on.

  • statusstring

    One of up, down, pending (no reachability result yet) and suspended (switched off).

    Values:suspendedpendingupdown(an open set: new values may be added)
  • health_statusstring

    One of unknown, healthy, warning, critical: the effective health (no collectors reads unknown).

  • collector_statusstring

    The collector pool’s state: active and standby, or why it is not (needs_collectors, failing, …).

  • collector_status_reasonstring or null

    Why the collector pool is awaiting a collector or failing, such as dns, blocked_destination or parameter_unavailable; null otherwise.

  • pool_modestring

    active_standby or all_members.

  • member_limitinteger or null

    How many collectors report, in all_members mode; null otherwise.

  • quorum_ninteger or null

    How many members must agree, in all_members mode; null otherwise.

  • collector_last_result_atinteger or null

    Epoch milliseconds. When a collector last reported a result; null when none has.

    An instant: epoch milliseconds, UTC.
  • latest_reachabilityobject or null

    The latest scored reachability result; null until one completes.

  • latest_responseobject or null

    The latest scored response check; null until one completes.

  • alarm_snoozeobject or null

    The service’s own alarm snooze, which holds the alarm notifications of every alarm on the service; null when none is live. See PUT /v1/services/{service_uuid}/alarm-snooze.

  • tagsarray of objects

    The tags attached to the service.

  • console_urlstring

    The service’s page in the console.

Create a service

POST/v1/services

Adds a service to monitor, with the servers that check it chosen by hand or by tags. Parameters and authentication need the services.parameters scope on the key and the permission on the owner’s role (a service account’s key: the scope alone), and are refused with 403 otherwise. Refuses an organisation over its service limit and one that needs a payment method.

Needs the scope services.edit.

Headers

  • Idempotency-KeystringOptional

    Any text of 1 to 255 visible ASCII characters. A repeat of the same request within 24 hours returns the first answer without running again (the response carries Idempotent-Replayed: true); the same key on a different request is refused 422 invalid_request.

Body parameters

  • namestringRequired

    The service’s name, up to 255 characters.

  • check_interval_secondsinteger or nullOptional

    Seconds between two checks, from 60 to 86400 and at least the run budget rounded up to a whole minute; 60 when omitted on create.

  • notesstring or nullOptional

    Free-form notes about the service; null or omitted stores none.

  • activeboolean or nullOptional

    Whether monitoring is switched on; on when omitted.

  • tag_uuidsarray of strings or nullOptional

    The uuids of the tags the service carries.

  • parametersarray of strings or nullOptional

    The parameter definitions the check reads (name, source, format and selector, never a value). Needs the services.parameters permission.

  • stepsarray of arraysRequired

    The service’s steps, 1 to 10, in order. Each step makes a request of any protocol (http, grpc, websocket, tcp, udp, icmp, dns, tls, smtp or wait), verifies the answer with assertions, extracts values for later steps and decides what happens next. A single check is a one-step service. A step may carry keep_evidence (boolean): whether it keeps what its server answered as evidence, on for a new step; on an update, a step sent with its uuid and no keep_evidence keeps the stored value. The write-only parts of a step (header names and values, bodies, cookies, query strings, payloads, messages, metadata and every authentication field) are never returned.

  • variablesarray of strings or nullOptional

    The values generated for each run (up to 10): numeric, alphabetic, alphanumeric, uuid, timestamp, date, run_uuid and service_uuid.

  • runarray of strings or nullOptional

    The whole run: budget_seconds (5 to 300; the sum of the steps’ own times when omitted) and fast_retry (count 0 to 3, interval_ms 0 to 60,000).

  • collectorsobjectRequired

    The servers that run the check, chosen by hand or by tags. Required on create.

  • pool_modestring or nullOptional

    active_standby (one collector with a standby) or all_members (every collector in the pool reports).

    Values:active_standbyall_members(an open set: new values may be added)
  • member_limitinteger or nullOptional

    With all_members, the most collectors that report, from 1 to the pool limit; only valid in that mode.

  • quorum_ninteger or nullOptional

    With all_members, how many collectors must agree, from 1 and at most the member limit; only valid in that mode.

Returns

201 Created:

The service that was created.

Each failure is a problem document with a stable code; the response panel's status selector shows each one this operation can answer, and errors lists them all.

Update a service

PUT/v1/services/{service_uuid}

Replaces a service’s definition; the fields the answer of GET /v1/services/{service_uuid} leaves out are kept from the stored service when omitted. Omitted request headers keep their stored names, an omitted body is kept while the destination is unchanged, and an omitted password or token is kept. Changing the destination without re-sending a stored body or header value is refused.

Needs the scope services.edit.

Headers

  • Idempotency-KeystringOptional

    Any text of 1 to 255 visible ASCII characters. A repeat of the same request within 24 hours returns the first answer without running again (the response carries Idempotent-Replayed: true); the same key on a different request is refused 422 invalid_request.

Path parameters

  • service_uuidstring (uuid)Required

    The uuid of the service.

Body parameters

  • namestringRequired

    The service’s name, up to 255 characters.

  • check_interval_secondsinteger or nullOptional

    Seconds between two checks, from 60 to 86400 and at least the timeout rounded up to a whole minute.

  • notesstring or nullOptional

    Free-form notes about the service; omit to keep the current notes, null clears them.

  • activebooleanRequired

    Whether monitoring is switched on.

  • tag_uuidsarray of strings or nullOptional

    The uuids of the tags the service carries.

  • parametersarray of strings or nullOptional

    The parameter definitions the check reads (name, source, format and selector, never a value). Needs the services.parameters permission.

  • stepsarray of arraysRequired

    The service’s steps, 1 to 10, in order. Each step makes a request of any protocol (http, grpc, websocket, tcp, udp, icmp, dns, tls, smtp or wait), verifies the answer with assertions, extracts values for later steps and decides what happens next. A single check is a one-step service. A step may carry keep_evidence (boolean): whether it keeps what its server answered as evidence, on for a new step; on an update, a step sent with its uuid and no keep_evidence keeps the stored value. The write-only parts of a step (header names and values, bodies, cookies, query strings, payloads, messages, metadata and every authentication field) are never returned.

  • variablesarray of strings or nullOptional

    The values generated for each run (up to 10): numeric, alphabetic, alphanumeric, uuid, timestamp, date, run_uuid and service_uuid.

  • runarray of strings or nullOptional

    The whole run: budget_seconds (5 to 300; the sum of the steps’ own times when omitted) and fast_retry (count 0 to 3, interval_ms 0 to 60,000).

  • collectorsobject or nullOptional

    The servers that run the check, chosen by hand or by tags; omit to leave the pool unchanged.

  • pool_modestring or nullOptional

    active_standby (one collector with a standby) or all_members (every collector in the pool reports).

    Values:active_standbyall_members(an open set: new values may be added)
  • member_limitinteger or nullOptional

    With all_members, the most collectors that report, from 1 to the pool limit; only valid in that mode.

  • quorum_ninteger or nullOptional

    With all_members, how many collectors must agree, from 1 and at most the member limit; only valid in that mode.

Returns

200 OK:

The service after the update.

Each failure is a problem document with a stable code; the response panel's status selector shows each one this operation can answer, and errors lists them all.

Get a service

GET/v1/services/{service_uuid}

Returns one service with its definition, its latest scored reachability and response results, the state of its collector pool and its tags. Request headers, the body and authentication secrets are never returned. Opening a service may also add any default alarms the catalogue gained since it was created, as the console’s page does.

Needs the scope services.view.

Path parameters

  • service_uuidstring (uuid)Required

    The uuid of the service.

Returns

200 OK:

The service.

Each failure is a problem document with a stable code; the response panel's status selector shows each one this operation can answer, and errors lists them all.

List services

GET/v1/services

Returns the organisation’s services, filtered by search text or tags and sorted by name, health, last scan or response time. Each row summarises the service’s definition, status, health, latest response time and collector pool. Pages by page and per_page (limit is the same as per_page); every page carries current_page, per_page, last_page and total.

Needs the scope services.view.

Query parameters

  • searchstring or nullOptional

    Only services whose name or host contains this text.

  • tag_uuidsarray of strings or nullOptional

    Only services carrying at least one of these tags, as tag UUIDs. A list: repeat the parameter (tag_uuids=<uuid>&tag_uuids=<uuid>) or send one value (tag_uuids=<uuid>); tag_uuids[]=<uuid> is accepted too.

  • sortstring or nullOptional

    The column to sort by: name, health, last_scan or response_time.

    Values:namehealthlast_scanresponse_time(an open set: new values may be added)
  • directionstring or nullOptional

    The sort direction, asc (the default) or desc.

    Values:ascdesc(an open set: new values may be added)
  • limitinteger or nullOptional

    The same as per_page, kept for existing clients.

  • include_totalstring or nullOptional

    Ignored: total is always present.

    Values:truefalse10(an open set: new values may be added)
  • per_pageinteger or nullOptional

    How many items one page holds, from 1 to 100; 25 when omitted.

  • pageinteger or nullOptional

    The page to read, from 1; 1 when omitted. A page past the last answers no rows.

Returns

200 OK:

One page of the organisation’s services.

Each item of the page:

  • uuidstring

    The service’s uuid.

  • namestring

    The service’s name.

  • step_countinteger

    How many steps the service has, 1 to 10.

  • step_typesarray of strings

    The types of its steps, each once, in order of first use: http, grpc, websocket, tcp, udp, icmp, dns, tls, smtp or wait.

  • health_statusstring

    One of unknown, healthy, warning, critical: the effective health (no collectors reads unknown).

  • statusstring

    One of up, down, pending (no reachability result yet) and suspended (switched off).

    Values:suspendedpendingupdown(an open set: new values may be added)
  • activeboolean

    Whether monitoring is switched on.

  • check_interval_secondsinteger

    Seconds between two checks.

  • run_budget_secondsinteger

    Seconds one whole run may take.

  • latest_response_time_msinteger or null

    The latest scored reachability result’s response time.

  • latest_checked_atinteger or null

    Epoch milliseconds. When the latest scored reachability result completed; null with none.

    An instant: epoch milliseconds, UTC.
  • collector_statusstring

    The collector pool’s state: active and standby, or why it is not (needs_collectors, failing, …).

  • collector_status_reasonstring or null

    Why the collector pool is awaiting a collector or failing, such as dns, blocked_destination or parameter_unavailable; null otherwise.

  • pool_modestring

    active_standby (one collector with a standby) or all_members (every collector in the pool reports).

  • member_countinteger

    How many collectors are in the pool.

  • alarm_snoozeobject or null

    The service’s own alarm snooze, which holds the alarm notifications of every alarm on the service; null when none is live. See PUT /v1/services/{service_uuid}/alarm-snooze.

  • console_urlstring

    The service’s page in the console.

Each failure is a problem document with a stable code; the response panel's status selector shows each one this operation can answer, and errors lists them all.

Delete a service

DELETE/v1/services/{service_uuid}

Deletes the service and stops monitoring it.

Needs the scope services.delete.

Headers

  • Idempotency-KeystringOptional

    Any text of 1 to 255 visible ASCII characters. A repeat of the same request within 24 hours returns the first answer without running again (the response carries Idempotent-Replayed: true); the same key on a different request is refused 422 invalid_request.

Path parameters

  • service_uuidstring (uuid)Required

    The uuid of the service.

Returns

204 No Content:

The service was deleted; there is no body.

Each failure is a problem document with a stable code; the response panel's status selector shows each one this operation can answer, and errors lists them all.

Preview service collectors

POST/v1/services/collector-preview

Lists the servers a collector selection, by hand or by tags, would pick, with the role each would get, why each excluded server is left out and any warning about the pool. It reads only: nothing is saved and no server is contacted.

Needs the scope services.edit.

Headers

  • Idempotency-KeystringOptional

    Any text of 1 to 255 visible ASCII characters. A repeat of the same request within 24 hours returns the first answer without running again (the response carries Idempotent-Replayed: true); the same key on a different request is refused 422 invalid_request.

Body parameters

  • selectionstringRequired

    servers for a hand-picked list, tags for servers chosen by their tags.

    Values:serverstags(an open set: new values may be added)
  • serversarray of strings or nullOptional

    The uuids of the servers to preview, with selection servers.

  • allarray of strings or nullOptional

    Servers must carry ALL of these tags.

  • anyarray of strings or nullOptional

    Servers must carry ANY of these tags.

  • with_parametersboolean or nullOptional

    Whether the preview asks for the collectors that can read a parameter.

Returns

200 OK:

The matching servers and the pool’s warnings.

Each failure is a problem document with a stable code; the response panel's status selector shows each one this operation can answer, and errors lists them all.

List a service's collectors

GET/v1/services/{service_uuid}/collectors

Returns the servers of the service’s collector pool: each one’s role (active and standby in active-standby mode, member in every-collector mode, cold for a candidate), whether it is eligible, why it is excluded, and the time and result of its last check. A server’s address is never returned.

Needs the scope services.view.

Path parameters

  • service_uuidstring (uuid)Required

    The uuid of the service in the path.

Returns

200 OK:

The service’s collector pool.

Each failure is a problem document with a stable code; the response panel's status selector shows each one this operation can answer, and errors lists them all.

Duplicate a service

POST/v1/services/{service_uuid}/duplicate

Creates a copy of a service with the same steps, variables, run, parameters and collector rule. The copy is paused, holds new step uuids and no lease, so it never doubles checks until you resume it. Refuses an organisation over its service limit and one that needs a payment method.

Needs the scope services.edit.

Headers

  • Idempotency-KeystringOptional

    Any text of 1 to 255 visible ASCII characters. A repeat of the same request within 24 hours returns the first answer without running again (the response carries Idempotent-Replayed: true); the same key on a different request is refused 422 invalid_request.

Path parameters

  • service_uuidstring (uuid)Required

    The uuid of the service to copy.

Body parameters

  • namestring or nullOptional

    The copy’s name, up to 255 characters; Copy of <name> when omitted.

Returns

201 Created:

The new copy of the service.

Each failure is a problem document with a stable code; the response panel's status selector shows each one this operation can answer, and errors lists them all.

End a service's alarm snooze

DELETE/v1/services/{service_uuid}/alarm-snooze

Ends the service’s alarm snooze early, so held notifications are released by the next sweep (up to a minute), as described for PUT. The call is safe to repeat: it answers 204 also when the service had no live snooze, since the end state is what you asked for. Needs the alarms.edit scope.

Needs the scope alarms.edit.

Headers

  • Idempotency-KeystringOptional

    Any text of 1 to 255 visible ASCII characters. A repeat of the same request within 24 hours returns the first answer without running again (the response carries Idempotent-Replayed: true); the same key on a different request is refused 422 invalid_request.

Path parameters

  • service_uuidstring (uuid)Required

    The UUID of the service.

Returns

204 No Content:

The snooze was ended, or there was none; the answer has no body.

Each failure is a problem document with a stable code; the response panel's status selector shows each one this operation can answer, and errors lists them all.

Import a step

POST/v1/services/import

Reads a pasted cURL command, or one operation of a pasted OpenAPI document (JSON or YAML, up to 1 MB, named by its operationId or as “METHOD path”), and answers the step it makes. Nothing is saved: send the step in a create or an update. Every credential in the source becomes a {{param.name}} reference listed in parameters_needed, which you add to the service as Parameters; its value is in no answer. A flag or part the reader does not know is named in unread_flags. A document is pasted, never fetched: a url is refused.

Needs the scope services.edit.

Headers

  • Idempotency-KeystringOptional

    Any text of 1 to 255 visible ASCII characters. A repeat of the same request within 24 hours returns the first answer without running again (the response carries Idempotent-Replayed: true); the same key on a different request is refused 422 invalid_request.

Body parameters

  • sourcestringRequired

    What the text is: curl for a cURL command, openapi for an OpenAPI document.

    Values:curlopenapi(an open set: new values may be added)
  • source_textstringRequired

    The pasted cURL command or OpenAPI document (JSON or YAML), up to 1 MB. It is never logged.

  • operationstring or nullOptional

    With openapi, the operation to read: its operationId, or METHOD path such as GET /pets/{petId}.

  • urlstringOptional

    Refused: a document is pasted, never fetched.

Returns

200 OK:

The step, the parameters it needs and what was not read.

Each failure is a problem document with a stable code; the response panel's status selector shows each one this operation can answer, and errors lists them all.

Get a service parameters test

GET/v1/services/{service_uuid}/parameters/test

Returns the state of the last parameters test: none when none is pending or recent, pending, or done with the results by parameter name. A result says whether the parameter was found, its length and where it came from, never its value.

Needs the scope services.view.

Path parameters

  • service_uuidstring (uuid)Required

    The uuid of the service.

Returns

200 OK:

The state of the last parameters test and its results.

Each failure is a problem document with a stable code; the response panel's status selector shows each one this operation can answer, and errors lists them all.

Pause a service

POST/v1/services/{service_uuid}/pause

Pauses monitoring: the service is switched off, open incidents on it are resolved and its collectors stop checking. Answers the service as the single-service read does.

Needs the scope services.edit.

Headers

  • Idempotency-KeystringOptional

    Any text of 1 to 255 visible ASCII characters. A repeat of the same request within 24 hours returns the first answer without running again (the response carries Idempotent-Replayed: true); the same key on a different request is refused 422 invalid_request.

Path parameters

  • service_uuidstring (uuid)Required

    The uuid of the service.

Returns

200 OK:

The service after it was paused.

Each failure is a problem document with a stable code; the response panel's status selector shows each one this operation can answer, and errors lists them all.

Reassign a service

POST/v1/services/{service_uuid}/reassign

Moves checking to the standby collector at once; the previous active collector becomes the standby and its late results are ignored. Refused in all_members mode, where every member checks. Answers the service as the single-service read does.

Needs the scope services.edit.

Headers

  • Idempotency-KeystringOptional

    Any text of 1 to 255 visible ASCII characters. A repeat of the same request within 24 hours returns the first answer without running again (the response carries Idempotent-Replayed: true); the same key on a different request is refused 422 invalid_request.

Path parameters

  • service_uuidstring (uuid)Required

    The uuid of the service.

Returns

200 OK:

The service after the reassignment.

Each failure is a problem document with a stable code; the response panel's status selector shows each one this operation can answer, and errors lists them all.

Resume a service

POST/v1/services/{service_uuid}/resume

Resumes a paused service: checking and billing start again, so the payment method is checked first. The service is verified again, and its alarms stay quiet until the first result after the resume. Answers the service as the single-service read does.

Needs the scope services.edit.

Headers

  • Idempotency-KeystringOptional

    Any text of 1 to 255 visible ASCII characters. A repeat of the same request within 24 hours returns the first answer without running again (the response carries Idempotent-Replayed: true); the same key on a different request is refused 422 invalid_request.

Path parameters

  • service_uuidstring (uuid)Required

    The uuid of the service.

Returns

200 OK:

The service after it was resumed.

Each failure is a problem document with a stable code; the response panel's status selector shows each one this operation can answer, and errors lists them all.

Run a service check now

POST/v1/services/{service_uuid}/run-now

Asks the active collector, or every member in all_members mode, to make one extra check now, scored like a scheduled one. Nothing is checked from WatchTower15 itself. Answers the service as the single-service read does.

Needs the scope services.edit.

Headers

  • Idempotency-KeystringOptional

    Any text of 1 to 255 visible ASCII characters. A repeat of the same request within 24 hours returns the first answer without running again (the response carries Idempotent-Replayed: true); the same key on a different request is refused 422 invalid_request.

Path parameters

  • service_uuidstring (uuid)Required

    The uuid of the service.

Returns

202 Accepted:

The service, with the check requested.

Each failure is a problem document with a stable code; the response panel's status selector shows each one this operation can answer, and errors lists them all.

List a service's runs

GET/v1/services/{service_uuid}/runs

Returns the runs of a workflow service in a time window, newest first, one cursor page at a time, from every collector: each run has its status, its reason, its duration against its budget, the collector that ran it and the step that failed. A window inside the last 30 days is read from every run; the part of a window older than that holds only the runs that mattered (the first failed run of a streak, one a hour while it lasts, and the recovery), and meta.history_only_before says where that begins. A service that is not a workflow answers an empty page with meta.path check: its results are GET /v1/services/{service_uuid}/scans.

Needs the scope services.view.

Path parameters

  • service_uuidstring (uuid)Required

    The uuid of the service.

Query parameters

  • periodstring or nullOptional

    A relative window ending now: 1 to 9999 minutes, hours, days or weeks (3h, 2w). Not with from and to. The operation names its longest window and its default.

  • fromstring or nullOptional

    The start of a pinned window, epoch milliseconds or RFC 3339 with an offset. Needs to. A start before the oldest data kept is served from it.

  • tostring or nullOptional

    The end of a pinned window, epoch milliseconds or RFC 3339 with an offset, after from. A window that ends before the oldest data kept, or in the future, is refused.

  • statusarray of strings or nullOptional

    Only runs with one of these statuses: passed, failed, budget_exceeded or refused. Repeat the parameter (status[]=failed&status[]=budget_exceeded) for several. A list: repeat the parameter (status=passed&status=failed) or send one value (status=passed); status[]=passed is accepted too.

    Values:passedfailedbudget_exceededrefused(an open set: new values may be added)
  • collector_uuidstring or nullOptional

    Only runs of this collector, by the server’s uuid.

  • failed_step_uuidstring or nullOptional

    Only runs whose failed step is this one, by the step’s uuid.

  • limitinteger or nullOptional

    The same as per_page, kept for existing clients.

  • cursorstring or nullOptional

    The next_cursor of the previous page; omit it for the first page.

  • per_pageinteger or nullOptional

    How many runs one page holds, from 1 to 100; 25 when omitted.

Returns

200 OK:

One page of the service’s runs.

Each item of the page:

  • run_uuidstring

    The run’s uuid.

  • collectorobject

    The server that ran the run.

  • version_uuidstring

    The uuid of the service’s saved version that this run ran.

  • versioninteger

    The number of that version, 1 for the first.

  • triggerstring

    scheduled for a run on the service’s own schedule, probe for a run asked for by a probe or a standby collector.

  • statusstring

    One of passed, failed, budget_exceeded (the run used its whole time budget) and refused (the collector would not run the definition).

  • reasonstring or null

    A short name for why a budget_exceeded or refused run ended so, for example budget_exceeded, definition_unsupported; null otherwise.

  • started_atinteger

    Epoch milliseconds: when the run started.

    An instant: epoch milliseconds, UTC.
  • completed_atinteger

    Epoch milliseconds: when the run completed.

    An instant: epoch milliseconds, UTC.
  • duration_msinteger

    How long the whole run took, in milliseconds.

  • budget_msinteger

    The time budget of the run, in milliseconds.

  • attemptsinteger

    How many times the run was tried: 1 plus its fast retries.

  • failed_step_uuidstring or null

    The uuid of the first step that failed and stopped the run; null when no step did.

  • failed_reasonstring or null

    Why that step failed, a short name such as timeout or assertion_failed; null when none did.

  • steps_runinteger

    How many steps ran: every step but the ones skipped.

  • eventfulboolean

    Whether this run is one the service keeps for ten years: the first failed run of a streak, one an hour while it lasts and the recovery.

  • retentionstring

    recent for a run kept for 30 days, history for one kept for 10 years.

Each failure is a problem document with a stable code; the response panel's status selector shows each one this operation can answer, and errors lists them all.

Get a service run

GET/v1/services/{service_uuid}/runs/{run_uuid}

Returns one run of a workflow service with every step’s outcome: its status, reason, attempts, timings and the numbers it observed (a status code, a response time), the assertions’ outcomes and the extractions’ outcomes, never a value. A run is kept for 30 days; the runs that mattered (the first failed run of a streak, one a hour while it lasts and the recovery) are kept for 10 years, and retention says which. A run that is no longer kept answers not found.

Needs the scope services.view.

Path parameters

  • service_uuidstring (uuid)Required

    The uuid of the service.

  • run_uuidstringRequired

    The uuid of the run, from the runs list.

Returns

200 OK:

The run and its steps.

Each failure is a problem document with a stable code; the response panel's status selector shows each one this operation can answer, and errors lists them all.

List a service's results

GET/v1/services/{service_uuid}/scans

Returns the service’s completed results of one type (reachability or response), newest first, one cursor page at a time, from every collector. The list holds every result of the last 168 hours and then, before meta.history_only_before, only the results that mattered: the first failure of a streak, one an hour while it lasts and the recovery, kept for ten years. Each row has the common fields and those of its type; a result kept for ten years has no error_message and no content_type.

Needs the scope services.view.

Path parameters

  • service_uuidstring (uuid)Required

    The uuid of the service.

Query parameters

  • typestringRequired

    The result type to list: reachability or response.

    Values:reachabilityresponse(an open set: new values may be added)
  • limitinteger or nullOptional

    The same as per_page, kept for existing clients.

  • cursorstring or nullOptional

    The next_cursor of the previous page; omit it for the first page.

  • include_totalstring or nullOptional

    Ignored: total is always present.

    Values:truefalse10(an open set: new values may be added)
  • per_pageinteger or nullOptional

    How many items one page holds, from 1 to 100; 25 when omitted.

Returns

200 OK:

One page of the service’s completed results of the requested type.

Each item of the page:

  • uuidstring

    The result’s uuid.

  • outcomestring or null

    The scanner’s verdict on a result from a former scanner; null on every result a collector reported and on a result kept past 168 hours.

  • completed_atinteger or null

    Epoch milliseconds: when the result completed; null while it has not.

    An instant: epoch milliseconds, UTC.
  • execution_time_msinteger or null

    How long the check took, in milliseconds; null when unknown.

  • error_messagestring or null

    The error text of a failed check, without any parameter value; null when the check passed and on a result kept past 168 hours.

  • confirmationstring or null

    Whether a failure was confirmed by the standby collector: pending, confirmed or unconfirmed; null for a result that passed.

  • reasonstring or null

    The failure’s reason class (for example dns, refused, timeout); null when the check passed or failed only on an assertion.

  • is_reachableboolean or null

    Whether the host and port answered within the timeout; null until completed. Present on reachability results only.

  • response_time_msinteger or null

    The connect or request time, in milliseconds; null when none was measured. Present on both result types.

  • ip_resolvedstring or null

    The address the host resolved to on the collector; null when it did not resolve. Present on reachability results only.

  • is_upboolean or null

    Whether every configured response check passed; null until completed. Present on response results only.

  • http_status_codeinteger or null

    The HTTP status code received; null when the request failed. Present on response results only.

  • status_matchboolean or null

    Whether the status was one of the expected statuses; null when not judged. Present on response results only.

  • body_matchboolean or null

    Whether the body contained the expected text; null when not judged. Present on response results only.

  • content_typestring or null

    The Content-Type header of the response; null when none was received and on a result kept past 168 hours. Present on response results only.

  • response_size_bytesinteger or null

    The size of the response body, in bytes; null when unknown. Present on response results only.

Each failure is a problem document with a stable code; the response panel's status selector shows each one this operation can answer, and errors lists them all.

Snooze a service's alarms

PUT/v1/services/{service_uuid}/alarm-snooze

Holds the alarm notifications of one service for a set time, as the console’s Snooze does. The alarms keep evaluating the whole time: incidents still open, escalate, step down and resolve, and health and the alarm states keep their real values; only the automatic notifications are held. It covers every alarm whose resource is the service: its reachability, response, collector and workflow run and step alarms, and any custom alarm on it. The servers that collect for the service are their own resources and are not covered, and snoozing a server does not snooze the services it checks. While a snooze is live, a new or escalated incident whose alarm has a notification policy is held, not sent, and reads notification_held_at on the incident. An incident that resolves while the service is snoozed is resolved without a notification, even one that was notified before the snooze started, and an incident whose trigger was held is resolved without one too: the team is not told that an earlier page cleared. A person’s acknowledge or resolve still notifies and clears the hold, snoozed or not. When the snooze ends, by its time or by DELETE, each incident still open whose notification was held is notified once at its current severity (the stored message, so it may read as lowered from a higher severity); one already acknowledged or resolved is cleared without a notification. That release is made by a sweep that runs every minute, so it can lag the end by up to a minute. A paused service may also be snoozed: the two are independent, and a snooze still live when the service is resumed holds whatever opens after it. Send duration (a whole number, at least 1) and unit (minutes, hours or days), counted from now: the total is 1 minute to 30 days, and more is refused with 422. Setting a snooze on a service that already has one replaces its end, so a second call extends or shortens it, and there is one snooze for each. reason is optional, plain text, at most 500 characters. A snooze takes effect from the next evaluation pass (up to a minute), so a notification can still go out in the pass that is running when you call, and likewise an end takes effect from the next pass. Needs the alarms.edit scope.

Needs the scope alarms.edit.

Headers

  • Idempotency-KeystringOptional

    Any text of 1 to 255 visible ASCII characters. A repeat of the same request within 24 hours returns the first answer without running again (the response carries Idempotent-Replayed: true); the same key on a different request is refused 422 invalid_request.

Path parameters

  • service_uuidstring (uuid)Required

    The UUID of the service.

Body parameters

  • durationintegerRequired

    How long the snooze lasts, a whole number of units, at least 1. The total is 1 minute to 30 days: at most 43200 minutes, 720 hours or 30 days.

  • unitstringRequired

    The unit of duration: minutes, hours or days.

    Values:minuteshoursdays(an open set: new values may be added)
  • reasonstring or nullOptional

    Why the alarms are snoozed, plain text, at most 500 characters; null or left out for none. It is shown to the team with the snooze.

Returns

200 OK:

The service’s own snooze after the call: when it ends, its reason and when it was set.

Each failure is a problem document with a stable code; the response panel's status selector shows each one this operation can answer, and errors lists them all.

Test service parameters

POST/v1/services/{service_uuid}/parameters/test

Asks the service’s collector to test the saved parameters and returns the test as pending. Poll GET /v1/services/{service_uuid}/parameters/test for the results, which name each parameter and never carry a value.

Needs the scope services.edit.

Headers

  • Idempotency-KeystringOptional

    Any text of 1 to 255 visible ASCII characters. A repeat of the same request within 24 hours returns the first answer without running again (the response carries Idempotent-Replayed: true); the same key on a different request is refused 422 invalid_request.

Path parameters

  • service_uuidstring (uuid)Required

    The uuid of the service.

Returns

202 Accepted:

The test, pending and without results.

Each failure is a problem document with a stable code; the response panel's status selector shows each one this operation can answer, and errors lists them all.

Test a service definition

POST/v1/services/test-runs

Runs one check of a service definition that is not saved, from one live collector of its pool, and answers 202 with the test’s uuid. Poll GET /v1/service-test-runs/{test_uuid} for the result, which carries each check’s reason and observed numbers and never a value or a response snippet. The body is the create body; the same refusals apply, and one test is allowed every 30 seconds, 20 an hour per organisation.

Needs the scope services.edit.

Headers

  • Idempotency-KeystringOptional

    Any text of 1 to 255 visible ASCII characters. A repeat of the same request within 24 hours returns the first answer without running again (the response carries Idempotent-Replayed: true); the same key on a different request is refused 422 invalid_request.

Body parameters

  • namestringRequired

    The service’s name, up to 255 characters.

  • check_interval_secondsinteger or nullOptional

    Seconds between two checks, from 60 to 86400 and at least the run budget rounded up to a whole minute; 60 when omitted on create.

  • notesstring or nullOptional

    Free-form notes about the service; null or omitted stores none.

  • activeboolean or nullOptional

    Whether monitoring is switched on; on when omitted.

  • tag_uuidsarray of strings or nullOptional

    The uuids of the tags the service carries.

  • parametersarray of strings or nullOptional

    The parameter definitions the check reads (name, source, format and selector, never a value). Needs the services.parameters permission.

  • stepsarray of arraysRequired

    The service’s steps, 1 to 10, in order. Each step makes a request of any protocol (http, grpc, websocket, tcp, udp, icmp, dns, tls, smtp or wait), verifies the answer with assertions, extracts values for later steps and decides what happens next. A single check is a one-step service. A step may carry keep_evidence (boolean): whether it keeps what its server answered as evidence, on for a new step; on an update, a step sent with its uuid and no keep_evidence keeps the stored value. The write-only parts of a step (header names and values, bodies, cookies, query strings, payloads, messages, metadata and every authentication field) are never returned.

  • variablesarray of strings or nullOptional

    The values generated for each run (up to 10): numeric, alphabetic, alphanumeric, uuid, timestamp, date, run_uuid and service_uuid.

  • runarray of strings or nullOptional

    The whole run: budget_seconds (5 to 300; the sum of the steps’ own times when omitted) and fast_retry (count 0 to 3, interval_ms 0 to 60,000).

  • collectorsobjectRequired

    The servers that run the check, chosen by hand or by tags. Required on create.

  • pool_modestring or nullOptional

    active_standby (one collector with a standby) or all_members (every collector in the pool reports).

    Values:active_standbyall_members(an open set: new values may be added)
  • member_limitinteger or nullOptional

    With all_members, the most collectors that report, from 1 to the pool limit; only valid in that mode.

  • quorum_ninteger or nullOptional

    With all_members, how many collectors must agree, from 1 and at most the member limit; only valid in that mode.

Returns

202 Accepted:

The test, waiting for its collector.

Each failure is a problem document with a stable code; the response panel's status selector shows each one this operation can answer, and errors lists them all.

Test a saved service

POST/v1/services/{service_uuid}/test-runs

Runs one check of the service with the definition sent, as PUT /v1/services/{service_uuid} would save it, from one live collector of its pool, and answers 202 with the test’s uuid. Nothing is saved. A stored secret that is not sent is used as saved. Poll GET /v1/service-test-runs/{test_uuid} for the result.

Needs the scope services.edit.

Headers

  • Idempotency-KeystringOptional

    Any text of 1 to 255 visible ASCII characters. A repeat of the same request within 24 hours returns the first answer without running again (the response carries Idempotent-Replayed: true); the same key on a different request is refused 422 invalid_request.

Path parameters

  • service_uuidstring (uuid)Required

    The uuid of the service.

Body parameters

  • namestringRequired

    The service’s name, up to 255 characters.

  • check_interval_secondsinteger or nullOptional

    Seconds between two checks, from 60 to 86400 and at least the timeout rounded up to a whole minute.

  • notesstring or nullOptional

    Free-form notes about the service; omit to keep the current notes, null clears them.

  • activebooleanRequired

    Whether monitoring is switched on.

  • tag_uuidsarray of strings or nullOptional

    The uuids of the tags the service carries.

  • parametersarray of strings or nullOptional

    The parameter definitions the check reads (name, source, format and selector, never a value). Needs the services.parameters permission.

  • stepsarray of arraysRequired

    The service’s steps, 1 to 10, in order. Each step makes a request of any protocol (http, grpc, websocket, tcp, udp, icmp, dns, tls, smtp or wait), verifies the answer with assertions, extracts values for later steps and decides what happens next. A single check is a one-step service. A step may carry keep_evidence (boolean): whether it keeps what its server answered as evidence, on for a new step; on an update, a step sent with its uuid and no keep_evidence keeps the stored value. The write-only parts of a step (header names and values, bodies, cookies, query strings, payloads, messages, metadata and every authentication field) are never returned.

  • variablesarray of strings or nullOptional

    The values generated for each run (up to 10): numeric, alphabetic, alphanumeric, uuid, timestamp, date, run_uuid and service_uuid.

  • runarray of strings or nullOptional

    The whole run: budget_seconds (5 to 300; the sum of the steps’ own times when omitted) and fast_retry (count 0 to 3, interval_ms 0 to 60,000).

  • collectorsobject or nullOptional

    The servers that run the check, chosen by hand or by tags; omit to leave the pool unchanged.

  • pool_modestring or nullOptional

    active_standby (one collector with a standby) or all_members (every collector in the pool reports).

    Values:active_standbyall_members(an open set: new values may be added)
  • member_limitinteger or nullOptional

    With all_members, the most collectors that report, from 1 to the pool limit; only valid in that mode.

  • quorum_ninteger or nullOptional

    With all_members, how many collectors must agree, from 1 and at most the member limit; only valid in that mode.

Returns

202 Accepted:

The test, waiting for its collector.

Each failure is a problem document with a stable code; the response panel's status selector shows each one this operation can answer, and errors lists them all.

Get a service test

GET/v1/service-test-runs/{test_uuid}

Returns one service test started by the same key’s user within the last hour: waiting, picked_up, passed, failed or no_answer, the collector that ran it and, once it ended, each check’s result. A result carries reasons and observed numbers, never a value, a resolved address or a response snippet.

Needs the scope services.view.

Path parameters

  • test_uuidstring (uuid)Required

    The uuid of the test run in the path, as answered when the test was started.

Returns

200 OK:

The service test.

Each failure is a problem document with a stable code; the response panel's status selector shows each one this operation can answer, and errors lists them all.

Test a service's collectors

POST/v1/services/{service_uuid}/verify

Asks every current candidate collector to probe the service now. A paused service, or one with no collectors chosen, has nobody to ask. Answers the service as the single-service read does.

Needs the scope services.edit.

Headers

  • Idempotency-KeystringOptional

    Any text of 1 to 255 visible ASCII characters. A repeat of the same request within 24 hours returns the first answer without running again (the response carries Idempotent-Replayed: true); the same key on a different request is refused 422 invalid_request.

Path parameters

  • service_uuidstring (uuid)Required

    The uuid of the service.

Returns

200 OK:

The service, with the probes requested.

Each failure is a problem document with a stable code; the response panel's status selector shows each one this operation can answer, and errors lists them all.

List a service's versions

GET/v1/services/{service_uuid}/versions

Lists every saved version of a service, newest first. Every save of a service writes a version that is live at once; versions are kept for ever. A row says which version it is, when and by whom it was saved and how many steps it held; services.versionsView returns the definition. Pages by page and per_page (limit is the same as per_page); every page carries current_page, per_page, last_page and total.

Needs the scope services.view.

Path parameters

  • service_uuidstring (uuid)Required

    The uuid of the service.

Query parameters

  • limitinteger or nullOptional

    The same as per_page, kept for existing clients.

  • include_totalstring or nullOptional

    Ignored: total is always present.

    Values:truefalse10(an open set: new values may be added)
  • per_pageinteger or nullOptional

    How many items one page holds, from 1 to 100; 25 when omitted.

  • pageinteger or nullOptional

    The page to read, from 1; 1 when omitted. A page past the last answers no rows.

Returns

200 OK:

One page of the service’s versions.

Each item of the page:

  • uuidstring

    The version’s uuid.

  • versioninteger

    The version’s number: 1 for the first save, one more for each save after.

  • created_atinteger or null

    Epoch milliseconds. When the version was saved.

    An instant: epoch milliseconds, UTC.
  • created_byobject or null

    Who saved it; null when the system did (a conversion).

  • step_countinteger

    How many steps the version held.

Each failure is a problem document with a stable code; the response panel's status selector shows each one this operation can answer, and errors lists them all.

Get a service version

GET/v1/services/{service_uuid}/versions/{version_uuid}

Returns one saved version of a service: its steps, variables and run as they were when that version was saved. Header names and values, bodies, cookies, query strings, payloads, messages, metadata and authentication fields are never returned.

Needs the scope services.view.

Path parameters

  • service_uuidstring (uuid)Required

    The uuid of the service.

  • version_uuidstring (uuid)Required

    The uuid of the version, from services.versions; it must belong to the service.

Returns

200 OK:

The version.

Each failure is a problem document with a stable code; the response panel's status selector shows each one this operation can answer, and errors lists them all.