Skip to content

Get a shared package

GET
/api/packages/shared/{name}
curl --request GET \
--url http://127.0.0.1:9090/api/packages/shared/overtime \
--header 'Authorization: Basic <credentials>' \
--header 'X-Request-Id: 4f1c2b0e-8a7d-4c51-9e2f-3a6b8d0c1e7f'

Every revision kept (a failed one with what failed), each published version with what every instance runs of it, and the catalog of what this instance runs: its manifest and its hooks.

name
required
string

The shared package’s name.

Example
overtime
X-Request-Id
string
<= 128 characters /^[A-Za-z0-9._:-]+$/

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-3a6b8d0c1e7f

The package: its revisions, its published versions and its catalog.

Media typeapplication/json

A package by name (GET /api/packages/{name}).

object
catalog
required

What the instance that answers runs of the package, line by line: the full catalog (manifest, routes, commands, actions, settings, options), every parameter typed.

Array<object>

A loaded package: its whole catalog, as it declares it, every parameter typed.

object
actions
required

The actions it offers, standard and its own.

Array<object>

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
command

The command that is the action, when it is one; otherwise the package expands it into steps.

string | null
description

What the package says about how it does it, if anything.

string
name
required

The action’s name: what a request names to queue it.

string
params
required

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.

Array<object>

One parameter: its name, type and what narrows it.

object
description

What it is. Absent when the package does not say.

string
items
One of:
null
max

integer: the largest value.

integer | null format: int64
max_bytes

binary: the most bytes, decoded.

integer | null
max_items

list, cards: the most items.

integer | null
max_length

string, secret: the most characters.

integer | null
min

integer: the smallest value.

integer | null format: int64
name
required

The parameter’s name, as a request gives it in params.

string
pattern

string, secret: a regular expression the whole value matches.

string | null
required

A request must give it. False unless said.

boolean
sensitive

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.

boolean
type
required

The kind of value it takes.

string
Allowed values: string integer boolean enum secret binary wall_time rfc3339 cards biometrics object list
values

enum: the values it may be.

Array<string>
standard
required

A standard action (true), or the package’s own (false): a vendor operation such as a firmware upgrade, with its own parameters.

boolean
writes
required

The sync domains it writes: the standard action’s, or what the package’s own action declares.

Array<string>
commands
required

The commands it can send to devices by name: every one but those only its own actions use.

Array<object>

A command the package declares: what it does, the parameters it takes, and what it writes on the device.

object
description
required

What it does.

string
implements

The standard action this command is, if it is one: it takes the standard parameters (GET /api/tenants/{tenant}/actions).

string | null
internal

Only a step of the package’s own actions: never sent by name.

boolean
key
required

Its name: what an action names to send it.

string
params
required

The parameters it takes, typed.

Array<object>

One parameter: its name, type and what narrows it.

object
description

What it is. Absent when the package does not say.

string
items
One of:
null
max

integer: the largest value.

integer | null format: int64
max_bytes

binary: the most bytes, decoded.

integer | null
max_items

list, cards: the most items.

integer | null
max_length

string, secret: the most characters.

integer | null
min

integer: the smallest value.

integer | null format: int64
name
required

The parameter’s name, as a request gives it in params.

string
pattern

string, secret: a regular expression the whole value matches.

string | null
required

A request must give it. False unless said.

boolean
sensitive

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.

boolean
type
required

The kind of value it takes.

string
Allowed values: string integer boolean enum secret binary wall_time rfc3339 cards biometrics object list
values

enum: the values it may be.

Array<string>
quick
required

Worth a one-click button: a hint for user interfaces.

boolean
sensitive_result
required

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.

boolean
success
required

Which result codes mean the command succeeded, unless the package says so itself.

string
Allowed values: zero non_negative positive
title
required

A short name for people.

string
writes
required

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.

Array<string>
hash

Its bundle’s content hash, sha256:<hex>; null when it runs from a folder.

string | null
hooks

A policy package’s hooks (route, joined, moved, back, enrolled); absent for a protocol package.

Array<string>
id
required

Its name and version, “name@version”: “[email protected]”.

string
line
required

Its line, the name and major.minor version: “[email protected]”.

string
manifest
required

Its manifest (package.toml).

object
commands

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
missed_hand
One of:
null
missed_on

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.

Array<string>
reply

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
bytes_option

The endpoint option (a whole number) that sets max_bytes for one endpoint instead.

string | null
max_bytes

The most bytes of command text in one reply.

integer | null
max_count

The most commands in one reply.

integer | null
resend

Which commands the gateway may hand out once more when one is lost.

string
Allowed values: never writes
resend_times

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.

integer | null format: int32
delivery

What happens to a message whose events could not be delivered to a sink. ack unless declared.

string
Allowed values: ack cursor none
description

What the package is for (“” when it does not say).

string
host_api
required

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.

integer format: int32
kind

What it is: protocol (how a device talks: the default) or policy (a tenant’s decisions at fixed moments, its hooks).

string
Allowed values: protocol policy
name
required

The package’s name.

string
requires

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
secrets

The secrets it needs, by name.

Array<string>
vars

The vars it needs, by name.

Array<string>
transports

Listener types the package can be bound to. http unless declared. A policy package is bound to none: it is not read.

Array<string>
Allowed values: http mqtt
vendor

Who makes the devices it serves (“” when it does not say).

string
version
required

Its version, dotted numbers (“3.4.0”); the first two make its line.

string
options
required

The endpoint options it reads (options of an endpoint).

Array<object>

An endpoint option the package reads (set in the endpoint’s options).

object
description
required

What it does.

string
name
required

The option’s name.

string
required
required

An endpoint of this package must set it.

boolean
type
One of:
null
revision

The revision it was loaded from; null when it runs from a folder (hourd dev).

integer | null format: int32
routes
required

The device messages it handles, route by route.

Array<object>

A kind of message from a device that the package handles.

object
description
required

What the message is and what the package does with it.

string
lookup

It asks the sync group something before it answers. Absent when false.

boolean
name
required

The route’s name.

string
settings
required

Every device setting it can set or read.

Array<object>

A device setting the package registers: what set_settings and read_settings take, by its neutral name.

object
access
required

Rw (the default), w (set only) or r (read only).

string
depends_on_device

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.

boolean
description
required

What it does.

string
max

integer, number: the largest value.

number | null format: double
max_length

string: the most characters.

integer | null
min

integer, number: the smallest value.

number | null format: double
name
required

The neutral name callers use (snake_case).

string
native
required

The name the device knows it by.

string
needs_reboot
required

The device takes it only after a restart.

boolean
pattern

string: a regular expression the value must match.

string | null
sensitive
required

Kept sealed and shown only as its size.

boolean
standard

The standard setting it is (volume), if it is one.

string | null
title

A short name for people. Absent when the package does not say.

string
type
required

Boolean, integer, number, string, enum or table.

string
values

enum: the values it may be.

Array<string>
lines
required

Each active line: its revision and what every instance runs of it.

Array<object>

An active package line and what every instance runs of it.

object
activated_at
required

When it was made the active one.

string format: date-time
activated_by
required

Who made it the active one: the admin login’s user name, token:<name> for an API token, or local without a login.

string
hash
required

The active revision’s content hash, sha256:<hex>.

string
instances
required

What each running instance runs of the line.

Array<object>

What one instance runs of a package line.

object
error

Why it does not run the wanted revision (it keeps the one it had); null when nothing stops it.

string | null
idle

True for a shared package’s version no tenant takes: published, and not loaded on the instance until a tenant takes it.

boolean
instance
required

The instance’s name.

string
running

The revision it runs; null when it runs none of the line, or does not say.

integer | null format: int32
wanted

The revision it is to run: the line’s active one, as far as it has read it. Null when it does not say.

integer | null format: int32
line
required

The line: the name and major.minor version (“[email protected]”).

string
revision
required

The active revision.

integer format: int32
name
required

The package’s name.

string
revisions
required

Every revision kept, oldest first, each saying whether it is active.

Array

A package revision kept, and whether it is the active one of its line.

object
failed

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.

Array<string> | null
hash
required

sha256:<hex> over its files.

string
host_api
required

The host API it is written for.

integer format: int32
line
required

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.

string
name
required

The package’s name.

string
pushed_at
required

When it was pushed.

string format: date-time
pushed_by
required

Who pushed it: the admin login’s user name, token:<name> for an API token, or local without a login.

string
revision
required

Counted per name from 1, in the order pushed.

integer format: int32
size
required

The bundle’s size, in bytes.

integer format: int64
version
required

The package version it holds, from its manifest.

string
active
required

It is the active revision of its line.

boolean
Example
{
"catalog": [],
"lines": [
{
"activated_at": "2026-10-07T08:00:00Z",
"activated_by": "builder",
"hash": "sha256:9f2c...",
"instances": [
{
"error": null,
"instance": "houradvantage-0",
"running": 4,
"wanted": 4
}
],
"line": "[email protected]",
"revision": 4
}
],
"name": "overtime",
"revisions": [
{
"active": true,
"hash": "sha256:9f2c...",
"host_api": 2,
"line": "[email protected]",
"name": "overtime",
"pushed_at": "2026-10-07T08:00:00Z",
"pushed_by": "builder",
"revision": 4,
"size": 1201,
"version": "2.3.1"
},
{
"active": false,
"failed": [
"tests/weekly.toml: expected 'route' to pick payroll"
],
"hash": "sha256:41ab...",
"host_api": 2,
"line": "[email protected]",
"name": "overtime",
"pushed_at": "2026-10-08T08:00:00Z",
"pushed_by": "builder",
"revision": 5,
"size": 1240,
"version": "2.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).

Media typetext/plain
string
Example
the API token was refused
WWW-Authenticate
string

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
error
required

Why the request was refused, in a sentence.

string
fields

For a request whose parameters do not fit (422): what is wrong with each field. Absent otherwise.

Array<object>

What is wrong with one field of a request.

object
field
required

The parameter, as the request names it (values.volume for a setting inside values).

string
message
required

What is wrong with it.

string
request_id

The request’s id, as its X-Request-Id header gives it: what to quote when asking what happened to it.

string | null
Example
{
"error": "the Host must name this machine (localhost or a loopback address); an API reached by other names needs the admin login"
}

There is no such shared package.

Media typeapplication/json

A refusal, and why.

object
error
required

Why the request was refused, in a sentence.

string
fields

For a request whose parameters do not fit (422): what is wrong with each field. Absent otherwise.

Array<object>

What is wrong with one field of a request.

object
field
required

The parameter, as the request names it (values.volume for a setting inside values).

string
message
required

What is wrong with it.

string
request_id

The request’s id, as its X-Request-Id header gives it: what to quote when asking what happened to it.

string | null
Example
{
"error": "no package 'overtime'"
}

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.

Media typetext/plain
string
Example
too many logins at once; try again
Retry-After
integer

Seconds to wait: 1.

Something went wrong in the gateway that asking again will not put right by itself; error says what.

Media typeapplication/json

A refusal, and why.

object
error
required

Why the request was refused, in a sentence.

string
fields

For a request whose parameters do not fit (422): what is wrong with each field. Absent otherwise.

Array<object>

What is wrong with one field of a request.

object
field
required

The parameter, as the request names it (values.volume for a setting inside values).

string
message
required

What is wrong with it.

string
request_id

The request’s id, as its X-Request-Id header gives it: what to quote when asking what happened to it.

string | null
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).

Media typeapplication/json

A refusal, and why.

object
error
required

Why the request was refused, in a sentence.

string
fields

For a request whose parameters do not fit (422): what is wrong with each field. Absent otherwise.

Array<object>

What is wrong with one field of a request.

object
field
required

The parameter, as the request names it (values.volume for a setting inside values).

string
message
required

What is wrong with it.

string
request_id

The request’s id, as its X-Request-Id header gives it: what to quote when asking what happened to it.

string | null
Example
{
"error": "the gateway is starting; try again shortly"
}