Skip to main content
POST
/
virtual_tag_configs
Create virtual tag config
curl --request POST \
  --url https://api.vantage.sh/v2/virtual_tag_configs \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "key": "<string>",
  "overridable": true,
  "backfill_until": "2023-12-25",
  "collapsed_tag_keys": [
    {
      "key": "<string>",
      "providers": [
        "<string>"
      ]
    }
  ],
  "values": [
    {
      "filter": "<string>",
      "name": "<string>",
      "business_metric_token": "<string>",
      "cost_metric": {
        "filter": "<string>",
        "aggregation": {
          "tag": "<string>"
        }
      },
      "percentages": [
        {
          "value": "<string>",
          "pct": 123
        }
      ]
    }
  ]
}
'
{
  "token": "vtag_d5503747c5ce9a21",
  "created_by_token": "team_7589281b8e354c45",
  "key": "Expense Code",
  "overridable": false,
  "backfill_until": "2024-07-01",
  "values": [
    {
      "filter": "costs.provider = 'aws' AND\ncosts.service = 'Amazon Elastic Compute Cloud' AND\ncosts.account_id IN ('1234', '5678')\n",
      "name": "EXPC-1234"
    },
    {
      "filter": "(\n  (costs.provider = 'aws' AND costs.account_id IN ('1234', '5678')) OR\n  (costs.provider = 'gcp' AND costs.service = 'Google Compute Engine')\n)\n",
      "name": "EXPC-9876"
    }
  ]
}

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Body

application/json

Create a new VirtualTagConfig.

key
string
required

The key of the VirtualTagConfig.

overridable
boolean
required

Whether the VirtualTagConfig can override a provider-supplied tag on a matching Cost.

backfill_until
string<date>

The earliest month the VirtualTagConfig should be backfilled to.

collapsed_tag_keys
object[]

Tag keys to collapse values for.

values
object[]

Values for the VirtualTagConfig, with match precedence determined by order in the list.

Response

VirtualTagConfig model

token
string
required

The token of the VirtualTagConfig.

Example:

"vtag_1234"

created_by_token
string | null
required

The token of the Creator of the VirtualTagConfig.

Example:

"usr_1234"

key
string
required

The key of the VirtualTagConfig.

Example:

"Cost Center"

overridable
boolean
required

Whether the VirtualTagConfig can override a provider-supplied tag on a matching Cost.

backfill_until
string
required

The earliest month VirtualTagConfig should be backfilled to.

Example:

"2025-07-01"

values
object[]
required

Values for the VirtualTagConfig, with match precedence determined by their relative order in the list.

collapsed_tag_keys
object[]

Tag keys to collapse values for.