v51

latestOpenAPI 3.0.2raw.githubusercontent.com2026-08-01245104440.0 KB
Data Collection

Get data collection history

Retrieve historical data for a specific DCI (Data Collection Item).

The server can serve data from one of three storage tiers: raw samples, hourly aggregates, or daily aggregates. The tier query parameter selects which tier to read from (default auto, which picks the densest tier whose point count fits within the server-side DataCollection.Aggregation.MaxAutoSelectPoints threshold). When the resolved tier is hourly or daily, each row carries pre-computed avg/min/max and a sampleCount of raw samples that contributed to the bucket. The function query parameter selects which value column(s) the server returns from the aggregate tables (minmax returns avg, min, and max in a single response for band rendering).

get/v1/objects/{object-id}/data-collection/{dci-id}/history

Path parameters

object-idinteger required

Object ID

dci-idinteger required

DCI (Data Collection Item) ID

Query parameters

timeFrominteger

Start time for data retrieval (Unix timestamp)

timeTointeger

End time for data retrieval (Unix timestamp)

maxRowsinteger

Maximum number of data points to return

maxDataPointsinteger

When the request resolves to the raw tier, perform on-the-fly bucketing into this many points and return avg/min/max per bucket. Ignored on hourly/daily tier reads (those already serve pre-computed buckets).

historicalDataTypeinteger

Type of historical data (0=raw, 1=processed, 2=full table, 3=raw and processed)

tier'auto' | 'raw' | 'hourly' | 'daily'

Storage tier to read from. auto picks the densest tier whose point count fits the server-side auto-select threshold. Explicit tiers are downgraded to raw when the requested aggregate is not available for the DCI (e.g. string DCIs, or non-TSDB targets where the per-object aggregate table has not been created yet). The actually-served tier is reported in tierServed.

function'avg' | 'min' | 'max' | 'minmax'

Aggregation function for hourly/daily tier reads. minmax returns avg, min, and max columns in a single response, suitable for band-graph rendering. Ignored when tierServed is raw.

Response

Data collection history retrieved successfully

descriptionstring

DCI description

unitNamestring

Unit name for the value

tierServed'raw' | 'hourly' | 'daily'

Storage tier the server actually read from. May differ from the requested tier (e.g. auto resolves to a concrete tier; an unsupported tier downgrades to raw).

aggregatedboolean

true when rows carry aggregate columns (avg/min/max). Set when the response is served from a hourly/daily tier or when maxDataPoints triggered on-the-fly bucketing on the raw tier.

bucketSizeinteger

On-the-fly bucket size in milliseconds. Only present when the raw tier was bucketed via maxDataPoints.