Appearance
API Reference
This reference documents every module of the backend: each endpoint with its parameters, request and response schemas, worked examples, errors and rate limits — plus the events a module emits. It is generated from the backend's route definitions, so it cannot drift from the code. For a guided introduction, start with the Application Developer Guide.
Conventions
- All REST endpoints live under
https://<host>/api/v1/…. - Requests are authenticated with a DPoP-bound access token:
Authorization: DPoP <accessToken>plus a signed proof per request — the full flow is in Authentication & Sessions. Routes reachable without a token show no implicit401entry in their error table. - Resources are identified by CRNs (
crn#tenant:….device:…) — opaque handles; pass them back unchanged. {deviceId}path parameters accept the device id or the device's IMEI.- Property ids are canonical hex strings (
0x0800); only websocket payloads carry decimalpropIds. - Timestamps are UTC epoch milliseconds.
- Value encodings follow the property type:
INT64/UINT64travel as decimal strings,BIN/UUIDas base64. - List endpoints fold nested resources into one response via
depth; optional fields are requested withexpand.
Errors
Each route lists its declared errors with status, body shape and example. Four answers are implicit on (almost) every route: 400 (validation failed, with details), 401 (missing or invalid token/proof), 429 (rate limited — the affected routes state their limits, and the response carries a Retry-After header), and 500 (server-side failure, safe to retry).
Events
State changes are emitted as events — { "type", "resourceIdentifier", "payload" } — documented in the Events section of the emitting module's page and delivered live over the websocket.
| Module | Endpoints | Events |
|---|---|---|
| IAM | 57 | 40 |
| Audit | 1 | 1 |
| Billing | 13 | 5 |
| Register | 5 | 7 |
| Flake | 10 | 11 |
| Meta | 5 | 3 |
| Devicegroup | 8 | 5 |
| Functions | 12 | 8 |
| Metaschema | 6 | 3 |
| 19 | — | |
| Health | 2 | — |
| Socket | 1 | — |
| Userdata | 7 | 2 |
| Data | 5 | 2 |
| Schema | 5 | 3 |
| Codebook | 9 | 5 |
| Notification | 4 | 3 |
| Geolocation | 6 | 4 |
| Temporal | 5 | — |
| Updates | 1 | — |