Today, Vantage is adding usage data to the Vantage API. Customers who use the Vantage API can now programmatically query for usage data to view their infrastructure consumption in non-monetary metrics, such as virtual machine running hours or read/write units consumed.
Previously, Vantage users could access usage data in the UI and export it to a CSV file; however, this manual approach was insufficient for organizations that needed to integrate usage data into other systems or workflows outside of Vantage. For example, many users rely on usage data such as storage sizes, virtual machine running hours, or database read/write units to generate custom reports or automate processes like internal chargebacks or customer billing. With programmatic access to usage data through the API, users can now extract this data via the /costs
API endpoint and use it for other custom reporting and processes outside of Vantage.
To get started with retrieving usage data through the API, review the API documentation. If you want to learn more about Usage-Based Reporting in Vantage, see the product documentation.
Frequently Asked Questions
1. What is being announced today?
Vantage is announcing updates to the Vantage API. You can now access provider usage data via the /costs
API endpoint.
2. Who is the customer?
The customer is anyone who wants to programmatically retrieve available usage data from their Vantage account.
3. How much does this feature cost?
This endpoint is free to all users, including those in the free tier.
4. What is the format of the endpoint?
To fetch usage data, send a GET
request to the /costs
endpoint. Note that the cost_report_token
is a required field, as this data is based on an existing, saved Cost Report.
curl --location 'https://api.vantage.sh/v2/costs?cost_report_token=<REPORT_TOKEN>&order=desc&settings[include_credits]=false&settings[include_refunds]=false&settings[include_discounts]=true&settings[include_tax]=true&settings[amortize]=true&settings[unallocated]=false&settings[aggregate_by]=usage' \
--header 'Authorization: Bearer <AUTH_TOKEN>' \
--header 'content-type: application/json'
Ensure you set the settings[aggregate_by]
query parameter to usage
. The following example JSON is returned in a successful 200
response.
...
"total_cost": {
"amount": "85123.00",
"currency": "USD"
},
"total_usage": [
{
"amount": "10234.00",
"unit": "Hours"
}
],
"costs": [
{
"accrued_at": "2025-01-08",
"amount": "885.4577627912",
"currency": "USD",
"usage": {
"amount": "910.969248694",
"unit": "Hrs"
},
"provider": "aws",
"account_id": "123456789012",
"service": "AmazonEC2"
},
...
total_usage
is provided, along with amount
and unit
. For each costs
item, corresponding usage
is also included.
6. How do I authenticate with Vantage to use the API?
The Vantage API uses a Vantage API token for authentication. All API calls performed by the API are authenticated via your user token.
7. Where can I read the documentation?
Vantage provides multiple resources for getting started with the API:
- The Vantage API documentation site contains information about available API endpoints and provides a tool for running API calls directly on the site. Specifically, you can access the Quickstart Tutorial for a step-by-step walkthrough of how to pull usage data from the
/costs
endpoint. - The “FinOps as Code” repository contains tutorials and code samples for getting started with the Vantage API.