Aerovy Platform logo

Ingest thing data via a template

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

Ingests a raw third-party JSON payload for a thing, mapping it through the given template onto the thing's metric definitions and writing the result to timeseries. Set previewOnly=true to map and report without persisting. The template's target must be ThingData and the thing must carry a ThingTypeDefinition. 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.

templateIdstringrequired

The mapping template to apply.

Query Parameters

previewOnlybooleandefault: false

When true, map and report without persisting.

Default: false

Response

application/json

The apply report (records mapped/written + diagnostics).

previewOnlyboolean
templateIdnull | string
templateRevisionnull | integer | string<int32>
Pattern: ^-?(?:0|[1-9]\d*)$
templateUpdatedAtnull | string<date-time>
recordsParsedinteger | string<int32>
Pattern: ^-?(?:0|[1-9]\d*)$
readingsWritteninteger | string<int32>
Pattern: ^-?(?:0|[1-9]\d*)$
metricValuesWritteninteger | string<int32>
Pattern: ^-?(?:0|[1-9]\d*)$
recordsSkippedarray<object>
recordsSkipped.indexinteger | string<int32>
Pattern: ^-?(?:0|[1-9]\d*)$
recordsSkipped.reasonstring
recordsSkipped.valuenull | string
recordsSkippedOmittedinteger | string<int32>
Pattern: ^-?(?:0|[1-9]\d*)$
metricsSkippedNotOnTtdarray<string>
fieldsSkippedMissingarray<object>
fieldsSkippedMissing.metricIdstring
fieldsSkippedMissing.countinteger | string<int32>
Pattern: ^-?(?:0|[1-9]\d*)$
fieldsInvalidarray<object>
fieldsInvalid.metricIdstring
fieldsInvalid.reasonstring
fieldsInvalid.countinteger | string<int32>
Pattern: ^-?(?:0|[1-9]\d*)$
lineProtocolnull | string