Get organization groups AI spend
GET
Returns AI spend limits and aggregate spend for the requested groups. A maximum of 100 group IDs may be requested per call, and requests with more are rejected, so callers are expected to batch across multiple requests. Unknown or unreadable group IDs are silently omitted.
CoderSessionTokenheader
Coder-Session-Token<token>organization*stringOrganization ID
Format
uuidgroup_ids*stringComma-separated list of group IDs (maximum 100)
OK
application/json- response
groups?array<>period_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-timeThe samples read CODER_URL and CODER_SESSION_TOKEN: set up your environment.
curl -X GET \ "$CODER_URL/api/v2/organizations/{organization}/groups/ai/spend?group_ids={group_ids}" \ -H "Coder-Session-Token: $CODER_SESSION_TOKEN"Example Response200
{ "groups": [ { "current_spend_micros": 0, "group_id": "306db4e0-7449-4501-b76f-075576fe2d8f", "spend_limit_micros": 0, "total_spend_limit_micros": 0 } ], "period_end": "2019-08-24T14:15:22Z", "period_start": "2019-08-24T14:15:22Z"}