set_url_check
const url = 'https://example.com/api/v1/nodes/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/url-check';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"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}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://example.com/api/v1/nodes/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/url-check \ --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 }'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Node id
Request Bodyrequired
Section titled “Request Bodyrequired”A node’s URL-monitoring configuration (1:1 with the node). No secrets: the optional auth
credential is a reference; core resolves/inlines the decrypted value (ADR-018/020).
object
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.
Follow 3xx redirects (default true).
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.
One number to lift out of a JSON response body and record as a metric.
object
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.
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.
Request method (default GET).
Per-request timeout, in milliseconds (default 5000).
Full URL to probe, e.g. https://api.example.com/health.
Verify the TLS certificate chain (default true; never silently disabled — security.md).
Responses
Section titled “Responses”URL check stored
The URL is malformed, not http(s), or points at a blocked address
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
object
Stable machine-readable code. Clients branch on this, never on the message.
Operator-facing sentence. Safe to display; never carries an internal error’s own text.
Examplegenerated
{ "error": { "code": "example", "message": "example" }}No valid bearer token
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
object
Stable machine-readable code. Clients branch on this, never on the message.
Operator-facing sentence. Safe to display; never carries an internal error’s own text.
Examplegenerated
{ "error": { "code": "example", "message": "example" }}Role lacks ManageConfig
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
object
Stable machine-readable code. Clients branch on this, never on the message.
Operator-facing sentence. Safe to display; never carries an internal error’s own text.
Examplegenerated
{ "error": { "code": "example", "message": "example" }}No such node
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
object
Stable machine-readable code. Clients branch on this, never on the message.
Operator-facing sentence. Safe to display; never carries an internal error’s own text.
Examplegenerated
{ "error": { "code": "example", "message": "example" }}The node is already a monitor of another kind
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
object
Stable machine-readable code. Clients branch on this, never on the message.
Operator-facing sentence. Safe to display; never carries an internal error’s own text.
Examplegenerated
{ "error": { "code": "example", "message": "example" }}Inventory storage is unavailable (skeleton mode)
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
object
Stable machine-readable code. Clients branch on this, never on the message.
Operator-facing sentence. Safe to display; never carries an internal error’s own text.
Examplegenerated
{ "error": { "code": "example", "message": "example" }}