Create a budget
SendPOST /api/v1/tenant/budgets with your tenant in the
X-CostGraph-Tenant-ID header:
To change a budget, send the whole budget again with
PUT /api/v1/tenant/budgets/{id}. DELETE archives it. GET /api/v1/tenant/budgets/{id}/series returns cumulative daily spend against a
straight-line budget for the current period, for charting.
Periods
Periods are calendar periods in UTC: the calendar month, the calendar quarter starting in January, April, July, or October, or the calendar year. Spend resets at the start of each period.Status
Every budget response includes anevaluation for the current period:
actual spend, pctUsed, the period-end forecast, and a status:
on_track: spend and forecast are both under the amount.at_risk: spend is under the amount, but the forecast reaches it.over: spend has reached the amount.
Currency
A budget counts spend in its own currency only. If spend in its scope is billed in a different currency, CostGraph rejects the budget and names the currency to use. Spend in other currencies that matches the filters is listed inexcludedCurrencies and left out of the total.
Alerts
CostGraph alerts once for each threshold spend crosses in a period, and once when the forecast first reaches the amount. If spend drops more than five points back below a threshold, that threshold can alert again.
Budget alerts go to the budget’s owners and to your organization owners and
admins by email. Route
cost.budget_threshold and cost.forecast_breach to an
alert destination to send them to Slack,
Teams, PagerDuty, or a webhook.
Next steps
Forecast
How CostGraph forecasts where the period ends.