UsageReport

Organization hierarchy with rolled-up consumption

Changed on

The organization's sub-organization tree, each node carrying what its OWN consumers spent (direct) and what the whole subtree spent (rollup); at every node rollup equals direct plus the children's rollup. With level=consumer the consumers themselves are listed, paged. Read from the hourly token rollup, which has no environment dimension, so no environment filter applies.

get/apiops/projects/{projectName}/credential-organizations/{organizationCode}/usage/hierarchy

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.

levelstring

organization (default) for the sub-organization tree, or consumer for the paged consumer list.

includeDescendantsboolean

With level=consumer, also list the consumers of descendant organizations. Ignored for level=organization.

pageinteger

Zero-based page index.

sizeinteger

Page size. Defaults to 20, capped at 200.

Response

successful operation!

level'ORGANIZATION' | 'CONSUMER'

Which level was asked for.

dataSourcestring

Where the figures came from.

freshnessstring

How fresh the figures are.

partialboolean

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

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"
  },
  "dataSource": "ROLLUP_DAILY",
  "freshness": "hourly",
  "nodes": [
    {
      "code": "acme-partners"
    }
  ],
  "members": {
    "content": [
      {
        "organizationPath": "Acme / Partners"
      }
    ]
  }
}

Changes

    • breaking

      for the query request parameter includeDescendants, default value false was added

    • breaking

      removed the enum value consumer from the query request parameter level

    • breaking

      removed the enum value organization from the query request parameter level

    • breaking

      for the query request parameter page, the format changed from no format to int32

    • breaking

      for the query request parameter size, the format changed from no format to int32

    • breaking

      the // response's property type changed from array to no type for status

    This list may be incomplete.

    • info

      endpoint added