ListConversations
Performs a paging query on the agent session list for the current account. You can filter the results by status, agent type, keyword, and session ID.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
odps:ListConversations |
list |
*All Resource
|
None | None |
Request syntax
GET /api/v1/ai/conversations HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| nextToken |
string |
No |
The pagination token. Leave this parameter empty for the first query. For subsequent queries, pass the nextToken value returned in the previous response. An empty nextToken value in the response indicates that no more data is available. |
eyJvZmZzZXQiOjIwfQ== |
| maxResults |
integer |
No |
The maximum number of sessions to return in the current request. Valid values: 1 to 100. Default value: 20. |
20 |
| status |
string |
No |
The session status used to filter results. Valid values: active (active sessions, default value) and archived (archived sessions). |
active |
| agentType |
string |
No |
The agent type used to filter results. Valid values: MaxAgent (MaxCompute intelligent assistant, default value) and DataAgent (data analytics agent). |
DataAgent |
| keyword |
string |
No |
The keyword used to filter results by matching session titles. The maximum length is 100 characters. |
Sales analysis |
| conversationId |
string |
No |
The session ID used for exact match filtering. The maximum length is 128 characters. |
123456789012****#cn-shanghai#1ee04bea-0488-46b6-b85b-827e3cd37e55 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| requestId |
string |
The request ID, which uniquely identifies the request. You can use this ID for troubleshooting and log correlation. |
A3F5B7C9-1D2E-4F6A-8B9C-0D1E2F3A4B5C |
| httpCode |
integer |
The business status code. This field is not returned if the call is successful. If the call fails, the corresponding HTTP error code is returned, such as 400, 403, 404, or 500. |
400 |
| errorCode |
string |
The error code. This field is not returned if the call is successful. If the call fails, a specific error code is returned to help identify the cause of the error. |
InvalidParameter |
| errorMsg |
string |
The error message. This field is not returned if the call is successful. If the call fails, a human-readable error description is returned. |
The specified parameter is invalid. |
| data |
object |
The session list and pagination information. |
|
| conversations |
array<object> |
The list of sessions. |
|
|
array<object> |
|||
| conversationId |
string |
The session ID. You can use this ID to query message history and artifacts, or to initiate a conversation. |
123456789012****#cn-shanghai#1ee04bea-0488-46b6-b85b-827e3cd37e55 |
| title |
string |
The session title. |
Sales trend analysis for the last 30 days |
| agentType |
string |
The agent type to which the session belongs. Valid values: MaxAgent (MaxCompute intelligent assistant) and DataAgent (data analytics agent). |
DataAgent |
| status |
string |
The session status. Valid values: active (active) and archived (archived). |
active |
| messageCount |
integer |
The total number of messages in the session. |
6 |
| lastMessagePreview |
string |
The preview text of the most recent message. |
The sales trend analysis for the last 30 days is complete |
| metadata |
object |
The session metadata. |
|
| projectName |
string |
The name of the MaxCompute project associated with the session. |
odps_project |
| createdAt |
string |
The time when the session was created. The time is displayed in UTC and follows the RFC 3339 format, such as 2026-08-27T08:53:38.000Z. |
2026-08-27T08:53:38.000Z |
| updatedAt |
string |
The time when the session was last updated. The time is displayed in UTC and follows the RFC 3339 format, such as 2026-08-27T08:53:38.000Z. |
2026-08-27T08:53:38.000Z |
| nextToken |
string |
The pagination token for the next page. An empty string indicates that no more data is available. |
eyJvZmZzZXQiOjIwfQ== |
| maxResults |
integer |
The maximum number of entries returned in the current request. |
20 |
Examples
Success response
JSON format
{
"requestId": "A3F5B7C9-1D2E-4F6A-8B9C-0D1E2F3A4B5C",
"httpCode": 400,
"errorCode": "InvalidParameter",
"errorMsg": "The specified parameter is invalid.",
"data": {
"conversations": [
{
"conversationId": "123456789012****#cn-shanghai#1ee04bea-0488-46b6-b85b-827e3cd37e55",
"title": "Sales trend analysis for the last 30 days",
"agentType": "DataAgent",
"status": "active",
"messageCount": 6,
"lastMessagePreview": "The sales trend analysis for the last 30 days is complete",
"metadata": {
"projectName": "odps_project"
},
"createdAt": "2026-08-27T08:53:38.000Z",
"updatedAt": "2026-08-27T08:53:38.000Z"
}
],
"nextToken": "eyJvZmZzZXQiOjIwfQ==",
"maxResults": 20
}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.