Skip to content

Telemetry API

Query historical telemetry data for a device within a time range. Telemetry data is stored in the telemetry timeseries collection.


Get Telemetry

GET /api/telemetry

Query Parameters

ParameterTypeRequiredDefaultDescription
idstringyesDevice Object ID (24-character hex)
startTimestringyesStart of time range (ISO 8601, e.g. 2025-01-15T00:00:00.000Z)
endTimestringyesEnd of time range (ISO 8601, e.g. 2025-01-16T00:00:00.000Z)
pagenumberno1Page number
limitnumberno50Items per page

Example

bash
curl -H "Authorization: Bearer <key>" \
  "http://localhost:9001/api/telemetry?id=665a1b2c3d4e5f6a7b8c9d0e&startTime=2025-01-15T00:00:00.000Z&endTime=2025-01-16T00:00:00.000Z&page=1&limit=10"

Response

json
{
  "success": true,
  "data": [
    {
      "time": "2025-01-15T12:30:00.000Z",
      "temperature": 23.5,
      "humidity": 65.2
    },
    {
      "time": "2025-01-15T12:29:00.000Z",
      "temperature": 23.4,
      "humidity": 65.1
    }
  ],
  "total": 2,
  "page": 1,
  "limit": 10
}

Each telemetry data point contains the time field and any payload keys that were sent by the device (e.g. temperature, humidity, pressure).