WorkspaceAPIKeyAuth middleware exists for ws_live_... keys, but it is not mounted to these management routes in the current router.
Dashboard drilldowns
Path prefix:/api/v1/dashboard.
Endpoints:
GET /overviewGET /spendGET /spend/seriesGET /top-agentsGET /top-agents/detailsGET /budget-blockedGET /budget-blocked/detailsGET /guard-blockedGET /guard-blocked/details
- Requires
gw_session - Tenant is resolved from
/w/{slug} - Returns
401when unauthenticated,403when tenant access is denied
range(optional, defaultcurrent_month)- Allowed values:
15s,30s,1min,5min,10min,15min,30min,45min,today,yesterday,1m,3m,current_month timezone(optional, IANA timezone string)
range values currently fall back to current_month.
Detail endpoint requirements:
top-agents/details: requiresagent_idbudget-blocked/details: requiresrun_idorevent_idguard-blocked/details: requiresrun_idorevent_id
GET /api/v1/dashboard/spend?range=current_month):
Budgets (workspace, agent, plan)
Path prefix:/api/v1/workspaces/{tenant_id}/budgets.
Auth/runtime behavior:
- Requires
gw_session - Requires owner access for
{tenant_id} - Returns
401for unauthenticated,403for non-owner/non-member
Workspace budget
GET /workspacePUT /workspace
PUT request:
daily_budget_usd_micros may be null (unset). Negative values return 400.
Agent budgets
GET /agentsPUT /agents/{agent_id}
PUT request:
PUT response:
PUT /agents/{agent_id} returns 404 when the agent does not exist in that tenant.
Plan budgets
GET /plansPOST /plansPUT /plans/{plan_key}DELETE /plans/{plan_key}(returns204)
POST /plans request:
plan_key must match ^[a-z0-9][a-z0-9_-]*$.
PUT /plans/{plan_key} supports partial updates:
display_namedescriptiondaily_budget_usd_microsis_active
Alerts (rules, channels, history)
Path prefix:/api/v1/alerts.
Auth/runtime behavior:
- Requires
gw_session - Requires admin-or-higher tenant membership
- Tenant is resolved from
/w/{slug}before membership checks
System status
GET /system
Rules
POST /rulesGET /rulesGET /rules/{rule_id}PATCH /rules/{rule_id}DELETE /rules/{rule_id}(204)
severity:info | low | medium | high | criticalscope_type:tenant | workspace | agentrule_kind:event_count_gte | first_occurrencerule_config.window_seconds: required,> 0rule_config.threshold: required forevent_count_gte(> 0), omitted or0forfirst_occurrencecooldown_seconds:>= 0channel_config_ids: optional channel references
POST /rules example:
Channels
POST /channelsGET /channelsGET /channels/{channel_id}PATCH /channels/{channel_id}DELETE /channels/{channel_id}(204)POST /channels/{channel_id}/test
channel_type values:
slackwith config{ "webhook_url": "https://..." }webhookwith config{ "url": "https://...", "signing_secret": "optional" }
POST /channels example:
POST /channels/{channel_id}/test returns 200 for successful test sends. Current wire keys are:
Alert history
GET /GET /{alert_id}
limit(default50)offset(default0)rule_idseveritystatusfrom(RFC3339)to(RFC3339)
Workspace management keys
Path prefix:/api/v1/management/workspace-keys.
Auth/runtime behavior:
- Requires
gw_session - Owner access required
- Tenant is resolved from
/w/{slug}
GET /
POST /
Request:
201) returns the key record and api_key once:
role values: read_only, developer, admin.
POST /{id}:revoke
Disabled endpoint
POST /api/v1/execute
Always returns 410 Gone:
