ListChatMessages
Retrieves the message history and temporary download URLs for the pipeline snapshot of a specified session by session ID.
Operation description
Request description
When calling the V2 service, set the
AgentVersionparameter toV2.This operation only accepts the
SessionIdof the current user's session. It does not directly return a message array, but returns presigned download URLs forsession.jsonlanda2a-snapshot.json.The download URLs are valid for 1,800 seconds (30 minutes). Complete the download within the validity period.
The URLs in the response contain signature parameters. Do not log, share, or cache them for a long time.
MaxResultsandNextTokenare compatibility fields and are not consumed in V2.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ros:ListChatMessages |
list |
*All Resource
|
None | None |
Request syntax
POST HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| SessionId |
string |
Yes |
The ID of the session to query. You can only query sessions owned by the current user. You can call ListChatSessions to obtain an existing session ID, or call StartChat to create a new session and obtain the session ID. |
7f4e2a8c6d9b4a1f8e3c5b7d2a6f9012 |
| MaxResults |
integer |
No |
The compatibility field. V2 does not return message arrays in pages, and the service does not consume this field. |
20 |
| NextToken |
string |
No |
The compatibility field. V2 does not return message arrays in pages, and the service does not consume this field. |
CAES... |
| AgentVersion |
string |
No |
Set this parameter to V2 to route the request to the ROS Agent V2 backend. |
V2 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| RequestId |
string |
The ID of the request. |
4C68F7A5-2D16-5C8F-A4B1-01E9C6A9B0D2 |
| Messages |
array<object> |
The compatibility field. The V2 response does not return a message array. |
[] |
|
object |
The compatibility field. V2 does not return message objects. |
{} |
|
| NextToken |
string |
The compatibility field. The V2 response does not return NextToken. |
CAES... |
| MaxResults |
integer |
The compatibility field. The V2 response does not return MaxResults. |
20 |
| SessionMessagesDownloadUrl |
string |
The presigned download URL for the session messages in |
https://oss.example/session.jsonl?signature=REDACTED |
| PipelineSnapshotDownloadUrl |
string |
The presigned download URL for the pipeline snapshot in |
https://oss.example/a2a-snapshot.json?signature=REDACTED |
| Title |
string |
The title of the session. This field may be empty. |
Create VPC template |
| PipelineName |
string |
The name of the pipeline. Valid values: EvaluationFirstSelling and SolutionFirstSelling. |
SolutionFirstSelling |
| WorkspaceTemplates |
array<object> |
The list of ROS templates in the session workspace. This field is returned only for the solution-first workflow. If no published templates exist, this field is not returned or an empty array is returned. |
|
|
object |
The path, availability status, and temporary download URL of a single ROS template. |
||
| TemplatePath |
string |
The relative path of the template in the session workspace. The |
templates/0-vpc.yml |
| Status |
string |
The downloadable status of the template. Valid values:
|
available |
| DownloadUrl |
string |
The temporary download URL of the template file. This field is returned only when |
https://example.com/templates/0-vpc.yml?expires=300 |
| HistoryReadiness |
string |
The readiness status of session history messages. History can be loaded only when the status is READY. History cannot be loaded when the status is STARTING, RUNNING, STOPPING, FINALIZING (processing), NOT_READY (not ready), RECOVERY_REQUIRED (recovery required), or UNKNOWN (unknown). |
READY |
| Workspace |
object |
The session workspace data. |
{} |
Examples
Success response
JSON format
{
"RequestId": "4C68F7A5-2D16-5C8F-A4B1-01E9C6A9B0D2",
"Messages": [
{}
],
"NextToken": "CAES...",
"MaxResults": 20,
"SessionMessagesDownloadUrl": "https://oss.example/session.jsonl?signature=REDACTED",
"PipelineSnapshotDownloadUrl": "https://oss.example/a2a-snapshot.json?signature=REDACTED",
"Title": "Create VPC template",
"PipelineName": "SolutionFirstSelling",
"WorkspaceTemplates": [
{
"TemplatePath": "templates/0-vpc.yml",
"Status": "available",
"DownloadUrl": "https://example.com/templates/0-vpc.yml?expires=300"
}
],
"HistoryReadiness": "READY",
"Workspace": {}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.