Getmasterkeysspendbykey

以 Markdown 格式查看
Per-master-key spend with previous-window comparison plus a **full-slice** `summary` (not limited by `limit`). **Success `data`:** `window`, `previousWindow`, `summary`, `rows` (camelCase spend fields, `spendChangePercent` may be null). **Optional filters:** `departmentId` (UUID) scopes slice; invalid UUID → 400 / `40013`.

请求头

Authorizationstring可选

Optional. Bearer JWT, Virtual Key, or PAT. Server also accepts Cookie alephant_token; not modeled as a header here.

X-Workspace-Idstring可选

Optional in the spec; required for authenticated analytics. Omit for unauthenticated GET /v1/analytics/health.

查询参数

presetstring可选

Calendar preset; default 30d.

startstring可选

YYYY-MM-DD with end.

endstring可选

YYYY-MM-DD with start.

limitinteger可选

Max keys returned (default 200, max 200).

departmentIdstring可选

Optional department UUID filter; must be valid if non-empty.

响应

codeinteger
messagestring
dataany