UsageReport

Usage trend of one consumer organization

Token, cost and traffic figures of the subject, bucketed by day, week or month. Every bucket of the period is present: a quiet day is zero, while an unreadable source sets partial and names the environment. AI figures come from the same source the summary report declares.

get/apiops/projects/{projectName}/consumer-organizations/{organizationCode}/usage/timeseries

Request

Path parameters

projectNamestring required

Project name

organizationCodestring required

Organization code

Query parameters

fromstring

Start of the period, ISO-8601 UTC (2026-08-01, 2026-08-01T00:00:00Z or an offset date-time). Defaults to 30 days before 'to'.

tostring

End of the period, ISO-8601 UTC. Defaults to now. The period may not be inverted or wider than 366 days.

granularitystring

Bucket width: day (default), week (ISO, starting Monday) or month. All buckets are UTC.

includestring

Comma-separated blocks to fill: ai, traffic. Defaults to both. A block that was not requested is answered as null, not zero.

modelstring

Exact LLM model id (e.g. gpt-5). Narrows the whole report to that model's requests and keeps the scope-total budget rows.

environmentNamestring

Environment name. Defaults to every environment of the project. Applies to traffic-log blocks only; filters.environmentApplied reports whether it took effect.

Response

successful operation!

granularity'DAY' | 'WEEK' | 'MONTH'

Bucket width of the series.

aiDataSourcestring

Where the AI figures came from: ROLLUP_DAILY or TRAFFIC_LOG. Null when AI was not requested.

aiFreshnessstring

How fresh the AI figures are.

trafficDataSourcestring

Where the traffic figures came from. Null when traffic was not requested.

totalinteger

Number of buckets in the series.

partialboolean

True when at least one source could not be read; the answer is still 200 with what was readable.

unavailableEnvironmentsstring[]

Names of the environments whose traffic log could not be read.

notesstring[]

Machine-readable notes explaining zero or missing numbers.

Example response

{
  "period": {
    "from": "2026-08-12T00:00:00Z",
    "to": "2026-09-11T00:00:00Z",
    "timeZone": "UTC"
  },
  "granularity": "DAY",
  "aiFreshness": "hourly",
  "series": [
    {
      "bucketStart": "2026-09-01T00:00:00Z"
    }
  ]
}

Changes

No recorded changes to this operation across all 21 revisions of this API.