API reference

The control-plane REST API that adj and the portal talk to. Everything the CLI does goes through this surface — if you're scripting against Adjoint directly (CI, an internal tool) instead of shelling out to adj, this is the contract.

This is a metadata-only API. It never sees your database rows: source credentials go straight into your data-plane cluster as a Kubernetes Secret, and instance credentials are brokered live from the agent on each request (see Instances). The control plane stores orgs, users, the golden-snapshot catalog, cluster registrations, and an audit trail.

Base URL

https://api.stagdb.com

All paths below are relative to this base and are versioned under /v1. The only other route is GET /healthz — a bare liveness probe ({"status":"ok"}, no auth) used by load balancers and uptime checks, not part of the customer-facing surface documented here.

Auth model

Login is org-scoped: you authenticate with an org slug, an email, and a password — the same email can belong to different orgs with different passwords, so the slug disambiguates.

$ curl -s https://api.stagdb.com/v1/auth/login \
    -H 'Content-Type: application/json' \
    -d '{"org_slug":"acme","email":"[email protected]","password":"hunter22"}'
{"token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...","refresh_token":"3n8fK2pQZmR1sV6xY0bC4dE7gH9jL_wA5oT8uI2rP0k"}

POST /v1/auth/login returns two tokens in the same response:

Refresh tokens rotate: every successful POST /v1/auth/refresh invalidates the token you presented and returns a brand-new one. Presenting an already-rotated (or already-revoked) token trips reuse detection — the server treats it as evidence of token theft and revokes every refresh token for that user, forcing a fresh login everywhere. This is the same behavior adj logout --all triggers on purpose; reuse detection triggers it automatically as a defensive measure.

The CLI's adj1.… invite codes (see Users) are a client-side convenience that base64url-packs a server URL, org slug, and raw invite token into one relayable string — the API itself only ever deals in the bare token underneath.

Conventions

Pages in this reference

Page Covers
Auth Org registration, login, refresh, logout, invite acceptance
Client config Published data-plane image refs + the CLI support policy
Account Your own profile, password, sessions
Users Invites, member listing, disable/enable/remove
Quota Per-user / per-org instance caps
Snapshots The golden-snapshot catalog: versions, sharing, delete
Instances Clone lifecycle: launch, reset, refresh, extend, credentials
Clusters Cluster registration, health, tokens, bootstrap bundle
Sources & imports Source connections and the RDS import pipeline
Pools Pre-warmed clone pools
Org Org-wide usage rollup and the audit trail

Every route below is documented straight from the handler code — request fields, response shapes, and the exact error statuses that route can actually produce (not a generic catalog of HTTP codes).