JSON (RFC 8259), UTF-8, times RFC 3339. Requests with a body send
Content-Type: application/json; unknown fields are refused, and the body holds exactly
one JSON value.
Errors are RFC 9457 problem details (application/problem+json) with status, detail
and a machine readable code (type is urn:limdm:problem:<code>: bad_request,
unauthorized, forbidden, not_found, conflict, invalid, rate_limited, busy, ...),
also for unknown paths (404) and wrong methods (405 with Allow). A 422 names the
request field in errors: [{"field": "payload", "message": "..."}] (name, type,
payload, tree, parent_id, tags, blueprint_id, params, or the
Idempotency-Key header; empty when the request as a whole is wrong). A 401 carries
WWW-Authenticate: Bearer realm="limdm", error="invalid_token".
Status codes: 200 read or replaced, 201 created (with Location), 202 command
queued or approval requested, 204 deleted, 400 malformed request, 401 token missing
or invalid, 403 role does not allow it, 404 not found or outside the token's tenant or
scope, 409 name taken, object still in use or device retired, 415 not JSON, 422
rejected by validation, 429 rate limited, 503 server busy (database lock or statement
timeout; retry after Retry-After).
Every answer carries X-Request-ID; a well formed one sent with the request is kept.
Server log lines of failed requests name it.
Lists take limit (1 to 500, default 100) and return {"items": [...], "next_cursor": "..."}.
Pass next_cursor as cursor for the next page; it is absent on the last page.
GET /api/v1/tags is not paged.
Lists of the console app follow more conventions, implemented for devices first:
filter takes the query language, sort a field (-field for
descending; the cursor belongs to the sort it came with) and <list>/facets counts the
matching objects per value.