Consumption metrics for each project in your Organization for the current billing period
All plans
Finding organizations for consumption queries
Before querying consumption metrics, you'll need the org_id values for organizations you want to query. Use your personal API key to list all organizations you have access to:
The response includes details about each organization, including the org_id you'll need for consumption queries:
Account-level metrics
To get global totals for all projects in the organization org-ocean-art-12345678, include the org_id in the GET /consumption/projects request. Required parameters:
A start date
An end date
A level of granularity
The following example requests hourly metrics between June 30th and July 2nd, 2024:
The response will provide aggregated hourly consumption metrics, including active time, compute time, written data, and synthetic storage size, for each hour between June 30 and July 2.
Response
Project-level metrics (granular)
You can also get similar daily, hourly, or monthly metrics across a selected time period, but broken out for each individual project that belongs to your organization.
Using the endpoint GET /consumption_history/projects, let's use the same start date, end date, and level of granularity as our account-level request: hourly metrics between June 30th and July 2nd, 2024.
Response
Project-level metrics (for the current billing period)
To get basic billing period-based consumption metrics for each project in the organization org-ocean-art-12345678, include org_id in the GET /projects request for consumption metrics: