GET /v1/dashboard
Read the authenticated tenant dashboard
说明(契约原文)
The target tenant, scope, user, and session are derived only from the authenticated tenant session. Any tenant_id parameter, including an empty or matching value, returns dashboard_scope_forbidden. The live session must conjunctively retain every required permission listed below in the same repeatable-read PostgreSQL transaction as the aggregate reads. nodes.read is optional; when absent, node-backed resource facts use the explicit unavailable branch.
参数
| 名称 | 位置 | 类型 | 必填 | 说明 |
|---|---|---|---|---|
range | query | string: today / yesterday / seven_days / thirty_days | 是 | Tenant calendar range in the requested timezone. |
timezone | query | string | 是 | IANA timezone name other than Local. Calendar boundaries converted to UTC must be hour aligned; zones with a non-hour boundary offset are rejected rather than rounded. |
site_id | query | string(uuid) | 否 | Optional canonical site UUID for ClickHouse drill-down; tenant scope remains session-derived. |
node_id | query | string(uuid) | 否 | Optional canonical node UUID for ClickHouse drill-down; tenant scope remains session-derived. |
X-Request-ID | header | string | 否 | Optional safe correlation ID; invalid values are replaced. |
响应
| 状态码 | 说明 |
|---|---|
200 | Version 2 dashboard snapshot for the authenticated tenant only. 字段: |
400 | dashboard_invalid_request |
401 | dashboard_authentication_required |
403 | dashboard_scope_forbidden or dashboard_permission_denied |
408 | dashboard_request_cancelled |
500 | dashboard_internal_error |
502 | dashboard_response_too_large |
503 | dashboard_storage_unavailable; no zero-value data is substituted. |
504 | dashboard_query_timeout |
失败时怎么办
400按字段说明修正参数或请求体再发;不要原样重试。401检查凭据格式、是否过期或被轮换。403检查 Key 范围与所有者当前权限、当前租户作用域;不要换更高权限账号绕过。500结果未知:先按资源 ID 或列表回读确认,再决定是否用原 Idempotency-Key 重试。503依赖暂不可用:稍后用原 Idempotency-Key 重试。