REST API
Dette indhold er ikke tilgængeligt i dit sprog endnu.
Adminium exposes a REST API at /api/v1. The dashboard is built on it: there is
no private API the UI uses and you cannot.
Versioning
Section titled “Versioning”/api/v1 is additive-only. New fields and new routes may appear; existing
ones do not change shape or disappear. A breaking change would ship as
/api/v2, side by side.
Authentication
Section titled “Authentication”Two mechanisms:
| Used by | Sends | |
|---|---|---|
| Session cookie | The dashboard | adminium_session — httpOnly, signed, SameSite=Lax |
| API key | Your scripts and integrations | Authorization: Bearer <key> |
API keys are scoped and revocable. Create them in Settings → API Keys. Issue one per integration, never share one between two, and revoke on rotation.
curl -H "Authorization: Bearer $ADMINIUM_API_KEY" \ https://admin.example.com/api/v1/system/infoEvery request is authorized against the caller’s role. An API key cannot do what its role cannot do — the RBAC check is the same one the UI goes through.
Health
Section titled “Health”GET /api/v1/healthzReturns JSON with ok. Check the body, not just the status code — bare
/healthz has no route and is answered by the SPA history fallback with a 200,
so a probe there reports healthy even when the meta store is unreachable.
GET /api/v1/readyzReadiness, as opposed to /healthz’s liveness: can this process serve a real
request right now? It reports per-dependency verdicts — most importantly
whether the meta store is reachable — and answers 503 when it is not. Point
load-balancer and orchestrator readiness gates here, not at /healthz. (The
Docker image’s own HEALTHCHECK deliberately probes /api/v1/healthz instead:
restarting the container cannot reconnect a dead meta database, so a database
blip must not become a crash-loop.)
GET /api/v1/system/infoVersion and instance information.
The machine-readable spec
Section titled “The machine-readable spec”The full contract is published as OpenAPI 3.1, generated from the route tree
itself — every /api/v1 route declares a Zod schema and the server refuses to
boot without one, so the spec is derived from the code that enforces it rather
than written alongside it. CI fails when the two disagree.
https://docs.adminium.dev/openapi.jsonPoint a client generator, Postman, Insomnia, or an editor’s OpenAPI extension at it. Request and response shapes, query parameters, enums and status codes are all in there; the sections below are the map, not the territory.
Route groups
Section titled “Route groups”Thirty-one namespaces. Counts are operations, not paths.
| Group | Ops | |
|---|---|---|
/api/v1/about/* |
2 | Build version, edition, and the update check |
/api/v1/add-ons/* |
17 | Installed add-ons — list what a host should mount, preview what installing would do, install from a verified package, enable or disable per host, and uninstall |
/api/v1/api-keys/* |
3 | Issue, list and revoke API keys |
/api/v1/audit/* |
2 | The audit log — list and read single entries |
/api/v1/auth/* |
12 | Login, logout, session listing, 2FA enrolment, password change and reset |
/api/v1/bootstrap |
1 | Everything the dashboard needs on first paint, in one call |
/api/v1/branding/* |
4 | Instance name, colours and logo (read is public; writes are admin) |
/api/v1/connections/* |
17 | Databases Adminium is pointed at — CRUD, connection test, introspection, schema snapshots, diffs, overrides, and generation |
/api/v1/data/* |
8 | Rows in your database — list, read, create, update, delete, bulk write, undo, and inbound references |
/api/v1/email-templates/* |
4 | Transactional email bodies per locale, plus a test send |
/api/v1/events |
1 | Server-sent events — the fallback when a WebSocket cannot be established |
/api/v1/exports/* |
4 | Queued exports of a whole result set, and their downloads |
/api/v1/healthz |
1 | Liveness |
/api/v1/i18n/* |
13 | Runtime translations — locales, keys, bundles, import/export, format errors |
/api/v1/imports/* |
6 | CSV/spreadsheet imports — upload, dry run, run, error report |
/api/v1/jobs/* |
4 | Background jobs — enqueue, poll, cancel |
/api/v1/llm/* |
13 | LLM assist — provider config, runs, prompts, diffs, apply, undo |
/api/v1/me/* |
11 | The signed-in user — profile, preferences, notifications, saved layouts |
/api/v1/meta/* |
2 | Where the meta store lives, and relocating it |
/api/v1/onboarding/* |
2 | The first-run checklist |
/api/v1/pages/* |
13 | Pages and dashboards — layout, config, nav order, shared views |
/api/v1/permissions |
1 | The permission catalog every role is built from |
/api/v1/public/* |
6 | The scoped public API for customer- and staff-facing pages (off by default) |
/api/v1/public-api/* |
2 | Turn the public API on or off, and see whether this instance opted in |
/api/v1/public-keys/* |
5 | Issue, reveal, rotate and revoke the browser-safe keys your pages use |
/api/v1/public-scopes/* |
4 | Define what a public key may read — resources, columns, filters and time zone |
/api/v1/readyz |
1 | Readiness — per-dependency verdicts, 503 when a dependency is down |
/api/v1/roles/* |
6 | RBAC roles and their permission sets |
/api/v1/scheduled-reports/* |
4 | Recurring exports delivered on a schedule |
/api/v1/schema-import |
1 | Parse a schema file (SQL, Prisma, Drizzle, the JSON IR, …) into the IR |
/api/v1/search |
1 | Cross-resource search for the command palette |
/api/v1/settings/* |
10 | Instance settings — defaults, branding, email, security, telemetry, workspace |
/api/v1/setup/* |
2 | First-boot super-admin creation, and whether setup is still open |
/api/v1/surfaces/* |
5 | Hosted app surfaces — placement in the dashboard, and attaching your own domains |
/api/v1/system |
1 | Version and instance information |
/api/v1/users/* |
9 | People in the workspace — invite, suspend, delete, assign roles |
/api/v1/widget-data/* |
2 | The queries widgets run, singly and in batches |
Three of these deserve a note, because the obvious guess is wrong:
- There is no
/api/v1/schema/*. Snapshots, diffs and overrides are nested under the connection they belong to:/connections/:id/schema/*. - There is no
/api/v1/generate/*. Generation is an action on a connection:POST /connections/:id/generate. - There is no
/api/v1/views/*. Shared views belong to a page (/pages/:pageId/views); per-user saved layouts belong to you (/me/views/:pageId/layout).
Every operation
Section titled “Every operation”The complete surface, straight from the spec. Path parameters appear as
{name}.
/about
Section titled “/about”GET /api/v1/aboutGET /api/v1/about/update-check/add-ons
Section titled “/add-ons”GET /api/v1/add-ons/catalogPUT /api/v1/add-ons/catalogPOST /api/v1/add-ons/catalog/refreshPOST /api/v1/add-ons/downloadPOST /api/v1/add-ons/uploadDELETE /api/v1/add-ons/staged/{key}/{version}POST /api/v1/add-ons/{key}/upgradeGET /api/v1/add-onsPOST /api/v1/add-onsGET /api/v1/add-ons/{key}/planGET /api/v1/add-ons/{key}/bundle/{*}POST /api/v1/add-ons/{key}/connectDELETE /api/v1/add-ons/{key}/connectPOST /api/v1/add-ons/{key}/connect/oauth/startPOST /api/v1/add-ons/{key}/connect/oauth/completePATCH /api/v1/add-ons/{key}DELETE /api/v1/add-ons/{key}/api-keys
Section titled “/api-keys”GET /api/v1/api-keysPOST /api/v1/api-keysDELETE /api/v1/api-keys/{id}/audit
Section titled “/audit”GET /api/v1/auditGET /api/v1/audit/{id}POST /api/v1/auth/loginPOST /api/v1/auth/2fa/verifyPOST /api/v1/auth/logoutGET /api/v1/auth/sessionGET /api/v1/auth/sessionsDELETE /api/v1/auth/sessions/{id}POST /api/v1/auth/password/changePOST /api/v1/auth/password/forgotPOST /api/v1/auth/password/resetPOST /api/v1/auth/2fa/enrollPOST /api/v1/auth/2fa/activatePOST /api/v1/auth/2fa/disable/bootstrap
Section titled “/bootstrap”GET /api/v1/bootstrap/branding
Section titled “/branding”GET /api/v1/brandingGET /api/v1/branding/logoPOST /api/v1/branding/logoDELETE /api/v1/branding/logo/connections
Section titled “/connections”GET /api/v1/connectionsPOST /api/v1/connectionsPOST /api/v1/connections/testGET /api/v1/connections/{id}PATCH /api/v1/connections/{id}DELETE /api/v1/connections/{id}POST /api/v1/connections/{id}/testPOST /api/v1/connections/{id}/introspectGET /api/v1/connections/{id}/schemaGET /api/v1/connections/{id}/schema/snapshotsGET /api/v1/connections/{id}/schema/snapshots/{snapshotId}GET /api/v1/connections/{id}/schema/diffGET /api/v1/connections/{id}/schema/overridesPUT /api/v1/connections/{id}/schema/overridesGET /api/v1/connections/{id}/overridesPUT /api/v1/connections/{id}/overridesPOST /api/v1/connections/{id}/generateGET /api/v1/data/{connectionId}/{table}POST /api/v1/data/{connectionId}/{table}POST /api/v1/data/undo/{token}POST /api/v1/data/{connectionId}/{table}/bulkGET /api/v1/data/{connectionId}/{table}/{recordId}/referencesGET /api/v1/data/{connectionId}/{table}/{recordId}PATCH /api/v1/data/{connectionId}/{table}/{recordId}DELETE /api/v1/data/{connectionId}/{table}/{recordId}/email-templates
Section titled “/email-templates”GET /api/v1/email-templatesGET /api/v1/email-templates/{key}/{locale}PUT /api/v1/email-templates/{key}/{locale}POST /api/v1/email-templates/{key}/test-send/events
Section titled “/events”GET /api/v1/events/exports
Section titled “/exports”GET /api/v1/exportsPOST /api/v1/exportsGET /api/v1/exports/{id}GET /api/v1/exports/{id}/download/healthz
Section titled “/healthz”GET /api/v1/healthzGET /api/v1/i18n/manifestGET /api/v1/i18n/bundle/{locale}/{namespace}GET /api/v1/i18n/format-errorsGET /api/v1/i18n/keysPUT /api/v1/i18n/keysDELETE /api/v1/i18n/keysPOST /api/v1/i18n/keys/bulkGET /api/v1/i18n/export/{locale}POST /api/v1/i18n/import/{locale}GET /api/v1/i18n/localesPOST /api/v1/i18n/localesPATCH /api/v1/i18n/locales/{locale}DELETE /api/v1/i18n/locales/{locale}/imports
Section titled “/imports”POST /api/v1/imports/uploadGET /api/v1/importsPOST /api/v1/importsPOST /api/v1/imports/{id}/runGET /api/v1/imports/{id}GET /api/v1/imports/{id}/error-reportGET /api/v1/jobsPOST /api/v1/jobsGET /api/v1/jobs/{id}POST /api/v1/jobs/{id}/cancelGET /api/v1/llm/configPUT /api/v1/llm/configPOST /api/v1/llm/config/testGET /api/v1/llm/modelsGET /api/v1/llm/runsPOST /api/v1/llm/runsPOST /api/v1/llm/runs/{id}/executePOST /api/v1/llm/runs/{id}/responseGET /api/v1/llm/runs/{id}GET /api/v1/llm/runs/{id}/promptGET /api/v1/llm/runs/{id}/diffPOST /api/v1/llm/runs/{id}/applyPOST /api/v1/llm/runs/{id}/undo/{token}GET /api/v1/mePATCH /api/v1/meGET /api/v1/me/prefsPATCH /api/v1/me/prefsGET /api/v1/me/notificationsPOST /api/v1/me/notifications/{id}/readPOST /api/v1/me/notifications/read-allGET /api/v1/me/notification-prefsPUT /api/v1/me/notification-prefsPUT /api/v1/me/views/{pageId}/layoutDELETE /api/v1/me/views/{pageId}/layoutGET /api/v1/meta/placementPOST /api/v1/meta/relocate/onboarding
Section titled “/onboarding”GET /api/v1/onboardingPOST /api/v1/onboarding/dismiss/pages
Section titled “/pages”GET /api/v1/pages/{pageId}PATCH /api/v1/pages/{pageId}DELETE /api/v1/pages/{pageId}PATCH /api/v1/pages/{pageId}/layoutGET /api/v1/pagesPOST /api/v1/pagesPUT /api/v1/pages/nav-orderPATCH /api/v1/pages/{pageId}/configPOST /api/v1/pages/{pageId}/duplicateGET /api/v1/pages/{pageId}/viewsPOST /api/v1/pages/{pageId}/viewsPATCH /api/v1/pages/{pageId}/views/{viewId}DELETE /api/v1/pages/{pageId}/views/{viewId}/permissions
Section titled “/permissions”GET /api/v1/permissions/catalog/public
Section titled “/public”GET /api/v1/public/configGET /api/v1/public/records/{ref}POST /api/v1/public/records/{ref}PATCH /api/v1/public/records/{ref}/{id}POST /api/v1/public/claimDELETE /api/v1/public/session/public-api
Section titled “/public-api”GET /api/v1/public-apiPUT /api/v1/public-api/public-keys
Section titled “/public-keys”GET /api/v1/public-keysPOST /api/v1/public-keysGET /api/v1/public-keys/{id}/revealPOST /api/v1/public-keys/{id}/rotateDELETE /api/v1/public-keys/{id}/public-scopes
Section titled “/public-scopes”GET /api/v1/public-scopesPOST /api/v1/public-scopesPATCH /api/v1/public-scopes/{id}DELETE /api/v1/public-scopes/{id}/readyz
Section titled “/readyz”GET /api/v1/readyz/roles
Section titled “/roles”GET /api/v1/rolesPOST /api/v1/rolesPATCH /api/v1/roles/{id}DELETE /api/v1/roles/{id}GET /api/v1/roles/{id}/permissionsPUT /api/v1/roles/{id}/permissions/scheduled-reports
Section titled “/scheduled-reports”GET /api/v1/scheduled-reportsPOST /api/v1/scheduled-reportsPATCH /api/v1/scheduled-reports/{id}DELETE /api/v1/scheduled-reports/{id}/schema-import
Section titled “/schema-import”POST /api/v1/schema-import/parse/search
Section titled “/search”GET /api/v1/search/settings
Section titled “/settings”GET /api/v1/settings/defaultsPUT /api/v1/settings/defaultsGET /api/v1/settings/workspacePUT /api/v1/settings/brandingGET /api/v1/settings/securityPUT /api/v1/settings/securityGET /api/v1/settings/telemetryPUT /api/v1/settings/telemetryGET /api/v1/settings/emailPUT /api/v1/settings/email/setup
Section titled “/setup”GET /api/v1/setup/statePOST /api/v1/setup/super-admin/surfaces
Section titled “/surfaces”GET /api/v1/surfacesPUT /api/v1/surfaces/{appKey}/placementPUT /api/v1/surfaces/{appKey}/connectionPUT /api/v1/surfaces/instancesPUT /api/v1/surfaces/domains/system
Section titled “/system”GET /api/v1/system/info/users
Section titled “/users”POST /api/v1/users/{id}/rolesPUT /api/v1/users/{id}/rolesDELETE /api/v1/users/{id}/roles/{roleId}GET /api/v1/usersPOST /api/v1/usersGET /api/v1/users/{id}PATCH /api/v1/users/{id}DELETE /api/v1/users/{id}POST /api/v1/users/{id}/invite/resend/widget-data
Section titled “/widget-data”POST /api/v1/widget-data/queryPOST /api/v1/widget-data/batchRealtime
Section titled “Realtime”/ws |
WebSocket |
/api/v1/events |
SSE fallback |
Behind a reverse proxy the WebSocket needs Upgrade/Connection headers and a
long read timeout, or the UI goes stale without erroring:
Behind a reverse proxy.
Errors
Section titled “Errors”Every error shares one envelope, with a stable machine-readable code. Branch on
code, not on the message — messages are for humans and may be reworded or
localized.
Validation failures identify the offending path: every external input is schema-validated before a handler sees it.
Off by default: the dashboard is served by the same process as the API, so it is same-origin.
For a split deployment, ADMINIUM_CORS_ORIGINS takes a CSV of exact origins.
* is rejected — responses are credentialed.