List devices
const url = 'http://127.0.0.1:9090/api/tenants/acme/devices?endpoint=office&status=allowed&limit=1000&after=office%2FCG0001&select=region%20%5E%3D%20west%2Fnevada%20and%20kind%20!%3D%20kiosk';const options = { method: 'GET', headers: { 'X-Request-Id': '4f1c2b0e-8a7d-4c51-9e2f-3a6b8d0c1e7f', Authorization: 'Basic <credentials>' }};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'http://127.0.0.1:9090/api/tenants/acme/devices?endpoint=office&status=allowed&limit=1000&after=office%2FCG0001&select=region%20%5E%3D%20west%2Fnevada%20and%20kind%20!%3D%20kiosk' \ --header 'Authorization: Basic <credentials>' \ --header 'X-Request-Id: 4f1c2b0e-8a7d-4c51-9e2f-3a6b8d0c1e7f'The device register, a page at a time, in endpoint then device order,
each device with its own labels. To read the next page, send after
set to the last device of the page you have (<endpoint>/<device>); a
page shorter than limit is the last. select keeps the devices a
selector picks by their labels: the endpoint’s, with the device’s own
over them, as a sync group’s placement and a job’s targets read them.
When each device was last seen (and from where), when it was last
refused for its key, and what was counted of its messages (health)
are as every running instance knows them: the other instances are
asked, and the answer waits for each until it answers or its session
ends. An instance that ended without answering is named, with why, in the
X-Instances-Unanswered header, and what the database holds is shown for
what only it knew. A device that is held carries held.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The tenant’s id.
Example
acmeQuery Parameters
Section titled “Query Parameters”Only the devices of this endpoint.
Example
officeWhether a device may talk to the gateway: pending (known, waiting
for someone to allow or block it; its messages are refused meanwhile),
allowed (its messages are taken in) or blocked (its messages are
refused until someone allows it).
Only the devices with this status: pending, allowed or blocked.
Example
allowedHow many devices at most: 1 to 10000, 1000 unless given.
Example
1000The last device of the page before, as <endpoint>/<device>: the
page starts after it. Leave it out for the first page.
Example
office/CG0001Only the devices this selector picks by their labels (their
endpoint’s, with their own over them): region ^= west/nevada and kind != kiosk (docs/selectors.md).
Example
region ^= west/nevada and kind != kioskHeader Parameters
Section titled “Header Parameters”An id to follow the request by: answered back in X-Request-Id, and in the log, the audit trail and the events the request causes. 1 to 128 letters, digits, -, _, . or :; anything else is replaced by a new id.
Example
4f1c2b0e-8a7d-4c51-9e2f-3a6b8d0c1e7fResponses
Section titled “Responses”At most limit devices, each with its own labels.
A device, with its own labels.
object
The id the package identifies the device by: a serial number, a MAC address, a cloud id.
The endpoint it belongs to.
None for a device that was registered and has not called in yet.
How its messages have gone, counted by every instance that serves it.
object
Of those, the ones that failed: the package failed, no route matched, or what it changed could not be stored.
Messages that got past its key: taken in, or refused for its status.
Present while the device is held (a gate of one of its actions did not pass): nothing is handed to it until it is released, and what it sends is taken in as usual.
object
The action whose gate failed.
When the hold was taken.
Why: the gate that did not pass and what became of it.
The gate’s step in that action, counted from 1.
The device’s number in the register.
Facts the package reported: firmware, IP, user counts, capabilities.
object
Where it stands with its key.
When the device, while held, last presented a key other than the
one it was held with: someone else may be calling under its name.
Adopting takes the key it was held with all the same;
adopt_presented_key takes the latest instead. Cleared when its key
is set, adopted or taken away.
The device presented a key while it was held (waiting to be allowed, with no key of its own), and the first such key is kept: adopting its key takes that one, the key it was held with, not a later one.
What its latest message carried for a key.
When a message was last refused for carrying the wrong key, or none.
When its latest message came, as the instances that serve it know; null until it calls in.
Values captured from the endpoint’s path or topic template on the latest message it was let in on (its first, until then); used to address replies (e.g. MQTT reply topics).
object
The address its latest message came from, of those it was let in on (its first message, until it is let in; “” until it calls in). A message refused for the device’s status or rate moves nothing.
Whether a device may talk to the gateway: pending (known, waiting
for someone to allow or block it; its messages are refused meanwhile),
allowed (its messages are taken in) or blocked (its messages are
refused until someone allows it).
What other systems know the device by: system name to id.
object
The device’s own labels, by name: what a sync group’s placement rules pick members by, together with its endpoint’s labels (the device’s own win where both name one).
object
Free-form data from other systems, kept as given.
object
Example
[ { "device": "CG0001", "endpoint": "office", "first_seen": "2026-01-15T08:00:00Z", "health": { "errors": 1, "last_error": { "at": "2026-01-15T07:58:00Z", "reason": "line 3: '2026-13-01 08:00:00' is not a time", "route": "attlog" }, "messages": 1520 }, "id": 42, "info": { "firmware": "3.4.0", "punches": 1830, "users": 25 }, "key": "active", "key_presented": "registered", "key_refused_at": null, "labels": { "site": "north" }, "last_seen": "2026-01-15T08:05:00Z", "params": {}, "remote_ip": "192.0.2.10", "status": "allowed" }]Headers
Section titled “Headers”The instances that ended without answering when devices were last seen, name (why), comma separated: present only when there were any.
limit is 0 or more than 10000, or after is not <endpoint>/<device>, or select is not a selector (said at the column of the mistake). A status that is not pending, allowed or blocked is refused with 400 and a plain-text reason.
A refusal, and why.
object
Why the request was refused, in a sentence.
For a request whose parameters do not fit (422): what is wrong with each field. Absent otherwise.
What is wrong with one field of a request.
object
The parameter, as the request names it (values.volume for a
setting inside values).
What is wrong with it.
The request’s id, as its X-Request-Id header gives it: what to
quote when asking what happened to it.
Example
{ "error": "limit must be 1 to 10000"}A login is configured and the request carries neither it nor an API token, or it carries a wrong login (WWW-Authenticate: Basic realm="Hour Advantage", no body). Or the request carries an API token that is not one (revoked, or never made), login or not (WWW-Authenticate: Bearer realm="Hour Advantage", error="invalid_token", the body the API token was refused).
Example
the API token was refusedHeaders
Section titled “Headers”The scheme to answer with: Basic realm="Hour Advantage", or for a refused token Bearer realm="Hour Advantage", error="invalid_token".
The Host header does not name a loopback address while one is required (no login configured, or the API listens on loopback), or the Origin header does not match the Host: {"error": ...} says which. Or no login is configured and the request carries Forwarded, X-Forwarded-For or X-Real-IP (a proxy forwarded it): the plain text body says so. Or an API token asks for a route its scope does not reach: the plain text body says so.
A refusal, and why.
object
Why the request was refused, in a sentence.
For a request whose parameters do not fit (422): what is wrong with each field. Absent otherwise.
What is wrong with one field of a request.
object
The parameter, as the request names it (values.volume for a
setting inside values).
What is wrong with it.
The request’s id, as its X-Request-Id header gives it: what to
quote when asking what happened to it.
Example
{ "error": "the Host must name this machine (localhost or a loopback address); an API reached by other names needs the admin login"}Example
a forwarded request needs the admin login; none is setMore than 2 admin logins are being checked at once: send the request again after the Retry-After seconds. A request carrying the login that checked out last, or an API token, is not held up.
Example
too many logins at once; try againHeaders
Section titled “Headers”Seconds to wait: 1.
Something went wrong in the gateway that asking again will not put right by itself; error says what.
A refusal, and why.
object
Why the request was refused, in a sentence.
For a request whose parameters do not fit (422): what is wrong with each field. Absent otherwise.
What is wrong with one field of a request.
object
The parameter, as the request names it (values.volume for a
setting inside values).
What is wrong with it.
The request’s id, as its X-Request-Id header gives it: what to
quote when asking what happened to it.
Example
{ "error": "db error: ERROR: permission denied for table settings"}The database cannot be used right now (not reachable, too busy, no connection free in time), or the instance is still starting: send the same request again shortly. An API token that cannot be checked for the same reason is answered 503 in plain text (the API token cannot be checked right now; try again shortly).
A refusal, and why.
object
Why the request was refused, in a sentence.
For a request whose parameters do not fit (422): what is wrong with each field. Absent otherwise.
What is wrong with one field of a request.
object
The parameter, as the request names it (values.volume for a
setting inside values).
What is wrong with it.
The request’s id, as its X-Request-Id header gives it: what to
quote when asking what happened to it.
Example
{ "error": "the gateway is starting; try again shortly"}