Skip to content

Test a check

POST
/api/v1/projects/{projectId}/check-tests
curl --request POST \
--url https://app.monitorly.cloud/api/v1/projects/PROJECT_ID/check-tests \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "check": { "intervalSecs": 30, "kind": { "assertions": [ { "op": "eq", "target": "status", "value": 200 }, { "op": "equals", "path": "$.db", "target": "json", "value": "ok" } ], "maxRedirects": 0, "method": "GET", "type": "http", "url": "https://api.acme.io/healthz" }, "name": "payments-health", "nodes": [ "NODE_ID_HEL", "NODE_ID_FRA", "NODE_ID_AMS" ] } }'

Runs a check once on each of its locations without saving anything, for example before creating it or after a deploy. check is validated as for Create a check; checkId lets the test use the stored secrets of a saved check. The answer comes at once with every location pending: poll Get a check test for the results. Heartbeat checks cannot be tested.

projectId
required
string format: uuid

The project’s id.

Example

PROJECT_ID
Media typeapplication/json
object
check
required

The check as the editor shows it, validated like a create; nodes are the nodes to run it on.

object
downAfter
integer format: int32
escalationPolicyId

The escalation policy of the check’s incidents instead of the project’s; absent or null: the project’s.

string | null format: uuid
intervalSecs

Required except for heartbeat checks, whose schedule is kind.periodSecs.

integer | null format: int32
kind
required
One of:
object
assertions
Array
One of:
object
op
required
string
Allowed values: eq ne lt le gt ge
target
required
string
Allowed values: status
value
required
integer format: int32
body
string | null
degradedAfterMs

Response time above this marks the run DEGRADED.

integer | null format: int32
headers
Array<object>
object
name
required
string
value
required
One of:
object
kind
required
string
Allowed values: plain
value
required
string
maxRedirects
required
integer format: int32
method
required
string
Allowed values: GET HEAD POST PUT PATCH DELETE OPTIONS
url
required
string
type
required
string
Allowed values: http
muted
boolean
name
required
string
nodes

Nodes that run the check; none for heartbeat checks.

Array<string>
quorum
One of:

F ≥ ⌈M/2⌉ and F ≥ min(2, S).

object
mode
required
string
Allowed values: half
timeoutMs
integer format: int32
upAfter
integer format: int32
checkId

The saved check being edited, whose stored secrets {"kind": "secret", "secretId": …} may use.

string | null format: uuid

Example

{
"check": {
"intervalSecs": 30,
"kind": {
"assertions": [
{
"op": "eq",
"target": "status",
"value": 200
},
{
"op": "equals",
"path": "$.db",
"target": "json",
"value": "ok"
}
],
"maxRedirects": 0,
"method": "GET",
"type": "http",
"url": "https://api.acme.io/healthz"
},
"name": "payments-health",
"nodes": [
"NODE_ID_HEL",
"NODE_ID_FRA",
"NODE_ID_AMS"
]
}
}

The test, with every location pending.

Media typeapplication/json
object
deadline
required

The check’s timeout + 5 s after the start.

string
done
required

running until every node answered or the deadline passed.

boolean
id
required
string format: uuid
projectId
required
string format: uuid
results
required

In the order of check.nodes.

Array<object>
object
certificateExpiresAt

SSL checks: the certificate’s expiry.

string | null
domainExpiresAt

Domain checks: the registration’s expiry.

string | null
error
One of:
object
code
required

Stable code, for example egress.private_address, http.timeout, test.offline.

string
message
required
string
failures
required
Array<object>
object
actual
required
string
index

Index of the failed assertion; null for the implicit 2xx/3xx rule.

integer | null format: int32
finishedAt
string | null
nodeId
required
string format: uuid
outcome
One of:
string
Allowed values: up degraded down
status
required
string
Allowed values: pending done not_supported offline timeout failed
statusCode
integer | null format: int32
timings
One of:
object
connectMs
integer | null format: int32
dnsMs
integer | null format: int32
tlsMs
integer | null format: int32
totalMs
required
integer format: int32
ttfbMs
integer | null format: int32
startedAt
required
string

Example

{
"deadline": "2026-11-27T15:10:15Z",
"done": false,
"id": "TEST_ID",
"projectId": "PROJECT_ID",
"results": [
{
"failures": [],
"nodeId": "NODE_ID_HEL",
"status": "pending"
},
{
"failures": [],
"nodeId": "NODE_ID_FRA",
"status": "pending"
},
{
"failures": [],
"nodeId": "NODE_ID_AMS",
"status": "pending"
}
],
"startedAt": "2026-11-27T15:10:00Z"
}

Bad Request.

  • request.malformed: the body or a parameter is not of the expected shape
  • auth.credentials_conflict: the request carries both a session cookie and a token
Media typeapplication/problem+json
object
detail
string | null
errors
required

Field errors, empty for errors of the whole request.

Array<object>
object
code
required
string
params
required
object
key
additional properties
pointer
required

JSON pointer into the request body.

string
status
required
integer format: int32
title
required
string
type
required

Stable code, for example check.timeout_exceeds_interval.

string

Example generated

{
"detail": "example",
"errors": [
{
"code": "example",
"params": {
"additionalProperty": "example"
},
"pointer": "example"
}
],
"status": 1,
"title": "example",
"type": "example"
}

Unauthorized.

  • auth.unauthenticated, auth.session_expired: no session, or it ended
  • token.invalid: the token is malformed, unknown, revoked or expired, or its creator left the workspace
Media typeapplication/problem+json
object
detail
string | null
errors
required

Field errors, empty for errors of the whole request.

Array<object>
object
code
required
string
params
required
object
key
additional properties
pointer
required

JSON pointer into the request body.

string
status
required
integer format: int32
title
required
string
type
required

Stable code, for example check.timeout_exceeds_interval.

string

Example generated

{
"detail": "example",
"errors": [
{
"code": "example",
"params": {
"additionalProperty": "example"
},
"pointer": "example"
}
],
"status": 1,
"title": "example",
"type": "example"
}

Forbidden.

  • auth.forbidden: your role is too low for this
  • token.scope_missing: the token lacks the scope this needs; detail names it
  • request.origin_mismatch, request.header_required: a changing request with a session comes from another site or lacks X-Monitorly-Request: 1
Media typeapplication/problem+json
object
detail
string | null
errors
required

Field errors, empty for errors of the whole request.

Array<object>
object
code
required
string
params
required
object
key
additional properties
pointer
required

JSON pointer into the request body.

string
status
required
integer format: int32
title
required
string
type
required

Stable code, for example check.timeout_exceeds_interval.

string

Example generated

{
"detail": "example",
"errors": [
{
"code": "example",
"params": {
"additionalProperty": "example"
},
"pointer": "example"
}
],
"status": 1,
"title": "example",
"type": "example"
}

Not Found.

  • request.not_found: it does not exist, or you cannot see it
Media typeapplication/problem+json
object
detail
string | null
errors
required

Field errors, empty for errors of the whole request.

Array<object>
object
code
required
string
params
required
object
key
additional properties
pointer
required

JSON pointer into the request body.

string
status
required
integer format: int32
title
required
string
type
required

Stable code, for example check.timeout_exceeds_interval.

string

Example generated

{
"detail": "example",
"errors": [
{
"code": "example",
"params": {
"additionalProperty": "example"
},
"pointer": "example"
}
],
"status": 1,
"title": "example",
"type": "example"
}

Payload Too Large.

  • request.too_large: the body is larger than 256 KiB
Media typeapplication/problem+json
object
detail
string | null
errors
required

Field errors, empty for errors of the whole request.

Array<object>
object
code
required
string
params
required
object
key
additional properties
pointer
required

JSON pointer into the request body.

string
status
required
integer format: int32
title
required
string
type
required

Stable code, for example check.timeout_exceeds_interval.

string

Example generated

{
"detail": "example",
"errors": [
{
"code": "example",
"params": {
"additionalProperty": "example"
},
"pointer": "example"
}
],
"status": 1,
"title": "example",
"type": "example"
}

Unprocessable Entity.

  • field.required, field.too_long, field.invalid: a field breaks a rule; errors points at it
  • check_test.not_runnable: a heartbeat check waits for pings and cannot be checked on nodes
  • check.node_unavailable: node does not exist, is revoked, or is a private node of another workspace
Media typeapplication/problem+json
object
detail
string | null
errors
required

Field errors, empty for errors of the whole request.

Array<object>
object
code
required
string
params
required
object
key
additional properties
pointer
required

JSON pointer into the request body.

string
status
required
integer format: int32
title
required
string
type
required

Stable code, for example check.timeout_exceeds_interval.

string

Example generated

{
"detail": "example",
"errors": [
{
"code": "example",
"params": {
"additionalProperty": "example"
},
"pointer": "example"
}
],
"status": 1,
"title": "example",
"type": "example"
}

Too Many Requests.

  • token.rate_limited: more than 10 requests a second with this token
  • session.rate_limited: more than 5 changes a second from your sessions
  • check_test.busy: a test of this check by you is already running, or the project already runs 3 tests; Retry-After in seconds
  • check_test.rate_limited: more than 20 tests in 10 minutes by you or in the workspace; wait Retry-After seconds
Media typeapplication/problem+json
object
detail
string | null
errors
required

Field errors, empty for errors of the whole request.

Array<object>
object
code
required
string
params
required
object
key
additional properties
pointer
required

JSON pointer into the request body.

string
status
required
integer format: int32
title
required
string
type
required

Stable code, for example check.timeout_exceeds_interval.

string

Example generated

{
"detail": "example",
"errors": [
{
"code": "example",
"params": {
"additionalProperty": "example"
},
"pointer": "example"
}
],
"status": 1,
"title": "example",
"type": "example"
}
Retry-After
integer
>= 1

Seconds to wait before trying again.