Endpoints¶
| Method and path | Level | Request | Answer |
|---|---|---|---|
GET /api/v1/devices |
read | filters, limit, cursor |
200 page of devices (id, hostname, os, agent_version, blueprint, tags, status, failing, checks, last_seen, retired) |
GET /api/v1/devices/{id} |
read | 200 device with blueprint_id, enrolled_at and inventory |
|
PATCH /api/v1/devices/{id} |
admin | {"tags": [...], "blueprint_id": 3, "users": [{"username", "email", "admin"}], "primary_user": "jane@example.com"}; fields left out stay, null assigns default, "" clears the primary user |
200 device; audited as device.assign |
GET /api/v1/devices/{id}/commands |
read | limit, cursor |
200 page of commands, newest first |
POST /api/v1/devices/{id}/commands |
helpdesk | {"type", "params"}, see Commands |
202 command or 202 approval request |
GET /api/v1/commands/{id} |
read | 200 command: id, device_id, type, status, output, created_by, created_at, updated_at |
|
GET /api/v1/library-items |
read | limit, cursor |
200 page of items (id, name, type, description, payload) |
POST /api/v1/library-items |
admin | item without id |
201 item; audited as library.save; 202 approval request for root effective types while four eyes approval is on |
GET /api/v1/library-items/{id} |
read | 200 item |
|
PUT /api/v1/library-items/{id} |
admin | full item | 200 item; audited as library.save; 202 approval request as for POST |
DELETE /api/v1/library-items/{id} |
admin | 204; 409 while a blueprint uses it; audited as library.delete |
|
GET /api/v1/blueprints |
read | limit, cursor |
200 page of blueprints (id, name, description, parent_id, tree, updated_at) |
POST /api/v1/blueprints |
admin | {"name", "description", "parent_id", "tree"} |
201 blueprint; audited as blueprint.save |
GET /api/v1/blueprints/{id} |
read | 200 blueprint |
|
PUT /api/v1/blueprints/{id} |
admin | full blueprint | 200 blueprint; audited as blueprint.save |
DELETE /api/v1/blueprints/{id} |
admin | 204; its devices fall back to default; audited as blueprint.delete |
|
GET /api/v1/tags |
read | 200 {"items": [{"name", "devices"}]}, tags of active devices |
|
GET /api/v1/audit |
audit | q, actor, action, target, from, to, limit, cursor |
200 page of entries (id, at, actor, action, target, detail, prev, hash, tenant_id), newest first |
GET /api/v1/approvals |
read | status, limit, cursor |
200 page of approval requests (id, action, target, payload, reason, requested_by, status, decided_by, decided_at, created_at, expires_at), newest first; helpdesk tokens see their own |
GET /api/v1/approvals/{id} |
read | 200 approval request |
|
POST /api/v1/approvals/{id}/approve, .../reject |
admin | optional {"reason"} (up to 500 characters; a console session must give one to reject, 422 otherwise) |
200 approval request with decision_reason (and credentials of an approved local account or token); 409 for an own, decided or expired request; audited as approval.approve or approval.reject with the reason |
GET /api/v1/exceptions |
read | 200 {"items": [...]} risk exceptions with state |
|
POST /api/v1/exceptions |
admin | {"check_id", "mode", "tag", "reason", "owner", "approver", "expires": "YYYY-MM-DD"} |
201 {"id"}; audited as exception.add; with four eyes approval on 202 {"approval_id"} (the approving admin becomes the approver) |
DELETE /api/v1/exceptions/{id} |
admin | 204; audited as exception.revoke |
|
GET /api/v1/compliance |
read | 200 device states, every reported check with pass, fail, n/a and exception counts, framework controls; titles in the caller's language |
|
GET /api/v1/compliance/checks/{id} |
read | 200 one check with the result of each device in scope (failing first, at most 500) |
|
GET /api/v1/compliance/heatmap?group=blueprint\|tenant |
read | 200 passed and failed results per check area and blueprint or tenant |
|
GET /api/v1/compliance/history?at=YYYY-MM-DD&device=ID |
read | 200 state at the end of that day, per device or for one device with its changes |
|
GET /api/v1/compliance/policies |
read | 200 compliance policies and custom checks of the library with the blueprints using them |
|
GET /api/v1/exports/{kind} |
audit | the console export (compliance.csv, compliance-history.csv, exceptions.csv, inventory.csv, packages.csv, audit.csv, audit.jsonl, evidence.json, evidence.pdf with days 1..365, default 90; the audit exports take the filters of /api/v1/audit), audited as export and export.done with the SHA-256; the evidence exports also as evidence.sign |
|
POST /api/v1/exception-requests |
helpdesk | {"check_id", "mode", "tag", "reason", "owner", "expires"} |
202 {"approval_id"}; a four eyes request (exception.add) another admin approves |
GET /api/v1/tokens |
audit | 200 {"items": [...]} tokens without secrets |
|
POST /api/v1/tokens |
admin | {"name", "role", "days", "read_only", "scope_tags", "scopes"} |
201 token with token (the secret, shown once); audited as api_token.create |
DELETE /api/v1/tokens/{id} |
admin | 204; audited as api_token.revoke |
|
GET /api/v1/tenants |
admin, global token | 200 {"items": [...]} tenants with device counts; 404 without multi tenancy |
|
POST /api/v1/tenants |
admin, global token | {"name"} |
201 {"id"}; 409 name taken; audited as tenant.add |
GET /api/v1/devices/{id}/detail |
read | 200 everything the device page shows: inventory, check results, declaration states, resolved chain, protective actions, recovery key metadata, network certificates, catalog state and app requests, 7 day metrics, and switches for the actions (shell, four eyes) |
|
GET /api/v1/devices/{id}/packages |
read | 200 {"items": [{"name", "version", "arch"}]} |
|
GET /api/v1/devices/{id}/timeline |
read | kind, limit, cursor |
200 page of events, commands, script results, shell sessions (helpdesk: its own), diagnostics bundles (admin, helpdesk), compliance check changes and audit entries about the device (audit permission; reading them is audited like /api/v1/audit), newest first |
GET /api/v1/devices/{id}/diagnostics/{cid} |
helpdesk | 200 text attachment; audited as device.diagnostics.download |
|
POST /api/v1/devices/{id}/retire |
admin | 200 device; audited as device.retire |
|
DELETE /api/v1/devices/{id} |
admin | confirm (the host name) |
204; 409 unless retired; audited as device.delete |
POST /api/v1/devices/{id}/agent-update |
admin | {"version"} (empty: newest approved) |
202; audited as agent_update.request |
POST /api/v1/devices/{id}/recovery-keys/{uuid}/view |
helpdesk | {"reason"} |
200 {"key", "rotate", ...}; with four eyes for recovery keys state reason, requested or pending instead of the key; audited as recovery.view |
POST /api/v1/devices/{id}/shell |
helpdesk, console session | {"user"} |
201 {"id"}, the terminal connects to /shell/{id}/ws?csrf=; 202 waits for approval; audited as shell.start |
GET /api/v1/devices/{id}/shell-sessions, GET /api/v1/shell-sessions/{sid} |
read | sessions; the transcript (plain text) for admins and auditors after the end | |
GET /api/v1/shell-sessions/{sid}/transcript |
audit | 200 raw recorded bytes of an ended session (application/octet-stream, .log), audited read; 409 while it runs |
|
POST /api/v1/shell-sessions/{sid}/end |
helpdesk | 204; the user who started it or an admin |
|
POST /api/v1/devices/bulk |
helpdesk | {"ids": [...], "action": "command:sync", "params": {...}}; actions command:<type> (not lost, wipe), agent-update, tag-add, tag-remove (admin) |
202 {"status": "queued"} or {"status": "approval", "approvals": n} |
GET /api/v1/devices/catalog-apps |
read | 200 enabled catalog apps (id, name) for bulk install and removal |
|
GET /api/v1/devices/primary-users |
admin | q |
200 up to 20 directory email addresses, 120 searches a minute. The directory is installation wide: an account bound to a tenant or a device scope sees, and may set as primary user, only people who already are the primary user of a device in its tenant and scope (the console device page applies the same rule) |
GET /api/v1/enrollment-tokens |
read | 200 active tokens with agent_url, public_url, fingerprint, release_repo for the install command and enroll.conf |
|
POST /api/v1/enrollment-tokens |
admin | {"note", "blueprint_id", "uses", "days"} |
201 {"id", "token"} (shown once); audited as token.create |
DELETE /api/v1/enrollment-tokens/{id} |
admin | 204; audited as token.revoke |
|
GET /api/v1/devices/facets |
read | filters | 200 counts per status, OS, agent, blueprint and tag |
GET /api/v1/me |
read | 200 the caller: login, role, tenant, super, scope, scopes, permissions (read, audit, commands, admin, tenants), four_eyes, locale, company_name, accent, and for sessions csrf_token |
|
GET /api/v1/events/stream |
read | server sent events, see Console app | |
GET /api/v1/views |
read | list |
200 own and shared saved views |
POST /api/v1/views |
self | {"list", "name", "query", "sort", "columns", "shared"} |
201 view; only admins share; shared views are audited as view.save |
PUT /api/v1/views/{id}, DELETE /api/v1/views/{id} |
self | 200 view or 204; own views, admins also delete shared ones (view.delete) |
|
GET /api/v1/schemas, GET /api/v1/schemas/{type} |
read | lang (de, en) |
declaration types with title, description, documentation link and four_eyes; JSON Schema (draft 2020-12) of a payload, derived from the Go types, with titles, help texts, sections, choices, widgets and limits per field |
GET /api/v1/config/blueprints |
read | 200 blueprints with devices, devices by status, items, assignment sources (devices, directory groups, default), inherited, read_only, a running pilot, plus deleted blueprints and the rule_fields of conditions |
|
GET /api/v1/config/library |
read | 200 library items (network secrets masked) with used_by, invalid signature, read_only, plus deleted items |
|
POST /api/v1/config/library/preview, POST /api/v1/config/blueprints/preview |
admin | item or blueprint as for a save (with id for an existing one) |
200 review: line diff to the stored version, devices (online, offline, by status, sample), needs_approval, expected impact (compliance level, excluded or advisory checks, items added or removed); nothing is saved |
GET /api/v1/config/library/template |
admin, no device scope | type, or device with file or remote and inst, mode (edit, disable, enable) |
200 start of a new library item (type, name, description, payload): the example payload of the type, or a sources or Flatpak item from what the device (in scope) reported; nothing is saved |
GET /api/v1/config/{kind}/{id}/versions |
read, not device scoped | kind is blueprints or library |
200 versions newest first with the text diffs compare, exists |
POST /api/v1/config/{kind}/{id}/rollback |
admin, not device scoped | {"version"} |
200 saved as the newest version or restored; 202 approval request for root effective items; audited as library.rollback, blueprint.rollback |
POST /api/v1/config/blueprints/{id}/pilot |
admin, not device scoped | {"tree", "devices"} |
201 pilot: the changed map goes into a copy <name>.pilot set on these devices of the blueprint; audited as blueprint.pilot |
POST /api/v1/config/blueprints/{id}/pilot/{op} |
admin, not device scoped | op promote or abort |
200; promote saves the pilot map as a new version, both put the devices back and delete the copy; audited as blueprint.pilot_end |
GET /api/v1/software/catalog, .../requests, .../remotes, .../settings |
audit, global accounts | 200 catalog apps with installs and Flatpaks to take over; app requests; managed and found remotes; store settings |
|
POST /api/v1/software/apps, PUT/DELETE /api/v1/software/apps/{id} |
admin, global accounts | catalog app with sources, scope, icon (PNG, base64) |
200, 204; 202 approval request for a required app with four eyes; audited as catalog.save, catalog.delete |
POST /api/v1/software/flathub, GET /api/v1/software/flathub/search |
admin / audit | {"id", "mode"}, q |
add a Flathub app (201, 202), search Flathub through the server |
POST /api/v1/software/import |
admin | {"flatpaks"} |
200 Flatpaks of the fleet taken into the catalog |
POST /api/v1/software/requests/{id}/{op} |
admin | op approve, approve-all, deny; optional {"install": true} for approve and approve-all (the agent installs the app at once, else the user installs it) |
200; audited as catalog.request.<op>, an approval with install as catalog.request.approve+install |
PUT /api/v1/software/remotes/{name}, POST /api/v1/software/remotes/{name}/{op} |
admin | remote; op allow, block, filter, unmanage |
200; audited as catalog.remote |
PUT /api/v1/software/settings |
admin | {"restrict_flathub", "stores_read_only", "only_managed_remotes"} |
200; audited as catalog.settings |
GET /api/v1/packages |
audit, not device scoped | 200 uploads of the tenant with usage and snippet, limits, quota use |
|
POST /api/v1/packages |
admin, not device scoped | multipart: name, version, kind, reason, file (up to the upload limit) |
201 uploaded, or pending with four eyes; audited as artifact.upload |
DELETE /api/v1/packages/{id} |
admin, not device scoped | 204; 409 while a library item uses it; audited as artifact.delete |
|
PUT /api/v1/packages/settings |
admin, global accounts | {"max_upload_mb", "quota_mb", "quota_count", "store", "s3"} |
200; an empty S3 secret keeps the stored one; audited as artifact.settings |
GET /api/v1/stats/fleet |
read | 200 devices per status, online, agent versions, OS, one fleet grid cell per device |
|
GET /api/v1/stats/compliance |
read | days (1 to 400, default 30) |
200 score, frameworks, most failing checks, daily history (global view only) |
GET /api/v1/stats/attention |
read | 200 pending approvals, failed and sent commands of 24 hours, non compliant and stale devices, exceptions expiring in 7 days, last backup (global view, admin and auditor) |
|
GET /api/v1/stats/tenants |
admin, super admin in the all tenants view | 200 per tenant: devices, compliant, non compliant, stale, pending, score, pending approvals; 404 without multi tenancy |
|
GET /api/v1/stats/commands |
read | days (1 to 90, default 14) |
200 failed and all commands per day, devices in scope |
GET /api/v1/onboarding |
read | 200 first steps of a new installation (admins in the global view until done), else empty |
|
GET /api/v1/commands |
read | status, days (1 to 90, default 7), limit, cursor |
200 commands of every device in scope with host name, newest first, never the payload |
GET /api/v1/activity |
read | kind, category, q, actor, action, target, from, to, limit, cursor |
200 audit log (admins and auditors, audited as a read like /api/v1/audit) and device events (device scope) as one stream, newest first |
GET /api/v1/activity/histogram |
read | the filters of /api/v1/activity |
200 counts per day and category, default the last 30 days, at most 400 |
GET /api/v1/audit/status, POST /api/v1/audit/verify |
audit | 200 first broken entry (0 = intact), last full verification, keyed from, known actions; verify checks the whole chain now (audited as audit.verify) |
|
GET /api/v1/stats/updates |
read | days (1 to 400, default 30) |
200 devices with pending security updates (from the detail of the check updates.security), their sum, devices failing it for more than 14 days, devices on the newest approved agent release (else the newest reported); daily history in the global view |
GET /api/v1/update-rings |
read | 200 update rings of the tenant view with wave, pause, approval and devices (by their last check in), the newest 20 waves, devices in no ring; see Patch management |
|
POST /api/v1/update-rings, PUT /api/v1/update-rings/{id} |
admin | {"name", "position", "deferral_days", "wave_days", "require_approval", "all_devices", "tags", "groups", "blueprints"} |
200 the ring; 422 names the field; audited as update_ring.save |
DELETE /api/v1/update-rings/{id}, POST /api/v1/update-rings/{id}/{action} |
admin | action pause, resume, approve |
204 or the ring; audited as update_ring.delete and update_ring.<action> |
POST /api/v1/update-waves |
admin | 201 the new wave of the caller's tenant (the default tenant in the global view); 409 without rings; audited as update_wave.start |
|
GET /api/v1/devices/{id}/updates |
read | 200 ring, pending updates with versions, security flag, severity and CVEs, last run per source, CVEs matched from the Debian and Ubuntu data (vulnerabilities) |
|
GET /api/v1/devices/{id}/workloads |
read | 200 containers and VMs of the device, tool versions, read errors, when the inventory last changed, the last check in (checked_at), and control (policy allows actions, caller may send them, four eyes for stop and restart); see Containers and VMs |
|
GET /api/v1/workloads |
read | kind, state, image |
200 containers and VMs of the fleet in the caller's scope with device and host name, at most 2000 |
GET /api/v1/updates/fleet |
read | cve |
200 devices with security and pending updates, open CVEs with severity and devices, pending updates per package; with cve the devices it affects |
GET /api/v1/updates/package-versions |
read | name |
200 installed versions of the package with device counts |
GET /api/v1/updates/cve-feeds |
read | 200 Debian, Ubuntu, Arch and Alpine security data: any feed on, import running, per feed on or off, URL, last import, entries, bytes, last error; see Patch management |
|
POST /api/v1/updates/cve-feeds/refresh |
admin of the whole installation | 202, the switched on feeds are imported in the background; 409 while every feed is off or an import runs; audited as cve_feeds.refresh |
|
GET /api/v1/vulnerabilities |
read | q, severity, status (active by default, all), device, os, package, from, to, kev=true, sort (cvss, first_detected, devices, severity, cve, - descending), limit, cursor, format=csv |
200 one row per CVE of the devices in scope: severity, CVSS, KEV, packages, first detected, devices, status, total, next_cursor; CSV up to 10000 rows; see Vulnerabilities |
GET /api/v1/vulnerabilities/summary |
read | 200 active CVEs per severity, findings per status, top packages, OS and devices with findings, whether CVE data is on |
|
GET /api/v1/vulnerabilities/{cve} |
read | 200 severity, CVSS and vector, KEV entry, packages with installed and fixed versions, devices, sources, references, risk acceptances; 404 when no device in scope has it |
|
POST /api/v1/vulnerabilities/{cve}/accept |
admin | 201 risk acceptance with reason, expires (last day, within a year), optional device_id and package (a tag scoped admin needs device_id); audited as vulnerability.accept |
|
POST /api/v1/vulnerabilities/{cve}/reopen |
admin | 204 revokes the active acceptances of the CVE (or acceptance_id); 404 when none; audited as vulnerability.reopen |
|
GET /api/v1/logs |
read | q (query language), from, to (RFC 3339, default the last hour), device, limit (1 to 1000), cursor |
200 log lines newest first, next_cursor; admins and auditors, the helpdesk only with device when Settings, Logs allows it; see Logs |
GET /api/v1/logs/histogram |
read | as /logs |
200 lines per time bucket and priority |
GET /api/v1/logs/facets |
read | as /logs |
200 most frequent units, containers and files |
GET /api/v1/logs/context |
read | id, n |
200 lines before and after a line on the same device |
GET /api/v1/logs/export |
read | as /logs, format (ndjson, csv) |
200 at most 100000 lines; audited as logs.export |
GET /api/v1/logs/status |
audit | 200 partitions, store size, disk guard, archive keys, archived days, restores, usage today (global accounts) |
|
POST /api/v1/logs/keys/rotate |
admin | 200 new archive data key per tenant; audited as logs.key_rotate |
|
POST /api/v1/logs/archive/run |
admin | 202 archives finished days in the background; audited as logs.archive_run |
|
POST /api/v1/logs/archive/restore |
admin | 200 loads an archived day (optional tenant_id) back into the search; audited as logs.restore |
|
GET, POST /api/v1/logs/alerts, PUT, DELETE /api/v1/logs/alerts/{id}, POST /api/v1/logs/alerts/{id}/test |
audit (read), admin | alert rules (query, threshold, window, severity); audited as logs.alert_save and logs.alert_delete |
|
GET /api/v1/stats/annotations |
audit | days |
200 key rotations, approved agent releases, blueprint changes and failed backups per day, for the history charts |
GET /api/v1/report-schedules |
audit | 200 own schedules (admins: all of the tenant view) and the channels a schedule may use |
|
POST /api/v1/report-schedules |
admin or auditor person, not a token | {"view_id", "cadence", "channels", "emails"} |
200 schedule of a saved report (list reports); audited as report.schedule; see Scheduled reports |
DELETE /api/v1/report-schedules/{id}, POST .../{id}/run, GET .../{id}/runs |
owner, or admin of the tenant view | 204, the new run, or the kept runs; audited as report.unschedule and report.run |
|
GET /api/v1/report-runs/{id} |
audit | the file of a run: its owner, or admins and auditors without a device scope in the same or the all tenants view; audited as report.download |
|
GET /api/v1/openapi.json |
none | the OpenAPI document | |
GET /api/v1/docs |
none | the interactive reference (Swagger UI), see Trying it out | |
GET /metrics |
metrics | Prometheus text format, see Metrics |
Device filters¶
q (text in host name, OS, id, blueprint, tags), status (compliant, in grace,
non-compliant, stale, pending, retired), tag, app, flatpak, remote,
blueprint, agent, failing (check id) and pkg. All given filters apply together;
a value above 200 characters or an unknown status is answered with 400, never with the
unfiltered fleet. pkg is a package name with an optional version
comparison:
curl -G -H "Authorization: Bearer $LIMDM_TOKEN" https://mdm.example.com/api/v1/devices \
--data-urlencode 'pkg=openssl < 3.0.13' --data-urlencode 'status=compliant'
Versions compare by their runs of digits; the epoch is ignored, letters and the Debian ~
ordering are not evaluated.
Query language¶
filter holds free words and key:value terms (key:"value with spaces"); every term
must match. Free words search host name, OS, id, blueprint and tags. Keys of devices:
status (compliant, in-grace, non-compliant, stale, pending, retired, and
locked: locked by the compliance policy or a lock command), os (part of the name),
kind (desktop or server), tag, blueprint, agent, check (id of a failing check), pkg (as
above, pkg:openssl<3.0.13), app, flatpak, remote and seen (>7d last check in
older than, <2h newer than; m, h, d). At most 20 terms of 200 characters; an
unknown key or value is a 400. sort takes hostname, os, agent, failing or
last_seen.
The console speaks German, so the German names of the prototype work as well and mean
the same: keys zustand (status), system and betriebssystem (os), art (kind),
schlagwort (tag), pruefung (check), paket (pkg), quelle (remote), zuletzt and
gesehen (seen) and offline (offline:7d is seen:>7d); status values konform,
nicht-konform, in-karenz (or karenz), veraltet and offline (stale),
ausstehend, ausgemustert and gesperrt (locked); kind values arbeitsplatz, laptop,
notebook (desktop) and server. Saved views keep the text as typed.
GET /api/v1/devices/facets takes the same filters and answers
{"total", "facets": {"status", "os", "agent", "blueprint", "tag"}, "keys"} with at most 25
values per facet and the keys with a help text for the query bar.
curl -G -H "Authorization: Bearer $LIMDM_TOKEN" https://mdm.example.com/api/v1/devices \
--data-urlencode 'filter=status:non-compliant os:"Ubuntu 24" seen:<1d' --data-urlencode 'sort=-last_seen'
Console app¶
The console app (/app/) uses this API with the console session instead of a token. A
request with the session cookie and without Authorization is checked like a console
page: the session must be valid, Sec-Fetch-Site (when sent) must be same-origin, Origin
(when sent) must be LIMDM_PUBLIC_URL, and every request other than GET, HEAD and
OPTIONS must carry the session's CSRF token (csrf_token of GET /api/v1/me) in
X-CSRF-Token. The session acts under its login with its role, tenant and device scope,
600 requests a minute; audit entries name the login, not a token.
Access levels beyond a route's own (audit entries in the event stream, sharing a view)
check role and token scopes together, so a token limited to read never receives audit
data.
GET /api/v1/events/stream sends server sent events, each limited to the caller's tenant
and device scope: device (a check in: id, hostname, status, last_seen),
activity (new audit entries: id, at, actor, action, target; admin and auditor
with the audit scope; opening such a stream is an audited read of the audit log) and
inbox (pending approvals, when the number changes). A stream ends after four minutes and
the browser reconnects; each caller may hold five streams.
Settings and administration¶
The settings area of the console app calls these endpoints, and every guard holds for API tokens too:
GET /api/v1/settingsandPATCH /api/v1/settings/{section}(global admins; auditors read). A section saves only its own fields; left out fields keep their value. Secrets (OIDC client secret, logo bytes) are never returned;oidc_client_secretsets one,clear_secretremoves it. The lockout guards of the console apply (own address, local login only off with an OIDC admin, four eyes approval needs two admins)./api/v1/users: add (local accounts answer their credentials once), change role, state and scope, reset local credentials. Self demotion is refused, the last admin stays, admin changes wait for approval (202with the approval) while four eyes approval is on./api/v1/tenants/{id}(name, state, branding),/api/v1/tenants/shared,POST /api/v1/tenants/switch(super admin sessions, audited astenant.switch)./api/v1/keys,/api/v1/backup(targets, schedules with a preview, runs, verify),/api/v1/notification-channels,/api/v1/directory,/api/v1/network,/api/v1/agentsand the own/api/v1/profile(console sessions only).
Global pages (settings, keys, backup, directory, agents) refuse tenant accounts and accounts with a device scope.
Audit filters¶
q searches actor, action, target and detail; actor is a part of the actor; action a
prefix (api. finds every API entry); target an exact target; from and to are dates
(YYYY-MM-DD, both inclusive).
Commands¶
The body names a console command type and the fields of the console form. Params are
strings, numbers or booleans; true is sent as a checked box.
{"type": "reboot", "params": {"minutes": 5}}
{"type": "message", "params": {"title": "Maintenance", "text": "Please save your work."}}
{"type": "wipe", "params": {"confirm": "pc-042", "reason": "stolen, ticket 4711"}}
{"type": "user_create", "params": {"username": "anna", "full_name": "Anna", "password": "...", "admin": false}}
| Types | Roles |
|---|---|
sync, update, reboot, shutdown, lock, unlock, message, user_password, user_lock, user_unlock, diagnostics |
admin, helpdesk |
script, lost, found, wipe, allow_uninstall, app_install, app_remove, user_create, user_admin, user_delete, software_remove, package_hold, package_downgrade, firewall_remove_rule |
admin |
workload_action |
admin; helpdesk when Settings, Approvals allow it |
Fields: minutes (reboot, shutdown: 0 to 1440, default 1), confirm and message (lost,
wipe: confirm is the host name), title and text (message), payload (script), app
(app_install, app_remove), username, full_name, password, admin, keep_home (user
commands), kind, name, installation (software_remove), name and release (package_hold),
name and version (package_downgrade, see Patch management), kind, id and
action (workload_action: a workload of the device's last inventory, 409 when the device's policy
does not allow it and while another action for the same workload or 5 actions in all wait for the
device, see Containers and VMs), rule_id and
confirm_risk (firewall_remove_rule, see Firewall inventory), reason (shown with an
approval request, up to 500 characters). A type the token's role may not send answers 403
and is audited as api.denied; other rule violations answer 422. A retired device answers
409. sync is accepted once per device and 30 seconds, whoever sends it; a second one within
that time answers 429 with Retry-After (bulk sends are not limited).
The answer is 202 with the command and Location: /api/v1/commands/{id}. Send an
Idempotency-Key header (up to 255 printable characters) to make a retry after a timeout
safe: within 24 hours the same token and key get the first answer again
(Idempotent-Replayed: true) instead of a second command; the key with another request
answers 422, while the first is still running 409. Poll
GET /api/v1/commands/{id} until status is ok, failed or expired (pending and
sent are still open; commands expire after 7 days). The payload is never returned, since
it can hold a password.
With four eyes approval on (Settings, Security), wipe, lost mode, scripts, package downgrades and firewall rule removals do not run:
the answer is 202 with {"approval_id": 12, "status": "pending"} (ApprovalPending in the
OpenAPI document, Location: /api/v1/approvals/{id}) instead of a command, and another
admin decides under Approvals in the console (params.reason is shown there) or through
POST /api/v1/approvals/{id}/approve. Neither the requesting token nor the person who created
it can approve; once approved, the command is queued with the token as creator.
Firewall inventory¶
GET /api/v1/devices/{id}/firewall (read, device scope) returns the latest firewall
inventory the agent reported: backend (ufw, firewalld, nftables, iptables), active,
policy (in, out, forward) and rules, each with origin managed (added by LiMDM),
foreign or system (Docker, Podman, libvirt, Kubernetes, NetBird, Tailscale, ZeroTier, wg-quick, fail2ban, CrowdSec,
and rules on addresses of the local container bridges in bridge_nets), its fields,
the raw text, risk (ssh or server), kept (listed in keep of the device's firewall
declaration) and adopt_error when it cannot be adopted.
POST /api/v1/devices/{id}/firewall/rules/{rid}/adopt, .../keep and .../remove (admins;
remove adds the rule to the item's remove list, a rule with a risk needs
"confirm_risk": true, and with four eyes approval on the save answers 202 with the
approval or, for a new item, 409) take
{"item_id": 12} or {"name": "Adopted rules", "blueprint_id": 4, "confirm": true}. Adopt
adds the rule to that com.limdm.firewall item in the declaration format, keep adds its
match to keep. An existing item is a normal library save (validation, signature,
version, audit, four eyes). A new item (enforce off) is created and assigned in
blueprint_id in one transaction with both versions and audit entries, so nothing is left
behind when the assignment fails. GET /api/v1/devices/{id}/firewall/targets lists the
blueprints the caller may pick with the devices each reaches (devices, global_default,
device): tenant accounts only those of their tenant, never the global default. A blueprint
that is the global default or reaches more than one device answers 422 on confirm
without "confirm": true. Every adopt, keep and remove adds an audit entry firewall.adopt,
firewall.keep or firewall.remove on the device.
firewall_remove_rule (command, admins, four eyes) deletes one foreign rule on the device:
{"type": "firewall_remove_rule", "params": {"rule_id": "3f2a9c1d7e4b5a60"}}. System and
managed rules answer 422; a rule with a risk needs "confirm_risk": true. The agent
reads the firewall again and refuses the rule when it changed meanwhile. With nftables and
iptables this changes the running ruleset only; the console's Discard writes a remove list
entry instead, which outlasts a reboot.
Library items and blueprints¶
Library items take name, type, description and payload like the console editor and
are validated and signed the same way. Every save creates a version like a console save.
Answers mask network secrets; a PUT that sends the mask back keeps them. A certificate
item takes its certificates in the payload (the PEM upload is a console feature).
Blueprints take name, description, parent_id and tree (the JSON of the blueprint
editor). Deleting a library item a blueprint uses answers 409. The default blueprint
cannot be renamed (404) or deleted (409), and never inherits.
GET and every save of a single item or blueprint answer with an ETag. Send it back as
If-Match with a PUT: when the object changed since (another automation or the console),
the answer is 412 with the current ETag and nothing is saved. The comparison locks the row
in the transaction of the save, so two writers with the same ETag cannot both win. A PUT
without If-Match replaces as before.