Skip to main content
POST
/
costs
/
data_exports
Generate cost data export
curl --request POST \
  --url https://api.vantage.sh/v2/costs/data_exports \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "cost_report_token": "<string>",
  "filter": "<string>",
  "workspace_token": "<string>",
  "start_date": "<string>",
  "end_date": "<string>",
  "groupings": [
    "<string>"
  ],
  "date_bin": "day",
  "schema": "vntg",
  "settings": {
    "include_credits": false,
    "include_refunds": false,
    "include_discounts": true,
    "include_tax": true,
    "amortize": true,
    "unallocated": false,
    "aggregate_by": "cost",
    "show_previous_period": true
  }
}
'
This response has no body data.

Documentation Index

Fetch the complete documentation index at: https://docs.vantage.sh/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Body

application/json

Generate a DataExport of costs.

cost_report_token
string

The CostReport token.

filter
string

The VQL filter to apply to the costs. If this is supplied you do not need cost_report_token.

workspace_token
string

The token of the Workspace to query costs from. Ignored if 'cost_report_token' is set. Required if the API token is associated with multiple Workspaces.

start_date
string

First date you would like to filter costs from. ISO 8601 formatted.

end_date
string

Last date you would like to filter costs to. ISO 8601 formatted.

groupings
string[]

Group the results by specific field(s). Defaults to provider, service, account_id. Valid groupings: account_id, billing_account_id, charge_type, cost_category, cost_subcategory, provider, region, resource_id, service, tagged, tag:<tag_value>. If providing multiple groupings, join as comma separated values: groupings=provider,service,region

date_bin
enum<string>

The date bin of the costs. Defaults to the report's default or day.

Available options:
day,
week,
month,
quarter,
hour
schema
enum<string>
default:vntg

The schema of the data export.

Available options:
vntg,
focus,
comparison
settings
object

Cost-related settings.

Response