Skip to navigation

Getusagesummary

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):

{
"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": "..." }
}

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

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

This endpoint returns an object.
codeinteger
messagestring
dataany