ListChatSessions
Queries the ROS Agent V2 sessions for the current user with paging.
Operation description
Request description
When you call the V2 service, set AgentVersion to V2.
This operation returns only the sessions of the current user. By default, sessions are sorted by UpdatedAt in descending order.
You can use the Mode parameter to filter sessions by mode. Valid values: IaCCodeNormal and IaCCodePipeline.
Do not reuse the previous NextToken after you change the Mode.
Use the CreatedAt and UpdatedAt fields for time information. The UpdatedTime field in metadata is a compatibility field and is not returned in the current response.
The number of entries to return is specified by the MaxResults request parameter. Valid values: 1 to 100.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ros:ListChatSessions |
list |
*All Resource
|
None | None |
Request syntax
POST HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| MaxResults |
integer |
No |
The number of sessions to return per page. Valid values: 1 to 100. Default value: 20. |
20 |
| NextToken |
string |
No |
The pagination token returned from the previous response. Do not specify this parameter for the first request. Do not reuse the previous token after you change the Mode. |
CAES... |
| AgentVersion |
string |
No |
The version of the Agent service. Set this parameter to V2 to route the request to the ROS Agent V2 backend. |
V2 |
| Mode |
string |
No |
Filters sessions by mode. Valid values: IaCCodeNormal and IaCCodePipeline. Valid values:
|
IaCCodePipeline |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| RequestId |
string |
The ID of the request. |
4C68F7A5-2D16-5C8F-A4B1-01E9C6A9B0D2 |
| Sessions |
array<object> |
The list of sessions for the current user, sorted by update time in descending order. |
[] |
|
object |
The session object. |
{} |
|
| SessionId |
string |
The ID of the session. You can use this ID for StartChat re-entry, StopChat, and ListChatMessages. |
7f4e2a8c6d9b4a1f8e3c5b7d2a6f9012 |
| Summary |
string |
The summary of the session. This field currently shares the same source as Title and may be empty. |
Create VPC template |
| UpdatedTime |
string |
The compatibility field. This field is not returned in the current V2 response. Use UpdatedAt instead. The time is in ISO 8601 format in UTC, accurate to seconds, and ends with Z. |
2026-08-26T10:00:00Z |
| Title |
string |
The title of the session. This field may be empty. |
Create VPC template |
| Mode |
string |
The mode of the session. Valid values: IaCCodeNormal and IaCCodePipeline. |
IaCCodePipeline |
| PipelineName |
string |
The name of the pipeline. Valid values: EvaluationFirstSelling and SolutionFirstSelling. |
SolutionFirstSelling |
| HistoryReadiness |
string |
The readability 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). |
STARTING |
| ClientReferenceId |
string |
The client-defined session identifier. This identifier is used only for the client to identify its own sessions. The server does not provide uniqueness verification or list filtering based on this identifier. |
07484e4b81708f7586 |
| FirstCursor |
string |
The cursor value of the first Server-Sent Events (SSE) event in the replayable SSE stream of the most recent StartChat call for the current session. You can use this value to replay the complete SSE stream of the most recent StartChat call from the beginning. |
v1.xsssaa.0 |
| NextToken |
string |
The token for the next page. This field may not be returned or may be null on the last page. |
CAES... |
| MaxResults |
integer |
The compatibility field. This field is not returned in the current V2 response. Refer to the MaxResults request parameter instead. |
20 |
Examples
Success response
JSON format
{
"RequestId": "4C68F7A5-2D16-5C8F-A4B1-01E9C6A9B0D2",
"Sessions": [
{
"SessionId": "7f4e2a8c6d9b4a1f8e3c5b7d2a6f9012",
"Summary": "Create a VPC template",
"UpdatedTime": "2026-08-26T10:00:00Z",
"Title": "Create a VPC template",
"Mode": "IaCCodePipeline",
"PipelineName": "SolutionFirstSelling",
"HistoryReadiness": "STARTING",
"ClientReferenceId": "07484e4b81708f7586",
"FirstCursor": "v1.xsssaa.0"
}
],
"NextToken": "CAES...",
"MaxResults": 20
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.