GetSessionContent
Calls the GetSessionContent operation to retrieve the detailed content of a specified session, including user messages and the complete conversation history of Agent responses.
Usage notes
You can only query the conversation content of sessions under your own account. Cross-account queries are not supported.
This operation is a standard HTTP request that returns a complete JSON response (non-streaming).
Request syntax
GET /api/oss/agent/get_session_content.json HTTP/1.1
Request parameters
Parameter |
Type |
Required |
Description |
sessionId |
string |
Yes |
The session ID. Example: |
Response parameters
Parameter |
Type |
Description |
requestId |
string |
The request ID. |
sessionId |
string |
The session ID. |
content |
array<object> |
The conversation content list. |
content[].timestamp |
string |
The time when the conversation occurred. Format: |
content[].userContent |
string |
The message content sent by the user (JSON string). |
content[].toolConfirm |
boolean |
Indicates whether a tool call confirmation is included. |
content[].agentContents |
array<object> |
The detailed conversation content list of Agent responses. |
content[].agentContents[].timestamp |
string |
The time when the content was generated (Unix timestamp). |
content[].agentContents[].agentContent |
string |
The conversation chunk content of the Agent response (JSON string). All chunks constitute the complete response. |
Examples
Sample request:
GET /api/oss/agent/get_session_content.json?sessionId=550e8400-e29b-41d4-a716-446655440000 HTTP/1.1
Sample response:
{
"requestId": "2D69EEAB-F672-5E63-9B43-7E42BF69C1FE",
"sessionId": "550e8400-e29b-41d4-a716-446655440000",
"content": [
{
"timestamp": "2026-09-03 04:08:30,637",
"userContent": "[{\"role\":\"user\",\"content\":\"Hi OSS\"}]",
"toolConfirm": false,
"agentContents": [
{
"timestamp": "1774577589",
"agentContent": "{\"id\":\"16aa7737-9e6a-4500-abd2-96c5f17d1188\",\"object\":\"chat.completion.chunk\",\"created\":1788408524,\"model\":\"oss-agent\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"Hello, I am OSS Agent\"}}]}"
}
]
}
]
}