Skip to content

list_thresholds

GET
/api/v1/thresholds
curl --request GET \
--url https://example.com/api/v1/thresholds \
--header 'Authorization: Bearer <token>'
limit
integer format: int64

A capped page of rules, with the unfiltered total

Media typeapplication/json

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
items
required
Array

A stored threshold rule with its scope and id (id is for the API; the engine ignores it).

object
critical

Value at/over which the node is Critical. None = no critical level.

number | null format: double
direction
required

Which direction trips the threshold.

string
Allowed values: above below
dwell_samples
required

Hysteresis: consecutive samples the breach must hold before transitioning, to damp oscillation at the threshold. 0/1 = transition immediately.

integer format: int32
metric
required

Stable metric name this rule applies to (e.g. cpu_util).

string
warning

Value at/over which the node is Warning. None = no warning level.

number | null format: double
id
required
string format: uuid
scope_id
required
string
scope_level
required

The scope a threshold is defined at, ordered least → most specific so the derived Ord makes Node win over Group win over Profile.

string
Allowed values: profile group node
total
required

Rules stored in total, ignoring the cap.

integer format: int64
truncated
required

Whether items is a prefix of the ruleset rather than all of it.

boolean
Example
{
"items": [
{
"direction": "above",
"scope_level": "profile"
}
]
}

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 below Admin — the ruleset decides when the fleet pages someone

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"
}
}

Skeleton mode has no write side

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"
}
}