List jobs
const url = 'http://127.0.0.1:9090/api/tenants/acme/jobs?limit=50';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/jobs?limit=50' \ --header 'Authorization: Basic <credentials>' \ --header 'X-Request-Id: 4f1c2b0e-8a7d-4c51-9e2f-3a6b8d0c1e7f'The newest jobs first, each with how many of its devices are in each
state (counts). The devices themselves are not listed: get one job
for those.
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”How many jobs, newest first: 1 to 500, 500 unless given (0 counts as 1, more than 500 as 500).
Example
50Header 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 jobs, newest first, without their devices.
A job as the API shows it: the job, how many of its devices are in each state, and, for one job, every device.
object
How many devices had failed when the abort threshold last paused it: once resumed, it pauses again only on a new failure.
When it was created.
Who created it: the admin login, token:<name> for an API token,
or local when no login is configured.
When it was completed, or cancelled with nothing left running.
The job’s id.
Devices the targets matched (each has an execution).
Devices listed in targets.devices that are not known or not allowed.
Why it is as it is, when that is worth saying: what paused it, what it waits for.
The job as it was asked for, defaults filled in.
object
When too many devices fail, the job pauses. Absent: it never pauses on its own.
object
How many devices must have finished (succeeded, failed or timed out) before the threshold is judged. 1 unless said.
The share of finished devices, 1 to 100 per cent, that failed or timed out at which the job pauses.
What each device runs: a standard action its package offers, or a package action or command (firmware upgrades are package actions).
The lane each device’s action queues in: interactive (the
default) or bulk.
A name for people to know it by (not unique).
The action’s parameters, by name. None may be one the package marks sensitive: a job keeps its parameters to start each device’s action.
object
How the devices are taken on. One wave of every device, advancing on its own, unless said.
object
auto (the default): the next wave starts once every device of the
current one succeeded. manual: only when told
(POST /api/tenants/{tenant}/jobs/{id}/advance).
Devices running at once, at most (1 or more). Absent: no limit beyond the wave.
The size of each wave, in order: a count (5) or a share of all the devices (“10%”, rounded up). Devices left over after the last make one more wave. Absent: one wave of every device.
Which devices it runs on.
object
Devices by “endpoint/device”.
The endpoints whose allowed devices it runs on (with select, those
it picks). Absent: every endpoint, when select is given.
A selector over the devices’ labels (docs/selectors.md):
site = north and floor in (1, 2).
How long each device has, from when its action is started, in
seconds (a file or body may also say “90s”, “30m”, “2h”, “1d”); any
positive duration. At that instant its action expires: its steps not
handed out are cancelled, those in the device’s hand are given up on
(unanswered, each with its event), and the device is timed_out.
Absent: no deadline. The device’s action waits until the device
answers, its commands are lost (by order, or a restart), or the
action is cancelled or given up on.
When devices may start. Absent: any time.
object
The days it opens on: “mon” .. “sun” (or the full names). Absent: every day.
“HH:MM-HH:MM”, local time; “22:00-05:00” runs past midnight into the next day (the day it opened on counts). Absent: the whole day. A window gives its days, its hours or both.
Where a job stands: running (devices are started as the rollout
allows), paused (no device is started; those running go on to their
end), cancelled (stopped for good: devices not started never will be)
or completed (every device has finished).
The tenant it is of: it runs on that tenant’s devices only.
When it last changed.
The current wave, from 0: devices of this wave and those before it may start.
How many waves it has.
How many of its devices are in each state.
object
Devices cancelled: with the job, or their action was cancelled.
Devices whose action failed or could not be started.
Devices whose wave has not started, or that wait for room.
Devices whose action is started.
Devices whose action succeeded.
Devices whose action did not finish within the job’s timeout.
Devices whose turn it is, waiting for their window to open.
Every device of the job, in seq order. Absent in the list of jobs.
One device’s part in a job.
object
The action started on it (the latest attempt’s).
1, then one more for each retry-failed that took it again.
What went wrong, for one that failed, timed out or was cancelled (the step its action stopped at, counted from 1); what it waits for, for one waiting for its window (“waiting for window (opens 2026-10-04 22:00 America/Chicago)”).
The device’s id.
The device’s endpoint.
When it finished (the latest attempt).
Shown, not kept: the device is held (a gate of an action did not pass, and its outgoing queue waits for a release).
Its place among the job’s devices, from 0.
When its action was started (the latest attempt’s).
Where one device stands in a job: queued (its wave has not started,
or there is no room yet under max_concurrent), waiting_window (its
turn, but the window is closed where it is), running (its action is
started), succeeded, failed (its action failed, a step went
unanswered, or it could not be started), timed_out (its action did
not finish within the job’s timeout) or cancelled (the job was
cancelled, or its action was).
Its wave, from 0.
The zone its window is read in: its endpoint’s timezone option,
else its sync group’s timezone setting. Absent: it has none, and UTC
is used.
How many of its devices have no zone of their own: their window is read in UTC. Always 0 in the list of jobs.
Example
[ { "abort_seen": 0, "counts": { "cancelled": 0, "failed": 0, "queued": 0, "running": 0, "succeeded": 2, "timed_out": 0, "waiting_window": 0 }, "created_at": "2026-01-15T16:55:00Z", "created_by": "admin", "finished_at": "2026-01-15T17:01:10Z", "id": 7, "matched": 2, "no_zone": 0, "spec": { "abort": { "after": 5, "failed_percent": 20 }, "action": "show_message", "lane": "interactive", "name": "Evening notice, north site", "params": { "minutes": 60, "text": "The clocks restart at 22:00" }, "rollout": { "advance": "auto", "max_concurrent": 10, "waves": [ 1, "50%" ] }, "targets": { "endpoints": [ "office" ], "select": "site = north" }, "timeout": 1800, "window": { "days": [ "mon", "tue", "wed", "thu", "fri" ], "hours": "17:00-21:00" } }, "state": "completed", "updated_at": "2026-01-15T17:01:10Z", "wave": 1, "waves": 2 }]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"}