Ingest thing data via a template
POST
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:
falseResponse
application/json
The apply report (records mapped/written + diagnostics).
previewOnlybooleantemplateIdnull | stringtemplateRevisionnull | 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.reasonstringrecordsSkipped.valuenull | stringrecordsSkippedOmittedinteger | string<int32>Pattern:
^-?(?:0|[1-9]\d*)$metricsSkippedNotOnTtdarray<string>fieldsSkippedMissingarray<object>fieldsSkippedMissing.metricIdstringfieldsSkippedMissing.countinteger | string<int32>Pattern:
^-?(?:0|[1-9]\d*)$fieldsInvalidarray<object>fieldsInvalid.metricIdstringfieldsInvalid.reasonstringfieldsInvalid.countinteger | string<int32>Pattern:
^-?(?:0|[1-9]\d*)$lineProtocolnull | string