Skip to content

Admin API

The admin API lives under /api/v1/* and is consumed by the web UI. You can also call it programmatically — either with a session cookie (after logging in) or with an API token that holds the right capability.

This page is a high-level map. For the consumer-facing read endpoint, see Consuming data.

Authentication

Two equivalent options:

  • Session cookie — set automatically after you log in to the UI. Useful when scripting against your own browser session.
  • Bearer tokenAuthorization: Bearer pika_.... The token must hold a capability that covers the requested operation.

TIP

Token capabilities for admin operations are different from path scopes used on /data/*. A token holds a list of capabilities (files.read, settings.manage, …). The list is set when the token is created.

Discovery

MethodPathCapabilityPurpose
GET/healthz(public)Liveness probe. Returns OK.
GET/api/v1/info(public)Server metadata, version, current user identity, effective capabilities, encryption-config warning flag.
GET/api/v1/key/status(public)Server-key state (initialized / locked / unlocked). Allowed while the server is locked.

/api/v1/info is the discovery endpoint — the UI calls it on every load to decide which sections to render, and scripts can use it to feature-detect.

Configuration data plane

These operate on the persisted config tree.

MethodPathCapabilityPurpose
GET/api/v1/folder, /folder/*files.readList folders / contents.
POST/api/v1/folder/*files.writeCreate a folder.
DELETE/api/v1/folder/*files.writeDelete a folder.
GET/api/v1/file/*files.readRead a config file. Supports ?variant= and ?version=.
POST/api/v1/file/*files.writeCreate or update a config file (creates a new version).
DELETE/api/v1/file/*files.writeDelete a config file.
GET/api/v1/versions/*files.readList versions of a file.
PATCH/api/v1/versions/*files.writeSet / clear the semver tag on a specific version.
GET/api/v1/variants/*files.readList the variants of a file.
POST/api/v1/render/*files.readResolve a file (inheritance + variant + version) and return the merged document.
POST/api/v1/convertfiles.readConvert content between JSON / YAML / TOML.
GET/api/v1/search?q=...files.readFull-text search across configs (Server-Sent Events stream).

Consumer endpoints

Reachable on the same admin port. To expose configuration data on a separate port (no Bearer required, custom shape, optional request-rule pre-stage), configure an Endpoint instead.

MethodPathCapabilityPurpose
GET/data/*files.read (scope-gated)Resolved config — see Consuming data.

External resources

Browse and operate on configured external backends (Vault, Consul, etcd, AWS, Azure, GCP, Kubernetes, HTTP). All endpoints are gated on external.* because exposing them returns or mutates third-party secrets.

MethodPathCapabilityPurpose
GET/api/v1/external/resourcesexternal.readList configured external resources.
GET/api/v1/external/{name}/pathsexternal.readBrowse the namespace of one resource.
POST/api/v1/external/{name}/testexternal.readProbe connectivity / credentials for one resource.
POST/api/v1/external/{name}/readexternal.readRead one entry by path (body carries the path; * wildcard not viable in middle-segment routing).
POST/api/v1/external/{name}/writeexternal.writeCreate / update one entry.
POST/api/v1/external/{name}/deleteexternal.writeDelete one entry.
POST/api/v1/external/{name}/versionsexternal.readList historical versions (KV backends that support it).
POST/api/v1/external/{name}/versionexternal.readRead a specific version of an entry.
GET/api/v1/external/{name}/searchexternal.readSearch within the resource.

Users, permissions, tokens

MethodPathCapabilityPurpose
GET,POST,PATCH,DELETE/api/v1/users[/*]users.manageUser CRUD.
POST/api/v1/users-kick/*users.manageForce-logout a user (invalidates their sessions).
DELETE/api/v1/users-totp/*users.manageAdmin reset of a user's TOTP enrolment.
GET,POST,PATCH,DELETE/api/v1/permissions[/*]permissions.managePermission bundle CRUD.
GET,PUT/api/v1/user-permissions/*permissions.manageRead / replace a user's bundle assignments.
GET,POST,DELETE,PATCH/api/v1/tokens[/*]tokens.manageAPI token CRUD.

Server administration

MethodPathCapabilityPurpose
GET,POST/api/v1/settingssettings.manageRead / patch the entire settings document.
POST/api/v1/key/initializesettings.manageOpt in to at-rest encryption (first-time setup).
POST/api/v1/key/unlocksettings.manageUnlock the server after a restart by supplying the master key.
POST/api/v1/key/locksettings.manageManually re-lock the server without restarting.
POST/api/v1/key/rotatesettings.manageRotate the server encryption key (current → new).
GET/api/v1/tls/statussettings.manageInspect active HTTPS policy and certificate expiry.
POST/api/v1/tls/self-signedsettings.manageGenerate and activate a managed self-signed certificate.
PUT/api/v1/tls/manualsettings.manageUpload and activate a PEM certificate / key pair.
POST/api/v1/tls-generatesettings.manageGenerate a TLS certificate / key pair without activating it.
POST/api/v1/ssh-keygensettings.manageGenerate an SSH key pair (used by external resources that require key-based auth, e.g. Git over SSH).
GET/api/v1/cluster/statussettings.manageRuntime cluster role, quorum, leader, visible alan peers.
GET/api/v1/public-endpoints/statussettings.manageRuntime state of each configured Endpoint listener.
POST/api/v1/public-endpoints/test-rulessettings.manageDry-run draft Endpoint request rules and return a trace.
POST/api/v1/public-endpoints/{id}/testsettings.manageSynthetic probe against a saved Endpoint.
GET,POST/api/v1/backup[/info]settings.manageExport / inspect / import a full backup archive.
GET/api/v1/user-sync/statussettings.manageLast-run report for every configured user-sync source.
POST/api/v1/user-sync/run/*settings.manageTrigger a one-shot user-sync run.
POST/api/v1/user-sync/test/*settings.manageDry-run a user-sync source — no writes performed.

Per-user endpoints

Reserved under /api/v1/me/*. Every authenticated user can read and modify their own resources; no extra capability is required.

GroupRoutes
PreferencesGET / PUT / DELETE /api/v1/me/preferences
PasskeysPOST /me/passkeys/begin, /finish; GET /me/passkeys; PATCH / DELETE /me/passkeys/*
TOTPGET /me/totp; POST /me/totp/begin, /finish, /recovery-codes; DELETE /me/totp
Personal vaultGET /me/vault/status, /account; POST /me/vault/setup, /unlock-check, /rotate-password, /recovery-kit; PUT /me/vault/session-lock; DELETE /me/vault
Vault itemsGET / POST /me/vault/items; GET / PUT / DELETE /me/vault/items/*; POST /me/vault/items-restore/*, /items-use/*; GET /me/vault/items-versions/*

Authentication endpoints

Provided by the ada auth manager — paths are stable but the strategies behind them are configured at runtime under Settings → Authentication.

PathPurpose
GET /login/infoPublic — discover enabled strategies and login UI metadata. Allowed while locked.
GET /login/meCurrent session — username, capabilities, MFA state. Returns 401 when not signed in.
POST /login/pass/{strategy}Password-style strategies (local, ldap, etc.). Rate-limited by login_guard.
GET /login/{strategy}OAuth2 / OIDC redirect start.
POST /login/register/{strategy}Self-registration (when enabled by the strategy).
POST /logoutInvalidates the current session.

Conventions

  • All write endpoints accept JSON request bodies and return JSON responses.
  • 4xx responses include a { "message": "..." } body.
  • Long-running operations (search, backup export) stream over Server-Sent Events.
  • When the server is locked, all endpoints except the discovery group and /login/* / /api/v1/key/{status,unlock} return 503 Service Unavailable with X-Pika-Locked: true. See Encryption.

Released under the MIT License.