Read the most recent value per telemetry metric
The quickest "current state" snapshot - one row per metric this device has ever reported, plus its relay state. Use this instead of /telemetry when you just need "what is this device's situation right now", not history.
A secret API key created on the dashboard (API Keys page). By itself it grants nothing - it must also have a DeviceGrant scoping it to the specific device(s) and command(s) it may call.
In: header
Path Parameters
Response Body
application/json
application/json
application/json
curl -X GET "https://example.com/api/v1/devices/dev_a1b2c3/telemetry/latest"{ "state": { "relay": "ON", "brightness": 80 }, "relayState": true, "telemetry": [ { "metric": "temperature", "value": 21.4, "valueText": null, "unit": "celsius", "recordedAt": "2024-11-19T10:05:00.000Z" } ]}Read a device's telemetry history GET
Time-series readings this device has reported, newest first, what an AI agent needs to learn patterns rather than only react to the latest value. **Example:** `GET /devices/dev_a1b2c3/telemetry?metric=temperature&limit=50` returns the last 50 temperature readings. Omit `metric` to get every metric this device reports, mixed together in one list.
Send a command to a device POST
The general-purpose command endpoint - validates the command and its params against the device's catalog, checks the caller's DeviceGrant, then either publishes it over MQTT immediately or (for a command marked `requiresApproval`) creates a pending approval instead of executing it. An API key needs a DeviceGrant covering this device and this command name - see the Authentication & Access guide. **How to use this:** first call `GET /devices/{deviceId}/commands` to see exactly which `cmd` values this device accepts and what `params` (if any) each one expects, then send one of those `cmd` names here. A plain relay with no custom command catalog accepts `"ON"`, `"OFF"`, `"TOGGLE"`, and `"STATUS"` with no `params` at all.