VEXXHOSTDocumentation
API referenceCost forecasts

Calculate a cost forecast

POST
/v1/cost_forecasts

Projects the trailing daily average over a future period, up to 90 days. The result is an estimate.

Authorization

headerX-Auth-Token<token>

Request Body

application/json
  1. body
allow_partial?boolean

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

filter?
granularity*string
Value in"daily""monthly"
lookback_days?integer
Formatint64
Range1 <= value <= 90
Default7
metric?"cost"
Value in"cost"
time_period*

Response Body

OK

application/json
  1. response
as_of*string
Formatdate-time
estimated*boolean
forecast_results_by_time*array<>|null
history_period*
missing_regions?array<string>|

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

model*string
regions?array<>|

The regions the history covers and how far each one's data is complete.

total*
curl -X POST "https://example.com/v1/cost_forecasts" \  -H "Content-Type: application/json" \  -d '{    "granularity": "daily",    "time_period": {      "end": "2019-08-24T14:15:22Z",      "start": "2019-08-24T14:15:22Z"    }  }'
{  "as_of": "2019-08-24T14:15:22Z",  "estimated": true,  "forecast_results_by_time": [    {      "mean_value": "string",      "time_period": {        "end": "2019-08-24T14:15:22Z",        "start": "2019-08-24T14:15:22Z"      }    }  ],  "history_period": {    "end": "2019-08-24T14:15:22Z",    "start": "2019-08-24T14:15:22Z"  },  "missing_regions": [    "string"  ],  "model": "string",  "regions": [    {      "data_through": "2019-08-24T14:15:22Z",      "name": "string"    }  ],  "total": {    "amount": "string",    "unit": "string"  }}