Get the monthly spend forecast
Changed onReturns the organization's recorded and predicted spend, in US dollars, for each day of the current calendar month in time_zone. For a caller whose access covers only particular principals or groups, the operation reads only the events of those principals and groups. The prediction trains on up to 28 completed days, and the day in progress never counts. Each series covers at most one calendar month, so the response isn't paginated.
Predictions are statistical estimates. They don't check or enforce any budget.
Request
- Base URLhttps://global.api.konghq.com
- Auth
- HTTP bearer
- or HTTP bearer
- or HTTP bearer
- or HTTP bearer
Query parameters
The prediction method:
- auto: weekly_seasonal once 14 completed training days exist, and exponential_smoothing before that.
- weekly_seasonal: the mean daily spend for each weekday. Needs 14 completed training days.
- linear_regression: a straight-line fit of daily spend, extended to the end of the month. Needs 2 completed training days.
- exponential_smoothing: a weighted average of recent daily spend, carried forward. Needs 2 completed training days.
A method named in the request never falls back to another when the history is too short. The response's status is then insufficient_history. Defaults to auto.
The IANA time zone whose calendar sets the month and its days.
The name must be spelled as the time zone database spells it, such as Europe/Budapest, not europe/budapest. Offsets such as +02:00 aren't accepted. Defaults to UTC.
Response
The month's recorded daily spend and the forecast for the rest of the month.
The calendar month the forecast covers: the current month in time_zone.
The end of the observed history, as an RFC 3339 timestamp in UTC. It's the start of the day in progress in time_zone, so actual and the training history cover only the completed days before it.
When the service computed the forecast, as an RFC 3339 timestamp in UTC.
The method the service used. For a request with auto, it's the method that auto chose, so it's never auto.
Whether the forecast has predictions. It's ready when predicted holds them. It's insufficient_history when method has fewer completed training days than it needs, and predicted is then empty.
The completed days whose spend trains the prediction, at most the last 28. Days before the organization's first event since the start of the previous month don't count, and later days without events count as zero spend.
The recorded spend for each completed day of the month, oldest first.
The predicted spend for each remaining day of the month, from the day of observed_at through the last day, oldest first. Empty when status is insufficient_history.
Changes
- info
endpoint added
- info