Add FastAPI app with auth (JWT) and pipeline/bib/status endpoints #3

Closed
opened 2026-03-12 17:32:20 +00:00 by kert · 0 comments
Owner

Create src/api/ with FastAPI app:

  • POST /auth/token — issue JWT from configured credentials
  • POST /run/{pipeline} — trigger async pipeline run, return job ID
  • GET /run/{job_id} — poll job status
  • GET /pipelines — list all pipelines with step counts
  • GET /pipelines/{name} — pipeline detail (steps, inputs, outputs, refs)
  • GET /bib/items — query bibliography
  • GET /bib/tags — list tag namespaces with counts
  • GET /health — service + dependency health checks
  • GET /schema/{table} — JSON Schema from SQLTable.model_json_schema()

Auth: JWT with configurable secret in stack.toml [api] section.
Add stack api serve CLI command.

Create `src/api/` with FastAPI app: - `POST /auth/token` — issue JWT from configured credentials - `POST /run/{pipeline}` — trigger async pipeline run, return job ID - `GET /run/{job_id}` — poll job status - `GET /pipelines` — list all pipelines with step counts - `GET /pipelines/{name}` — pipeline detail (steps, inputs, outputs, refs) - `GET /bib/items` — query bibliography - `GET /bib/tags` — list tag namespaces with counts - `GET /health` — service + dependency health checks - `GET /schema/{table}` — JSON Schema from SQLTable.model_json_schema() Auth: JWT with configurable secret in stack.toml `[api]` section. Add `stack api serve` CLI command.
kert added this to the P1: Foundation — Config, CLI scaffold, auth milestone 2026-03-12 17:32:20 +00:00
kert added the apiauth labels 2026-03-12 17:32:20 +00:00
kert closed this issue 2026-03-12 19:04:09 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: homelab/stack#3