Skip to content

create_url_monitor

POST
/api/v1/url-monitors
curl --request POST \
--url https://example.com/api/v1/url-monitors \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "body_match": { "mode": "contains", "pattern": "example" }, "body_max_bytes": 1, "credential": "example", "expected_status": { "kind": "two_xx" }, "follow_redirects": true, "json_extract": [ { "metric": "example", "path": "example" } ], "method": "GET", "timeout_ms": 1, "url": "example", "verify_tls": true, "name": "example", "parent_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "pool": "example" }'
Media typeapplication/json

name/parent_id/pool plus a flattened [UrlCheckConfig] (only url is required; everything else defaults).

object
body_match
One of:
null
body_max_bytes

How many bytes of the response body to read (default 65536, range 1024–1048576). Applies to both body_match and json_extract; the body is not read at all unless one of them is set.

integer format: int32
credential
One of:
null
expected_status
One of:

Any 2xx (the default).

object
kind
required
string
Allowed values: two_xx
follow_redirects

Follow 3xx redirects (default true).

boolean
json_extract

Values to lift out of a JSON response body and record as operator-named metrics.

Each rule adds one gauge per poll. A rule whose path is missing, or whose value is not a number, records nothing for that poll rather than a zero.

Array<object>

One number to lift out of a JSON response body and record as a metric.

object
metric
required

The metric name to record the value under, e.g. queue_depth. Must match [A-Za-z_:][A-Za-z0-9_:]* and must not be one of the names the monitor already emits.

string
path
required

Dot-separated path to the value, e.g. data.queue.depth or items.0.value. Array elements are indexed by number; items[0].value is accepted and means the same thing.

Not a JSONPath expression: the path names exactly one location, so the rule always produces either one number or nothing.

string
method

Request method (default GET).

string
Allowed values: GET HEAD POST
timeout_ms

Per-request timeout, in milliseconds (default 5000).

integer format: int32
url
required

Full URL to probe, e.g. https://api.example.com/health.

string
verify_tls

Verify the TLS certificate chain (default true; never silently disabled — security.md).

boolean
name
required
string
parent_id
string | null format: uuid
pool
string | null

Monitor node created and bound to the built-in URL profile

Media typeapplication/json

The id of a freshly created resource — the whole body of a 201.

Deliberately one shape for every creator. The json!({"id": …}) literal it replaces was written out per handler, which is how {"id": …} and {"node_id": …} both ended up in this API for the same idea; a client then needs to know which creator it called to read the id back.

object
id
required
string format: uuid
Examplegenerated
{
"id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"
}

The name is empty, the URL is invalid or blocked, or the pool name is not a legal subject token

Media typeapplication/json

The ADR-019 envelope every failure renders as. pub(crate) and schema-bearing so the OpenAPI document can name one error shape for every endpoint (ADR-035) instead of leaving 4xx/5xx bodies undescribed — a client that has to guess the failure shape ends up parsing the success shape and reading undefined.

object
error
required
object
code
required

Stable machine-readable code. Clients branch on this, never on the message.

string
message
required

Operator-facing sentence. Safe to display; never carries an internal error’s own text.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example"
}
}

No valid bearer token

Media typeapplication/json

The ADR-019 envelope every failure renders as. pub(crate) and schema-bearing so the OpenAPI document can name one error shape for every endpoint (ADR-035) instead of leaving 4xx/5xx bodies undescribed — a client that has to guess the failure shape ends up parsing the success shape and reading undefined.

object
error
required
object
code
required

Stable machine-readable code. Clients branch on this, never on the message.

string
message
required

Operator-facing sentence. Safe to display; never carries an internal error’s own text.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example"
}
}

Role lacks ManageConfig

Media typeapplication/json

The ADR-019 envelope every failure renders as. pub(crate) and schema-bearing so the OpenAPI document can name one error shape for every endpoint (ADR-035) instead of leaving 4xx/5xx bodies undescribed — a client that has to guess the failure shape ends up parsing the success shape and reading undefined.

object
error
required
object
code
required

Stable machine-readable code. Clients branch on this, never on the message.

string
message
required

Operator-facing sentence. Safe to display; never carries an internal error’s own text.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example"
}
}

Inventory storage is unavailable (skeleton mode)

Media typeapplication/json

The ADR-019 envelope every failure renders as. pub(crate) and schema-bearing so the OpenAPI document can name one error shape for every endpoint (ADR-035) instead of leaving 4xx/5xx bodies undescribed — a client that has to guess the failure shape ends up parsing the success shape and reading undefined.

object
error
required
object
code
required

Stable machine-readable code. Clients branch on this, never on the message.

string
message
required

Operator-facing sentence. Safe to display; never carries an internal error’s own text.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example"
}
}