Skip to main content
GET
/
unit_costs
Get all unit costs for a cost report
curl --request GET \
  --url https://api.vantage.sh/v2/unit_costs \
  --header 'Authorization: Bearer <token>'
{
  "links": {
    "self": "https://api.vantage.sh/v2/unit_costs?cost_report_token=rprt_ea7dbb4f5783d677",
    "first": "https://api.vantage.sh/v2/unit_costs?cost_report_token=rprt_ea7dbb4f5783d677&page=1",
    "next": null,
    "last": null,
    "prev": null
  },
  "unit_costs": [
    {
      "business_metric_token": "bsnss_mtrc_3080a050c04104ff",
      "business_metric_title": "Biz Metric",
      "unit_cost_amount": "21.7",
      "business_metric_amount": "3.71",
      "scale": "1.0",
      "date": "2023-06-05"
    },
    {
      "business_metric_token": "bsnss_mtrc_4999b969d95095ef",
      "business_metric_title": "Different Biz Metric",
      "unit_cost_amount": "101.11",
      "business_metric_amount": "43.21",
      "scale": "1.0",
      "date": "2023-06-05"
    },
    {
      "business_metric_token": "bsnss_mtrc_3080a050c04104ff",
      "business_metric_title": "Biz Metric",
      "unit_cost_amount": "18.9",
      "business_metric_amount": "3.71",
      "scale": "1.0",
      "date": "2023-06-06"
    },
    {
      "business_metric_token": "bsnss_mtrc_4999b969d95095ef",
      "business_metric_title": "Different Biz Metric",
      "unit_cost_amount": "121.12",
      "business_metric_amount": "38.1",
      "scale": "1.0",
      "date": "2023-06-06"
    },
    {
      "business_metric_token": "bsnss_mtrc_3080a050c04104ff",
      "business_metric_title": "Biz Metric",
      "unit_cost_amount": "21.2",
      "business_metric_amount": "3.51",
      "scale": "1.0",
      "date": "2023-06-07"
    }
  ]
}

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.

Query Parameters

cost_report_token
string
required

The CostReport token.

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
order
enum<string>
default:desc

Whether to order unit costs by date in an ascending or descending manner.

Available options:
asc,
desc
limit
integer<int32>

The amount of results to return. The maximum is 1000.

page
integer<int32>

The page of results to return.

Response

UnitCosts model

unit_costs
object[]
required