Get Usage Summary

View as Markdown
Daily-aggregate KPIs for the window plus an equal-length **previous** window for comparison. **Success `data`:** `preset`, `window`, `previousWindow`, `current`, `previous` (rollup rows). **Example `data` (shape):** ```json { "preset": "30d", "window": { "startDate": "2026-01-01", "endDate": "2026-01-30" }, "previousWindow": { "startDate": "2025-12-02", "endDate": "2025-12-31" }, "current": { "request_count": "...", "cost_sum": "..." }, "previous": { "request_count": "...", "cost_sum": "..." } } ```

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

UTC calendar preset when start+end are not both set. Allowed: mtd, 7d, 30d, 3m, 6m, 12m. Omitted → 30d.

startstringOptional

Inclusive start date YYYY-MM-DD (UTC). Must be paired with end; overrides preset.

endstringOptional

Inclusive end date YYYY-MM-DD (UTC). Must be paired with start.

Response

codeinteger
messagestring
dataany