Get Usage Summary
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
Authorization
Optional. Bearer JWT, Virtual Key, or PAT. Server also accepts Cookie alephant_token; not modeled as a header here.
X-Workspace-Id
Optional in the spec; required for authenticated analytics. Omit for unauthenticated GET /v1/analytics/health.
Query parameters
preset
UTC calendar preset when start+end are not both set. Allowed: mtd, 7d, 30d, 3m, 6m, 12m. Omitted → 30d.
start
Inclusive start date YYYY-MM-DD (UTC). Must be paired with end; overrides preset.
end
Inclusive end date YYYY-MM-DD (UTC). Must be paired with start.
Response
code
message
data