Billing

Query Cost Data

Retrieves cost and usage data for the given time frame.

Use Query Cost Data to analyze backup costs by cloud provider, resource type, and resource. For details on exploring your costs visually in the Eon console, see About Cost Explorer.

post/v1/cost-data

Request

  • Base URL: https://%7Baccount-domain%7D.console.eon.io/api
  • URL: https://%7Baccount-domain%7D.console.eon.io/api/v1/cost-data
  • Auth: HTTP bearer

Query parameters

pageSizeinteger

Maximum number of cost records to return in a single response.

pageTokenstring

Cursor that points to the first record of the next page of results. Get this value from the previous response. To preserve the results in the same order, use the same time frame, grouping, and filters in the first request as all subsequent requests.

Request body

costUnit'CREDITS' | 'USD' | 'UNSPECIFIED'

Currency unit for cost amounts. Use CREDITS for Eon credits and USD for U.S. dollars. UNSPECIFIED is supported only in responses.

usageUnit'BYTE_MONTHS' | 'BYTES' | 'UNSPECIFIED'

Whether usage is returned in byte-months, raw bytes, operations, or object-months for the specified timeFrame. UNSPECIFIED is supported only in responses.

granularity'HOURLY' | 'DAILY' | 'MONTHLY' | 'TOTAL'

Time granularity for aggregating cost data.

groupBy'SOURCE_ACCOUNT' | 'CLOUD_PROVIDER' | 'RESOURCE_TYPE' | 'RESOURCE' | 'RESOURCE_AND_VAULT'

Dimension to group cost data by in the response.

topNinteger

Limits the response to the top n resources by total cost over timeFrame, and folds all other matching resources into one aggregated record per time period in granularity. Use this when a resource-level query would return too many records—for example, to build an efficient top-spenders chart without requesting every resource for every period.

Applies only when grouping by RESOURCE or RESOURCE_AND_VAULT. Otherwise, ignored. Omit to return all matching resources.

Aggregated records have no dimensions and typically have resourceCount greater than 1.

Response

Cost data retrieved.

totalCountinteger required

Total number of cost records that matched the time frame and filter options.

resourceCountinteger required

Total number of resources that incurred costs during the specified time frame.

nextTokenstring

Cursor that points to the first record of the next page of results. Pass this value in the next request.

Changes

No recorded changes to this operation across all 1 revision of this API.