v1

latestOpenAPI 3.1.0Elastic 2.02026-07-179371211.2 KB
Assistant

Get Usage Statistics

Retrieve usage statistics of the AI assistant over a specified date range for every user.

get/api/assistant/admin/stats

Query parameters

rangestring required

Date range, in the specified timezone

zonestring required

Timezone of the date range

formatstring required

Date range date format. Use the example, exactly as shown, if not familiar with date formats

Response

Usage statistics for the AI assistant

modelUsageobject

Usage statistics per model@adapter combination.

totalCreditsinteger

The total credits used by the user in the date range.

totalInputTokensinteger

The total input tokens used by the user in the date range.

totalMessagesinteger

The total messages sent and received by the user in the date range.

totalOutputTokensinteger

The total output tokens used by the user in the date range.

totalSessionsinteger

The total sessions the user has added a message to in the date range.

userIdstring

The Id of the user.

Example response

[
  {
    "totalCredits": 5,
    "totalInputTokens": 1500,
    "totalMessages": 25,
    "totalOutputTokens": 3000,
    "totalSessions": 3,
    "userId": "8beae4b5-275b-4669-b678-8cff894911b5"
  }
]