Skip to main content
PUT
/
business_metrics
/
{business_metric_token}
Update business metric
curl --request PUT \
  --url https://api.vantage.sh/v2/business_metrics/{business_metric_token} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "title": "<string>",
  "cost_report_tokens_with_metadata": [
    {
      "cost_report_token": "<string>",
      "unit_scale": "per_unit",
      "label_filter": [
        "<string>"
      ]
    }
  ],
  "values": [
    {
      "date": "2023-11-07T05:31:56Z",
      "amount": 123,
      "label": "<string>"
    }
  ],
  "forecasted_values": [
    {
      "date": "2023-11-07T05:31:56Z",
      "amount": 123,
      "label": "<string>"
    }
  ],
  "datadog_metric_fields": {
    "integration_token": "<string>",
    "query": "<string>"
  },
  "cloudwatch_fields": {
    "integration_token": "<string>",
    "stat": "<string>",
    "region": "<string>",
    "namespace": "<string>",
    "metric_name": "<string>",
    "label_dimension": "<string>",
    "dimensions": [
      {
        "name": "<string>",
        "value": "<string>"
      }
    ]
  }
}
'
{
  "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": ""
}

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.

Path Parameters

business_metric_token
string
required

Body

application/json

Updates an existing BusinessMetric.

title
string

The title of the BusinessMetric.

cost_report_tokens_with_metadata
object[]

The tokens for any CostReports that use the BusinessMetric, and the unit scale.

values
object[]

The dates, amounts, and (optional) labels for the BusinessMetric.

forecasted_values
object[]

The dates, amounts, and (optional) labels for forecasted BusinessMetric values.

datadog_metric_fields
object

Datadog metric configuration fields

cloudwatch_fields
object

Cloudwatch configuration fields.

Response

BusinessMetric model

token
string
required

The token of the BusinessMetric.

Example:

"bsnss_mtrc_1234"

title
string
required

The title of the BusinessMetric.

Example:

"Total Revenue"

cost_report_tokens_with_metadata
object[]
required

The tokens for any CostReports that use the BusinessMetric, the unit scale, and label filter.

import_type
enum<string> | null
required

The type of import for the BusinessMetric.

Available options:
datadog_metrics,
cloudwatch,
snowflake_metrics,
csv
Example:

"datadog_metrics"

integration_token
string | null
required

The Integration token used to import the BusinessMetric.

created_by_token
string | null

The token of the Creator of the BusinessMetric.

Example:

"usr_1234"

cloudwatch_fields
object
datadog_metric_fields
object
snowflake_metric_fields
object