Delete business metric
curl --request DELETE \
--url https://api.vantage.sh/v2/business_metrics/{business_metric_token} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.vantage.sh/v2/business_metrics/{business_metric_token}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.vantage.sh/v2/business_metrics/{business_metric_token}', 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/business_metrics/{business_metric_token}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.vantage.sh/v2/business_metrics/{business_metric_token}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.vantage.sh/v2/business_metrics/{business_metric_token}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vantage.sh/v2/business_metrics/{business_metric_token}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"token": "bsnss_mtrc_1234",
"title": "Total Revenue",
"cost_report_tokens_with_metadata": [
{
"cost_report_token": "rprt_1234",
"unit_scale": "per_hundred",
"calculation_type": "unit_cost",
"label": "Gross Margin",
"label_filter": [
""
],
"label_filters": {
"team": [
"platform",
"finops"
],
"environment": [
"production"
]
}
}
],
"import_type": "datadog_metrics",
"integration_token": "<string>",
"created_by_token": "usr_1234",
"cloudwatch_fields": {
"stat": "Average",
"region": "us-east-1",
"namespace": "AWS/EC2",
"metric_name": "CPUUtilization",
"dimensions": [
{
"name": "<string>",
"value": "<string>"
}
],
"label_dimension": "<string>"
},
"datadog_metric_fields": {
"query": "sum:aws.applicationelb.request_count{region:us-east-1}.rollup(avg,daily)"
},
"gcp_bigquery_metric_fields": {
"sql_query": "SELECT date, value, label FROM `project.dataset.metrics`",
"query_project_id": "my-query-project"
},
"snowflake_metric_fields": {
"sql_query": "SELECT date, value, label FROM my_metrics_table"
},
"metronome_metric_fields": {
"metric_kind": "revenue",
"metric": "<string>",
"billable_metric_id": "<string>",
"billable_metric_name": "<string>"
},
"clickhouse_metric_fields": {
"query_endpoint_id": "7c6a3a87-12fd-41f5-afdf-caa4697a2886"
}
}{
"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>"
}
}{
"errors": [
"<string>"
],
"links": {
"self": "<string>",
"first": "<string>",
"next": "<string>",
"last": "<string>",
"prev": "<string>"
}
}BusinessMetrics
Delete business metric
Deletes an existing BusinessMetric.
DELETE
/
business_metrics
/
{business_metric_token}
Delete business metric
curl --request DELETE \
--url https://api.vantage.sh/v2/business_metrics/{business_metric_token} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.vantage.sh/v2/business_metrics/{business_metric_token}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.vantage.sh/v2/business_metrics/{business_metric_token}', 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/business_metrics/{business_metric_token}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.vantage.sh/v2/business_metrics/{business_metric_token}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.vantage.sh/v2/business_metrics/{business_metric_token}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vantage.sh/v2/business_metrics/{business_metric_token}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"token": "bsnss_mtrc_1234",
"title": "Total Revenue",
"cost_report_tokens_with_metadata": [
{
"cost_report_token": "rprt_1234",
"unit_scale": "per_hundred",
"calculation_type": "unit_cost",
"label": "Gross Margin",
"label_filter": [
""
],
"label_filters": {
"team": [
"platform",
"finops"
],
"environment": [
"production"
]
}
}
],
"import_type": "datadog_metrics",
"integration_token": "<string>",
"created_by_token": "usr_1234",
"cloudwatch_fields": {
"stat": "Average",
"region": "us-east-1",
"namespace": "AWS/EC2",
"metric_name": "CPUUtilization",
"dimensions": [
{
"name": "<string>",
"value": "<string>"
}
],
"label_dimension": "<string>"
},
"datadog_metric_fields": {
"query": "sum:aws.applicationelb.request_count{region:us-east-1}.rollup(avg,daily)"
},
"gcp_bigquery_metric_fields": {
"sql_query": "SELECT date, value, label FROM `project.dataset.metrics`",
"query_project_id": "my-query-project"
},
"snowflake_metric_fields": {
"sql_query": "SELECT date, value, label FROM my_metrics_table"
},
"metronome_metric_fields": {
"metric_kind": "revenue",
"metric": "<string>",
"billable_metric_id": "<string>",
"billable_metric_name": "<string>"
},
"clickhouse_metric_fields": {
"query_endpoint_id": "7c6a3a87-12fd-41f5-afdf-caa4697a2886"
}
}{
"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>"
}
}{
"errors": [
"<string>"
],
"links": {
"self": "<string>",
"first": "<string>",
"next": "<string>",
"last": "<string>",
"prev": "<string>"
}
}Authorizations
Response
BusinessMetric model