JavaScript
const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}}; fetch('https://studyfetchapi.com/api/v1/usage-analyst/chat-messages', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err));
{ "messages": [ { "sessionId": "<string>", "userId": "<string>", "componentId": "<string>", "role": "user", "content": "<string>", "createdAt": "2023-11-07T05:31:56Z", "metadata": {} } ], "total": 123, "sessionCount": 123 }
API Key for authentication
User ID to get chat messages for
Array of group IDs to filter
["class-101", "class-102"]
Chat messages retrieved successfully
Show child attributes
user
assistant
system
Was this page helpful?