budgets

Get spend alert or limit

One spend notification or hard cap, with computed spend so far in the current period.

Required permission: budgets.view.

get/v1/projects/{project_id}/budgets/alerts/{alert_id}

Request

  • Base URL: https://api.connic.co
  • URL: https://api.connic.co/v1/projects/{project_id}/budgets/alerts/{alert_id}
  • Auth: HTTP bearer

Path parameters

project_idstring uuid required

ID of the project the API key belongs to.

alert_idstring uuid required

Spend alert ID from GET /budgets/alerts.

Response

Successful Response

idstring uuid required
project_idstring uuid required

Project the rule belongs to.

namestring required
type'alert' | 'limit' required

alert sends a notification when spend reaches the threshold; limit also keeps new runs queued.

threshold_amountstring required

Spend that triggers the rule, as a decimal string in currency.

currency'USD' | 'EUR' required

Currency of the threshold and of current_spend.

scope'global' | 'environment' | 'agent' required

global counts all project spend, environment only the environments in scope_ids, agent only the agents named in scope_ids.

scope_idsstring[] nullable

Environment IDs or agent names, depending on scope.

period'monthly' | 'daily' required

Spend window: the current calendar month or the current day, in UTC.

enabledboolean required

Whether the rule is evaluated.

last_triggered_atstring date-time nullable

When the rule last fired. It fires at most once per period.

created_atstring date-time required
updated_atstring date-time required
current_spendstring nullable

Spend so far in the current period, as a decimal string in currency. Null when some model calls could not be priced.

current_spend_coverageobject

Pricing coverage of current_spend: complete, call_count, priced_call_count, unpriced_call_count and unpriced_models.

Changes

No recorded changes to this operation across all 2 revisions of this API.