Skip to main content

List an organization's consumption, one event per action

GET 

/organizations/:organization_id/consumption/events

The raw rows behind GET .../balance: every action a member of the organization made against the platform, one event per action whatever the number of technical calls it fanned out into, with the member who made it, the datasets present in the results it returned, how many entries came back, and the cost the ledger charged (cost, the same envelope every metered response carries). Each job's compute charge is listed too, as an event of kind compute with its own cost line ({currency, compute, total}), in the currency it was charged. Summed per currency, the cost[].total of every event of the feed equals the expenses of GET .../balance. A request refused before it reached the data is neither charged nor listed: a 401, a 403 on a dataset the caller has no access to, or a 402 for a suspended account, a sponsored quota or a sponsored suspension.

If the organization sponsors clients, the same feed lists their sponsored calls (see sponsored on the event), ordered with the organization's own calls under one cursor and watermark. A sponsored event never carries the content of the request, the user is pseudonymized and the cost is the sponsor's own platform fee.

Polling loop for an external accounting system: call without after once, store pageInfo.endCursor, then call with after=<cursor> on every poll and keep the latest cursor. Events are ordered by booking time and ascend inside each kind, an id is never reused but does not ascend across kinds, so deduplicate by equality. Nothing younger than watermark is served, so a cursor never skips an action. The cursor is opaque and holds one position for the calls and one for the compute charges: resume it with the filters it was issued under. A read that serves no compute event (with sponsoredGroupId, with sourceType api or mcp, or with a start, end or userId that matches no compute charge) leaves the compute position where it was, so continuing its cursor without those filters lists earlier compute charges again. A cursor issued before compute events is still accepted, and replays every past compute charge once. Deduplicating by id absorbs these replays.

Requires the caller's access token to carry the invoice:read ability and the caller to hold at least the org-admin role in the target organization (the same gate as .../balance). A client of a sponsor gets 401 on the sponsor's feed.

Request​

Responses​

One page of events