Assistant
Get Assistant Session History
Retrieve a chat session's messages for a given user and session.
get/api/assistant/admin/{userId}/sessions/{sessionId}/history
Path parameters
userIdstring required
ID of the user to retrieve the session from
sessionIdstring required
ID of the session to retrieve, it must belong to the indicated user
Response
List of messages belonging to the session
Example response
[
{
"createTime": "2024-11-14T15:03:22Z",
"id": "PdFc-JIBLkNJ8-bDfz47",
"kind": "case",
"message": {
"id": "c3d44fb8-3bc2-46e2-a7d2-8a8983556d1a",
"role": "user",
"stop_reason": "user_request",
"stop_sequence": "end_turn",
"usage": {
"credits": 1,
"input_tokens": 5,
"output_tokens": 10
}
},
"model": "sonnet-4.5@SOAI",
"operation": "create",
"session_id": "chat_1757086398900_ykhmndscn",
"tags": [
"investigation"
],
"updateTime": "2024-11-14T15:33:02Z",
"userId": "socl_my_new_client"
}
]Changes
Changed in 4 of the 23 revisions of this API.13
- ○
added the optional property
/to the response with the statusresponse-optional-property-added
- ○
- ○
added the optional property
//to the response with the statusresponse-optional-property-added
- ○
- ○
endpoint added
endpoint-added
- ○
- ▲
api path removed without deprecation
api-path-removed-without-deprecation
This revision also has 35 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog
- ▲