openapi: 3.0.1
info:
title: Vantage AccessGrants BusinessMetrics API
description: The Vantage API provides programmatic access to the Vantage cloud cost management and FinOps platform. It covers cost reporting and querying (Costs, Cost Reports, forecasts, unit costs), cost visibility and optimization (Resources, Recommendations, Financial Commitments, Kubernetes efficiency), governance and alerting (Budgets, Budget Alerts, Cost Alerts, Anomaly Alerts and Notifications), organization (Segments, Folders, Saved Filters, Dashboards, Workspaces, Teams), and billing (Billing Profiles, Billing Rules, Invoices). The API spans AWS, Azure, GCP, Kubernetes, Datadog, Snowflake, MongoDB, and other supported providers. Base URL https://api.vantage.sh/v2. Authentication is via OAuth2 (client credentials / bearer token) with read and write scopes.
termsOfService: https://www.vantage.sh/terms-of-use
contact:
name: Vantage Support
url: https://www.vantage.sh
email: support@vantage.sh
version: 2.0.0
servers:
- url: https://api.vantage.sh/v2
security:
- oauth2:
- read
tags:
- name: BusinessMetrics
description: Operations about BusinessMetrics
paths:
/business_metrics:
get:
tags:
- BusinessMetrics
summary: Get all business metrics
description: Return all BusinessMetrics that the current API token has access to.
operationId: getBusinessMetrics
parameters:
- name: page
in: query
description: The page of results to return.
schema:
type: integer
format: int32
- name: limit
in: query
description: The amount of results to return. The maximum is 1000.
schema:
type: integer
format: int32
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/BusinessMetrics'
example:
business_metrics:
- token: bsnss_mtrc_124dc3483510ac35
title: Business Metric
created_by_token: usr_80447a58ff9821dd
cost_report_tokens_with_metadata: []
import_type: csv
integration_token: ''
- token: bsnss_mtrc_2534c89d90b714f7
title: AWS Metric
created_by_token: usr_752202a1bb7c9a70
cost_report_tokens_with_metadata: []
import_type: cloudwatch
integration_token: accss_crdntl_742fd1207f8b6816
cloudwatch_fields:
stat: Maximum
region: us-east-1
namespace: AWS/EC2
metric_name: CPUUtilization
dimensions:
- name: InstanceId
value: i-06105d0faad66r97
label_dimension: null
- token: bsnss_mtrc_c11f0f8dea953e92
title: Datadog Metric
created_by_token: usr_604fcaa892a23fe9
cost_report_tokens_with_metadata: []
import_type: datadog_metrics
integration_token: accss_crdntl_e0e11192748e69bb
datadog_metric_fields:
query: avg:system.cpu.user{*}.rollup(avg, daily)
security:
- oauth2:
- read
post:
tags:
- BusinessMetrics
summary: Create business metric
description: Create a new BusinessMetric.
operationId: createBusinessMetric
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/createBusinessMetric'
required: true
responses:
'201':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/BusinessMetric'
example:
token: bsnss_mtrc_e8d0a6f35c9f4e8c
title: New Biz Metric
created_by_token: usr_464e70f8e230fa62
cost_report_tokens_with_metadata:
- cost_report_token: rprt_67a1e1ac3bb7cefd
unit_scale: per_thousand
label_filter:
- Dev
- Prod
- Staging
- ''
import_type: csv
integration_token: ''
'404':
description: NotFound
content:
application/json:
schema:
$ref: '#/components/schemas/Errors'
'400':
description: BadRequest
content:
application/json:
schema:
$ref: '#/components/schemas/Errors'
'422':
description: UnprocessableEntity
content:
application/json:
schema:
$ref: '#/components/schemas/Errors'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/Errors'
security:
- oauth2:
- write
x-codegen-request-body-name: createBusinessMetric
/business_metrics/{business_metric_token}:
get:
tags:
- BusinessMetrics
summary: Get business metric by token
description: Return a BusinessMetric.
operationId: getBusinessMetric
parameters:
- name: business_metric_token
in: path
required: true
schema:
type: string
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/BusinessMetric'
example:
token: bsnss_mtrc_6d8f14830f9870ac
title: Quo Lux
created_by_token: usr_622d8870faf147bb
cost_report_tokens_with_metadata: []
import_type: csv
integration_token: ''
'404':
description: NotFound
content:
application/json:
schema:
$ref: '#/components/schemas/Errors'
security:
- oauth2:
- read
put:
tags:
- BusinessMetrics
summary: Update business metric
description: Updates an existing BusinessMetric.
operationId: updateBusinessMetric
parameters:
- name: business_metric_token
in: path
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/updateBusinessMetric'
required: true
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/BusinessMetric'
example:
token: bsnss_mtrc_e3d9bf77f276d23b
title: New Title
created_by_token: usr_1e4b6318373f5c98
cost_report_tokens_with_metadata:
- cost_report_token: rprt_54aa7c0519d3f1e2
unit_scale: per_thousand
label_filter:
- Dev
- Prod
- Staging
- ''
- cost_report_token: rprt_201403b36022766a
unit_scale: per_million
import_type: csv
integration_token: ''
'404':
description: NotFound
content:
application/json:
schema:
$ref: '#/components/schemas/Errors'
'400':
description: BadRequest
content:
application/json:
schema:
$ref: '#/components/schemas/Errors'
'422':
description: UnprocessableEntity
content:
application/json:
schema:
$ref: '#/components/schemas/Errors'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/Errors'
security:
- oauth2:
- write
x-codegen-request-body-name: updateBusinessMetric
delete:
tags:
- BusinessMetrics
summary: Delete business metric
description: Deletes an existing BusinessMetric.
operationId: deleteBusinessMetric
parameters:
- name: business_metric_token
in: path
required: true
schema:
type: string
responses:
'204':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/BusinessMetric'
'404':
description: NotFound
content:
application/json:
schema:
$ref: '#/components/schemas/Errors'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/Errors'
security:
- oauth2:
- write
/business_metrics/{business_metric_token}/values:
get:
tags:
- BusinessMetrics
summary: Get business metric values
description: Return values of a BusinessMetric
operationId: getBusinessMetricValues
parameters:
- name: page
in: query
description: The page of results to return.
schema:
type: integer
format: int32
- name: limit
in: query
description: The amount of results to return. The maximum is 1000.
schema:
type: integer
format: int32
- name: start_date
in: query
description: Query BusinessMetrics by the first date you would like to filter from. ISO 8601 Formatted - 2021-07-15
schema:
type: string
format: date
- name: business_metric_token
in: path
required: true
schema:
type: string
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/BusinessMetricValues'
example:
values:
- date: '2024-01-03T00:00:00Z'
amount: '300.0'
- date: '2024-01-02T00:00:00Z'
amount: '200.0'
- date: '2024-01-01T00:00:00Z'
amount: '100.0'
'404':
description: NotFound
content:
application/json:
schema:
$ref: '#/components/schemas/Errors'
security:
- oauth2:
- read
delete:
tags:
- BusinessMetrics
summary: Delete business metric values
description: Deletes Business Metric values (historical or forecasted unit metrics).
operationId: deleteBusinessMetricValues
parameters:
- name: start_date
in: query
description: Inclusive lower bound (ISO 8601 date or datetime, UTC). Date-only values start at 00:00:00 UTC that day.
schema:
type: string
- name: end_date
in: query
description: Inclusive upper bound (ISO 8601 date or datetime, UTC). Date-only values include the full calendar day through 23:59:59.999999999 UTC.
schema:
type: string
- name: label
in: query
description: When present in the query string (including as an empty value), only unit metrics with this exact label are deleted. Omit the parameter to delete all labels in range.
schema:
type: string
- name: forecasted
in: query
description: When true, deletes forecasted unit metrics instead of historical ones.
schema:
type: boolean
default: false
- name: business_metric_token
in: path
required: true
schema:
type: string
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/BusinessMetricValuesDeleteResponse'
example:
deleted_count: 120
'404':
description: NotFound
content:
application/json:
schema:
$ref: '#/components/schemas/Errors'
'422':
description: UnprocessableEntity
content:
application/json:
schema:
$ref: '#/components/schemas/Errors'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/Errors'
security:
- oauth2:
- write
/business_metrics/{business_metric_token}/forecasted_values:
get:
tags:
- BusinessMetrics
summary: Get business metric forecasted values
description: Return forecasted values of a BusinessMetric
operationId: getBusinessMetricForecastedValues
parameters:
- name: page
in: query
description: The page of results to return.
schema:
type: integer
format: int32
- name: limit
in: query
description: The amount of results to return. The maximum is 1000.
schema:
type: integer
format: int32
- name: start_date
in: query
description: Query BusinessMetrics by the first date you would like to filter from. ISO 8601 Formatted - 2021-07-15
schema:
type: string
format: date
- name: business_metric_token
in: path
required: true
schema:
type: string
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/BusinessMetricValues'
example:
values:
- date: '2025-01-03T00:00:00Z'
amount: '300.0'
- date: '2025-01-02T00:00:00Z'
amount: '200.0'
- date: '2025-01-01T00:00:00Z'
amount: '100.0'
'404':
description: NotFound
content:
application/json:
schema:
$ref: '#/components/schemas/Errors'
security:
- oauth2:
- read
/business_metrics/{business_metric_token}/values.csv:
put:
tags:
- BusinessMetrics
summary: Update business metric values from CSV
description: Updates the values for an existing BusinessMetric from a CSV file.
operationId: updateBusinessMetricValuesCSV
parameters:
- name: business_metric_token
in: path
required: true
schema:
type: string
requestBody:
content:
application/x-www-form-urlencoded:
schema:
required:
- csv
type: object
properties:
csv:
type: string
description: CSV file containing BusinessMetric dates and amounts
format: binary
forecasted:
type: boolean
description: When true, imports values as forecasted metrics instead of historical metrics.
default: false
multipart/form-data:
schema:
required:
- csv
type: object
properties:
csv:
type: string
description: CSV file containing BusinessMetric dates and amounts
format: binary
forecasted:
type: boolean
description: When true, imports values as forecasted metrics instead of historical metrics.
default: false
required: true
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/BusinessMetric'
example:
token: bsnss_mtrc_6bb1021d8651923a
title: Overhold
created_by_token: usr_ad24de73bffb7791
cost_report_tokens_with_metadata: []
import_type: csv
integration_token: ''
'404':
description: NotFound
content:
application/json:
schema:
$ref: '#/components/schemas/Errors'
'400':
description: BadRequest
content:
application/json:
schema:
$ref: '#/components/schemas/Errors'
'422':
description: UnprocessableEntity
content:
application/json:
schema:
$ref: '#/components/schemas/Errors'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/Errors'
security:
- oauth2:
- write
components:
schemas:
CloudwatchDimension:
required:
- name
- value
type: object
properties:
name:
type: string
nullable: false
value:
type: string
nullable: false
Errors:
required:
- errors
type: object
properties:
links:
$ref: '#/components/schemas/Links'
errors:
type: array
nullable: false
items:
type: string
description: Errors model
BusinessMetric:
required:
- cost_report_tokens_with_metadata
- import_type
- integration_token
- title
- token
type: object
properties:
token:
type: string
description: The token of the BusinessMetric.
nullable: false
example: bsnss_mtrc_1234
title:
type: string
description: The title of the BusinessMetric.
nullable: false
example: Total Revenue
created_by_token:
type: string
description: The token of the Creator of the BusinessMetric.
nullable: true
example: usr_1234
cost_report_tokens_with_metadata:
type: array
description: The tokens for any CostReports that use the BusinessMetric, the unit scale, and label filter.
items:
$ref: '#/components/schemas/AttachedCostReportForBusinessMetric'
import_type:
type: string
description: The type of import for the BusinessMetric.
nullable: true
example: datadog_metrics
enum:
- datadog_metrics
- cloudwatch
- snowflake_metrics
- metronome_metrics
- csv
integration_token:
type: string
description: The Integration token used to import the BusinessMetric.
nullable: true
cloudwatch_fields:
$ref: '#/components/schemas/CloudwatchFields'
datadog_metric_fields:
$ref: '#/components/schemas/DatadogMetricFields'
snowflake_metric_fields:
$ref: '#/components/schemas/SnowflakeMetricFields'
description: BusinessMetric model
BusinessMetricValues:
required:
- values
type: object
properties:
values:
type: array
items:
$ref: '#/components/schemas/BusinessMetricValue'
description: BusinessMetricValues model
SnowflakeMetricFields:
required:
- sql_query
type: object
properties:
sql_query:
type: string
description: The SQL query used to import Snowflake metrics.
nullable: false
example: SELECT date, value, label FROM my_metrics_table
BusinessMetricValuesDeleteResponse:
required:
- deleted_count
type: object
properties:
deleted_count:
type: integer
description: Number of unit metric rows removed.
format: int32
nullable: false
example: 120
description: BusinessMetricValuesDeleteResponse model
createBusinessMetric:
required:
- title
type: object
properties:
title:
type: string
description: The title of the BusinessMetrics.
cost_report_tokens_with_metadata:
type: array
description: The tokens for any CostReports that use the BusinessMetric, the unit scale, and label filter.
items:
required:
- cost_report_token
type: object
properties:
cost_report_token:
type: string
description: The token of the CostReport the BusinessMetric is attached to.
unit_scale:
type: string
description: Determines the scale of the BusinessMetric's values within the CostReport.
default: per_unit
enum:
- per_unit
- per_hundred
- per_thousand
- per_million
- per_billion
label_filter:
type: array
description: Include only values with these labels in the CostReport.
items:
type: string
values:
type: array
description: The dates, amounts, and (optional) labels for the BusinessMetric.
items:
required:
- amount
- date
type: object
properties:
date:
type: string
format: date-time
amount:
type: number
format: double
label:
type: string
nullable: true
x-omitempty: true
forecasted_values:
type: array
description: The dates, amounts, and (optional) labels for forecasted BusinessMetric values.
items:
required:
- amount
- date
type: object
properties:
date:
type: string
format: date-time
amount:
type: number
format: double
label:
type: string
nullable: true
x-omitempty: true
datadog_metric_fields:
type: object
properties:
integration_token:
type: string
description: Integration token for the account from which you would like to fetch metrics.
query:
type: string
description: Datadog metrics query string. e.g. sum:aws.applicationelb.request_count{region:us-east-1}.rollup(avg,daily)
description: Datadog metric configuration fields
cloudwatch_fields:
type: object
properties:
integration_token:
type: string
description: Integration token for the account from which you would like to fetch metrics.
stat:
type: string
region:
type: string
namespace:
type: string
metric_name:
type: string
label_dimension:
type: string
dimensions:
type: array
items:
type: object
properties:
name:
type: string
value:
type: string
description: Cloudwatch configuration fields.
snowflake_metric_fields:
type: object
properties:
integration_token:
type: string
description: Integration token for the Snowflake integration from which you would like to fetch metrics.
sql_query:
type: string
description: Snowflake SQL query returning date, value, and optional label columns.
description: Snowflake metric configuration fields.
description: Create a new BusinessMetric.
CloudwatchFields:
required:
- dimensions
- label_dimension
- metric_name
- namespace
- region
- stat
type: object
properties:
stat:
type: string
description: The time aggregation function used to import Cloudwatch metrics.
nullable: false
example: Average
enum:
- Sum
- Average
- Minimum
- Maximum
region:
type: string
description: The region used to import Cloudwatch metrics.
nullable: false
example: us-east-1
namespace:
type: string
description: The namespace used to import Cloudwatch metrics.
nullable: false
example: AWS/EC2
metric_name:
type: string
description: The metric name used to import Cloudwatch metrics.
nullable: false
example: CPUUtilization
dimensions:
type: array
description: The dimensions used to pull specific statistical data for Cloudwatch metrics.
items:
$ref: '#/components/schemas/CloudwatchDimension'
label_dimension:
type: string
description: The dimension used to aggregate the Cloudwatch metrics.
nullable: true
updateBusinessMetric:
type: object
properties:
title:
type: string
description: The title of the BusinessMetric.
cost_report_tokens_with_metadata:
type: array
description: The tokens for any CostReports that use the BusinessMetric, and the unit scale.
items:
required:
- cost_report_token
type: object
properties:
cost_report_token:
type: string
description: The token of the CostReport the BusinessMetric is attached to.
unit_scale:
type: string
description: Determines the scale of the BusinessMetric's values within the CostReport.
default: per_unit
enum:
- per_unit
- per_hundred
- per_thousand
- per_million
- per_billion
label_filter:
type: array
description: Include only values with these labels in the CostReport.
items:
type: string
values:
type: array
description: The dates, amounts, and (optional) labels for the BusinessMetric.
items:
required:
- amount
- date
type: object
properties:
date:
type: string
format: date-time
amount:
type: number
format: double
label:
type: string
nullable: true
x-omitempty: true
forecasted_values:
type: array
description: The dates, amounts, and (optional) labels for forecasted BusinessMetric values.
items:
required:
- amount
- date
type: object
properties:
date:
type: string
format: date-time
amount:
type: number
format: double
label:
type: string
nullable: true
x-omitempty: true
datadog_metric_fields:
type: object
properties:
integration_token:
type: string
description: Integration token for the account from which you would like to fetch metrics.
query:
type: string
description: Datadog metrics query string. e.g. sum:aws.applicationelb.request_count{region:us-east-1}.rollup(avg,daily)
description: Datadog metric configuration fields
cloudwatch_fields:
type: object
properties:
integration_token:
type: string
description: Integration token for the account from which you would like to fetch metrics.
stat:
type: string
region:
type: string
namespace:
type: string
metric_name:
type: string
label_dimension:
type: string
x-omitempty: false
dimensions:
type: array
items:
type: object
properties:
name:
type: string
value:
type: string
description: Cloudwatch configuration fields.
snowflake_metric_fields:
type: object
properties:
integration_token:
type: string
description: Integration token for the Snowflake integration from which you would like to fetch metrics.
sql_query:
type: string
description: Snowflake SQL query returning date, value, and optional label columns.
description: Snowflake metric configuration fields.
description: Updates an existing BusinessMetric.
DatadogMetricFields:
required:
- query
type: object
properties:
query:
type: string
description: The query used to import Datadog metrics.
nullable: false
example: sum:aws.applicationelb.request_count{region:us-east-1}.rollup(avg,daily)
Links:
type: object
properties:
self:
type: string
description: The URL of the current page of results.
nullable: true
first:
type: string
description: The URL of the first page of results.
nullable: true
next:
type: string
description: The URL of the next page of results, if one exists.
nullable: true
last:
type: string
description: The URL of the last page of results, if one exists.
nullable: true
prev:
type: string
description: The URL of the previous page of results, if one exists.
nullable: true
BusinessMetricValue:
required:
- amount
- date
type: object
properties:
date:
type: string
description: The date of the Business Metric Value. ISO 8601 formatted.
nullable: false
example: 2024-03-01+00:00
amount:
type: string
description: The amount of the Business Metric Value as a string to ensure precision.
nullable: false
example: '100.00'
label:
type: string
description: The label of the Business Metric Value.
nullable: true
example: Cost Center A
AttachedCostReportForBusinessMetric:
required:
- calculation_type
- cost_report_token
- unit_scale
type: object
properties:
cost_report_token:
type: string
description: The token of the CostReport the BusinessMetric is attached to.
nullable: true
example: rprt_1234
unit_scale:
type: string
description: Determines the scale of the BusinessMetric's values within a particular CostReport.
nullable: false
example: per_hundred
enum:
- per_unit
- per_hundred
- per_thousand
- per_million
- per_billion
calculation_type:
type: string
description: The calculation type applied when this BusinessMetric is used in the CostReport.
nullable: false
example: unit_cost
enum:
- unit_cost
- gross_margin
- usage_unit_cost
- raw_business_metric
# --- truncated at 32 KB (32 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/vantage-sh/refs/heads/main/openapi/vantage-sh-businessmetrics-api-openapi.yml