Skip to content

Read one property series' change history

GET
/components/{name}/properties/{property}/samples
curl --request GET \
--url https://example.com/api/v1/components/example/properties/example/samples

The change history behind the effective value for one property series, newest first, windowed (hours) and capped (limit, newest kept). With a resolution (seconds) it answers instead with every regular bucket of the window, oldest first, each with the change count, last (the value its own changes end on, null when empty) and held (the value in force at its end), and covered_from, the earliest instant retention leaves data for. Both forms carry carried_in, the value in force when the window opens (the newest measured row of the instance before it, within retention), so a step chart starts on it instead of blank. A bucket aggregates one instance’s measured changes (observed and calculated, never declared or intended): instance names it, and unset it is the one instance with measured changes in the window, or a 422 listing them when there are several. Gated by component:read; an out-of-scope owner is a non-disclosing 404.

name
required

The owner’s name or uuid

string

The owner’s name or uuid

property
required

The property_type name of the series

string

The property_type name of the series

hours

The window in hours, counted back from now; 24 when unset

integer format: int64
>= 1 <= 720

The window in hours, counted back from now; 24 when unset

limit

The row cap, newest kept; 500 when unset. Ignored when a resolution is set

integer format: int64
>= 1 <= 2000

The row cap, newest kept; 500 when unset. Ignored when a resolution is set

resolution

The bucket width in seconds, at most 30 days. Set, the read answers with every regular bucket of the window (buckets) instead of raw rows; unset, the raw samples. A window of more than 5000 buckets is refused

integer format: int64
>= 1 <= 2592000

The bucket width in seconds, at most 30 days. Set, the read answers with every regular bucket of the window (buckets) instead of raw rows; unset, the raw samples. A window of more than 5000 buckets is refused

instance

The instance a bucketed read aggregates. Unset, the one instance with measured samples in the window; when more than one has them the read is refused with a 422 listing them. On a raw read it names only the instance whose carried_in value is returned, the one with a measured row in the window else the one holding a value from before it

string

The instance a bucketed read aggregates. Unset, the one instance with measured samples in the window; when more than one has them the read is refused with a 422 listing them. On a raw read it names only the instance whose carried_in value is returned, the one with a measured row in the window else the one holding a value from before it

OK

Media type application/json
object
$schema

A URL to the JSON Schema for this object.

string format: uri
buckets

Every regular bucket of the window, oldest first

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 window opens: the newest measured row (observed or calculated) of the instance from before it, no older than the type’s retention; absent when none. A step chart draws it from the window’s left edge to the first change

string
covered_from

The earliest instant the read could have data for: the start of the window or the series’ effective retention, whichever is later

string format: date-time
instance

The one instance the buckets aggregate, measured changes only (observed and calculated); present only on a bucketed read

string
owner
required

The owner’s name

string
property
required

The series’ property_type name

string
resolution_seconds

The bucket width applied, the one asked for; present only on a bucketed read

integer format: int64
samples
required

Newest first: the change history behind the effective value; empty when a resolution was asked for

Array<object> | null
object
instance

The series discriminator, when set

string
provenance
required

Observed, declared, or calculated

string
source
string
ts
required

When the value was observed

string format: date-time
value
required
string

Example

{
"$schema": "/api/v1/schemas/PropertySeriesOutputBody.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"
}