HTTP API
Everything the dashboard shows comes from the HTTP API under /api, and a
program of your own can call the same endpoints. This page is the reference
for doing that with an API token: how a request authenticates,
what comes back, and the endpoints worth scripting against.
The live WebSocket at /api/live, which pushes changes instead of being asked,
is described in API Tokens under Following changes as they
happen.
Conventions
Authentication
Send the token as a bearer token on every request:
Authorization: Bearer selv_…
A request that carries a token is answered as the token's account and never
falls back to a session cookie. A token that is unknown, revoked or expired —
or one presented from an address that has sent too many wrong ones — is
answered exactly like a request with no credentials at all: 401.
Roles
What a request may do is decided by the account's role and its customer grants, read fresh on every call (see Users and Permissions). The tables below use these terms:
| Term | Roles | Meaning |
|---|---|---|
| any | ADMIN, MANAGER, OPERATOR, VIEWER | every signed-in account; reads are limited to the customers it reaches |
| acknowledge | ADMIN, MANAGER, OPERATOR | may change an alert's status |
| manage | ADMIN, MANAGER | may create, change and delete, within the customers it reaches |
| admin | ADMIN | the whole instance |
On top of the role, every write checks the customers it touches. A cluster is writable only when the account reaches every member's customer; a maintenance window or rule over the whole instance belongs to administrators. A token is never narrowed by customer view, which is a browser setting.
Requests
- Bodies are JSON; send
Content-Type: application/json. A body that is not valid JSON is answered400 Invalid JSON. - Query parameters are checked as strictly as bodies: an unknown value, an
unreadable time or a
limitthat is not a whole number within the endpoint's range is answered400with a message naming the parameter. It is never quietly replaced by a default. - Ids are opaque strings. Take them from list responses.
- Times are ISO 8601. Send them with an explicit offset (
2026-10-03T22:00:00Zor2026-10-04T00:00:00+02:00); responses always use UTC with aZ.
Responses
A successful call answers 200 with
{ "success": true, "data": … }
Some list endpoints add fields next to data (nextCursor, pagination), and
the metrics endpoints put range and source beside it. A successful delete
answers { "success": true } without data.
A failed call answers
{ "success": false, "error": "Unknown status: OPEN" }
Every error has this shape. A validation failure adds details, the list of
problems with the body (each with a path and a message). The HTTP status
says whose fault it was; the table below is the whole set.
| Status | Meaning |
|---|---|
200 | Done. |
400 | The request is wrong: an invalid parameter or body, an unknown cursor, a scope named in the body that does not exist or is not yours (Unknown scope). |
401 | No valid credentials. |
403 | Signed in, but the role is not enough for this verb or this scope. |
404 | The resource in the path is not there — or at a customer the account does not reach. The two give the same answer on purpose. |
409 | Conflicts with existing data (a customer code already taken). error is host_unmanaged when a route that runs something on a host (a job, a shell, a script, a scan, a service action, an SSH certificate) is given a host that has no agent; details.systemId names it. |
500 | Something failed on the server; the dashboard log says what. |
502 | Only from the SMTP test: the mail server refused or could not be reached; details says at which stage. |
503 | Only from /api/health: the database or Redis is not answering. |
Pagination
Lists that can grow without bound are paged by cursor: the response carries
nextCursor, the id of the last item on the page, or null when there is no
further page. Pass it back as the parameter the endpoint names (before or
cursor) to get the next page. A cursor naming something the account cannot
see answers 400 Unknown cursor. The other lists are returned whole, or
capped by a limit.
Rate limits
Only the bearer path itself is limited: 30 wrong token values per client
address in 5 minutes. After that, every request from that address is answered
401 — the right token included — until the window ends. A successful
verification clears the counter. Requests with a valid token are not metered.
Only values the dashboard never issued count: a token that is known but expired is
answered 401 token_expired, a revoked one 401 token_revoked, and neither
is counted.
The client address is the last entry of X-Forwarded-For, as added by the
reverse proxy in front of the dashboard.
Hosts
| Method and path | Who | What |
|---|---|---|
GET /api/systems | any | Hosts, sorted by name. |
POST /api/systems | manage, or the access entry right with kind: "remote" | Creates a host and returns its agent key, or with kind: "remote" a host without an agent. Link hosts are created with POST /api/links. |
GET /api/systems/facets | any | Regions and tags in use, for filters. |
GET /api/systems/ids | any | The ids of every host the list filters match, up to 500, with how many match in all. Takes the filters of GET /api/systems. |
POST /api/systems/bulk | any, per action | One action on up to 500 hosts (see below). |
GET /api/systems/{id} | any | One host with its customer and open-alert count. |
PATCH /api/systems/{id} | manage; the access entry right for a host without an agent | Changes name, customer, region, tags, colour, folder, offline alerts, for a host without an agent its operating system (manualOs: linux, windows, macos, other or null) and, for an agent, whether it is a tunnel host. The answer and GET /api/systems/{id} carry color and the host's reachability (viaTunnel, tunnelSystemId; a derived reachMode stays for older consumers). |
GET /api/systems/{id}/access, and the routes for its addresses, shares, reachability, labels and notices | the access entry right, session only | A host's access data; see Host data. |
PATCH /api/systems/{id}/inventory | the host's edit right (manage; the access entry right for a host without an agent) | Sets the asset details of an agent, a network device or a host without an agent: location, assetTag, purchaseDate, warrantyUntil (YYYY-MM-DD), note, manualManufacturer, manualModel and manualSerial. Every field is replaced by what is sent; empty or null clears it. |
DELETE /api/systems/{id} | manage; the access entry right for a host without an agent | A host without an agent or a link host goes to the trash with its live access entries, and can be restored (see below and Deleting a host); an agent or a network device is deleted for good with its alerts and events, and the entries on it with it. Either needs confirmConnections while entries hang on it (a link host needs none: it is its own entry). |
POST /api/systems/{id}/install-key | the access entry right at the customer | Installs an agent on a host without one, in place, and returns the install key once. |
POST /api/systems/{id}/remove-agent | manage | Takes the agent off a host and keeps the host (see below). |
POST /api/systems/{id}/merge | the access entry right | Folds a host without an agent into another host of the same customer. 409 merge_invalid for a link host. |
POST /api/systems/{id}/regenerate-key | manage | Issues a new agent key; the old one stops working. 409 host_unmanaged for a host without an agent. |
GET /api/systems/{id}/metrics | any | The host's history, bucketed (see Metrics). |
GET /api/systems/{id}/settings | any | The host's agent settings, its detected services and config versions. |
PUT /api/systems/{id}/settings | manage | Sets agent settings on the host. |
GET /api/systems/{id}/snmp-targets | any | Network devices this agent polls. |
POST /api/systems/{id}/snmp-targets | manage | Adds a network device to this poller. |
PATCH /api/systems/{id}/snmp-targets/{deviceId} | manage | Changes a network device. |
DELETE /api/systems/{id}/snmp-targets/{deviceId} | manage | Removes a network device. |
GET /api/systems query parameters:
| Parameter | Type | Notes |
|---|---|---|
customerId | id | Only this customer's hosts. |
q | string | Name or hostname contains this, case-insensitive. |
status | ONLINE, OFFLINE, STANDBY, DEGRADED, UNKNOWN | |
attention | offline, collector_error, needs_config, disk_full, container_unhealthy, certificate_expiring, agent_outdated, maintenance | The hosts behind one entry of the dashboard's attention list. |
service | service name | The agent detected it and it is not switched off. |
customer | id | One customer, as the list's filter picks it. |
region, tag | string | One region or tag, as in GET /api/systems/facets. |
alerts | with, without | With or without active alerts. |
kind | agent, snmp | Servers or network devices. |
updates | held, released | Agents whose updates are held, or not. |
version | outdated, current | Agents on another version than the one this dashboard ships, or on that one. |
limit | integer 1–500 | Default 100. |
These are the filters of the hosts list in the interface; an unknown value
of any of them is 400.
The response has pagination: { "hasMore": …, "total": … } beside data;
total counts every matching host, so hasMore means the limit cut the
list short. Each host carries id, name, hostname, customerId,
customer, region, tags, status, kind (agent or snmp), lastSeenAt,
agentVersion, services, hostInfo, clusterId, clusterRole, poller,
activeAlerts and maintenance (whether a window covers it right now).
POST /api/systems body:
| Field | Type | Notes |
|---|---|---|
name | string | Required. |
customerId | id | Required; a customer the account reaches, otherwise 400 Unknown scope. |
region | string ≤ 100, or null | Optional. |
tags | array of strings ≤ 50 characters, at most 50 | Optional. |
The response contains agentKey in the clear. It is shown only here (and
by regenerate-key and install-key); store it before discarding the response.
See Agent Installation for what to do with it.
With kind: "remote" the body is kind, customerId, name, and optionally
host (the machine's name or address, which is what an access entry finds it
by) and folderId. It creates a host without an agent: status UNMANAGED, no
agent key, no measurements. The right is the access entry right at the customer,
not the hosts right, and a not managed customer takes such
hosts too. A name already used at the customer (case-insensitive) is 409 name_taken. See Hosts and Access Entries.
POST /api/systems/bulk applies one action to up to 500 hosts in one call.
The body is { "ids": [...], "action": "...", "params": {...} }:
action | params | Needs |
|---|---|---|
tags | mode (add, remove, replace), tags (array) | manage |
region | region (string, or null to clear) | manage |
color | color (a colour such as #ef4444, or null to remove it) | manage |
hold | hold (boolean) | manage |
offline_alerts | value (true, false, or null for the platform default) | manage |
tunnel_host | value (boolean): marks or unmarks agents as tunnel hosts; every other kind is skipped as not_applicable, and unmarking a host that other hosts reach through as in_use | manage |
maintenance | the fields of a maintenance window without the scope: name, startsAt, endsAt, note, recurrence, recurrenceUntil, timeZone; one window is created over each host | manage |
actions | actions (array of action names; empty allows nothing); sets the host-scope entry of each host | actions.manage at the host's customer; 409 while remote actions are off |
move | customerId; 400 Unknown scope for a customer the account cannot reach | manage |
moveToFolder | folderId (or null to unfile), or newFolderName to create the folder first. All the hosts belong to one customer (409 bulk_mixed_customers) and so does the folder (400 invalid_folder) | the host's own right: manage for an agent or a network device, the access entry right for a host without an agent |
delete | confirmConnections (boolean); required while the hosts hold live access entries, which go to the trash with a host without an agent and are deleted with an agent (409 confirm_connections_required, details.connections; a link host is not counted) | manage; the access entry right for a host without an agent |
export | none; answers the rows the inventory list shows, for a CSV | any |
check | for (script, patch, actions or hosts); answers which hosts the action can run on, with the reason for each that it cannot, and writes nothing. hosts answers what each bulk operation allows for the selection, the operations a mixed selection cannot run and the number of access entries a delete would trash | the permission of that action |
tags, region, color, move, moveToFolder and delete also work on hosts without an
agent, under the access entry right at their customer; hold, offline_alerts,
maintenance, actions and the checks for scripts and patching skip them as
not_applicable. A network device is skipped by move: it stays with its poller.
The answer to a write is { "action", "requested", "changed", "unchanged", "skipped": [{ "id", "name", "reason" }] }. reason is not_found (not a host
the account reaches), forbidden, not_applicable or, when unmarking a tunnel host, in_use. A host that is
skipped does not stop the others; the whole call is refused only when the
role may not write at all (403), the body is wrong (400), or the target
customer is out of reach (400). All writes of a call happen in one
transaction, so a failure leaves nothing half done, and the audit log gets one
entry per changed host. More than 500 ids, an empty list or an unknown
action is 400.
PATCH /api/systems/{id} takes any of name, customerId, region,
tags (as above; at most 50, each at most 80 characters), color, folderId, offlineAlerts and tunnelHost. offlineAlerts:
true or false decides for this host, null hands it back to the platform default
(409 host_unmanaged for a host without an agent). tunnelHost (a boolean, agents
only, 409 host_unmanaged otherwise) marks the agent as one that hosts of its
customer may be set to reach through; unmarking one that hosts still reach through is
409 tunnel_host_in_use with details.hostCount and details.entryCount, and every change is audited as
system.tunnel_host_change. GET /api/systems/{id} answers tunnelHost. A field left out stays as it is; region: null clears the
region and folderId: null unfiles the host. Moving a host to another customer
moves its access entries and the network devices it polls with it and unfiles it,
because a folder belongs to one customer, and cuts a tunnel that would span two
customers; a network device cannot be moved on its own (400). A customer the
caller does not reach, another person's private customer included, is 400 Unknown scope.
POST /api/systems/{id}/install-key turns a host without an agent into an
agent in place: the id, name, access entries, addresses, notes, tags and folder stay, the host gains the agent path, the status
becomes OFFLINE until the agent reports, and the answer carries agentKey once.
409 host_managed for a host that already has an agent. Installing the
agent with this key is the way to give a host its agent; an enrollment token
reaches the same host by itself when the hostname matches (see
Agent Installation).
POST /api/systems/{id}/remove-agent turns an agent into a host without an
agent in place. Everything the agent produced is deleted (measurements, alerts,
events, jobs, patch and inventory data, services, sessions); the name, notes,
tags, folder, access entries and audit history stay, and the host loses the agent path. The agent that keeps reporting
is answered like any unknown key. 409 host_unmanaged for a host without an agent
and for a network device.
POST /api/systems/{id}/merge takes { "into": "<system id>" }. The host's
access entries, addresses and shares move to the target, its tags are added to the target's, its notes are
appended, the target takes its folder and colour when it has none, and the host is deleted.
The target is another host of the same customer; anything else is 409 merge_invalid.
DELETE /api/systems/{id} with a body { "confirmConnections": true } is
needed while the host holds live access entries. A host without an agent or a link host is moved to
the trash together with them, stored passwords included, and keeps its notes and
tags; an agent or a network device is deleted for good, with the entries on it.
The answer says which (trashed, connectionsTrashed, connectionsDeleted). Without
the confirmation the answer is 409 confirm_connections_required with the number in
details.connections. A bulk delete answers with hostsTrashed, connectionsTrashed
and connectionsDeleted beside changed.
PUT /api/systems/{id}/settings (and the cluster equivalent) takes an
object of setting keys to string values, for example
{ "patroni_url": "http://127.0.0.1:8008" }. null or an empty string removes the value
at this level so the inherited one applies again. Unknown keys are ignored. The
keys and their meaning are listed in Agent Settings.
SNMP targets take name (≤ 200), address (≤ 253), port (1–65535,
default 161), version (2c or 3), and the credentials for that version:
community, or v3User, v3Level, v3AuthProtocol, v3AuthKey,
v3PrivProtocol, v3PrivKey. A target that cannot be polled as sent answers
400 with a problem naming what is missing. See
SNMP Devices.
Network discovery
| Method and path | Who | What |
|---|---|---|
POST /api/discovery/scan | script.run at the host's customer | Asks a host to scan now. |
PATCH /api/discovery/devices/{id} | operator | Sets the status of a discovered device. |
DELETE /api/discovery/devices/{id} | manager | Removes a device from the list. |
POST /api/discovery/devices/{id}/tunnel-target | manager | Makes a named tunnel target of a device. |
PATCH /api/discovery/hosts/{id} | manager | Sets a host's daily scan and extra networks. |
PATCH /api/discovery/customers/{id} | manager | Sets a customer's daily scans and notification. |
POST /api/discovery/scan takes systemId and title, the name the scan
gets in the jobs list, and answers 201 with the batch and job ids like any
other job. PATCH /api/discovery/devices/{id} takes status: new,
known or ignored. POST .../tunnel-target takes port (one of the
device's open ports), protocol (ssh, rdp, vnc, http, https or
other) and optionally name; a name another target of the customer already
has answers 409. PATCH /api/discovery/hosts/{id} takes scheduled and
networks, a list of private IPv4 networks such as 10.20.0.0/24; one that is
not valid answers 400 with problem: "invalidNetwork" and the offending
network. PATCH /api/discovery/customers/{id} takes scheduleEnabled and
notifyNew. None of them is available in customer view. See
Network Discovery.
Inventory
| Method and path | Who | What |
|---|---|---|
GET /api/inventory/export | any | The inventory as a CSV file. |
GET /api/inventory/export query parameters:
| Parameter | Type | Notes |
|---|---|---|
kind | hardware, software, packages | Required. One row per host, per installed package on a host, or per package across the fleet. |
q | string | Every word must match; see Inventory. |
customer | id | One customer. |
virtualization | bare_metal, vm, container | hardware only. |
manager | dpkg, rpm, apk, pacman, windows | software and packages. |
updatable | true | software and packages: only where an update is waiting. |
folders | comma separated folder ids | Only hosts filed in these folders. |
unfiled | true or false | Also (with folders) or only (alone) hosts in no folder. Anything else is 400. |
At most 200,000 rows are returned. The columns are the ones of the tables in Inventory.
SSH keys
| Method and path | Who | What |
|---|---|---|
PUT /api/ssh-keys/owner | manage | Gives a key an owner. |
DELETE /api/ssh-keys/owner | manage | Takes the owner off a key. |
PUT /api/ssh-keys/system-key | manage | Marks a key as an expected host key. |
DELETE /api/ssh-keys/system-key | manage | Takes the mark off a key. |
POST /api/ssh-keys/remove | any, with access.shell | Asks the hosts that hold the keys to remove them. |
POST /api/ssh-keys/restore | any, with access.shell | Asks the hosts to put back what a removal took out. |
The keys themselves are read through the live socket the page uses; there is no list endpoint.
PUT /api/ssh-keys/owner takes fingerprint (SHA256:…) and either
userId (an account the caller may see) or personName (up to 120
characters). A key that is on no host the caller sees answers 404.
DELETE takes fingerprint.
PUT /api/ssh-keys/system-key takes fingerprint, reason (1 to 300
characters) and scope: { "kind": "all" } (administrators only),
{ "kind": "customer", "customerId": … } or { "kind": "systems", "systemIds": […] }.
It replaces an earlier mark. 404 for a key the caller does not wholly see or
a customer or host that does not exist, 403 for a scope outside the caller's
reach. DELETE takes fingerprint. See
SSH Keys.
POST /api/ssh-keys/remove takes title (the batch's name), fingerprints
(up to 200) and/or owner (u:<account id> or p:<name in lower case>, which
expands to all of that owner's keys), and optionally user (only that
account's files), systemIds (only these hosts) and reason. The hosts are the
ones holding a key that the caller sees. The answer is 201 with
{ batchId, hosts, keys }; the jobs wait for approval, see
SSH Keys. 403 without the permission at every
customer involved, 400 when a customer's policy needs a reason, 404 when
no host holds the keys.
POST /api/ssh-keys/restore takes title (the batch's name) and either
batchId (every finished ssh.key.remove job of that batch that the caller
sees) or jobIds (those jobs), and optionally reason. Fingerprints, files
and copies come from the removal jobs' results, not from the request. The
answer is 201 with { batchId, hosts, files, awaitingApproval }; see
SSH Keys. 403 without the permission at every
customer involved, 400 when a customer's policy needs a reason, 404 when
no removal changed a file on a host that can still run jobs.
POST /api/jobs/cancel cancels, in one call, every job that is awaiting
approval or queued, that the caller sees and that the caller may cancel
(the job type's permission at the job's customer). The body narrows the jobs
with any of batchId, systemId, customerId, type (an exact job type),
status, q (the search of the jobs list) and os (linux or windows);
an empty body means all of them. Jobs that were sent to a host are never
touched. The answer is { "success": true, "data": { "cancelled": 12, "skipped": 1 } },
where skipped counts matching waiting jobs that were not cancelled: not
permitted, or no longer waiting. Each cancelled job is audited as job.cancel
with bulk: true. See Jobs.
POST /api/jobs also takes an optional reason (3 to 500 characters),
kept in the audit log. It is required, with 400 otherwise, when a customer
among the hosts requires a reason.
Accounts
What an administrator does to accounts; all of it from a signed-in browser (an API token gets
403), and every step is audited. See Users and Permissions.
| Method and path | Who | What |
|---|---|---|
GET, POST /api/users | admin | The list; and create an account. POST takes email, name?, role and either password or, left out, invites the person: the answer carries invitation with the sign-in url (valid for seven days) and whether it was emailed. |
PATCH, DELETE /api/users/{id} | admin, or the account itself for its own profile | Edit; delete (not your own account, not the last administrator who can sign in). |
PUT /api/users/{id}/disable | admin | { "disabled": true } switches the account off (no sign-in, no token, open sessions end); false switches it on. 409 with details.reason self or last_admin. |
POST /api/users/{id}/invite | admin | A new sign-in link that lets the person choose a password; the old one stops working. 409 for a switched-off account. |
POST /api/users/{id}/two-factor-reset | admin | Removes the authenticator app, the recovery codes and the trusted browsers. |
POST /api/users/{id}/sign-out | admin | Ends every browser session, token and trusted browser of the account at once; { tokens } says how many tokens. |
GET, DELETE /api/users/{id}/devices | admin | The account's trusted browsers and tokens, by name and date; DELETE with { kind: "trusted" | "token", id } revokes one. |
GET /api/users/{id}/portfolio-stats | admin | { connections, folders }: how much its private customer holds, which is removed with the account after the trash retention. Numbers only. |
GET, POST /api/profile/totp, PUT, DELETE | the account, session only | Authenticator app. GET also says how many recovery codes are left; PUT (confirm) answers with the ten recovery codes, once. |
POST /api/profile/totp/recovery | the account, session only | Makes a new set of recovery codes and voids the old one; the codes are in the answer and nowhere else. |
POST /api/profile/tokens | the account, session only | { name, expiresAt?, scope? }; scope is read_write (default) or read, a token that answers GET and nothing else (403 token_read_only). 409 with details.reason token_limit at 25 tokens in use. |
GET, POST, DELETE /api/profile/ssh-keys | the account | The SSH public keys of the account's profile; POST takes { keys, label? } (one or several OpenSSH public key lines, at most 20) and makes the account the owner of each fingerprint; DELETE takes { id }. 400 with details.reason empty, too_many, private_key, options, unsupported_type, invalid_key or rsa_too_short (and the line); 409 with details.reason owned_by_other when another account owns a fingerprint. |
GET, POST, DELETE /api/users/{id}/ssh-keys | admin | The same for any account. |
Customers
| Method and path | Who | What |
|---|---|---|
GET /api/customers | any | Customers the account reaches, with host and alert counts. Customers that are not managed are left out unless ?includeUnmonitored=true. |
POST /api/customers | manage | Creates a customer. A manager is granted it at once. |
GET /api/customers/{id} | any | One customer with its host counts. |
PATCH /api/customers/{id} | manage | Changes the customer, a private one included (its name, code, notes and contact are editable like any other). |
DELETE /api/customers/{id} | manage | Deletes a customer that has no agents or network devices left (400 otherwise). Its hosts without an agent, link hosts, access entries (in the trash or not, stored passwords included), folders and notes go with it, which needs { "confirmConnections": true } in the body while there are any (409 confirm_connections_required, details.hosts and details.connections). A private customer is never deleted this way (409 private_customer_protected). |
GET /api/customers/{id}/metrics | any | Bucketed metrics of all its hosts (see Metrics). |
GET /api/customers/{id}/users | admin | Every non-admin account, flagged with whether it holds a grant here. |
PUT /api/customers/{id}/users | admin | Replaces the set of accounts granted this customer. A grant that stays keeps its permissions; a new one starts from the account's default permissions. |
PUT /api/users/{id}/customers/{customerId} | admin | Sets the permissions of one grant: { "permissions": ["access.shell", …] }. |
PUT /api/users/{id}/permissions | admin | Sets the permissions new grants of that account start with: { "defaultPermissions": […] }. |
PATCH /api/customers/{id}/policies | manage | Sets requireApproval, requireReason and recordSessions; every field optional. Works for not managed customers too. |
POST /api/customers/{id}/end-monitoring | admin | Switches the customer to not managed: deletes its history (metrics, alerts, events, reports), SNMP devices and monitoring objects, and keeps agents, tokens, access and policies. Body { "confirm": true }; answers { removed, purged }. See Switching to not managed. |
POST /api/customers body (and PATCH, where every field is
optional):
| Field | Type | Notes |
|---|---|---|
name | string | Required on create. |
code | string, 1–20 | Required on create; unique, 409 when taken. |
notes | string ≤ 2000 | Optional; empty clears it. |
contactName | string ≤ 200 | Optional; empty clears it. |
contactEmail | email or "" | Optional; empty clears it. |
active | boolean | Optional; an inactive customer raises no alerts. |
connectionAdminReveal | boolean | Optional, administrators only, true by default. False hides the customer's stored access entry passwords from administrators who hold no connection.reveal grant there; see Access Entries. |
monitored | boolean | Optional, true by default. Not managed customers keep their agents but own no history, rules or other monitoring objects. Switching it off needs confirm: true (administrators): without it the answer is 409 with details.reason customer_has_dependents or confirm_required and the preview; switching it on while another monitored customer has the same code or slugged name is 409 alias_conflict. |
Creating a rule, window, channel, webhook, schedule or patch policy for a
customer that is not managed is 409 with details.reason
customer_not_monitored, on every endpoint that does so. Hosts, enrollment
tokens, tunnel targets, access policies and action policies are allowed.
PUT /api/customers/{id}/users takes { "userIds": ["…", "…"] } — the
complete set, not an addition. An empty array withdraws every grant.
Administrators cannot be granted (400); ids that name no account are dropped.
Access entries and links
The records behind Access Entries and Hosts and Access Entries. The routes
under /api/access-entries, /api/links and /api/link-targets take a browser session or
the desktop app's token; a script's API or command line token may call only GET /api/access-entries. The host data
under /api/systems/{id}/... below takes a browser session only: no app token and no API token. Errors are codes
in error (not_found, forbidden, invalid_input, token_kind_not_allowed, locked, rate_limited, …) in the
usual envelope; an entry or host that is missing, in the trash, or out of reach (another person's private customer, a
viewer) answers 404 not_found. Customer view narrows the customers a browser reaches, so the entries of the chosen
customer stay and those of every other one answer 404. The stored password is never part of an answer except from
credential: entries carry hasPassword. The routes under /api/connections and /api/connection-jump-presets
of earlier releases are gone, with no replacement shim.
Access entries
| Method and path | Needs | What |
|---|---|---|
GET /api/access-entries | any signed-in account but a viewer | Masked list. customerId, systemId (one host), protocol, q and limit (up to 5,000) filter. An API or command line token never gets a private customer. |
POST /api/access-entries | edit | Creates one on a host. Body: systemId, protocol (ssh, rdp, vnc, web, vscode, wsl) and the fields the protocol takes: address (one of the host's addresses; for wsl the distribution), name (web, optional: what the page is called), url (web), port, username, password, domain (RDP and web), vscodeFolder, icon, quicklink (web). The customer is the host's and is never accepted. 201 with the entry. Not for a link host (use /api/links). |
GET /api/access-entries/{id} | read | One entry (AccessEntryFields, with addressKnown), and beside data the caller's rights. |
PATCH /api/access-entries/{id} | edit | Changes the fields given, and version, the one they were edited from (409 version_conflict). password left out keeps it, null or "" clears it, a string replaces it. The protocol and the host cannot change. |
DELETE /api/access-entries/{id} | edit | Moves it to the trash. 204. 409 link_entry_required for the entry of a link host: delete the host. |
POST /api/access-entries/bulk | edit on every one | { ids (up to 500), action: "patch", patch } with username, domain or port, or { ids, action: "delete" }, optionally systemIds to restrict the hosts. All or none; entries of link hosts are skipped. |
POST /api/access-entries/delete-all | edit | { customerId }: moves every entry of that customer to the trash, however many; its hosts and folders stay. { count }. |
POST /api/access-entries/{id}/duplicate | edit | A copy on the same host with its password, sealed again under its own id. 201. 409 link_entry_required for a link host. |
POST /api/access-entries/{id}/credential | reveal | {} → { password }. Browser session or desktop app only; see Passwords. no-store. Also serves web link hosts. |
POST /api/access-entries/{id}/tunnel | any signed-in account but a viewer, with access.tunnel at the customer | Opens a tunnel or a desktop session for the entry: { reason?, parentSessionId? } → 201 with a relay session, or 202 pending_approval. A desktop app or a browser session only; 423 while the app is locked. See Tunnels. |
GET, DELETE /api/access-entries/{id}/tunnel/{sessionId} | the person who opened it | Where a waiting approval or a launch stands; withdraws the request or ends the launch. |
POST /api/access-entries/{id}/remote | any signed-in account but a viewer, with access.tunnel; a browser session | Opens an RDP, VNC or SSH entry in the browser: { width, height, dpi, reason?, timezone?, locale? } → 201 with { sessionId }, or 202 pending_approval. See Remote Desktop. |
POST /api/access-entries/{id}/launched | read | The client opened it: counts as use, recorded as advisory. 204. |
POST, DELETE /api/access-entries/{id}/favorite and /pin | read | The caller's own marks. 204. |
GET /api/access-entries/{id}/usage, /history | read | Who used it last (ten), and its last ten changes, including the entries written under its old ids. |
Refusals specific to entries: 422 address_unknown (an address that is not in the host's list), 422 address_invalid,
422 invalid_url, 422 unsafe_url_scheme for a URL that starts with javascript:, data:, vbscript: or blob:,
422 invalid_port, 422 field_not_allowed (a field the protocol does not take, for example domain on SSH),
422 invalid_protocol, 422 protocol_not_allowed_on_host (a protocol the host's kind does not take),
409 access_duplicate (the same host, protocol, address or URL, port and user name), 409 limit_reached (64 entries
per host), 409 version_conflict, 409 link_entry_required, 423 locked and 423 pin_required for a locked desktop
app, 403 reauth_required and 429 rate_limited on credential. The routes that open an entry answer with the
code of the block when the route is blocked: no_rights (403), and offline, waiting_for_enrollment,
desktop_not_allowed, agent_outdated, tunnel_not_allowed, no_agent, tunnel_off, tunnel_host_required, no_browser_route,
tunnel_not_needed, as well as guacd_unavailable (503) and protocol_not_remote; see
Opening a host.
Link hosts
A web link, a local target or a remote VS Code project is created and edited as one unit, the host and its single entry in one transaction.
They need connection.edit at the customer and work in a private customer too.
| Method and path | What |
|---|---|
POST /api/links | { customerId, kind: "weblink" | "local" | "vscode", name, folderId?, tags?, color?, notes?, entry: { protocol, url?, address?, vscodeFolder?, username?, password?, domain?, icon?, quicklink? } }. A weblink takes a web entry, a local one vscode (a folder) or wsl, and a vscode host one vscode entry with the SSH address, an optional port (default 22), username, password, vscodeFolder (the remote project folder) and icon. 201 with { host, entry }. 409 name_taken for a host name the customer has. |
GET /api/links/{hostId} | { host, entry, rights }. |
PATCH /api/links/{hostId} | { name?, folderId?, tags?, color?, entry?: { fields…, version } } in one transaction; 409 version_conflict for the entry. Answers { host, entry }. |
DELETE /api/links/{hostId} | Moves the host and its entry to the trash under one stamp (204); the host restore route brings both back. |
Notes are written at creation only; later they are edited on the host's Notes tab. Errors: invalid_link_kind,
name_taken, folder_not_found (422), customer_not_found (404) and the entry codes above.
Deep links
| Method and path | What |
|---|---|
POST /api/web-addresses/{id}/tunnel, GET, DELETE /api/web-addresses/{id}/tunnel/{sessionId} | Older clients open a web page here. Web addresses are web entries now and keep their ids, so this answers exactly like /api/access-entries/{id}/tunnel; new clients use that route. |
GET /api/link-targets/{id} | Resolves an id from an rcm://connect/<id> link: an entry id, the id of an entry that was merged away (or of a former web address, which is a web entry now) or a host. { kind: "entry" | "host", id, entryId, systemId, customerId, hostKind }. An id the caller cannot see answers the same 404 as one that does not exist. |
Host data
Under /api/systems/{id}/, session only, for every host that is not a network device. All writes need connection.edit
at the host's customer (not the host's own right) and each loads the host first, so a host out of reach is 404.
| Method and path | Body | What |
|---|---|---|
GET access | none | The host's access: addresses (reported and manual, each with usedBy), shares, reachability, the entries with the route to open each in the browser and in the app, the migration notices, the tunnel hosts the host could use and the entries trashed on their own. |
POST addresses | { value, label? } | 201 with { address }. 422 address_invalid, 409 address_taken, 409 limit_reached, 409 host_kind for a link host or a network device. |
PATCH, DELETE addresses/{addressId} | { value?, label? } | Changes a manual address ({ address, updatedEntries }: entries that use it are rewritten and their version raised) or removes it. 409 address_reported for a reported one, 409 address_in_use with details.entryCount. |
POST shares, PATCH, DELETE shares/{shareId} | { name, target } | { share }. 422 invalid_share_target, 409 share_taken, limit_reached. |
PUT reachability | { viaTunnel: boolean, tunnelSystemId?: string | null } | { reach } with viaTunnel, tunnelSystemId, tunnelSystemName and paths; audited as host.reachability_set. viaTunnel: true needs a tunnel host. See Reachability for the refusals. The body { mode: "direct" | "agent" | "tunnel", tunnelSystemId? } is deprecated but still accepted: tunnel switches the tunnel on, direct and agent switch it off; any other value is 400 invalid_reach_mode. reach.mode in answers is derived and deprecated. |
PATCH labels | { tags?, color? } | Tags (at most 50, each at most 80 characters) and colour of the host, for any non-link host; needs connection.edit. { tags, color }. |
DELETE access-notices | none | Dismisses this host's migration notices. 204. |
Folders, trash, icons and administration
| Method and path | Needs | What |
|---|---|---|
POST /api/connection-folders | edit | { customerId, name }. 201. 409 name_taken for a name the customer has (case does not matter). |
PATCH, DELETE /api/connection-folders/{id} | edit | Rename (name, optionally the version it was edited from, 409 version_conflict) or reorder (sortOrder); or delete: the hosts in the folder, with their entries, become unfiled and only the folder goes to the trash. |
POST /api/connection-folders/move-hosts | edit on each host | { systemIds (up to 500), folderId }: files hosts of one customer in a folder, or unfiles them with folderId: null. { moved, refused: [{ id, reason }] }, where a host the caller may not edit is refused on its own; 409 bulk_mixed_customers, 400 invalid_folder. This is the desktop app's way to PATCH /api/systems/{id}, which its token does not reach. |
GET /api/connection-trash | edit | customerId=: { folders, hosts, entries }. hosts are the hosts that were deleted (id, name, kind, trashedAt, trashedBy and entryCount, how many entries return with them; a link host's own entry is not counted), entries the ones deleted on their own (with the host they hang on), folders the deleted folders. Also GET /api/customers/{id}/connection-trash. |
POST /api/connection-trash/hosts/{id}/restore, …/folders/{id}/restore, …/access-entries/{id}/restore | edit | Restore. A host returns with the entries that were deleted with it, under a free name if its own was taken; an entry whose host is in the trash brings the host back alone. 204. |
DELETE /api/connection-trash/hosts/{id}, …/folders/{id}, …/access-entries/{id} | edit | Delete for good; a host takes every entry that hung on it. 204. |
GET, PUT /api/customers/{id}/connection-info | read, edit | The customer's notes: { notes, version } with the version it was edited from (0 for none yet); 409 version_conflict carries the current ones. |
GET /api/connection-icons, GET /api/connection-icons/{name} | any signed-in account | The icon library: names, and one image (revalidated on every use with an ETag, so a replaced image shows at once). |
POST /api/connection-icons | admin, browser | Multipart file (PNG, JPEG or WebP, up to 512 KB, judged by its bytes) and optional name, stored lower case as a slug. 201; an image of that name is replaced (200). 422 unsupported_type, 413 too_large. The desktop app's token cannot call it. |
DELETE /api/connection-icons/{name} | admin, browser | Removes an image; entries that name it show their protocol's icon. 204. |
GET /api/admin/connection-usage | admin | Use per entry and person; see Who uses what. |
GET /api/admin/connection-orphans | admin | Private customers of deleted accounts, as counts. |
Removed with 3.4.0, with no replacement: /api/connections/** (an entry's move too: an entry cannot change host), the jump-preset
routes /api/connection-jump-presets/** and /api/customers/{id}/jump-presets, and the payload fields name, type, host,
tags, notes, webLinks, folderLinks, proxyJump, sshOptions, tunnelMode, tunnelSystemId and color of an entry.
The desktop app
The Remote Connection Manager signs in with the device flow: POST /api/cli/device with
{ "kind": "app" } (the command line sends none) and the usual POST /api/cli/token poll,
which answers with kind and expiresAt as well. Its token may call the
access routes, the alert and inbox routes it shows
(below), the live socket (the connections.* topics, alerts.counts, alerts.page and
inbox.feed) and the routes below, and nothing else: any other route answers
403 token_kind_not_allowed before it runs. Errors are codes, as for access entries.
| Method and path | What |
|---|---|
GET /api/app/session | Account, reach (role, allCustomers, customerCount), the token (expiresAt, daysLeft; the app shows a notice at 14) and the lock (pinSet, locked, unlockedUntil), plus serverTime. Readable while locked. |
GET /api/app/avatar | The signed-in user's profile picture as image bytes (Cache-Control: private, no-store). 404 when there is none. Readable while locked. |
POST /api/app/unlock | { pin, windowMinutes? } gives { unlockedUntil }. The window is 15 minutes unless asked for, at most 60. 403 wrong_pin carries details.attemptsLeft; the fifth wrong PIN revokes the token (401 token_revoked); twenty in an hour for the account pause unlocking for 15 minutes (429 rate_limited, Retry-After); one guess a second per token. 423 pin_required until a PIN exists. |
POST /api/app/keepalive | Extends the window while the user is active, never past 12 hours from the unlock. 423 locked once it has ended. |
POST /api/app/lock | Locks now. 204. The app calls it on auto-lock, tray lock and sign-out. |
PUT /api/app/pin | { pin, currentPin? }, at least 4 characters. The first PIN needs only the token and unlocks it; a change needs an unlocked token and currentPin. A browser session may call it too, within 15 minutes of confirming who it is (403 reauth_required); replacing an existing PIN there revokes every app token of the account. |
POST /api/app/logout | Revokes the app's own token. |
| Alert and inbox routes | What the app may call |
|---|---|
GET /api/alerts, GET /api/alerts/{id} | Read. 423 locked while the app is locked. |
PATCH /api/alerts/{id} | Acknowledge, resolve or reopen. Needs the role the dashboard asks for (403 for a viewer) and 423 locked while locked. DELETE is not open to the app. |
GET /api/alerts/counts, GET /api/inbox/counts | The counts. Answered while locked: a locked app may know how many alerts are open. |
GET /api/inbox, POST /api/inbox/read | The bell and marking news read. 423 locked while locked. |
While locked, every access entry route answers 423 locked (423 pin_required before a PIN
exists), and a subscription to a connections.* topic, to alerts.page or to inbox.feed
is answered with an err message of the same code and no data; alerts.counts is the one
alert topic a locked app is served. When the window ends the server sends err locked for
the open ones. Unlocking does not resubscribe: the app subscribes again.
A browser confirms who it is, for copying a password or setting the PIN, with
POST /api/profile/reauth ({ password, code? }, the second factor where the account has
one); the session is then fresh for 15 minutes. A write to the access entry routes or the
app's routes with a session cookie from another site (Origin naming a different host) is
refused with 403 cross_site; a bearer token is not asked for an origin.
Client releases
The installers of the desktop client and the feed installed clients read; see
Client Releases. The two public routes answer without a
sign-in. The others need an administrator's session or token, and answer
403 to anybody else.
| Method and path | Needs | What |
|---|---|---|
GET /api/updates/latest | nothing | platform (windows, macos, linux), channel (stable or beta, default stable), current (the installed version). A bare { available, … } object, not the usual envelope. |
GET /downloads/{file} | nothing | An installer a release names, as a download. 404 for anything else. |
GET /api/admin/client-releases | admin | Every release, newest first, with id, version, channel, platform, filename, sizeBytes, sha256, notes, isLatest, publishedAt and downloadUrl. |
POST /api/admin/client-releases | admin | multipart/form-data with file (up to 500 MB), version, channel, platform and optionally notes and is_latest. 201 with the release; 409 when that version, channel and platform exist; 413 over the size; 422 for a file type the platform does not take. |
PUT /api/admin/client-releases/{id} | admin | { isLatest?, notes? }. Marking a release moves the mark from the one that had it. |
DELETE /api/admin/client-releases/{id} | admin | Removes the release and its file. 204. |
Clusters
Clusters are created by the agents when they report a clustered service; the API reads, renames and forgets them.
| Method and path | Who | What |
|---|---|---|
GET /api/clusters | any | Clusters with a member the account sees, with member counts and open alerts. |
GET /api/clusters/{id} | any | One cluster with its members. |
PATCH /api/clusters/{id} | manage, every member | Renames it: { "name": "…" }, 1–100 characters. |
DELETE /api/clusters/{id} | manage, every member | Forgets the grouping and its settings. The members stay, and their agents recreate the cluster on the next report if the service still runs. |
GET /api/clusters/{id}/settings | any | Agent settings set on the cluster. |
PUT /api/clusters/{id}/settings | manage, every member | Sets agent settings for every member, same body as for a host. |
"Every member" means the account must reach the customer of each member; one
that reaches only some of them gets 403.
Alerts
| Method and path | Who | What |
|---|---|---|
GET /api/alerts | any | Alerts, newest first, or every change since a moment. |
GET /api/alerts/counts | any | Open alerts in total and per customer. |
GET /api/alerts/{id} | any | One alert, in the same shape as the list. |
PATCH /api/alerts/{id} | acknowledge | Sets the status: { "status": "ACKNOWLEDGED" }. |
DELETE /api/alerts/{id} | manage | Deletes the alert. |
GET /api/alerts reads the table one of two ways.
Without since it returns the newest alerts first, ordered by when they were
raised, and pages into the past with before. With since it returns every
alert whose state changed at or after that moment, oldest change first, and
pages with cursor — what a program that was not running needs to catch up
without missing a transition. Neither reading shows deleted alerts; a program
that must be certain also re-reads the open alerts outright.
| Parameter | Type | Reading | Notes |
|---|---|---|---|
status | ACTIVE, ACKNOWLEDGED, RESOLVED | both | Anything else is 400. |
systemId | id | both | One host's alerts. |
customerId | id | both | One customer's alerts. |
clusterId | id | both | Alerts of the hosts in one cluster. |
q | string | newest first | Case-insensitive substring of the host name, the metric, the message or the name of the rule that raised it. Trimmed, up to 200 characters. |
metric | [A-Za-z0-9_.-], 1–64 characters | newest first | A metric's base name: disk matches disk and every disk:/mount. Anything else is 400. |
folders | comma separated folder ids | newest first | Alerts of hosts filed in these folders. At most 100 ids; a longer list is 400. |
unfiled | true or false | newest first | Alerts of hosts in no folder; together with folders, of either. Anything else is 400. |
limit | integer 1–200 | both | Default 50. |
before | alert id | newest first | The nextCursor of the previous page. Cannot be combined with since. |
since | ISO 8601 time | — | Switches to the changes reading. Unparseable is 400. |
cursor | alert id | since | The nextCursor of the previous page. Requires since. |
q, metric, folders and unfiled are ignored when since is given.
The response is { "success": true, "data": [ … ], "nextCursor": … }. Each
alert carries id, systemId, metricType, threshold, condition
(ABOVE or BELOW), currentValue, status, message, metadata,
triggeredAt, acknowledgedAt, resolvedAt, updatedAt, and system with
its name, hostname, status and customer (id, name, code, kind). kind is private for an alert in the caller's own private customer.
GET /api/alerts/counts answers
{ "total": { "active": n, "acknowledged": n }, "byCustomer": { "<customerId>": { … } }, "generatedAt": "…" }.
PATCH /api/alerts/{id} accepts ACTIVE (reopen), ACKNOWLEDGED and
RESOLVED, and answers with the updated alert. How alerts move between these
states on their own is described in Alert Rules.
Inbox
The personal inbox behind the bell, see Notifications. It is the caller's own and takes a token like the rest; a token is never narrowed to a customer, the way a browser in customer view is.
| Method and path | Who | What |
|---|---|---|
GET /api/inbox | any | The whole feed: what waits for a decision, the open alerts and the news, with the counts. |
GET /api/inbox/counts | any | Only the counts. |
POST /api/inbox/read | any | Marks news read: { "ids": ["…"] } or { "all": true }. |
GET /api/inbox answers { "success": true, "data": { "todo": [ … ], "alerts": [ … ], "news": [ … ], "counts": { … } } }.
A group the caller switched off in Profile → Notifications is absent. Every entry has
key, group (todo, alerts, security, foryou or operations), kind, at, href
(a path of the dashboard where it is handled), customer, system, detail, params
(the values the wording names), critical, unread and decision. kind and params
select and fill a wording each client has in its own language; no sentence is sent.
decision is null or { "kind", "id", "deny", "reason" }: the entry can be decided
with the existing endpoints (/api/jobs/{id}/approve or /cancel,
/api/patches/runs/{id}/approve or /cancel, PUT /api/access/requests/{id},
/api/scripts/versions/{id}/approve, /api/systems/{id}/approve), and reason says that
the customer asks for a reason with the decision.
counts is { "todo", "alerts", "criticalAlerts", "security", "foryou", "operations", "badge" }.
security, foryou and operations count unread news; badge is the number the bell shows.
POST /api/inbox/read answers { "marked": n }. Only the caller's own entries are
reached. Entries in todo and alerts have no read state: they leave when the matter is
decided or the alert closes. News older than 30 days is removed.
Timeline
| Method and path | Who | What |
|---|---|---|
GET /api/timeline | any | Events, newest first. |
GET /api/timeline/kinds | any | { "kinds": [ … ] }: the event kinds that occur in what the account sees. |
GET /api/timeline query parameters:
| Parameter | Type | Notes |
|---|---|---|
systemId, clusterId, customerId | id | Narrow to one host, cluster or customer. |
kinds | comma-separated list | Only these kinds, e.g. agent.updated,settings.changed. |
severity | info, warning, critical | A lower bound: warning returns warnings and criticals. Anything else is 400. |
since | ISO 8601 time | Default 30 days ago. Events are kept for 90 days. |
until | ISO 8601 time | Optional upper bound. An unparseable since or until is 400. |
q | string | Case-insensitive substring of the message, the kind, the host name or the cluster name. |
limit | integer 1–200 | Default 50. |
cursor | event id | The nextCursor of the previous page. |
The response is { "success": true, "data": [ … ], "nextCursor": … }, like
the alerts list. Each event has id, time,
kind, severity, message, data, source, systemId, systemName,
customerId, customerCode, clusterId and clusterName. The kinds are
listed in Event Rules.
Maintenance windows
| Method and path | Who | What |
|---|---|---|
GET /api/maintenance | any | Windows the account reaches, plus every window over the whole instance, latest start first. ?active=1 returns only the open ones (0 or 1; anything else is 400). |
POST /api/maintenance | manage | Opens a window. |
PUT /api/maintenance/{id} | manage | Replaces a window with the body sent. |
PATCH /api/maintenance/{id} | manage | Renames it, changes the note, or ends it at a given time. |
DELETE /api/maintenance/{id} | manage | Deletes the window. |
Every write needs a scope the account could open a window over: a customer it
reaches, a host at such a customer, or a cluster all of whose members are.
A window with scope all is for administrators. Both the scope a window had
and the one an edit gives it are checked. Maintenance Windows
explains what a window suppresses.
POST and PUT take the whole window:
| Field | Type | Notes |
|---|---|---|
name | string, 1–200 | Required. |
scopeType | all, customer, cluster, system | Required. |
scopeId | id or null | Required unless scopeType is all, where it is ignored. An unknown scope, or one at a customer the account does not reach, is 400 Unknown scope. |
startsAt | ISO 8601 time | Required. For a repeating window, the first occurrence. |
endsAt | ISO 8601 time | Required; after startsAt. |
note | string ≤ 2000, or null | Optional. |
recurrence | daily, weekly, monthly_date, monthly_weekday, or null | Optional. One occurrence may last at most a day (daily), a week (weekly) or 28 days (monthly). |
recurrenceUntil | ISO 8601 time or null | Optional; the last day an occurrence may start. Not before startsAt. |
timeZone | IANA zone, e.g. Europe/Berlin | Optional; the wall clock a repeating window keeps to. Defaults to the instance's time zone; ignored for a one-off window. |
PATCH takes any of name, note (null clears it) and endsAt. Setting
endsAt to now ends the window now; on a one-off window it must lie after
startsAt (400 otherwise). On a repeating window it ends only the open
occurrence; the next one opens as planned.
Every write answers with the window as the list shows it: id, name,
scopeType, scopeId, scopeName, startsAt and endsAt of the occurrence
that matters now (the open one, else the next), active, note, createdBy,
createdByName, recurrence, recurrenceUntil, firstStartsAt,
firstEndsAt and timeZone.
Alert rules
| Method and path | Who | What |
|---|---|---|
GET /api/alert-rules | any | Rules the account reaches, newest first, each with writable. Managers also see rules over the whole instance, read-only. |
POST /api/alert-rules | manage | Creates a rule. |
PATCH /api/alert-rules/{id} | manage | Changes any field, including enabled. |
DELETE /api/alert-rules/{id} | manage | Deletes the rule. |
| Field | Type | Notes |
|---|---|---|
name | string | Required on create. |
metricType | string | Required on create. GET /api/metric-types lists the candidates. |
condition | ABOVE, BELOW | Required on create. |
threshold | number | Required on create. |
durationSeconds | number ≥ 1 | Required on create; how long the condition must hold. |
systemId, customerId, clusterId | id or null | Optional scope. Customer and cluster may be combined and apply where they overlap. A rule with none of them covers the whole instance and needs admin. |
serviceName | string or null | Optional; narrows the rule to hosts running that service. |
enabled | boolean | PATCH only. |
A scope out of reach answers 400 Unknown scope. See
Alert Rules for how a rule is evaluated.
Event rules
| Method and path | Who | What |
|---|---|---|
GET /api/event-rules | any | Rules the account reaches; rules over the whole instance only for administrators. |
POST /api/event-rules | manage | Creates a rule. |
PATCH /api/event-rules/{id} | manage | Changes any field. |
DELETE /api/event-rules/{id} | manage | Deletes the rule. |
| Field | Type | Notes |
|---|---|---|
name | string, 1–200 | Required on create. |
minSeverity | info, warning, critical | Required on create. |
kinds | array of event kinds | Optional; empty means every kind. An unknown kind is 400. |
systemId, customerId, clusterId | id or null | At most one of them. None means the whole instance, which needs admin. |
enabled | boolean | Optional; default true. |
A scope out of reach answers 400 Unknown scope. See
Event Rules.
Metrics
Two different questions, two different sources. A chart wants the bucketed
history; a script asking "what is it now" usually wants the current values
that GET /api/systems/{id} and the live socket carry. Bucket values are
averages and must not be read as the current value.
| Method and path | Who | What |
|---|---|---|
GET /api/systems/{id}/metrics | any | One host's history, every series, bucketed. |
GET /api/customers/{id}/metrics | any | Selected metrics of a customer's hosts, bucketed. |
GET /api/metrics | any | Raw samples of one host. |
GET /api/metric-types | any | Metric types known to the catalogue or reported by a reachable host, with present. |
range (both bucketed endpoints) is one of:
range | Bucket | Source |
|---|---|---|
1h | 1 minute | raw samples |
6h (default) | 2 minutes | raw samples |
24h | 5 minutes | 5-minute rollup |
7d | 30 minutes | 5-minute rollup |
30d | 2 hours | 1-hour rollup |
90d | 6 hours | 1-hour rollup |
1y | 1 day | 1-hour rollup |
How far back each source reaches is set by the retention settings in Configuration.
GET /api/systems/{id}/metrics?range=24h answers
{ "success": true, "data": { "<series>": [ { "time": "…", "value": n }, … ] }, "range": "24h", "source": "metrics_5m" },
keyed by series (cpu, disk:/, disk:/mnt/data, …).
GET /api/customers/{id}/metrics additionally takes metrics, a
comma-separated list of 1–6 of cpu, memory, disk, network_in_rate,
network_out_rate, load_1m, load_5m (default cpu,memory,disk; disk is
the root mount). It answers range, source, systems (at most 60, those
needing attention first), truncated (whether more were left out) and
data keyed by metric, then by host id.
GET /api/metrics returns raw samples, newest first, grouped by metric
type:
| Parameter | Type | Notes |
|---|---|---|
systemId | id | Required. |
type | string | One exact metric type, e.g. disk:/. |
from | ISO 8601 time | Default 6 hours ago; unreadable is 400. |
to | ISO 8601 time | Optional; unreadable is 400. |
limit | integer | Default 100, at most 1000 — samples in total, across every type. |
Agents
| Method and path | Who | What |
|---|---|---|
GET /api/agents | any | The rollout mode, the targetVersion, and per host its agent version, update hold, rollout state and collector problems. |
PATCH /api/agents | manage | Sets the rollout mode or holds updates. |
GET /api/agents/server-url | admin | The address agents are told to move to. |
PUT /api/agents/server-url | admin | { "url": "https://…" } sets it; null or "" clears it. |
POST /api/agents/action-policies | permission actions.manage at the customer | { "scope": "customer" | "cluster" | "system", "scopeId": "…", "customerId": "…", "actions": ["patch", …] } sets the actions allowed for that customer's, cluster's or host's hosts whose file leaves them open; customerId is required for a cluster. Answers 409 while the gateway has GATEWAY_REMOTE_ACTIONS off. See Agent Settings. |
DELETE /api/agents/action-policies/{id} | permission actions.manage at the customer | Removes an entry; hosts only it reached are told to allow nothing. |
PATCH /api/agents body:
| Field | Type | Notes |
|---|---|---|
mode | all, staged | Instance-wide; admin only. |
hold | boolean | Holds (true) or releases (false) agent updates. |
systemIds | array of ids | Limits hold to these hosts; without it, hold applies to every host the account reaches. |
See Agent Rollout for what the modes and holds do.
Health
GET /api/health needs no authentication. It answers 200 with
{ "status": "ok", "timestamp": "…", "services": { "database": "ok", "redis": "ok" } },
and 503 with "status": "degraded" when either service fails. It does not
use the usual envelope.
Audit log
| Method and path | Who | What |
|---|---|---|
GET /api/audit-log | admin | One page of entries, newest first, with cursor and limit (up to 500). |
GET /api/audit-log/export | admin | Every matching entry as format=csv or format=json, streamed. |
Both take the same filters: customerId, actorId, targetType, targetId, action, outcome,
from, to and q. See Audit Log.
Other endpoints
- Instance settings and accounts —
/api/settings/*and/api/users/*accept a token and are for administrators;GET /api/settings/general(the instance time zone) is readable by everyone. - MCP —
POST /api/mcpis the endpoint for assistants speaking the Model Context Protocol and takes a token only; see MCP Server. - Profile and tokens —
/api/profile/*reads the session cookie only. A token cannot manage tokens; see API Tokens. - Used by the agent, not for scripting —
/api/webhook/metrics,/api/agent/inventory,/api/agent/ssh-keys,/api/agent/settings,/api/agent/version,/api/agent/config,/api/agent/downloadand the install scripts/api/agent/install.shand/api/agent/install.ps1serve the agent and its installer. They take the host's agent key or the agent's signed request, or nothing at all, and ignore a token. - Sign-in, setup and the alert evaluator —
/api/auth/*,/api/setupand/api/cron/evaluate-alertsserve the login screen, the first start and the cron container.
Examples
Set the base URL and the token once:
export SELVARA=https://selvara.example.com
export SELVARA_TOKEN=selv_…
Open disk alerts mentioning backup:
curl -s -H "Authorization: Bearer $SELVARA_TOKEN" \
"$SELVARA/api/alerts?status=ACTIVE&metric=disk&q=backup"
The next page of the same list, continuing after the last alert received:
curl -s -H "Authorization: Bearer $SELVARA_TOKEN" \
"$SELVARA/api/alerts?status=ACTIVE&metric=disk&q=backup&before=<nextCursor>"
Everything that changed since a moment, for a program catching up:
curl -s -H "Authorization: Bearer $SELVARA_TOKEN" \
"$SELVARA/api/alerts?since=2026-10-02T06:00:00Z&limit=200"
Acknowledge an alert:
curl -s -X PATCH -H "Authorization: Bearer $SELVARA_TOKEN" \
-H "Content-Type: application/json" \
-d '{"status":"ACKNOWLEDGED"}' \
"$SELVARA/api/alerts/<alertId>"
Open a maintenance window over one host for tonight:
curl -s -X POST -H "Authorization: Bearer $SELVARA_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Kernel update",
"scopeType": "system",
"scopeId": "<systemId>",
"startsAt": "2026-10-02T20:00:00Z",
"endsAt": "2026-10-02T22:00:00Z",
"note": "Reboot expected"
}' \
"$SELVARA/api/maintenance"
The response's data.id is the window's id. Move it an hour later — PUT
replaces the whole window, so every field is sent again:
curl -s -X PUT -H "Authorization: Bearer $SELVARA_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Kernel update",
"scopeType": "system",
"scopeId": "<systemId>",
"startsAt": "2026-10-02T21:00:00Z",
"endsAt": "2026-10-02T23:00:00Z",
"note": "Reboot expected"
}' \
"$SELVARA/api/maintenance/<windowId>"
The work finished early — end the window now:
curl -s -X PATCH -H "Authorization: Bearer $SELVARA_TOKEN" \
-H "Content-Type: application/json" \
-d "{\"endsAt\":\"$(date -u +%Y-%m-%dT%H:%M:%SZ)\"}" \
"$SELVARA/api/maintenance/<windowId>"