Aerovy Platform logo

Ingest thing data

POSThttps://spectra.api.aerovy.com/v2/thing/{thingId}/data

Writes one or more timestamped data frames for a thing. Each frame carries a Unix-epoch-millisecond timestamp and a generic map of metric name to value; names are matched (case-insensitively) against the thing's ThingTypeDefinition and mapped to their immutable metric ids before being written to timeseries. Values may be numbers, booleans, or strings and are coerced to each metric's declared data type. Unknown metric names are rejected with 400. Requires an API key with the write action scoped to the thing.

Loading code example
Loading code example

Authorizations

apiKeystringheaderrequired

API key passed in the header.

Path Parameters

thingIdstringrequired

The thing to ingest data for.

Body

The data frames to ingest.

framesarray<object>required

The data frames to ingest. At least one is required.

Required array length: >= 1 elements
frames.timestampinteger | string<int64>required

The reading time as Unix epoch milliseconds (UTC).

Pattern: ^-?(?:0|[1-9]\d*)$
frames.metricsobjectrequired

Metric values keyed by metric name. Values are scalars — number, boolean, or string — and are coerced to each metric's declared data type. At least one metric is required.

Response

application/json

Data accepted and written; returns an ingest summary.

thingIdstring

The thing the data was written for.

framesIngestedinteger | string<int32>

The number of data frames written.

Pattern: ^-?(?:0|[1-9]\d*)$
metricsarray<string>

The distinct metric names that were ingested across the frames.