Admin KPI dashboard — operator KPIs for observability (BRIEF-ADMIN-001)
Return the operator KPI payload.
Args: force_refresh: When true, bypass the 5-minute in-process cache and recompute every tile against live data. Used sparingly — repeated force_refresh hits hurt warm-cache latency for everyone.
Authorization: - Anonymous → 401 (handled by the auth dep) - Authenticated non-admin → 403 (handled by require_admin) - Admin → 200
Privacy (CV §10 / AC-ADMIN-07): Aggregates and counts ONLY. No customer email, agent name, user-id, or per-user drill-down. The Sentry tile is a count with a link-out; no rendered issue titles or stack traces. Per-user filter parameters are NOT accepted and the route does NOT expose them in OpenAPI.
Flag gate (rule #4): When ADMIN_DASHBOARD_ENABLED is false (prod default), the endpoint returns 404. Independent of ADMIN_EMAILS — the flag controls existence, the email list controls access.
Response shape: { "computed_at": "<ISO8601 UTC>", "ttl_seconds": 300, "cached": bool, "kpis": [ {"id": "total_users", "label": "Total users", "available": true, "value": 42, "unit": "count"}, ... ] }
Request
- Base URL: https://api.badgeia.com
- URL: https://api.badgeia.com/api/v1/admin/kpis
- Auth: none declared
Query parameters
Response
Successful Response
Changes
No recorded changes to this operation across all 1 revision of this API.