Skip to content

node_availability

GET
/api/v1/nodes/{node_id}/availability
curl --request GET \
--url https://example.com/api/v1/nodes/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/availability \
--header 'Authorization: Bearer <token>'
node_id
required
string format: uuid

Node id

period
string | null

24h, 7d, 30d or 90d. Defaults to 30d.

When the node was down, in maintenance or not recorded over the period, and the share of the rest it was up. Down means its liveness alert was open. While no liveness rule reaches the node, or its pool has no live poller, the time it was not down is not recorded rather than up, and there is no share.

Media typeapplication/json

One node’s availability over one period. Totals cover the whole period even when spans was cut.

object
availability_pct

Up ÷ (up + down) × 100. Maintenance and not-recorded time are left out of both sides, the rule reports::render::availability_from_snapshots uses. None with neither.

number | null format: double
down_secs
required
integer format: int64
from_unix_ms
required
integer format: int64
maintenance_secs
required
integer format: int64
no_record_secs
required
integer format: int64
node_id
required
string format: uuid
outages
required

How many times the liveness alert opened, or was already open, inside the period.

integer format: int32
period
required

How far back the graph looks. The tokens are the query parameter’s values.

string
Allowed values: 24h 7d 30d 90d
spans
required

Every down, maintenance and not-recorded stretch, oldest first. Time no span covers was up.

Array<object>

One stretch of time of one kind, clipped to the period.

object
from_unix_ms
required
integer format: int64
kind
required

What a span of time was. Up is not a kind: it is whatever no span covers.

string
Allowed values: down maintenance no_record
to_unix_ms
required
integer format: int64
to_unix_ms
required
integer format: int64
truncated_before_unix_ms

Set when more than [SPANS_MAX] spans existed: the oldest were dropped, and before this instant spans is incomplete (read it as not recorded, never as up).

integer | null format: int64
up_secs
required
integer format: int64
Example
{
"period": "24h",
"spans": [
{
"kind": "down"
}
]
}

Unknown period

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

Not signed in

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

Missing View

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 such node, or the node is outside the caller’s scope

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: no database

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