Management API and Dashboard Guide¶
This document describes the current Codara control plane: the /management/v1/* APIs and the /dashboard UI that consumes them.
1. Control-Plane Model¶
The dashboard is a first-party client of the management API. It does not have privileged backend-only data access.
Operator
│
▼
/dashboard login
│
▼
POST /management/v1/auth/token
│
▼
Bearer token in sessionStorage
│
▼
Dashboard pages query /management/v1/*
2. Authentication¶
Management endpoints require an operator bearer token or the configured management secret for token minting.
Important notes:
- the login screen exchanges the operator secret for a bearer token
- the dashboard stores the access token in
sessionStorage API_TOKENremains the primary operational secret nameUAG_MGMT_SECRETis a supported fallback alias
3. Current Management API Surface¶
3.1 Users¶
Routes:
GET /management/v1/usersGET /management/v1/users/{user_id}POST /management/v1/usersPOST /management/v1/users/{user_id}/suspendPOST /management/v1/users/{user_id}/unsuspendDELETE /management/v1/users/{user_id}GET /management/v1/users/{user_id}/keysDELETE /management/v1/users/{user_id}/keys/{key_id}POST /management/v1/users/{user_id}/keys/rotatePOST /management/v1/users/{user_id}/channels/link-tokenPOST /management/v1/users/{user_id}/workspace/reset
Dashboard behavior:
- the Users page shows the real
user_id - operators can rotate keys
- operators can create Telegram link tokens
- operators can reset a user's workspace sessions
3.2 Workspaces¶
Routes:
GET /management/v1/workspacesGET /management/v1/workspaces/{workspace_id}POST /management/v1/workspaces/{workspace_id}/resetDELETE /management/v1/workspaces/{workspace_id}
The Workspaces page is the operator-facing inventory of the managed workspace tree. It includes git metadata, bound users, and bound sessions.
3.3 Sessions¶
Routes:
GET /management/v1/sessionsGET /management/v1/sessions/{session_id}GET /management/v1/sessions/{session_id}/turnsDELETE /management/v1/sessions/{session_id}POST /management/v1/sessions/{session_id}/reset
3.4 Observability¶
Routes:
GET /management/v1/healthGET /management/v1/health/providersGET /management/v1/providers/modelsGET /management/v1/overviewGET /management/v1/metricsGET /management/v1/tracesGET /management/v1/traces/{trace_id}GET /management/v1/logsPOST /management/v1/observability/prune
Observability storage model:
- traces are file-backed structured events
- runtime logs are file-backed JSONL shards
- the API merges or filters them at query time
3.5 Audit and Playground¶
Routes:
GET /management/v1/auditPOST /management/v1/playground/chat
The Playground is intentionally routed through a dedicated dashboard admin user rather than an ad hoc operator-only execution path.
4. Dashboard Page Map¶
The current dashboard routes and responsibilities are:
| Route | Page | Purpose |
|---|---|---|
/ |
Overview | High-level runtime, provider, and audit summary |
/playground |
Agent Playground | Operator testing through the shared user-bound flow |
/sessions |
Active Sessions | Inspect, copy, reset, or delete sessions |
/workspaces |
Workspaces | Inspect managed workspaces and reset/delete them |
/users |
Users | Provision users, rotate keys, issue Telegram link tokens, reset workspace sessions |
/providers |
Providers | Runtime provider readiness and model inventory |
/observability |
Observability | Unified trace + runtime-log workflow |
/audit |
Audit Logs | Search and inspect management mutations |
5. Key Operator Workflows¶
5.1 Provision a User¶
Users page
│
▼
POST /management/v1/users
│
▼
one-time raw API key returned
│
▼
user begins calling /v1/chat/completions
5.2 Link a Telegram User¶
Users page
│
▼
Create channel link token
POST /management/v1/users/{user_id}/channels/link-token
│
▼
operator copies raw token
│
▼
Telegram user sends: /link <token>
│
▼
channel_user_links row is created
5.3 Diagnose a Runtime Problem¶
Overview or Providers page
│
▼
Observability page
│
├─ query trace roots
├─ query runtime log messages
└─ reconstruct one merged timeline by trace_id
6. Current Config and Deployment Notes¶
The dashboard and management plane rely on:
- block-based
codara.toml - a built UI bundle under
ui/dist - the management secret in
.envor environment variables
The dashboard does not require a separate backend service. It is served directly by the gateway.
The gateway also provides a dashboard-scoped history fallback: extensionless /dashboard/* paths return ui/dist/index.html so browser refreshes on React Router pages continue to work. Missing dashboard asset paths still return 404s, and API paths such as /management/v1/* are not affected by the fallback.
7. Known Boundaries¶
Current intentional boundaries:
- the dashboard surfaces real management actions instead of acting as a generic API console
- Observability is the primary log/trace debugging page; standalone Traces/Logs routes remain secondary
- only Telegram is fully implemented as a channel runtime today