list_thresholds
const url = 'https://example.com/api/v1/thresholds';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://example.com/api/v1/thresholds \ --header 'Authorization: Bearer <token>'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Responses
Section titled “Responses”A capped page of rules, with the unfiltered total
A capped page of threshold rules.
total is the unfiltered row count, not items.len(), so the UI can say how many it is not
showing. truncated is derived rather than left to the client comparing the two — a client that
forgets the comparison shows a complete-looking list.
object
A stored threshold rule with its scope and id (id is for the API; the engine ignores it).
object
Value at/over which the node is Critical. None = no critical level.
Which direction trips the threshold.
Hysteresis: consecutive samples the breach must hold before transitioning,
to damp oscillation at the threshold. 0/1 = transition immediately.
Stable metric name this rule applies to (e.g. cpu_util).
Value at/over which the node is Warning. None = no warning level.
The scope a threshold is defined at, ordered least → most specific so the derived
Ord makes Node win over Group win over Profile.
Rules stored in total, ignoring the cap.
Whether items is a prefix of the ruleset rather than all of it.
Example
{ "items": [ { "direction": "above", "scope_level": "profile" } ]}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 below Admin — the ruleset decides when the fleet pages someone
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" }}Skeleton mode has no write side
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" }}