Telemetry API
Telemetry API provides HTTP API to request telemetry.
Get Latest Telemetry
GET 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 string#Time window during which a telemetry value should be considered valid or up to date. It is set to 30 seconds by default.
Response
{
[
"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,
{
[
"123e4567-e89b-12d3-a456-426614174000": {
"voltage": {
"value": 2,
"timestamp": 1662593249
},
"amperage": {
"warning": "Telemetry attribute is not found.",
}
}
]
}
Query Time Series
POST /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",
}]
}'
Body Parameters
Request body is written in query language based on JSON according to the the schema.
fromnumber, stringrequired#Begin of time frame. Either a number containing Unix timestamp or a string in RFC 3339 format.
tonumber, stringrequired#End of time frame. Either a number containing 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;min— use max value.max— use min value.
granularityduration string#Time bucket interval. Can be overridden for each individual telemetry attribute.
gap_filling.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.
gap_filling.look_aroundduration string#Interval in the past to look for values outside of the time range specified.
telemetry.devicestring#Device ID.
telemetry.attributestring#Telemetry attribute name, same as specified in the blueprint manifest for this device.
telemetry.aggregationstring#Time bucket aggregation function. Overrides global
aggregationsettings. Required if global aggregation settings are not set.
telemetry.granularityduration string#Time bucket interval. Overrides global
granularitysettings. Required if global granularity 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
Successful response is a telemetry data in CSV format. The first row of response is CSV header. The first column is always ts — a Unix timestamp. Other columns contain 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 comma-separated list of types for each data column. The first column is always 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 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).