Updated on 2025-08-13 GMT+08:00

Exporting Chat History

Function

Export the chat history, including chat ID, question ID, question, answer, chat start time, and search result.

URI

GET /v1/{project_id}/applications/{application_id}/uni-search/chat-history/download

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Definition:

Project ID. For details about how to obtain the project ID, see Obtaining a Project ID.

Constraints:

N/A

Value range:

The value can contain 1 to 64 characters. Only digits, letters, hyphens (-), and underscores (_) are allowed. The value must start with a letter.

Default value:

N/A

application_id

Yes

String

Definition:

Application ID. For details about how to obtain the application ID, see Obtaining an Application ID.

Constraints:

Character string

Value range:

The value can contain 1 to 64 characters. Only digits, letters, hyphens (-), and underscores (_) are allowed. The value must start with a letter.

Default value:

N/A

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

user_name

No

String

Definition:

Username, used to identify a user.

Constraints:

N/A

Value range:

The value must be a string of 1 to 64 characters. Only letters, digits, underscores (_), and hyphens (-) are allowed.

Default value:

N/A

repo_id

Yes

String

Definition:

Knowledge base ID.

How to obtain:

Log in to the KooSearch experience platform. In the navigation tree on the left, choose Knowledge Bases to view knowledge base IDs. Each knowledge base has a unique ID stored in the vector database.

Constraints:

N/A

Value range:

The value must be a string of 1 to 64 characters. Only letters, digits, underscores (_), and hyphens (-) are allowed.

Default value:

N/A

tag

No

String

Definition:

Tags used to filter the chat history.

Constraints:

  1. The value can contain a maximum of 257 characters. Only letters, digits, colons (:), and underscores (_) are allowed.

  2. Format: tag:value

Value range:

N/A

Default value:

N/A

lang

No

String

Definition:

Language. The default value is zh. zh and en are supported.

Constraints:

N/A

Value range:

  • zh

  • en

Default value:

N/A

Request Parameters

Table 3 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Definition:

Token used for API authentication. For details about how to obtain the token, see Obtaining an IAM User Token.

Constraints:

N/A

Value range:

N/A

Default value:

N/A

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

-

File

Example Requests

Chat history export instance.

/v1/b25446daeb1a41a7953c5deba2b2677a/applications/be9b19bf-4865-4fb8-b9f8-2fd1fea98d76/uni-search/chat-history/download?repo_id=7741920e-7c1c-4a48-8555-c43b66153272&lang=zh

Example Responses

None

Status Codes

Status Code

Description

200

Chat log file.

Error Codes

See Error Codes.