HTTP API
Devices connect to ThingsBoard Edge over HTTP the same way they connect to ThingsBoard CE — only the host differs. Point your HTTP client to the Edge node’s IP address or hostname.
Default ports: 8080 (plain), 443 (HTTPS)
Credentials
Section titled “Credentials”Authenticate with the device access token embedded in the request URL:
http://{EDGE_HOST}:8080/api/v1/{accessToken}/...To find a device’s access token: go to Entities → Devices, open the device, click Copy access token on the Device details tab.
export ACCESS_TOKEN=your_device_tokenexport EDGE_HOST=your_edge_host_or_ipEndpoint reference
Section titled “Endpoint reference”Base URL: http://{EDGE_HOST}:8080/api/v1/{accessToken}
| Operation | Method | Path |
|---|---|---|
| Publish telemetry | POST | /telemetry |
| Publish client-side attributes | POST | /attributes |
| Get attributes | GET | /attributes?clientKeys=…&sharedKeys=… |
| Subscribe to shared attribute updates (long-poll) | GET | /attributes/updates?timeout={ms} |
| Subscribe to RPC commands (long-poll) | GET | /rpc?timeout={ms} |
| Respond to server-side RPC | POST | /rpc/{requestId} |
| Send client-side RPC | POST | /rpc |
| Claim device | POST | /claim |
| Provision new device | POST | http://{EDGE_HOST}:8080/api/v1/provision |
| Get firmware info | GET | /firmware?title={title}&version={ver} |
Examples
Section titled “Examples”curl -v -X POST \ "http://$EDGE_HOST:8080/api/v1/$ACCESS_TOKEN/telemetry" \ -H "Content-Type: application/json" \ -d '{"temperature": 25, "humidity": 60}'curl -v -X POST \ "http://$EDGE_HOST:8080/api/v1/$ACCESS_TOKEN/attributes" \ -H "Content-Type: application/json" \ -d '{"firmware_version": "1.2.0", "serial": "SN-001"}'curl -v \ "http://$EDGE_HOST:8080/api/v1/$ACCESS_TOKEN/attributes?clientKeys=serial&sharedKeys=firmware_version"Response example:
{"client": {"serial": "SN-001"}, "shared": {"firmware_version": "1.2.0"}}curl -v \ "http://$EDGE_HOST:8080/api/v1/$ACCESS_TOKEN/rpc?timeout=10000"Payload formats
Section titled “Payload formats”Telemetry and attribute payloads accept a flat JSON object or a timestamped array:
{"temperature": 25, "humidity": 60}[ {"ts": 1730000000000, "values": {"temperature": 25}}, {"ts": 1730000060000, "values": {"temperature": 26}}]