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": {}
}

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 unit costs.

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,
hour

Response

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

DataExport model

token
string
required
Example:

"dta_xprt_abcd1234567890"

status
string
required
Example:

"pending"

created_at
string
required
Example:

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

export_type
string
required
Example:

"cost_report"

manifest
object
required
attributes
object
required