Get Master Keys Spend Trend

View as Markdown

Per-day spend trend for the workspace, optionally scoped to one master key.

Success data: { "window", "rows": [{ "bucket", "cost_sum", "request_count", ... }] }

Headers

AuthorizationstringOptional

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

X-Workspace-IdstringOptional

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

Query parameters

presetstringOptional

Calendar preset; default 30d without start+end.

startstringOptional

YYYY-MM-DD with end.

endstringOptional

YYYY-MM-DD with start.

masterKeyIdstringOptional

Optional UUID. If sent non-empty it must be valid; filters to that key. Omit for workspace-wide trend.

Response

codeinteger
messagestring
dataany