Update spend alert or limit
Partial update: only supplied fields change. Changing threshold_amount or currency clears last_triggered_at so the alert can fire again in the current period. Raising a limit above current spend, or disabling it, releases runs it was holding in the queue.
Required permission: budgets.manage.
Request
- Base URLhttps://api.connic.co
- AuthHTTP bearer
Path parameters
ID of the project the API key belongs to.
Spend alert ID from GET /budgets/alerts.
Request body
Partial update of a spend rule. Omitted fields are unchanged.
alert sends a notification when spend reaches the threshold. limit also keeps new runs queued until the period resets or the limit is raised, disabled or deleted.
Spend that triggers the rule, as a positive decimal string in currency. Changing it clears last_triggered_at.
Currency of the threshold. Changing it clears last_triggered_at.
global counts all project spend, environment only the environments in scope_ids, agent only the agents named in scope_ids.
Environment IDs or agent names, depending on scope. Ignored for global.
Spend window: the current calendar month or the current day, in UTC.
Whether the rule is evaluated.
Response
Successful Response
A spend notification (alert) or hard cap (limit) for the project.
Project the rule belongs to.
alert sends a notification when spend reaches the threshold; limit also keeps new runs queued.
Spend that triggers the rule, as a decimal string in currency.
Currency of the threshold and of current_spend.
global counts all project spend, environment only the environments in scope_ids, agent only the agents named in scope_ids.
Environment IDs or agent names, depending on scope.
Spend window: the current calendar month or the current day, in UTC.
Whether the rule is evaluated.
When the rule last fired. It fires at most once per period.
Spend so far in the current period, as a decimal string in currency. Null when some model calls could not be priced.
Pricing coverage of current_spend: complete, call_count, priced_call_count, unpriced_call_count, unpriced_models and missing_price_models.
Changes
No recorded changes to this operation across all 17 revisions of this API.