Skip to main content
POST
/
unit_costs
/
data_exports
Generate data export of unit costs
curl --request POST \
  --url https://api.vantage.sh/v2/unit_costs/data_exports \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "cost_report_token": "<string>",
  "workspace_token": "<string>",
  "start_date": "<string>",
  "end_date": "<string>",
  "date_bin": "day"
}
'
{
  "token": "dta_xprt_abcd1234567890",
  "status": "pending",
  "created_at": "2025-03-20T12:00:00Z",
  "export_type": "cost_report",
  "manifest": {
    "files": "",
    "completed_at": "2025-03-20T12:00:00Z",
    "valid_until": "2025-03-20T12:00:00Z"
  },
  "attributes": "<string>"
}

Authorizations

Authorization
string
header
required

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

Body

application/json
cost_report_token
string
required

The CostReport token.

workspace_token
string

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

start_date
string

First date you would like to filter unit costs from. Defaults to the report's default. ISO 8601 formatted.

end_date
string

Last date you would like to filter unit costs to. Defaults to the report's default. ISO 8601 formatted.

date_bin
enum<string>

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

Available options:
day,
week,
month,
quarter

Response

The data export has been queued and will be available at the location specified in the Location header.

DataExport model

token
string
Example:

"dta_xprt_abcd1234567890"

status
string
Example:

"pending"

created_at
string
Example:

"2025-03-20T12:00:00Z"

export_type
string
Example:

"cost_report"

manifest
object
attributes
string