Get a package
const url = 'http://127.0.0.1:9090/api/packages/zk-push';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/packages/zk-push \ --header 'Authorization: Basic <credentials>' \ --header 'X-Request-Id: 4f1c2b0e-8a7d-4c51-9e2f-3a6b8d0c1e7f'One package by name: every revision kept (oldest first, each saying
whether it is active), each active line with what every instance runs
of it, and the full catalog of what this instance runs of the package
(its manifest, routes, commands, actions, settings and options, every
parameter typed). An instance that cannot run a line’s active revision
keeps the one it had and says why in its error.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The package’s name.
Example
zk-pushHeader 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 package: its revisions, its active lines and its catalog.
A package by name (GET /api/packages/{name}).
object
What the instance that answers runs of the package, line by line: the full catalog (manifest, routes, commands, actions, settings, options), every parameter typed.
A loaded package: its whole catalog, as it declares it, every parameter typed.
object
The actions it offers, standard and its own.
An action the package offers: a standard one (GET /api/tenants/{tenant}/actions), or
one of its own (standard false), which it expands into steps.
object
The command that is the action, when it is one; otherwise the package expands it into steps.
What the package says about how it does it, if anything.
The action’s name: what a request names to queue it.
The parameters it takes, typed: for a standard action, standard
ones and the package’s own (x_...); for the package’s own action,
those it declares.
One parameter: its name, type and what narrows it.
object
What it is. Absent when the package does not say.
list: what each item is (its name is the list’s).
object
What it is. Absent when the package does not say.
integer: the largest value.
binary: the most bytes, decoded.
list, cards: the most items.
string, secret: the most characters.
integer: the smallest value.
The parameter’s name, as a request gives it in params.
string, secret: a regular expression the whole value matches.
A request must give it. False unless said.
A secret or personal data (a password, a card number, a template, a photo): it reaches the device in the payload and is kept and shown nowhere else, only as its size.
The kind of value it takes.
enum: the values it may be.
integer: the largest value.
binary: the most bytes, decoded.
list, cards: the most items.
string, secret: the most characters.
integer: the smallest value.
The parameter’s name, as a request gives it in params.
string, secret: a regular expression the whole value matches.
A request must give it. False unless said.
A secret or personal data (a password, a card number, a template, a photo): it reaches the device in the payload and is kept and shown nowhere else, only as its size.
The kind of value it takes.
enum: the values it may be.
A standard action (true), or the package’s own (false): a vendor operation such as a firmware upgrade, with its own parameters.
The sync domains it writes: the standard action’s, or what the package’s own action declares.
The commands it can send to devices by name: every one but those only its own actions use.
A command the package declares: what it does, the parameters it takes, and what it writes on the device.
object
What it does.
The standard action this command is, if it is one: it takes the
standard parameters (GET /api/tenants/{tenant}/actions).
Only a step of the package’s own actions: never sent by name.
Its name: what an action names to send it.
The parameters it takes, typed.
One parameter: its name, type and what narrows it.
object
What it is. Absent when the package does not say.
list: what each item is (its name is the list’s).
object
What it is. Absent when the package does not say.
integer: the largest value.
binary: the most bytes, decoded.
list, cards: the most items.
string, secret: the most characters.
integer: the smallest value.
The parameter’s name, as a request gives it in params.
string, secret: a regular expression the whole value matches.
A request must give it. False unless said.
A secret or personal data (a password, a card number, a template, a photo): it reaches the device in the payload and is kept and shown nowhere else, only as its size.
The kind of value it takes.
enum: the values it may be.
integer: the largest value.
binary: the most bytes, decoded.
list, cards: the most items.
string, secret: the most characters.
integer: the smallest value.
The parameter’s name, as a request gives it in params.
string, secret: a regular expression the whole value matches.
A request must give it. False unless said.
A secret or personal data (a password, a card number, a template, a photo): it reaches the device in the payload and is kept and shown nowhere else, only as its size.
The kind of value it takes.
enum: the values it may be.
Worth a one-click button: a hint for user interfaces.
What the device answers may be sensitive (a file holding every
user, say): once the command.result event carrying it is stored,
the command keeps only its size.
Which result codes mean the command succeeded, unless the package says so itself.
A short name for people.
The sync domains it writes on the device (people, access,
lists, settings, punches); empty for reads and device
operations. A command that implements a standard action writes what
that action writes.
Its bundle’s content hash, sha256:<hex>; null when it runs from a
folder.
A policy package’s hooks (route, joined, moved, back,
enrolled); absent for a protocol package.
Its name and version, “name@version”: “[email protected]”.
Its line, the name and major.minor version: “[email protected]”.
Its manifest (package.toml).
object
How the vendor’s devices answer the commands they are handed
([commands]): what the gateway may conclude from an answer. Nothing
is concluded when it is not declared.
object
What M.missed is given as in_hand for a message that carries results, when the package needs less than the whole
hand: the slice it declares. A message on a missed_on route, and every message of a package that declares nothing,
gets the whole hand. The package says the slice is enough; the engine does not know what “missed” means.
object
"all" or "writes".
The commands of these names.
Only the commands handed out at or before the newest one the message answers.
The routes whose requests the package’s M.missed(req, in_hand, answered) is asked about even when they carry
no result, while commands are in the device’s hand: a request that means the device lost what it held (it
restarted). A message that carries results is asked about whichever its route. Any other message costs nothing.
What one reply to the device may carry of its commands. Declared, the gateway queues no more commands for a
device than a reply carries (a device that is away holds that many waiting, never more), and queue.pending cuts
a reply at these numbers when the package gives none of its own.
object
The endpoint option (a whole number) that sets max_bytes for one endpoint instead.
The most bytes of command text in one reply.
The most commands in one reply.
Which commands the gateway may hand out once more when one is lost.
How many times a lost command that resend allows is handed out again, at most; one handed out again that many times
and lost once more ends unanswered. Declared with resend = "writes", and only with it.
What happens to a message whose events could not be delivered to a
sink. ack unless declared.
What the package is for (“” when it does not say).
The host API the package is written for: the functions it may call and the declarations it is read for. This build runs 1 and 2.
What it is: protocol (how a device talks: the default) or
policy (a tenant’s decisions at fixed moments, its hooks).
The package’s name.
The vars and secrets it cannot run without ([requires]): it is
not activated in a cluster that lacks one. Absent when it needs none.
object
The secrets it needs, by name.
The vars it needs, by name.
Listener types the package can be bound to. http unless declared.
A policy package is bound to none: it is not read.
Who makes the devices it serves (“” when it does not say).
Its version, dotted numbers (“3.4.0”); the first two make its line.
The endpoint options it reads (options of an endpoint).
An endpoint option the package reads (set in the endpoint’s options).
The revision it was loaded from; null when it runs from a folder
(hourd dev).
The device messages it handles, route by route.
A kind of message from a device that the package handles.
object
What the message is and what the package does with it.
It asks the sync group something before it answers. Absent when false.
The route’s name.
Every device setting it can set or read.
A device setting the package registers: what set_settings and
read_settings take, by its neutral name.
object
Rw (the default), w (set only) or r (read only).
Whether a device has it depends on what the device reported
(firmware, capabilities): the package’s applies(info), or values
that are functions of info. A device’s own list says.
What it does.
integer, number: the largest value.
string: the most characters.
integer, number: the smallest value.
The neutral name callers use (snake_case).
The name the device knows it by.
The device takes it only after a restart.
string: a regular expression the value must match.
Kept sealed and shown only as its size.
The standard setting it is (volume), if it is one.
A short name for people. Absent when the package does not say.
Boolean, integer, number, string, enum or table.
enum: the values it may be.
Each active line: its revision and what every instance runs of it.
An active package line and what every instance runs of it.
object
When it was made the active one.
Who made it the active one: the admin login’s user name,
token:<name> for an API token, or local without a login.
The active revision’s content hash, sha256:<hex>.
What each running instance runs of the line.
What one instance runs of a package line.
object
Why it does not run the wanted revision (it keeps the one it had); null when nothing stops it.
True for a shared package’s version no tenant takes: published, and not loaded on the instance until a tenant takes it.
The instance’s name.
The revision it runs; null when it runs none of the line, or does not say.
The revision it is to run: the line’s active one, as far as it has read it. Null when it does not say.
The line: the name and major.minor version (“[email protected]”).
The active revision.
The package’s name.
Every revision kept, oldest first, each saying whether it is active.
A package revision kept, and whether it is the active one of its line.
object
Its scenarios failed when it was pushed: what failed, a line each
(tests/door.toml: ...). A failed revision is kept to be looked at
and is never activated. Absent: they passed.
sha256:<hex> over its files.
The host API it is written for.
Its line: one revision of each line is active. A protocol or a
tenant’s package: its name and major.minor version ([email protected]).
A shared package: its name and whole version (*:[email protected]),
so every version published stays there for whoever pins it.
The package’s name.
When it was pushed.
Who pushed it: the admin login’s user name, token:<name> for an
API token, or local without a login.
Counted per name from 1, in the order pushed.
The bundle’s size, in bytes.
The package version it holds, from its manifest.
It is the active revision of its line.
Example
{ "catalog": [ { "actions": [ { "command": "open_door", "name": "open_door", "params": [ { "description": "Which door, as the device numbers them; default: its only one.", "name": "door", "required": false, "sensitive": false, "type": "string" }, { "description": "How long; default: the device's own unlock time.", "name": "seconds", "required": false, "sensitive": false, "type": "integer" } ], "standard": true, "writes": [] } ], "commands": [ { "description": "Unlocks the door for a moment.", "implements": "open_door", "key": "open_door", "params": [ { "description": "Which door, as the device numbers them; default: its only one.", "name": "door", "required": false, "sensitive": false, "type": "string" }, { "description": "How long; default: the device's own unlock time.", "max": 60, "min": 1, "name": "seconds", "required": false, "sensitive": false, "type": "integer" } ], "quick": true, "sensitive_result": false, "success": "zero", "title": "Open door", "writes": [] } ], "hash": "sha256:5c2d8f0e9a7b6c4d3e2f1a0b9c8d7e6f0a1b2c3d4e5f60718293a4b5c6d7e8f9", "manifest": { "delivery": "ack", "description": "Push-protocol time clocks over HTTP.", "host_api": 2, "name": "zk-push", "transports": [ "http" ], "vendor": "Acme", "version": "3.4.0" }, "options": [ { "description": "The devices' zone.", "name": "timezone", "required": false, "type": "timezone" } ], "revision": 7, "routes": [ { "description": "Punches the device uploads.", "name": "attlog" } ], "settings": [ { "access": "rw", "description": "How loud the device speaks, in per cent.", "max": 100, "min": 0, "name": "volume", "native": "Volume", "needs_reboot": false, "sensitive": false, "standard": "volume", "title": "Volume", "type": "integer" } ] } ], "lines": [ { "activated_at": "2026-01-15T08:00:00Z", "activated_by": "admin", "hash": "sha256:5c2d8f0e9a7b6c4d3e2f1a0b9c8d7e6f0a1b2c3d4e5f60718293a4b5c6d7e8f9", "instances": [ { "error": null, "instance": "houradvantage-0", "running": 7, "wanted": 7 }, { "error": null, "instance": "houradvantage-1", "running": 7, "wanted": 7 } ], "revision": 7 } ], "name": "zk-push", "revisions": [ { "active": true, "hash": "sha256:5c2d8f0e9a7b6c4d3e2f1a0b9c8d7e6f0a1b2c3d4e5f60718293a4b5c6d7e8f9", "host_api": 2, "name": "zk-push", "pushed_at": "2026-01-15T08:00:00Z", "pushed_by": "admin", "revision": 7, "size": 48213, "version": "3.4.0" } ]}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 setNo revision of the package is kept and this instance runs none of it.
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": "no package 'zk-push'"}More 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"}