Get group members AI spend
GET
Returns aggregate AI spend attributed to the group per requested user. A maximum of 100 user IDs may be requested per call, and requests with more are rejected, so callers are expected to batch across multiple requests. User IDs that are not members of the group, or that the caller has no read access to, are silently omitted.
CoderSessionTokenheader
Coder-Session-Token<token>group*stringGroup ID
Format
uuiduser_ids*stringComma-separated list of user IDs (maximum 100)
OK
application/json- response
members?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/groups/{group}/members/ai/spend?user_ids={user_ids}" \ -H "Coder-Session-Token: $CODER_SESSION_TOKEN"Example Response200
{ "members": [ { "effective_budget": { "limit_source": "user_override", "spend_limit_micros": 0 }, "effective_group_id": "85e2b926-ddfb-4c66-b68e-b66e5acec6c0", "group_budget": { "limit_source": "user_override", "spend_limit_micros": 0 }, "group_spend_micros": 0, "user_id": "a169451c-8525-4352-b8ca-070dd449a1a5" } ], "period_end": "2019-08-24T14:15:22Z", "period_start": "2019-08-24T14:15:22Z"}