Skip to main content

ConsumptionEventPage

One page of consumption events, ordered by booking time and ascending inside each kind.

events object[]required
  • Array [
  • oneOf
    idstringrequired

    Stable action ID (the root call-log row), use it to deduplicate and the after cursor to resume.

    requestIdstringrequired

    The caller's x-request-id when one was sent, otherwise a platform-generated UUID.

    calledAtstring<date-time>required

    When the action was made (UTC).

    user objectrequired

    The member of the consumer organization who made the call. On a sponsored event (sponsored is set) the caller is a user of the client organization, so id is a pseudonym and email and description are null.

    id objectrequired

    The user / service-account ID, the same id as in GET /organizations/{organization_id}/users. On a sponsored event, a pseudonym user- plus ten hexadecimal characters, stable for one person and one sponsor, not linkable across sponsors.

    oneOf
    integer
    emailstring,null<email>nullablerequired

    null on a sponsored event.

    descriptionstring | nullnullablerequired

    The service account's description, null for a human.

    organizationIdintegerrequired

    The organization the event is listed for and whose ledger the cost comes from. For a sponsored call it is the sponsor, the client organization is in sponsored.organizationId.

    kindstringrequired

    cluster-data for a dataset read or search, external-api for a proxied external API call.

    Possible values: [cluster-data, external-api]

    actionstringrequired

    What was done: the cluster-data operation (list-datasets, get-dataset, keyword-search, vector-search, vector-search-entries, get-entry-content, get-entry-documents, get-entry-file) or, for external-api, <METHOD> <path>.

    sourceTypestringrequired

    Where the call came from: the REST API, an MCP server, or a workflow worker.

    Possible values: [api, mcp, worker]

    mcpSessionIdstring | nullnullablerequired

    The MCP session the call belongs to, when the MCP client sent one. Always null on a sponsored event, as are jobId and entryRefs. On a sponsored event resultCount is null for a search across datasets, and datasets and dataTokens cover only the sponsor's own datasets.

    jobIdinteger | nullnullablerequired

    The workflow job that made the call, null outside a workflow.

    successbooleanrequired

    true for a 2xx answer. A failed action is charged only when the failure is the caller's (error origin client), any other failure carries cost: []. Sum cost[].total per currency, never count events.

    responseStatusintegerrequired

    HTTP status the upstream answered with.

    dataTokensintegerrequired

    Data tokens of the whole response (the envelope of a fan-out, which already covers every dataset).

    resultCountinteger | nullnullablerequired

    How many distinct entries (articles) a search returned, how many datasets a listing returned, 1 for a single read. null on actions recorded before this field existed and on failed actions.

    entryRefsstring[]nullablerequired

    Up to 50 composite references (cluster:dataset:entry) of the entries returned, in response order. resultCount stays exact when more than 50 came back.

    datasets object[]required

    The datasets present in the results the call returned: for a search, the datasets with at least one hit in the page of results served (bounded by its limit), not every dataset searched or matched. [] for a dataset listing, a search that returned nothing, and an external-api action.

  • Array [
  • idinteger | nullnullablerequired

    Platform dataset ID.

    namestring | nullnullablerequired

    Dataset name at read time.

    dataTokensintegerrequired

    Data tokens served from this dataset for this action.

    listPricenumberrequired

    List price of those tokens in the dataset's currency, 0 for an unpriced dataset. The amount actually charged is in cost.

  • ]
  • cost object[]required

    The itemized cost of one metered call, one CostLine per currency actually charged to the ledger, sorted by currency code. An empty array means metering ran and charged nothing.

  • Array [
  • currencystringrequired

    ISO 4217 currency code this line is denominated in.

    Possible values: Value must match regular expression ^[A-Z]{3}$

    royaltynumberrequired

    Royalty charged to the dataset or endpoint provider in this currency, 0 when none fired.

    alienFeenumberrequired

    Platform fee charged in this currency, 0 when none fired.

    totalnumberrequired

    royalty plus alienFee, in this currency.

  • ]
  • sponsored objectrequired

    Present and non-null only for a client's call made through a sponsored group, listed on the sponsor's feed. null for the organization's own calls.

    oneOf
    groupIdintegerrequired
    groupNamestring | nullnullablerequired

    null once the group is deleted.

    organizationIdinteger | nullnullablerequired

    The client organization, null when the sponsor's fee names none.

    organizationNamestring | nullnullablerequired

    null when the client organization is unknown.

  • ]
  • pageInfo objectrequired
    hasNextPagebooleanrequired

    true when more events exist after endCursor.

    endCursorstring | nullnullablerequired

    Opaque cursor of the last event, pass it as after to get the next page. null on an empty page, keep the previous cursor then.

    watermarkstring<date-time>required

    The feed serves no action recorded after this instant (60 s behind the clock), so an action still being written is never skipped by the cursor. An action with calledAt later than the watermark appears on a later poll.

    ConsumptionEventPage
    {
    "events": [
    {
    "id": "string",
    "requestId": "string",
    "calledAt": "2024-07-29T15:51:28.071Z",
    "user": {
    "id": 0,
    "email": "user@example.com",
    "description": "string"
    },
    "organizationId": 0,
    "kind": "cluster-data",
    "action": "string",
    "sourceType": "api",
    "mcpSessionId": "string",
    "jobId": 0,
    "success": true,
    "responseStatus": 0,
    "dataTokens": 0,
    "resultCount": 0,
    "entryRefs": "Unknown Type: array,null",
    "datasets": [
    {
    "id": 0,
    "name": "string",
    "dataTokens": 0,
    "listPrice": 0
    }
    ],
    "cost": [
    {
    "currency": "string",
    "royalty": 0,
    "alienFee": 0,
    "total": 0
    }
    ],
    "sponsored": {
    "groupId": 0,
    "groupName": "string",
    "organizationId": 0,
    "organizationName": "string"
    }
    },
    {
    "id": "string",
    "requestId": "null",
    "calledAt": "2024-07-29T15:51:28.071Z",
    "user": {
    "id": 0,
    "email": "user@example.com",
    "description": "string"
    },
    "organizationId": 0,
    "kind": "compute",
    "action": "processing",
    "sourceType": "worker",
    "mcpSessionId": "null",
    "jobId": 0,
    "success": true,
    "responseStatus": "null",
    "dataTokens": 0,
    "resultCount": "null",
    "entryRefs": "null",
    "datasets": [
    {
    "id": 0,
    "name": "string",
    "dataTokens": 0,
    "listPrice": 0
    }
    ],
    "cost": [
    {
    "currency": "string",
    "compute": 0,
    "total": 0
    }
    ],
    "sponsored": "null"
    }
    ],
    "pageInfo": {
    "hasNextPage": true,
    "endCursor": "string"
    },
    "watermark": "2024-07-29T15:51:28.071Z"
    }