Vantage Adds Cost Allocation Segments Support to the API

by Vantage Team


Cost Allocation Segments API Endpoints

Today, Vantage announces the launch of API endpoints for managing cost allocation segments. These new endpoints will allow customers to list, create, update, and delete segments via the API. You can read more about the endpoints in the Vantage API V2 docs.

Before, customers could manage segments in the Vantage console; however, it was not possible to automate creating or updating these segments. This made it difficult for customers with complex segment structures to easily make changes across multiple segments, or even set them up in the first place.

Now, customers can script both the creation and modification of segments via new API endpoints. This makes it easy to take the input from a spreadsheet that contains a hierarchy and mappings, such as business units or cost centers, and create the segment hierarchy and corresponding filters. Just as in cost reports, segments use Vantage Query Language (VQL) to create the filter.

These new endpoints are available to all Vantage customers with the segments feature enabled. Head to the API documentation to get started. If you are interested in segments, you can head to the segments product documentation to learn more.

Frequently Asked Questions

1. What is being launched today?

Vantage is launching the ability to list, create, update, and delete segments via the API.

2. Who is the customer?

The customer is anyone who has the segments feature enabled for their account. If you would like to have segments enabled or have questions, you can email support@vantage.sh.

3. How much does this cost?

This feature is free to all customers.

4. What are the new segment endpoints?

  • GET /segments - returns a list of segments
  • POST /segments - creates a new segment
  • PUT /segments/:segment_token - updates a segment
  • DELETE /segments/:segment_token - deletes a segment

5. Can I move a segment to a new segment?

Yes, you can update the parent_segment_token parameter to move the segment to a new parent segment. This is currently only available via the API.

6. How can I specify filters for a segment?

You can specify filters for a segment using the filter parameter. This parameter takes in VQL and turns it into a filter.

7. What does a segment object look like in the API?

{
  title: String,
  priority: Number,
  track_unallocated: Boolean,
  workspace_token: String,
  filter: String,
  parent_segment_token: String
}

8. How often are segment costs updated?

Segments are currently updated once every 24 hours. Any changes you make via the API will not be immediately reflected in the cost data, as a generation step is required.

9. What is a cost allocation segment?

A segment is a namespace of costs. It comprises the following attributes:

  • Title (Required)
  • Filters (Optional; Set of filters that allocate costs to the segment)
  • Allocation Priority (Optional; Required if Filters are specified, costs are allocated in order of priority—0 is the highest.)
  • Track Unallocated (Optional; Only set at the root segment, configures whether the root segment will also create an Unallocated segment report)

10. Can I add a saved filter to a segment?

This is currently not supported, but it is on our roadmap.

11. Can I pull the costs for a segment report via the API?

This is not currently supported, but it is on our roadmap.

12. If I don’t have segments enabled in my account, how can I enable them?

You can contact support@vantage.sh to learn more and have segments enabled for your account.

13. Can I set a segment’s parent_segment_token to null?

No, this is not supported at this time. To change the parent, pass a new parent segment using the parent_segment_token parameter.

14. Can I manage segments with Terraform?

Not at this time, but it is on our near-term roadmap.

15. What happens when I remove a parent segment?

All children segments are also deleted.