Skip to main content

GetBudgetConsumption

GET 

/v1/policy/budget-consumption

GetBudgetConsumption reports what an organization, or the projects inside it, consumed in the current accounting period, and the budget in force at that scope when one is set. Exactly two scopes are reported, the organization and a project, and this surface has no others.

Consumption is measured from the usage rollups at read time and never stored, over the same two windows BudgetSpend is computed from: daily rollups before the current UTC day, hourly rollups from it on. It is reported in money and in tokens.

The budget is a money figure. No budget in this system is denominated in tokens, and no field on this RPC is a token ceiling.

budget is read from the active budget policy already stored at that scope, and is absent when there is none, so a caller can say that no budget is set rather than showing a zero. This RPC authors nothing: CreateBudgetPolicy still accepts TEAM, TEAM_PER_USER_DEFAULT and API_KEY scope only.

This RPC states consumption and limit, and says nothing about what happens when the limit is reached. That belongs to the budget system -- BudgetPolicy.action, the alert evaluator and the enforcement resolver -- and no field here adds to it or restates it.

Request​

Responses​

Success