List a device's actions
const url = 'http://127.0.0.1:9090/api/tenants/acme/devices/office/CG0001/actions';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/office/CG0001/actions \ --header 'Authorization: Basic <credentials>' \ --header 'X-Request-Id: 4f1c2b0e-8a7d-4c51-9e2f-3a6b8d0c1e7f'A device’s actions, the latest 500, oldest first, each with its steps. A device that is not known has no actions: the answer is an empty list.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The tenant’s id.
Example
acmeThe device’s endpoint.
Example
officeThe device’s id.
Example
CG0001Header 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”The device’s latest 500 actions, oldest first.
An action as it is kept, with its steps (the commands) in order.
object
What was asked for: a standard action, a package action or one of the package’s commands.
When it was queued.
Steps not handed to the device by then are cancelled. Absent when none was given.
The step that failed it, counted from 1.
When it was done, failed, cancelled or timed out; null until then.
The gate it stopped at, counted from 1: the gate failed, or the action was cancelled or timed out while waiting on it.
The action’s id, unique across the gateway.
The lane its steps queue in.
Who queued it, when the gateway did: a sync group’s actions say
sync:<group>:.... Absent for actions queued through the API.
Its parameters, by name, sensitive values redacted (null when none were given).
Why it stopped, for every action that failed, was cancelled or timed out: the step it stopped at (counted from 1) and what became of it.
Where an action stands: queued (no step handed to the device yet),
in_progress (some steps handed out, nothing failed), done (every
step succeeded), failed (a step failed or went unanswered; the steps
after it not yet handed out were skipped), cancelled (cancelled
before every step had gone out; those that had not were cancelled) or
timed_out (its expires_at passed before every step had gone out or
passed; those that had not were cancelled).
Its steps, in the order they go to the device.
A command: one message the package builds for a device, queued, handed
out and answered. Parameters the package marks sensitive are shown as
<redacted N bytes>, and so is the payload that carries them.
object
The package command it is (its key among the package’s commands).
The action it is a step of, if it is one.
When it finished (answered, cancelled or skipped); null until then.
When it was queued.
Not handed out by then, it never is.
A gate of its action: handed out on its own, and the steps after it wait for it to succeed.
The command’s id, unique across the gateway.
The lane it queues in.
Its parameters, by name, sensitive values redacted.
object
What the device is handed, as text (“” when it is not text).
What the device is handed, base64-encoded, when it is not text.
What the device answered, as text; null until it answers.
The result, base64-encoded, when the device returned something that is not text.
The code the device answered with, as the package reads it; null until it answers.
Parked until then: the device answered “not yet, ask again”.
When it was handed to the device; null until then.
Where a command stands: queued (waiting to be handed to the device),
offered (written into a reply to the device, no result yet), succeeded, failed,
unanswered (offered, then lost: the device answered a command handed out after it, and
it had been handed out twice; a result that comes later still completes it),
cancelled (taken back before it was handed out: its action was
cancelled or expired), skipped (an earlier step of its action failed
before it was handed out) or parked (waiting behind a gate of its
action that has not passed, or asked to be sent again later:
retry_at).
How many times it has been handed to the device (more than once when the device answered “not yet, ask again”).
Example
[ { "action": "open_door", "created_at": "2026-01-15T08:00:00Z", "finished_at": "2026-01-15T08:00:04Z", "id": 512, "lane": "interactive", "params": { "seconds": 5 }, "status": "done", "steps": [ { "action": "open_door", "action_id": 512, "completed_at": "2026-01-15T08:00:04Z", "created_at": "2026-01-15T08:00:00Z", "id": 9001, "lane": "interactive", "params": { "seconds": 5 }, "payload": "CONTROL DEVICE 01 05", "result": "OK", "result_code": 0, "sent_at": "2026-01-15T08:00:02Z", "status": "succeeded", "tries": 1 } ] }]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"}