コンテンツにスキップ

Fleet passive-event summary aggregates for the dashboard widgets.

GET
/api/v1/events/stats
curl --request GET \
--url https://example.com/api/v1/events/stats \
--header 'Authorization: Bearer <token>'

Categorical (group_by=kind|action|trap|source) returns count-ordered buckets; group_by=time returns a volume series. Routes to the same store the event log does, so a summary and the list it summarises can never disagree about which store answered.

start
string
end
string
kind
string
node_id
string format: uuid
matched
boolean
q
string
regex
boolean
group_by
string
limit
integer format: int64
bucket_secs
integer format: int64
split
string

A volume series for group_by=time, count-ordered buckets otherwise

Media typeapplication/json
One of:

group_by=time: the volume series.

Array<object>

One time bucket for the /events/stats?group_by=time volume series: a bucket-start timestamp (Unix ms), the total count, and — when split=kind — the per-kind breakdown.

object
by_kind
object | null
count
required
integer format: int64
ts_unix_ms
required
integer format: int64
Examplegenerated
[
{
"by_kind": "example",
"count": 1,
"ts_unix_ms": 1
}
]

A range bound is malformed, the kind is unknown, the regex does not compile, or group_by is not one of kind|action|trap|source|time

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 the read permission

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

This deployment has no write side to resolve node names against

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