You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Base URL:/api Auth: Session cookie (sid) for browser flows · Bearer API token (Authorization: Bearer fh_<token>) for CLI/CI Spec:lib/api-spec/openapi.yaml — validated in CI via Redocly
All list endpoints return { data: [...], meta: { total, page, limit, totalPages, hasNextPage, hasPrevPage } }.
All error responses return { message: string, code: string, status: number }.
Health
Method
Path
Description
GET
/health
Full health check (DB latency, version, uptime)
GET
/health/live
Kubernetes liveness probe
GET
/health/ready
Kubernetes readiness probe
Auth
Method
Path
Description
GET
/auth/user
Currently authenticated user (null if not logged in)
GET
/login
Start browser OIDC login flow
GET
/callback
OIDC callback handler
GET
/logout
Clear session + OIDC logout
POST
/mobile-auth/token-exchange
Exchange OIDC code for session token (mobile)
POST
/mobile-auth/logout
Revoke mobile session
API Tokens
Long-lived tokens for CLI and CI. Created via the UI (My Sites → API Tokens) or API.
Tokens start with fh_ and are SHA-256 hashed before storage — plaintext shown once at creation.
Method
Path
Auth
Description
GET
/tokens
✅
List active tokens (no hashes)
POST
/tokens
✅
Create token — returns plaintext once
DELETE
/tokens/:id
✅
Revoke a token
Request body (POST /tokens):
{ "name": "laptop-ci", "expiresInDays": 365 }
Nodes
Method
Path
Description
GET
/nodes
List all nodes (paginated, ?page=1&limit=20)
POST
/nodes
Register a new node
GET
/nodes/:id
Get node by ID
PATCH
/nodes/:id
Update node metadata
DELETE
/nodes/:id
Remove node from federation
POST
/nodes/:id/generate-keys
Generate/rotate Ed25519 key pair
GET
/nodes/:id/capacity
Per-node storage/bandwidth stats
Sites
Method
Path
Description
GET
/sites
List sites (paginated, ?search=, ?status=, ?ownerId=)