The budgets area has 6 methods on the client. Each takes one object of path, query and body arguments and an optional CallOptions, and returns a promise of the response body. A refused call rejects with OverlaneApiError (see the SDK index).
budgetsCheck
Ask whether a spend may go ahead; a refusal stores a stop record
- Request:
POSTon/v1/tenants/{tenantId}/budgets/check
budgetsCheck(args: { tenantId: string; body: BudgetCheckRequest }, options?: CallOptions): Promise<BudgetDecision>budgetsDelete
Remove a budget limit
- Request:
DELETEon/v1/tenants/{tenantId}/budgets - Needs an approval for agents: class
spend
budgetsDelete(args: { tenantId: string }, options?: CallOptions): Promise<Record<string, unknown>>budgetsGet
The team’s run budgets and what is spent
- Request:
GETon/v1/tenants/{tenantId}/budgets
budgetsGet(args: { tenantId: string }, options?: CallOptions): Promise<Record<string, unknown>>budgetsPut
Set a budget limit (spend class when it raises a limit)
- Request:
PUTon/v1/tenants/{tenantId}/budgets
budgetsPut(args: { tenantId: string; body: PutBudgetRequest }, options?: CallOptions): Promise<Record<string, unknown>>budgetsSpend
Record spend against the budgets
- Request:
POSTon/v1/tenants/{tenantId}/budgets/spend
budgetsSpend(args: { tenantId: string; body: RecordSpendRequest }, options?: CallOptions): Promise<Record<string, unknown>>budgetsStops
Stop records written when a budget refused a call
- Request:
GETon/v1/tenants/{tenantId}/budgets/stops
budgetsStops(args: { tenantId: string }, options?: CallOptions): Promise<BudgetStopList>