VEXXHOSTDocumentation
API referenceCost reports

Calculate a cost and usage report

POST
/v1/cost_reports

Computes costs and usage for a period that includes its start and excludes its end. Reports are not stored. A token reports on its own project.

Authorization

headerX-Auth-Token<token>

Request Body

application/json
  1. body
allow_partial?boolean

When a region does not answer, return the regions that did and list the rest in missing_regions, instead of failing the report.

as_of?string

Optional reporting cutoff; defaults to the current time and cannot be in the future.

Formatdate-time
filter?
granularity*string
Value in"hourly""daily""monthly"
group_by?array<>|
Itemsitems <= 5
metrics?array<>|
Items1 <= items <= 2
time_period*

Response Body

OK

application/json
  1. response
as_of*string
Formatdate-time
currency*string
group_definitions*array<string>|null
missing_regions?array<string>|

Regions left out of an allow_partial report because they did not answer.

pricing_version*string
regions?array<>|

The regions this report covers and how far each one's data is complete.

results_by_time*array<>|null
curl -X POST "https://example.com/v1/cost_reports" \  -H "Content-Type: application/json" \  -d '{    "granularity": "hourly",    "time_period": {      "end": "2019-08-24T14:15:22Z",      "start": "2019-08-24T14:15:22Z"    }  }'
{  "as_of": "2019-08-24T14:15:22Z",  "currency": "string",  "group_definitions": [    "string"  ],  "missing_regions": [    "string"  ],  "pricing_version": "string",  "regions": [    {      "data_through": "2019-08-24T14:15:22Z",      "name": "string"    }  ],  "results_by_time": [    {      "estimated": true,      "groups": [        {          "keys": [            "string"          ],          "metrics": {            "property1": {              "amount": "string",              "unit": "string"            },            "property2": {              "amount": "string",              "unit": "string"            }          }        }      ],      "time_period": {        "end": "2019-08-24T14:15:22Z",        "start": "2019-08-24T14:15:22Z"      },      "total": {        "property1": {          "amount": "string",          "unit": "string"        },        "property2": {          "amount": "string",          "unit": "string"        }      },      "usage_by_unit": {        "property1": {          "amount": "string",          "unit": "string"        },        "property2": {          "amount": "string",          "unit": "string"        }      }    }  ]}