Getmasterkeysspendbykey

View as 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`.

Authentication

AuthorizationBearer
Bearer credential containing a JWT, Virtual Key, or PAT.

Headers

X-Workspace-IdstringOptionalformat: "uuid"

Required for a normal JWT, Virtual Key, or PAT. A JWT may instead send X-Openmodel-User-Id. Not used by the public health endpoint.

X-Openmodel-User-IdstringOptionalformat: "uuid"

JWT-only alternative to X-Workspace-Id. Must be a UUID equal to the JWT subject; the server uses it as the workspace id. Not valid as the sole workspace header for Virtual Key or PAT authentication.

Query parameters

presetenumOptionalDefaults to 30d

Calendar preset; default 30d.

startstringOptional

YYYY-MM-DD with end.

endstringOptional

YYYY-MM-DD with start.

limitintegerOptional1-200Defaults to 50

Max keys returned (default 200, max 200).

departmentIdstringOptionalformat: "uuid"

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

Response

codeinteger
messagestring
dataany