Retrieve account consumption metrics (legacy plans)

Retrieves consumption metrics for Scale and Enterprise plan accounts, and for legacy Scale, Business, and Enterprise plan accounts. Consumption history begins at the time the account was upgraded to a supported plan.

Deprecated: This endpoint will be removed on June 1, 2026.

Query Params
date-time
required

Specify the start date-time for the consumption period. The date-time value is rounded according to the specified granularity. For example, 2024-03-15T15:30:00Z for daily granularity will be rounded to 2024-03-15T00:00:00Z. The specified date-time value must respect the specified granularity:

  • For hourly, consumption metrics are limited to the last 168 hours.
  • For daily, consumption metrics are limited to the last 60 days.
  • For monthly, consumption metrics are limited to the past year.

The consumption history is available starting from March 1, 2024, at 00:00:00 UTC.

date-time
required

Specify the end date-time for the consumption period. The date-time value is rounded according to the specified granularity. For example, 2024-03-15T15:30:00Z for daily granularity will be rounded to 2024-03-15T00:00:00Z. The specified date-time value must respect the specified granularity:

  • For hourly, consumption metrics are limited to the last 168 hours.
  • For daily, consumption metrics are limited to the last 60 days.
  • For monthly, consumption metrics are limited to the past year.
string
enum
required

Specify the granularity of consumption metrics. Hourly, daily, and monthly metrics are available for the last 168 hours, 60 days, and 1 year, respectively.

Allowed:
string

Specify the organization for which the consumption metrics should be returned. If this parameter is not provided, the endpoint will return the metrics for the authenticated user's account.

boolean
deprecated

The field is deprecated. Please use metrics instead. If metrics is specified, this field is ignored. Include metrics utilized in previous pricing models.

  • data_storage_bytes_hour: The sum of the maximum observed storage values for each hour for each project, which never decreases.
metrics
array of strings

Specify a list of metrics to include in the response. If omitted, active_time, compute_time, written_data, synthetic_storage_size are returned. Possible values:

  • active_time_seconds
  • compute_time_seconds
  • written_data_bytes
  • synthetic_storage_size_bytes
  • data_storage_bytes_hour

A list of metrics can be specified as an array of parameter values or as a comma-separated list in a single parameter value.

  • As an array of parameter values: metrics=cpu_seconds&metrics=ram_bytes
  • As a comma-separated list in a single parameter value: metrics=cpu_seconds,ram_bytes
metrics
Responses

Language
Credentials
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json