Admin API¶
The console offers a REST API under <LIMDM_PUBLIC_URL>/api/v1/ for scripts, ticket systems
and other integrations. It runs on the console listener and uses the same functions as the
console: the same role rules, device scopes, tenant limits, four eyes approval, validation
and audit entries. The OpenAPI 3.1 description is served at /api/v1/openapi.json (no token
needed) and lives in the repository as
internal/server/openapi.json. /api/v1/docs shows it as
an interactive reference (Swagger UI) on the console itself, linked as API reference in
the user menu.
Trying it out¶
/api/v1/docs is public like openapi.json: the page holds no data. Every call it sends is
a real request to this server and passes the same checks as any other API call: role, token
scopes, device scope, tenant, four eyes approval and audit rules are unchanged. Start with
GET calls; operations that act on devices or delete data say Warning in their
description.
- With a token: create a token (see Tokens, an
auditortoken with thereadscope is enough to explore), click Authorize, paste it intobearerand apply. Open an operation, Try it out, Execute. The page keeps the token in memory only: reloading or closing it forgets the token. - With the console session: opened while signed in to the console, the header says
so and calls without an authorized token use the session cookie, under your own role and
scope. The page reads the session's CSRF token from
GET /api/v1/meand sends it asX-CSRF-Tokenon state changes, as the console app does. An authorized token always wins over the session. - The server list holds
/, so calls go to the origin the page was opened on. - Swagger UI renders the tags in view only; a deep link such as
/api/v1/docs#/Devices/listDevicesopens one operation.
Swagger UI is vendored into the server (scripts/vendor-swagger-ui.sh, see
Swagger UI); the page loads nothing from other hosts and
its online validator is off. It runs under the console CSP with one addition for this page
only, img-src 'self' data: blob: (Tenants).