Skip to content

Admin API ​

Operator-facing HTTP surfaces that ship with the Bigwave API process. Every route below is bearer-token gated against BIGWAVE_ADMIN_TOKEN (or the proxy-headers principal, when BIGWAVE_AUTH=proxy_headers) and is workspace-scoped through the calling principal.

These endpoints sit alongside the OpenAI-shaped /v1/* chat surface documented in the How-to guides and the Configuration reference. They are intended for ops tooling, dashboards, and the in-tree bw CLI — not chat clients.

Surface map ​

SurfacePurpose
AdaptersLoRA adapter registry — list, fetch, delete trained adapters.
API tokensMint, list, and revoke per-workspace API tokens for /v1/* clients.
AuditRead the append-only audit log for the workspace.
CatalogFederated model catalog search (HuggingFace / Ollama Hub / Modelscope).
ChannelsCRUD over Telegram / Slack / Discord / Web channel bindings.
CostWorkspace cost rollups and the per-model price table.
DatasetsUpload, list, paginate, export, and delete workspace datasets (SFT / DPO).
EvalsSubmit, stream, and fetch evaluation runs and reports.
Feedback aggregationRoll up thumbs events and project them into a DPO dataset.
Guardrails policyCRUD over the workspace's input/output guardrail policy.
InferencePaginated read of the inference lifecycle log.
Knowledge basesIngest, query, and delete documents in workspace-scoped RAG collections.
MCPModel Context Protocol over HTTP — list and invoke Bigwave tools.
ModelsLoad, unload, list, and adapter-activate replicas on the running engine.
Rate limitInspect and reset the per-workspace token bucket.
Sandbox policyCRUD over the per-workspace sandbox policy used by the agent runtime.
Shadow modeToggle the secondary model that the gateway fans out to in the background.
TrainingSubmit, stream, and cancel fine-tuning jobs.
UploadsExtract text from a single file for inline RAG injection.
WebhooksInbound webhook receivers from third-party channels.
Workspace toolsRegister user-defined tool definitions that merge into the agent-runtime registry.
WorkspacesCRUD over the workspaces table — the unit of multi-tenant isolation.

Conventions ​

Authentication. Send Authorization: Bearer $BIGWAVE_ADMIN_TOKEN. Omitting the header returns 401.

Workspace fence. Every admin route resolves the workspace from the bearer principal — query strings or bodies that try to override it are ignored. Cross-tenant lookups return 404 (not 403) so existence does not leak. See the workspace fence concept for the broader contract.

503 Service Unavailable. Several admin surfaces depend on optional lifespan wiring (channel store, replica manager, federated catalog). When the relevant component is not initialised on app.state, the route returns 503 with an explanatory detail.

Audit trail. Mutating routes (POST / DELETE) write to audit_log via AuditLogRepository when one is wired; reads do not.

CLI wrappers ​

Most surfaces are also exposed by the bw CLI in the repo (packages/cli/). Where the wrapper exists, the per-surface page calls it out — operators usually prefer bw model loaded over a hand-rolled curl.

Dual-licensed: MIT OR Apache-2.0