Get group AI spend
GET
Returns the AI spend limit and aggregate spend for the group.
CoderSessionTokenheader
Coder-Session-Token<token>group*stringGroup ID
Format
uuidOK
application/json- response
current_spend_micros?integerCurrentSpendMicros is the group's spend over the current budget period.
group_id?stringFormat
uuidperiod_end?stringPeriodEnd is the exclusive upper bound of the current budget period.
Format
date-timeperiod_start?stringPeriodStart is the inclusive lower bound of the current budget period.
Format
date-timespend_limit_micros?integerSpendLimitMicros is the group's configured AI spend budget per member. Null when the group has no configured budget.
total_spend_limit_micros?integerTotalSpendLimitMicros is the currently configured combined budget of the members attributed to this group, with each member's override replacing their share. Null when the group has no budget, and zero when no members are attributed to it.
The samples read CODER_URL and CODER_SESSION_TOKEN: set up your environment.
curl -X GET \ "$CODER_URL/api/v2/groups/{group}/ai/spend" \ -H "Coder-Session-Token: $CODER_SESSION_TOKEN"Example Response200
{ "current_spend_micros": 0, "group_id": "306db4e0-7449-4501-b76f-075576fe2d8f", "period_end": "2019-08-24T14:15:22Z", "period_start": "2019-08-24T14:15:22Z", "spend_limit_micros": 0, "total_spend_limit_micros": 0}