Usage Analyst
Get all chat messages from sessions for user or group
OpenAPI specificationGET
/api/v1/usage-analyst/chat-messagesAuthentication
x-api-key
Request
curl --globoff --request GET \
--url 'https://api.example.com/api/v1/usage-analyst/chat-messages' \
--header 'x-api-key: <API_KEY>'Replace credential and <field> placeholders with your own values. URL placeholders appear as %3Cfield%3E. Review the example values before sending your request.
Replace https://api.example.com with the API server URL.
Parameters
userIdquery · stringUser ID to get chat messages for
groupIdsquery · arrayArray of group IDs to filter
Responses
200Chat messages retrieved successfully
{
"type": "object",
"properties": {
"messages": {
"type": "array",
"items": {
"type": "object",
"properties": {
"sessionId": {
"type": "string"
},
"userId": {
"type": "string"
},
"componentId": {
"type": "string"
},
"role": {
"type": "string",
"enum": [
"user",
"assistant",
"system"
]
},
"content": {
"type": "string"
},
"createdAt": {
"type": "string",
"format": "date-time"
},
"metadata": {
"type": "object"
}
}
}
},
"total": {
"type": "number"
},
"sessionCount": {
"type": "number"
}
}
}