All Products
Search
Document Center

ApsaraMQ for Kafka:KopilotListConversationChatMessages

Last Updated:Jul 03, 2026

Queries historical conversations.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request parameters

Parameter

Type

Required

Description

Example

SessionId

string

No

The session ID.

RegionId

string

Yes

The region ID.

PageSize

integer

No

The page size.

BeforeTurnId

integer

No

The cursor.

Note

If this parameter is not specified, the last pageSize turn IDs are returned. If this parameter is specified, the corresponding turn IDs are returned.

Response elements

Element

Type

Description

Example

object

Schema of Response

RequestId

string

The request ID.

Success

boolean

Indicates whether the request was successful.

Code

integer

The return code. A value of 200 indicates success.

Data

object

The data returned if the call is successful.

SessionId

string

The session ID.

TotalTurns

integer

The total number of turn IDs.

Messages

array<object>

The list of messages.

object

The message body.

Role

string

Content

string

CreateTime

string

TurnId

string

Feedback

string

HasMore

boolean

Indicates whether more data is available.

NextBeforeTurnId

integer

The cursor for the next page.

Examples

Success response

JSON format

{
  "RequestId": "",
  "Success": true,
  "Code": 0,
  "Data": {
    "SessionId": "",
    "TotalTurns": 0,
    "Messages": [
      {
        "Role": "",
        "Content": "",
        "CreateTime": "",
        "TurnId": "",
        "Feedback": ""
      }
    ],
    "HasMore": true,
    "NextBeforeTurnId": 0
  }
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.