This topic describes the API for retrieving the history session list in OpenSearch LLM-Based Conversational Search Edition.
Prerequisites
Obtain the API key for identity authentication: When you call the OpenSearch LLM-Based Conversational Search service, you must authenticate the caller's identity. For more information, see Manage API keys.
Obtain the service endpoint: When you call the OpenSearch LLM-Based Conversational Search service, you must provide the service endpoint. For more information, see Obtain endpoints.
Notes
The historical session data is completely isolated across Alibaba Cloud account, RAM user, and API key dimensions. Session data is not shared between different identity entities and authentication methods.
API information
Request method | Request protocol | Request data format |
GET | HTTP | JSON |
Request URL
{host}/v3/openapi/apps/{app_group_identity}/chat-history?page_number=1&page_size=10{host}: The endpoint used to call the service. You can call the API service through the Internet or VPC. For more information, see Obtain endpoints.{app_group_identity}: The application name. You need to log on to the OpenSearch LLM-Based Conversational Search console and view the application name of the corresponding instance in Instance Management.
Request parameters
Header parameters
Parameter | Type | Required | Description | Example |
Content-Type | string | Yes | The data format of the request. Only the JSON format is supported. Set the value to application/json. | application/json |
Authorization | string | Yes | The API key used for request authentication. The value must start with Bearer. | Bearer OS-d1**2a |
Body parameters
Parameter | Type | Required | Description | Example |
page_number | integer | No | The first page number. | 1 |
page_size | integer | No | The number of entries per page. (Default: 10, Maximum: 20) | 10 |
Request body example
curl -X GET "{host}/v3/openapi/apps/{app_group_identity}/chat-history?page_number=1&page_size=10" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer {API Key}"Response parameters
Parameter | Type | Description |
request_id | string | The request ID. |
result | Map | The data returned. |
result.latency | float | The time consumed by the API when the request is successful, in milliseconds. |
result.total_count | integer | The total number of data entries. |
result.data | list | The response data. |
result.data[0].title | string | The session title. |
result.data[0].chat_id | string | The session ID. |
result.data[0].status | string | The status of the session or task. |
result.data[0].time | string | The time when the session starts. |
code | string | The error code returned (not returned if no error occurs). |
message | string | The error message returned (not returned if no error occurs). |
Response body example
{
"request_id": "a842*******************133b",
"status": "OK",
"total_count": 1,
"latency": 0,
"result": [
{
"chat_id": "1751622286901",
"title": "Recommend a Jay Chou album for me",
"time": "2025-07-04 21:38:06",
"status": "SUCCESS"
}
],
"errors": []
}