Get all chat messages from sessions for user or group
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));curl --request GET \
--url https://studyfetchapi.com/api/v1/usage-analyst/chat-messages \
--header 'x-api-key: <api-key>'import requests
url = "https://studyfetchapi.com/api/v1/usage-analyst/chat-messages"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text){
"messages": [
{
"sessionId": "<string>",
"userId": "<string>",
"componentId": "<string>",
"role": "user",
"content": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"metadata": {}
}
],
"total": 123,
"sessionCount": 123
}Usage Analyst
Get all chat messages from sessions for user or group
GET
/
api
/
v1
/
usage-analyst
/
chat-messages
Get all chat messages from sessions for user or group
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));curl --request GET \
--url https://studyfetchapi.com/api/v1/usage-analyst/chat-messages \
--header 'x-api-key: <api-key>'import requests
url = "https://studyfetchapi.com/api/v1/usage-analyst/chat-messages"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text){
"messages": [
{
"sessionId": "<string>",
"userId": "<string>",
"componentId": "<string>",
"role": "user",
"content": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"metadata": {}
}
],
"total": 123,
"sessionCount": 123
}Authorizations
API Key for server-to-server authentication. Resolves to the owning organization.
Query Parameters
User ID to get chat messages for
Array of group IDs to filter
Example:
["class-101", "class-102"]
Was this page helpful?