Skip to content

HTTP API

Local API served by eelden serve / eelden studio. Base path: /api/v1. Auth is required on /api/*.

Auth

Pass the serve token one of three ways:

MechanismExample
Query?token=…
HeaderAuthorization: Bearer …
HeaderX-Eelden-Token: …

WebSocket tails use the query-string form (browsers cannot set WS auth headers).

Snapshot pin

Optional request header:

http
Eelden-Snapshot: <snapshot-name>

Pinned reads resolve against that named snapshot. Studio's time-travel slider sets this.

Endpoints

Health

MethodPathNotes
GET/api/v1/health{"ok":true,…}
GET/api/v1/health/detailCorruption identities+counts, WAL/checkpoint lag, recovery, fsync histogram
GET/api/v1/statsEngine stats for Studio footer

Tenants

MethodPathNotes
GET/api/v1/tenantsCatalog list

Per-tenant

All under /api/v1/t/:tenant/…. Touching collections or running a query applies pending lazy migration (Slice A).

MethodPathNotes
GET…/collectionsNames + row estimates
GET…/schemaSchema IR / fingerprint status (does not apply migration)
GET…/snapshotsNamed snapshots
GET…/diffVersion diff (added / removed / changed)
GET…/tailCDC: WebSocket upgrade, or HTTP poll with ?after=<lsn>
POST…/queryOne pipeline or one atomic block
POST…/opsTenant catalog operations

Also: GET /api/v1/schema.eel returns the loaded schema source.

POST …/query

Body:

json
{ "query": "users |> filter active == true |> select { name }" }

Also accepts "text". Raw non-JSON bodies are treated as query text.

Success JSON includes columns, rows, and a plan hint (index vs scan) when applicable. Errors are 400 with {"error":"…","conflict":bool}conflict is true on atomic first-committer-wins failures.

/query rejects schema decls, named-query decls, and tenant ops — send those via schema files at serve start or /ops.

POST …/ops

json
{ "op": "create" | "fork" | "snapshot" | "suspend" | "delete" | "compact",
  "name": "…",
  "target": "…" }
opFields
createname (defaults to path tenant)
forksource name, required target
snapshotsource name, required target
suspend / deletename
compactuses path tenant

Response: {"ok":true,"message":"…"}.

CDC tail

  • WebSocket: GET /api/v1/t/:tenant/tail?token=… with Upgrade.
  • HTTP poll: same path without upgrade; ?after=<lsn> and optional ?collection=.

Events carry advancing write-frame LSNs; resume from any event's lsn.

CORS

Local serve allows Studio origins and exposes Authorization, Content-Type, X-Eelden-Token, Eelden-Snapshot.

Pre-alpha. Local-first. Stdlib-only Rust engine.