Skip to content

Telemetry API

MethodPathDescription
GET/api/devices/:id/telemetryQuery telemetry history
GET/api/devices/:id/locationCurrent device location
GET/api/devices/:id/trackGPS track for map playback
GET/api/devices/:id/eventsDevice events
GET/api/devices/:id/tripsTrip history
Terminal window
GET /api/devices/:id/telemetry?from=2026-05-24T00:00:00Z&to=2026-05-24T12:00:00Z&limit=1000
ParameterTypeRequiredDescription
fromISO 8601YesStart of time range
toISO 8601YesEnd of time range
limitintNoMax records (default 1000, max 10000)
metricsstringNoComma-separated metric filter
{
"deviceId": "uuid",
"data": [
{
"timestamp": "2026-05-24T10:30:00Z",
"system": {
"cpuLoad": 0.12,
"memoryUsed": 42,
"uptime": 432000
},
"cellular": {
"rsrp": -82,
"rsrq": -8,
"sinr": 15,
"band": "B3",
"technology": "LTE"
},
"network": {
"wanType": "cellular",
"failoverActive": false
},
"gps": {
"lat": 40.7128,
"lon": -74.0060,
"speed": 45.5,
"heading": 180,
"altitude": 10,
"satellites": 12,
"hdop": 0.8
}
}
],
"count": 720,
"timeRange": {
"from": "2026-05-24T00:00:00Z",
"to": "2026-05-24T12:00:00Z"
}
}
Terminal window
GET /api/devices/:id/location

Returns the most recent GPS position from the device state cache.

{
"deviceId": "uuid",
"location": {
"lat": 40.7128,
"lon": -74.0060,
"speed": 0,
"heading": 180,
"altitude": 10,
"satellites": 12,
"hdop": 0.8,
"fix": "3D"
},
"timestamp": "2026-05-24T10:30:00Z",
"age": 45
}
FieldDescription
ageSeconds since this position was reported
Terminal window
GET /api/devices/:id/track?from=2026-05-24T08:00:00Z&to=2026-05-24T12:00:00Z

Returns GPS points optimized for map polyline rendering.

{
"deviceId": "uuid",
"track": [
{
"lat": 40.7128,
"lon": -74.0060,
"speed": 45.5,
"heading": 180,
"timestamp": "2026-05-24T08:00:00Z"
},
{
"lat": 40.7135,
"lon": -74.0055,
"speed": 52.0,
"heading": 175,
"timestamp": "2026-05-24T08:00:30Z"
}
],
"pointCount": 480,
"distance": 28.5,
"duration": 14400
}
FieldDescription
pointCountNumber of GPS points in track
distanceTotal distance in km
durationTotal time in seconds
Terminal window
GET /api/devices/:id/events?from=2026-05-24T00:00:00Z&type=ignition
ParameterTypeDescription
fromISO 8601Start time
toISO 8601End time
typestringFilter by event type
severitystringFilter: info, warning, critical
limitintMax results
TypeDescription
ignition_onVehicle ignition turned on
ignition_offVehicle ignition turned off
trip_startTrip started
trip_endTrip ended
speedingSpeed exceeded threshold
geofence_enterEntered geofenced area
geofence_exitLeft geofenced area
device_onlineDevice came online
device_offlineDevice went offline
failoverWAN failover triggered
{
"data": [
{
"id": "event-id",
"timestamp": "2026-05-24T08:15:00Z",
"eventType": "ignition_on",
"severity": "info",
"metadata": {
"lat": 40.7128,
"lon": -74.0060
}
}
],
"count": 24
}
Terminal window
GET /api/devices/:id/trips?from=2026-05-01T00:00:00Z&to=2026-05-24T23:59:59Z
{
"data": [
{
"id": "trip-uuid",
"status": "completed",
"startTime": "2026-05-24T08:15:00Z",
"endTime": "2026-05-24T09:30:00Z",
"startLocation": {"lat": 40.7128, "lon": -74.0060},
"endLocation": {"lat": 40.7589, "lon": -73.9851},
"distance": 12.3,
"maxSpeed": 65.0,
"avgSpeed": 28.5,
"idleSeconds": 420,
"pointCount": 150
}
],
"count": 3
}

For bulk data export:

Terminal window
GET /api/devices/:id/telemetry/export?from=2026-05-01&to=2026-05-24&format=csv

Supported formats: json, csv

Returns a download link for large datasets (processed async for > 10,000 records).