Reference
Get spend forecast
Returns forecasted spend value, confidence bounds, and a 60-point sparkline (past 30 days actual + next 30 days forecast).
Authorization
BearerAuth AuthorizationBearer <token>
In: header
Query Parameters
provider?Provider
Provider to forecast, or all. A provider with no costs returns an empty forecast.
horizon?Horizon
Forecast horizon
credits?Credits
Cost basis for Google Cloud: after credits (default) or before them. AWS stays on its invoiced basis.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/api/v1/costs/forecast"{
"success": true,
"timestamp": "2019-08-24T14:15:22Z",
"data": {
"forecast_value": 0,
"forecast_low": 0,
"forecast_high": 0,
"confidence_pct": 0,
"sparkline": [
0
],
"future_start_index": 0,
"delta_pct_vs_last_month": 0,
"booked_to_date": 0,
"daily_rate": 0,
"days_remaining": 0,
"actuals_through": "string",
"days_since_last_actual": 0,
"daily_rate_sample_days": 0,
"daily_rate_thin_days": 0,
"daily_rate_window_days": 0,
"credits": "before"
}
}{
"success": false,
"error": {
"code": "string",
"message": "string",
"details": null
},
"timestamp": "2019-08-24T14:15:22Z"
}{
"success": false,
"error": {
"code": "string",
"message": "string",
"details": null
},
"timestamp": "2019-08-24T14:15:22Z"
}{
"success": false,
"error": {
"code": "string",
"message": "string",
"details": null
},
"timestamp": "2019-08-24T14:15:22Z"
}{
"success": false,
"error": {
"code": "string",
"message": "string",
"details": null
},
"timestamp": "2019-08-24T14:15:22Z"
}{
"success": false,
"error": {
"code": "string",
"message": "string",
"details": null
},
"timestamp": "2019-08-24T14:15:22Z"
}{
"success": false,
"error": {
"code": "string",
"message": "string",
"details": null
},
"timestamp": "2019-08-24T14:15:22Z"
}{
"success": false,
"error": {
"code": "string",
"message": "string",
"details": null
},
"timestamp": "2019-08-24T14:15:22Z"
}{
"success": false,
"error": {
"code": "string",
"message": "string",
"details": null
},
"timestamp": "2019-08-24T14:15:22Z"
}