Telemetry API
Telemetry API provides HTTP API to request telemetry.
Get Latest Telemetry ✅ Cloud ✅ Gateway
GET /v3/telemetry/latest
Returns the latest values of specified telemetry attributes.
Request
$ curl http://api.enapter.com/v3/telemetry/latest -X GET -G \
-H 'X-Enapter-Auth-Token: {ACCESS_TOKEN}' \
-d 'devices[123e4567-e89b-12d3-a456-426614174000]=voltage,uptime'
Query Parameters
devicesobjectrequired#device's keys are device IDs, and the values are a list of comma-separated telemetry attributes.
relevance_intervalduration stringdefault: 30s#Time window during which a telemetry value should be considered valid or up to date.
Response
{
"telemetry": {
"123e4567-e89b-12d3-a456-426614174000": {
"voltage": {
"value": 2,
"timestamp": 1662593249
},
"uptime": {
"value": 12345,
"timestamp": 1662593249
}
}
}
}
If some attributes were not acquired, you will receive an explanation in the warning field. For example,
{
"telemetry": {
"123e4567-e89b-12d3-a456-426614174000": {
"voltage": {
"value": 2,
"timestamp": 1662593249
},
"amperage": {
"warning": "Telemetry attribute is not found.",
}
}
}
}
telemetryobject#Telemetryobject keys are requested device IDs and values areDeviceTelemetryobject.DeviceTelemetryobject#DeviceTelemetryobject kesy are requested telemetry attributes and values areDeviceTelemetryValueobject.DeviceTelemetryValueobject#DeviceTelemetryValue.valuenumber, boolean, string, array of strings#The value of requested telemetry attribute.
DeviceTelemetryValue.timestampinteger#The timestamp of the most relevant value of requested telemetry attribute.
DeviceTelemetryValue.warningstring#The warning message if telemetry attribute was not retrived.
Query Time Series ✅ Cloud ✅ Gateway
POST /v3/telemetry/query_timeseries
Returns time series - a sequence of measurements, ordered in time.
Request
$ curl http://api.enapter.com/v3/telemetry/query_timeseries -X POST \
-H 'X-Enapter-Auth-Token: {ACCESS_TOKEN}' \
-H 'Accept: text/csv' \
-d '{
"from": "2025-09-11T00:00:00Z",
"to": "2025-09-11T00:01:00Z",
"aggregation": "avg",
"granularity": "1s",
"telemetry": [{
"device": "123e4567-e89b-12d3-a456-426614174000",
"attribute": "voltage",
}]
}'
The response header Accept is mandatory and must equal text/csv.
Body Parameters
The request body is written in a query language based on JSON according to the schema.
fromnumber, stringrequired#Start of the time frame. Either a number containing a Unix timestamp or a string in RFC 3339 format.
tonumber, stringrequired#End of the time frame. Either a number containing a Unix timestamp or a string in RFC 3339 format.
aggregationstring#Time bucket aggregation function. Can be overridden for each individual telemetry attribute.
Currently supported functions:
auto— select eitheravgorlastdepending on the data type;avg— calculate arithmetic mean;last— use the last value;min— use the minimum value;max— use the maximum value;bool_or— use the logicaloroperation between values (trueif anytrueis present,falseotherwise).
granularityduration string#Time bucket interval.
gap_fillingobject#Gap-filling settings, an instance of the
GapFillingobject. Can be overridden for each individual telemetry attribute.GapFilling.methodstring#Gap-filling method. Currently, two gap-filling methods are supported:
locf— fill in missing values by last observation carried forward;interpolation- fill in missing values by linear interpolation.
GapFilling.look_aroundduration string#Interval in the past to look for values outside of the time range specified.
sitestring,object#The site can be provided in two forms: a
site_idstring or aSiteLabelMatcherobject.SiteLabelMatcherobject#SiteLabelMatcherallows selecting sites in different ways.
telemetryarray of objects#The
telemetrycontains an array ofTelemetryobjects.Telemetryobject#The
Telemetryobject describes which telemetry attributes from which devices should be retrieved and how to aggregate the values.Telemetry.devicestring,array of strings,object,array of objects#The
devicecan be specified as string(s) orDeviceLabelMatcherobject(s). In string(s) form,devicecontains a single device ID or an array of device IDs. InDeviceLabelMatcherobject(s) — a singleDeviceLabelMatcherobject or an array ofDeviceLabelMatcherobjects.
Telemetry.attributestring,object#The telemetry attribute can be provided in two forms: a string with a concrete attribute name or an
AttributeLabelMatcherobject.The telemetry attribute name should match the one specified in the blueprint manifest for this device.
AttributeLabelMatcherobject#AttributeLabelMatcherallows selecting telemetry attributes in different ways.
telemetry.aggregationstring#Time bucket aggregation function. Overrides global
aggregationsettings. Required if global aggregation settings are not set.
telemetry.gap_fillingobject#Gap-filling settings. Overrides global
gap_fillingsettings.
Response
ts,telemetry=voltage device=123e4567-e89b-12d3-a456-426614174000 aggregation=auto granularity=1s gap_filling_method=none gap_filling_look_around=0s
1665446400,4.3087
1665446410,4.3556
1665446419,4.3712
A successful response is telemetry data in CSV format. The first row of the response is the CSV header. The first column is always ts — a Unix timestamp. Other columns contain a space-separated list of key=value pairs describing the parameters used to calculate the time series in the column.
Possible header keys:
telemetry— telemetry attribute name;device— device ID;aggregation— time bucket aggregation function;granularity— time bucket interval;gap_filling_method— gap-filling method;gap_filling_look_around— gap-filling interval.
Each row after the first one represents one time series measurement at a specific time from the first column.
The HTTP header Content-Type is text/csv. The HTTP header X-Enapter-Timeseries-Data-Types contains a comma-separated list of types for each data column. The first column is always a timestamp, so this header describes types starting from the second. Possible types are float, integer, string, boolean.
X-Enapter-Timeseries-Data-Types: float,integer,boolean
Duration String Format
A duration string is a sequence of decimal numbers, each with an optional fraction and a unit suffix, such as 1s, 1.5m, or 2h45m. Valid time units are ns (nanosecond), us (microsecond), ms (millisecond), s (second), m (minute), h (hour), d (day), y (year).