curl --request POST \
--url https://api.vantage.sh/v2/cost_reports \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "<string>",
"previous_period_end_date": "<string>",
"end_date": "<string>",
"workspace_token": "<string>",
"custom_calculation_tokens": [
"<string>"
],
"groupings": "<string>",
"filter": "<string>",
"saved_filter_tokens": [
"<string>"
],
"business_metric_tokens_with_metadata": [
{
"business_metric_token": "<string>",
"unit_scale": "per_unit",
"calculation_type": "unit_cost",
"label": "<string>",
"label_filter": [
"<string>"
],
"label_filters": {
"team": [
"platform",
"finops"
],
"environment": [
"production"
]
}
}
],
"folder_token": "<string>",
"settings": {
"include_credits": false,
"include_refunds": false,
"include_discounts": true,
"include_tax": true,
"amortize": true,
"unallocated": false,
"aggregate_by": "cost",
"show_previous_period": true,
"complete_period": false,
"table_column_order": [
"<string>"
]
},
"previous_period_start_date": "<string>",
"start_date": "<string>",
"chart_type": "line",
"date_bin": "cumulative",
"chart_settings": {
"x_axis_dimension": [
"<string>"
]
}
}
'import requests
url = "https://api.vantage.sh/v2/cost_reports"
payload = {
"title": "<string>",
"previous_period_end_date": "<string>",
"end_date": "<string>",
"workspace_token": "<string>",
"custom_calculation_tokens": ["<string>"],
"groupings": "<string>",
"filter": "<string>",
"saved_filter_tokens": ["<string>"],
"business_metric_tokens_with_metadata": [
{
"business_metric_token": "<string>",
"unit_scale": "per_unit",
"calculation_type": "unit_cost",
"label": "<string>",
"label_filter": ["<string>"],
"label_filters": {
"team": ["platform", "finops"],
"environment": ["production"]
}
}
],
"folder_token": "<string>",
"settings": {
"include_credits": False,
"include_refunds": False,
"include_discounts": True,
"include_tax": True,
"amortize": True,
"unallocated": False,
"aggregate_by": "cost",
"show_previous_period": True,
"complete_period": False,
"table_column_order": ["<string>"]
},
"previous_period_start_date": "<string>",
"start_date": "<string>",
"chart_type": "line",
"date_bin": "cumulative",
"chart_settings": { "x_axis_dimension": ["<string>"] }
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
title: '<string>',
previous_period_end_date: '<string>',
end_date: '<string>',
workspace_token: '<string>',
custom_calculation_tokens: ['<string>'],
groupings: '<string>',
filter: '<string>',
saved_filter_tokens: ['<string>'],
business_metric_tokens_with_metadata: [
{
business_metric_token: '<string>',
unit_scale: 'per_unit',
calculation_type: 'unit_cost',
label: '<string>',
label_filter: ['<string>'],
label_filters: {team: ['platform', 'finops'], environment: ['production']}
}
],
folder_token: '<string>',
settings: {
include_credits: false,
include_refunds: false,
include_discounts: true,
include_tax: true,
amortize: true,
unallocated: false,
aggregate_by: 'cost',
show_previous_period: true,
complete_period: false,
table_column_order: ['<string>']
},
previous_period_start_date: '<string>',
start_date: '<string>',
chart_type: 'line',
date_bin: 'cumulative',
chart_settings: {x_axis_dimension: ['<string>']}
})
};
fetch('https://api.vantage.sh/v2/cost_reports', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.vantage.sh/v2/cost_reports",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'title' => '<string>',
'previous_period_end_date' => '<string>',
'end_date' => '<string>',
'workspace_token' => '<string>',
'custom_calculation_tokens' => [
'<string>'
],
'groupings' => '<string>',
'filter' => '<string>',
'saved_filter_tokens' => [
'<string>'
],
'business_metric_tokens_with_metadata' => [
[
'business_metric_token' => '<string>',
'unit_scale' => 'per_unit',
'calculation_type' => 'unit_cost',
'label' => '<string>',
'label_filter' => [
'<string>'
],
'label_filters' => [
'team' => [
'platform',
'finops'
],
'environment' => [
'production'
]
]
]
],
'folder_token' => '<string>',
'settings' => [
'include_credits' => false,
'include_refunds' => false,
'include_discounts' => true,
'include_tax' => true,
'amortize' => true,
'unallocated' => false,
'aggregate_by' => 'cost',
'show_previous_period' => true,
'complete_period' => false,
'table_column_order' => [
'<string>'
]
],
'previous_period_start_date' => '<string>',
'start_date' => '<string>',
'chart_type' => 'line',
'date_bin' => 'cumulative',
'chart_settings' => [
'x_axis_dimension' => [
'<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.vantage.sh/v2/cost_reports"
payload := strings.NewReader("{\n \"title\": \"<string>\",\n \"previous_period_end_date\": \"<string>\",\n \"end_date\": \"<string>\",\n \"workspace_token\": \"<string>\",\n \"custom_calculation_tokens\": [\n \"<string>\"\n ],\n \"groupings\": \"<string>\",\n \"filter\": \"<string>\",\n \"saved_filter_tokens\": [\n \"<string>\"\n ],\n \"business_metric_tokens_with_metadata\": [\n {\n \"business_metric_token\": \"<string>\",\n \"unit_scale\": \"per_unit\",\n \"calculation_type\": \"unit_cost\",\n \"label\": \"<string>\",\n \"label_filter\": [\n \"<string>\"\n ],\n \"label_filters\": {\n \"team\": [\n \"platform\",\n \"finops\"\n ],\n \"environment\": [\n \"production\"\n ]\n }\n }\n ],\n \"folder_token\": \"<string>\",\n \"settings\": {\n \"include_credits\": false,\n \"include_refunds\": false,\n \"include_discounts\": true,\n \"include_tax\": true,\n \"amortize\": true,\n \"unallocated\": false,\n \"aggregate_by\": \"cost\",\n \"show_previous_period\": true,\n \"complete_period\": false,\n \"table_column_order\": [\n \"<string>\"\n ]\n },\n \"previous_period_start_date\": \"<string>\",\n \"start_date\": \"<string>\",\n \"chart_type\": \"line\",\n \"date_bin\": \"cumulative\",\n \"chart_settings\": {\n \"x_axis_dimension\": [\n \"<string>\"\n ]\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.vantage.sh/v2/cost_reports")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"<string>\",\n \"previous_period_end_date\": \"<string>\",\n \"end_date\": \"<string>\",\n \"workspace_token\": \"<string>\",\n \"custom_calculation_tokens\": [\n \"<string>\"\n ],\n \"groupings\": \"<string>\",\n \"filter\": \"<string>\",\n \"saved_filter_tokens\": [\n \"<string>\"\n ],\n \"business_metric_tokens_with_metadata\": [\n {\n \"business_metric_token\": \"<string>\",\n \"unit_scale\": \"per_unit\",\n \"calculation_type\": \"unit_cost\",\n \"label\": \"<string>\",\n \"label_filter\": [\n \"<string>\"\n ],\n \"label_filters\": {\n \"team\": [\n \"platform\",\n \"finops\"\n ],\n \"environment\": [\n \"production\"\n ]\n }\n }\n ],\n \"folder_token\": \"<string>\",\n \"settings\": {\n \"include_credits\": false,\n \"include_refunds\": false,\n \"include_discounts\": true,\n \"include_tax\": true,\n \"amortize\": true,\n \"unallocated\": false,\n \"aggregate_by\": \"cost\",\n \"show_previous_period\": true,\n \"complete_period\": false,\n \"table_column_order\": [\n \"<string>\"\n ]\n },\n \"previous_period_start_date\": \"<string>\",\n \"start_date\": \"<string>\",\n \"chart_type\": \"line\",\n \"date_bin\": \"cumulative\",\n \"chart_settings\": {\n \"x_axis_dimension\": [\n \"<string>\"\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vantage.sh/v2/cost_reports")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"title\": \"<string>\",\n \"previous_period_end_date\": \"<string>\",\n \"end_date\": \"<string>\",\n \"workspace_token\": \"<string>\",\n \"custom_calculation_tokens\": [\n \"<string>\"\n ],\n \"groupings\": \"<string>\",\n \"filter\": \"<string>\",\n \"saved_filter_tokens\": [\n \"<string>\"\n ],\n \"business_metric_tokens_with_metadata\": [\n {\n \"business_metric_token\": \"<string>\",\n \"unit_scale\": \"per_unit\",\n \"calculation_type\": \"unit_cost\",\n \"label\": \"<string>\",\n \"label_filter\": [\n \"<string>\"\n ],\n \"label_filters\": {\n \"team\": [\n \"platform\",\n \"finops\"\n ],\n \"environment\": [\n \"production\"\n ]\n }\n }\n ],\n \"folder_token\": \"<string>\",\n \"settings\": {\n \"include_credits\": false,\n \"include_refunds\": false,\n \"include_discounts\": true,\n \"include_tax\": true,\n \"amortize\": true,\n \"unallocated\": false,\n \"aggregate_by\": \"cost\",\n \"show_previous_period\": true,\n \"complete_period\": false,\n \"table_column_order\": [\n \"<string>\"\n ]\n },\n \"previous_period_start_date\": \"<string>\",\n \"start_date\": \"<string>\",\n \"chart_type\": \"line\",\n \"date_bin\": \"cumulative\",\n \"chart_settings\": {\n \"x_axis_dimension\": [\n \"<string>\"\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"token": "rprt_299359872859a568",
"custom_calculation_tokens": [],
"title": "New Cost Report",
"folder_token": "fldr_736175272c30b820",
"saved_filter_tokens": [
"svd_fltr_3cf17b5bd79e849c"
],
"business_metric_tokens_with_metadata": [
{
"business_metric_token": "bsnss_mtrc_b90d5fe5fbff292d",
"unit_scale": "per_thousand",
"label_filter": [
"CBGB",
"Roxy",
"Studio 54",
""
]
}
],
"default_forecast": {
"kind": "baseline"
},
"filter": "costs.provider = 'aws' AND costs.service = 'Amazon Simple Storage Service'",
"groupings": "service,provider",
"settings": {
"include_credits": false,
"include_refunds": false,
"include_discounts": true,
"include_tax": true,
"amortize": true,
"unallocated": false,
"aggregate_by": "cost",
"show_previous_period": true,
"complete_period": false
},
"created_at": "2024-07-03T00:00:00Z",
"workspace_token": "wrkspc_9e2675148d6275f8",
"previous_period_start_date": null,
"previous_period_end_date": null,
"start_date": "2024-07-01",
"end_date": "2024-07-31",
"date_interval": "this_month",
"chart_type": "bar",
"date_bin": "day",
"chart_settings": {
"y_axis_dimension": "cost",
"x_axis_dimension": [
"date"
]
}
}{
"errors": [
"<string>"
],
"links": {
"self": "<string>",
"first": "<string>",
"next": "<string>",
"last": "<string>",
"prev": "<string>"
}
}{
"errors": [
"<string>"
],
"links": {
"self": "<string>",
"first": "<string>",
"next": "<string>",
"last": "<string>",
"prev": "<string>"
}
}Create cost report
Create a CostReport.
curl --request POST \
--url https://api.vantage.sh/v2/cost_reports \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "<string>",
"previous_period_end_date": "<string>",
"end_date": "<string>",
"workspace_token": "<string>",
"custom_calculation_tokens": [
"<string>"
],
"groupings": "<string>",
"filter": "<string>",
"saved_filter_tokens": [
"<string>"
],
"business_metric_tokens_with_metadata": [
{
"business_metric_token": "<string>",
"unit_scale": "per_unit",
"calculation_type": "unit_cost",
"label": "<string>",
"label_filter": [
"<string>"
],
"label_filters": {
"team": [
"platform",
"finops"
],
"environment": [
"production"
]
}
}
],
"folder_token": "<string>",
"settings": {
"include_credits": false,
"include_refunds": false,
"include_discounts": true,
"include_tax": true,
"amortize": true,
"unallocated": false,
"aggregate_by": "cost",
"show_previous_period": true,
"complete_period": false,
"table_column_order": [
"<string>"
]
},
"previous_period_start_date": "<string>",
"start_date": "<string>",
"chart_type": "line",
"date_bin": "cumulative",
"chart_settings": {
"x_axis_dimension": [
"<string>"
]
}
}
'import requests
url = "https://api.vantage.sh/v2/cost_reports"
payload = {
"title": "<string>",
"previous_period_end_date": "<string>",
"end_date": "<string>",
"workspace_token": "<string>",
"custom_calculation_tokens": ["<string>"],
"groupings": "<string>",
"filter": "<string>",
"saved_filter_tokens": ["<string>"],
"business_metric_tokens_with_metadata": [
{
"business_metric_token": "<string>",
"unit_scale": "per_unit",
"calculation_type": "unit_cost",
"label": "<string>",
"label_filter": ["<string>"],
"label_filters": {
"team": ["platform", "finops"],
"environment": ["production"]
}
}
],
"folder_token": "<string>",
"settings": {
"include_credits": False,
"include_refunds": False,
"include_discounts": True,
"include_tax": True,
"amortize": True,
"unallocated": False,
"aggregate_by": "cost",
"show_previous_period": True,
"complete_period": False,
"table_column_order": ["<string>"]
},
"previous_period_start_date": "<string>",
"start_date": "<string>",
"chart_type": "line",
"date_bin": "cumulative",
"chart_settings": { "x_axis_dimension": ["<string>"] }
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
title: '<string>',
previous_period_end_date: '<string>',
end_date: '<string>',
workspace_token: '<string>',
custom_calculation_tokens: ['<string>'],
groupings: '<string>',
filter: '<string>',
saved_filter_tokens: ['<string>'],
business_metric_tokens_with_metadata: [
{
business_metric_token: '<string>',
unit_scale: 'per_unit',
calculation_type: 'unit_cost',
label: '<string>',
label_filter: ['<string>'],
label_filters: {team: ['platform', 'finops'], environment: ['production']}
}
],
folder_token: '<string>',
settings: {
include_credits: false,
include_refunds: false,
include_discounts: true,
include_tax: true,
amortize: true,
unallocated: false,
aggregate_by: 'cost',
show_previous_period: true,
complete_period: false,
table_column_order: ['<string>']
},
previous_period_start_date: '<string>',
start_date: '<string>',
chart_type: 'line',
date_bin: 'cumulative',
chart_settings: {x_axis_dimension: ['<string>']}
})
};
fetch('https://api.vantage.sh/v2/cost_reports', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.vantage.sh/v2/cost_reports",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'title' => '<string>',
'previous_period_end_date' => '<string>',
'end_date' => '<string>',
'workspace_token' => '<string>',
'custom_calculation_tokens' => [
'<string>'
],
'groupings' => '<string>',
'filter' => '<string>',
'saved_filter_tokens' => [
'<string>'
],
'business_metric_tokens_with_metadata' => [
[
'business_metric_token' => '<string>',
'unit_scale' => 'per_unit',
'calculation_type' => 'unit_cost',
'label' => '<string>',
'label_filter' => [
'<string>'
],
'label_filters' => [
'team' => [
'platform',
'finops'
],
'environment' => [
'production'
]
]
]
],
'folder_token' => '<string>',
'settings' => [
'include_credits' => false,
'include_refunds' => false,
'include_discounts' => true,
'include_tax' => true,
'amortize' => true,
'unallocated' => false,
'aggregate_by' => 'cost',
'show_previous_period' => true,
'complete_period' => false,
'table_column_order' => [
'<string>'
]
],
'previous_period_start_date' => '<string>',
'start_date' => '<string>',
'chart_type' => 'line',
'date_bin' => 'cumulative',
'chart_settings' => [
'x_axis_dimension' => [
'<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.vantage.sh/v2/cost_reports"
payload := strings.NewReader("{\n \"title\": \"<string>\",\n \"previous_period_end_date\": \"<string>\",\n \"end_date\": \"<string>\",\n \"workspace_token\": \"<string>\",\n \"custom_calculation_tokens\": [\n \"<string>\"\n ],\n \"groupings\": \"<string>\",\n \"filter\": \"<string>\",\n \"saved_filter_tokens\": [\n \"<string>\"\n ],\n \"business_metric_tokens_with_metadata\": [\n {\n \"business_metric_token\": \"<string>\",\n \"unit_scale\": \"per_unit\",\n \"calculation_type\": \"unit_cost\",\n \"label\": \"<string>\",\n \"label_filter\": [\n \"<string>\"\n ],\n \"label_filters\": {\n \"team\": [\n \"platform\",\n \"finops\"\n ],\n \"environment\": [\n \"production\"\n ]\n }\n }\n ],\n \"folder_token\": \"<string>\",\n \"settings\": {\n \"include_credits\": false,\n \"include_refunds\": false,\n \"include_discounts\": true,\n \"include_tax\": true,\n \"amortize\": true,\n \"unallocated\": false,\n \"aggregate_by\": \"cost\",\n \"show_previous_period\": true,\n \"complete_period\": false,\n \"table_column_order\": [\n \"<string>\"\n ]\n },\n \"previous_period_start_date\": \"<string>\",\n \"start_date\": \"<string>\",\n \"chart_type\": \"line\",\n \"date_bin\": \"cumulative\",\n \"chart_settings\": {\n \"x_axis_dimension\": [\n \"<string>\"\n ]\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.vantage.sh/v2/cost_reports")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"<string>\",\n \"previous_period_end_date\": \"<string>\",\n \"end_date\": \"<string>\",\n \"workspace_token\": \"<string>\",\n \"custom_calculation_tokens\": [\n \"<string>\"\n ],\n \"groupings\": \"<string>\",\n \"filter\": \"<string>\",\n \"saved_filter_tokens\": [\n \"<string>\"\n ],\n \"business_metric_tokens_with_metadata\": [\n {\n \"business_metric_token\": \"<string>\",\n \"unit_scale\": \"per_unit\",\n \"calculation_type\": \"unit_cost\",\n \"label\": \"<string>\",\n \"label_filter\": [\n \"<string>\"\n ],\n \"label_filters\": {\n \"team\": [\n \"platform\",\n \"finops\"\n ],\n \"environment\": [\n \"production\"\n ]\n }\n }\n ],\n \"folder_token\": \"<string>\",\n \"settings\": {\n \"include_credits\": false,\n \"include_refunds\": false,\n \"include_discounts\": true,\n \"include_tax\": true,\n \"amortize\": true,\n \"unallocated\": false,\n \"aggregate_by\": \"cost\",\n \"show_previous_period\": true,\n \"complete_period\": false,\n \"table_column_order\": [\n \"<string>\"\n ]\n },\n \"previous_period_start_date\": \"<string>\",\n \"start_date\": \"<string>\",\n \"chart_type\": \"line\",\n \"date_bin\": \"cumulative\",\n \"chart_settings\": {\n \"x_axis_dimension\": [\n \"<string>\"\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vantage.sh/v2/cost_reports")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"title\": \"<string>\",\n \"previous_period_end_date\": \"<string>\",\n \"end_date\": \"<string>\",\n \"workspace_token\": \"<string>\",\n \"custom_calculation_tokens\": [\n \"<string>\"\n ],\n \"groupings\": \"<string>\",\n \"filter\": \"<string>\",\n \"saved_filter_tokens\": [\n \"<string>\"\n ],\n \"business_metric_tokens_with_metadata\": [\n {\n \"business_metric_token\": \"<string>\",\n \"unit_scale\": \"per_unit\",\n \"calculation_type\": \"unit_cost\",\n \"label\": \"<string>\",\n \"label_filter\": [\n \"<string>\"\n ],\n \"label_filters\": {\n \"team\": [\n \"platform\",\n \"finops\"\n ],\n \"environment\": [\n \"production\"\n ]\n }\n }\n ],\n \"folder_token\": \"<string>\",\n \"settings\": {\n \"include_credits\": false,\n \"include_refunds\": false,\n \"include_discounts\": true,\n \"include_tax\": true,\n \"amortize\": true,\n \"unallocated\": false,\n \"aggregate_by\": \"cost\",\n \"show_previous_period\": true,\n \"complete_period\": false,\n \"table_column_order\": [\n \"<string>\"\n ]\n },\n \"previous_period_start_date\": \"<string>\",\n \"start_date\": \"<string>\",\n \"chart_type\": \"line\",\n \"date_bin\": \"cumulative\",\n \"chart_settings\": {\n \"x_axis_dimension\": [\n \"<string>\"\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"token": "rprt_299359872859a568",
"custom_calculation_tokens": [],
"title": "New Cost Report",
"folder_token": "fldr_736175272c30b820",
"saved_filter_tokens": [
"svd_fltr_3cf17b5bd79e849c"
],
"business_metric_tokens_with_metadata": [
{
"business_metric_token": "bsnss_mtrc_b90d5fe5fbff292d",
"unit_scale": "per_thousand",
"label_filter": [
"CBGB",
"Roxy",
"Studio 54",
""
]
}
],
"default_forecast": {
"kind": "baseline"
},
"filter": "costs.provider = 'aws' AND costs.service = 'Amazon Simple Storage Service'",
"groupings": "service,provider",
"settings": {
"include_credits": false,
"include_refunds": false,
"include_discounts": true,
"include_tax": true,
"amortize": true,
"unallocated": false,
"aggregate_by": "cost",
"show_previous_period": true,
"complete_period": false
},
"created_at": "2024-07-03T00:00:00Z",
"workspace_token": "wrkspc_9e2675148d6275f8",
"previous_period_start_date": null,
"previous_period_end_date": null,
"start_date": "2024-07-01",
"end_date": "2024-07-31",
"date_interval": "this_month",
"chart_type": "bar",
"date_bin": "day",
"chart_settings": {
"y_axis_dimension": "cost",
"x_axis_dimension": [
"date"
]
}
}{
"errors": [
"<string>"
],
"links": {
"self": "<string>",
"first": "<string>",
"next": "<string>",
"last": "<string>",
"prev": "<string>"
}
}{
"errors": [
"<string>"
],
"links": {
"self": "<string>",
"first": "<string>",
"next": "<string>",
"last": "<string>",
"prev": "<string>"
}
}Authorizations
Body
Create a CostReport.
Grouping values for aggregating costs on the report. Valid groupings: account_id, billing_account_id, charge_type, cost_category, cost_subcategory, provider, region, resource_id, service, tagged, usage_unit, tag:<tag_value>. If providing multiple groupings, join as comma separated values: groupings=provider,service,region
The filter query language to apply to the CostReport. Additional documentation available at https://docs.vantage.sh/vql.
The date interval of the CostReport. Incompatible with 'start_date' and 'end_date' parameters. Defaults to 'this_month' if start_date and end_date are not provided.
this_month, last_7_days, last_30_days, last_month, last_3_months, last_6_months, custom, last_12_months, last_24_months, last_36_months, next_month, next_3_months, next_6_months, next_12_months, year_to_date, last_3_days, last_14_days Response
CostReport model
The filter applied to the CostReport. Additional documentation available at https://docs.vantage.sh/vql.