Skip to content

Read the history of one or more view bindings

POST
/views:run
curl --request POST \
--url https://example.com/api/v1/views:run \
--header 'Content-Type: application/json' \
--data '{ "bindings": [ { "filter": { "product": "example", "system": "example", "system_type": "example" }, "from": "2026-04-15T12:00:00Z", "keys": [ "example" ], "kind": "component", "limit": 1, "page": "example", "primitive": "metric", "refs": [ "example" ], "severity": "emergency", "source": "example", "step_seconds": 1, "to": "2026-04-15T12:00:00Z", "window_seconds": 1 } ] }'

Reads each binding’s history from one snapshot and answers the tail cursor it was taken at (ADR-1830). A binding names a primitive (metric, property, event or log), an entity selector (literal refs, or a kind and a filter), the keys, and a range (from and to, or window_seconds back from now). A metric or property binding answers one series per resolved entity, key and instance: its raw points, or with step_seconds every bucket of an epoch-aligned grid (metric buckets carry count, min, max, avg and last; property buckets count, last and held), the older hours from the hourly trends when an hour-multiple step reaches past the raw retention. An event or log binding answers a page of rows, newest first, and a next_page. /views:watch from the cursor carries exactly the rows the history does not. Gated by view:read; each binding also needs :read (component:read or system:read) and resolves only inside that read’s scope: a filter selector resolves to the visible entities, and a literal ref out of scope is the same 404 as one that does not exist. A selector past 200 entities, a raw read past 20000 points or a grid past 5000 buckets is a 422, never a truncated answer.

Media type application/json
object
$schema

A URL to the JSON Schema for this object.

string format: uri
bindings
required

The bindings read, all from one snapshot

Array<object> | null
>= 1 items <= 32 items
object
filter

Narrows a kind selector; refused beside refs

object
product

Components of this product (name or uuid). Component bindings only

string
<= 200 characters
system

Components that are members of this system (name or uuid). Component bindings only

string
<= 200 characters
system_type

Systems of this system type (name or uuid). System bindings only

string
<= 200 characters
from

An absolute range’s start. Give from (and optionally to), or window_seconds

string format: date-time
keys

The metric, property or event type names read. Required for metric and property; unset on an event binding reads every type; refused on a log binding

Array<string> | null
<= 50 items
kind
required

The entity kind the selector names. The binding needs :read on top of view:read, and resolves only inside that read’s scope. Log lines belong to components

string
Allowed values: component system
limit

An event or log page’s size; 100 when unset

integer format: int64
>= 1 <= 1000
page

An event or log read’s next_page, to read further back

string
<= 64 characters
primitive
required

The primitive read: metric and property answer one series per entity, key and instance; event and log answer rows, newest first, a page at a time

string
Allowed values: metric property event log
refs

Literal entities, by name, uuid or dotted address. One outside the caller’s scope is the same 404 as one that does not exist. Unset, the binding selects every visible entity of the kind that filter keeps

Array<string> | null
<= 200 items
severity

Log bindings: only lines at this severity or more severe

string
Allowed values: emergency alert critical error warning notice info debug
source

Log bindings: only lines that arrived on this channel

string
<= 100 characters
step_seconds

Buckets a metric or property read on an epoch-aligned grid of this width (at most 5000 buckets). An hour-multiple step reaching past the raw retention answers the older hours from the hourly trends. Unset, the raw points

integer format: int64
>= 1 <= 2592000
to

An absolute range’s end, exclusive; unset is now. Needs from

string format: date-time
window_seconds

A relative range: this many seconds back from now

integer format: int64
>= 1 <= 63072000

OK

Media type application/json
object
$schema

A URL to the JSON Schema for this object.

string format: uri
cursor
required

The tail cursor every result was read at

string
now
required

The snapshot’s clock, the end of every relative range

string format: date-time
results
required

One result per binding, in order

Array<object> | null
object
covered_from
required

The earliest instant the read could hold data for: the raw retention’s floor, or the trend floor when hourly trends answered the older hours

string format: date-time
cursor
required

The tail cursor this history was read at: /views:watch from it carries exactly what the history does not. A cursor is .; two from one server boot order by the sequence

string
entities
required

The entities the selector resolved to, in scope

Array<object> | null
object
id
required

The entity’s uuid, the id its series and rows carry

string
kind
required

Component or system

string
name
required
string
events

An event binding’s page, newest first

Array<object> | null
object
alarm_id

The alarm a rule’s event opened or resolved; history rows only

string
attributes
derived_by_rule

The deriving event rule’s name; history rows only

string
entity
required

The owning entity’s uuid

string
id
required

The row’s id, the page order’s tiebreak

integer format: int64
instance
string
key
required

The event type’s name

string
message
required
string
origin
required

Caught, caused, derived or scheduled

string
provenance

The occurrence’s lineage; history rows only

string
source

The transport that produced it; history rows only

string
ts
required
string format: date-time
from
required

The range read

string format: date-time
logs

A log binding’s page, newest arrival first

Array<object> | null
object
attributes
correlation_id

History rows only

string
entity
required

The writing component’s uuid

string
facility
string
id
required
integer format: int64
instance
string
labels

History rows only

message
required
string
received_at

When the server received the line, the order the read pages in

string format: date-time
severity
string
source

The channel it arrived on

string
ts
required

The time the line carried, else its arrival

string format: date-time
metric

A metric binding’s series

Array<object> | null
object
buckets

Every bucket of the grid, oldest first; on a read with a step

Array<object> | null
object
avg
required
number | null format: double
count
required

Samples in the bucket

integer format: int64
last
required

The newest sample’s value in the bucket

number | null format: double
max
required
number | null format: double
min
required
number | null format: double
ts
required

The bucket’s start

string format: date-time
entity
required

The entity’s uuid

string
instance
required

The series discriminator; empty for the owner-level series

string
key
required

The metric type’s name

string
points

The raw samples, oldest first; on a read without a step

Array<object> | null
object
ts
required
string format: date-time
value
required
number format: double
next_page

Pages an event or log read further back; absent at the end

string
property

A property binding’s series

Array<object> | null
object
buckets

Every bucket of the grid, oldest first; on a read with a step

Array<object> | null
object
count
required

Changes in the bucket

integer format: int64
held
required

The value in force at the bucket’s end: last, else the value held at the end of the bucket before it, else carried_in; null before any value is known (#1488)

string | null
last
required

The value the bucket’s own changes end on, from the newest change in it; null for a bucket with no change

string | null
ts
required

The bucket’s start

string format: date-time
carried_in

The value in force when the range opens; absent when none

string
entity
required

The entity’s uuid

string
instance
required

The series discriminator; empty for the owner-level series

string
key
required

The property type’s name

string
points

The changes, oldest first; on a read without a step

Array<object> | null
object
ts
required
string format: date-time
value
required
string
to
required
string format: date-time

Example

{
"$schema": "/api/v1/schemas/RunViewsOutputBody.json"
}

Error

Media type application/problem+json
object
$schema

A URL to the JSON Schema for this object.

string format: uri
detail

A human-readable explanation specific to this occurrence of the problem.

string
errors

Optional list of individual error details

Array<object> | null
object
location

Where the error occurred, e.g. ‘body.items[3].tags’ or ‘path.thing-id’

string
message

Error message text

string
value

The value at the given location

instance

A URI reference that identifies the specific occurrence of the problem.

string format: uri
status

HTTP status code

integer format: int64
title

A short, human-readable summary of the problem type. This value should not change between occurrences of the error.

string
type

A URI reference to human-readable documentation for the error.

string format: uri
default: about:blank

Example

{
"$schema": "/api/v1/schemas/ErrorModel.json",
"detail": "Property foo is required but is missing.",
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "about:blank"
}