Help Center/ Cloud Search Service_KooSearch/ API Reference/ API/ APIs/ File Management/ API for Re-loading Documents in Batches
Updated on 2025-08-13 GMT+08:00

API for Re-loading Documents in Batches

Function

Re-load documents in batches.

URI

PUT /v1/{project_id}/applications/{application_id}/uni-search/{repo_id}/files/retry

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

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:

Length: 1 to 64 characters. The value can contain only digits, letters, hyphens (-), and underscores (_).

Default value:

N/A

Request Parameters

Table 2 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

Table 3 Request body parameters

Parameter

Mandatory

Type

Description

file_ids

Yes

Array of strings

Definition:

File ID arrays.

Constraints:

N/A

Value range:

Each file ID can contain only 1 to 64 characters. Only digits, letters, hyphens (-), and underscores (_) are allowed.

Default value:

N/A

parser

No

String

Definition:

File parsing rules.

Constraints:

N/A

Value range:

  • inherit: inherits file-level parsing rules.

  • latest: latest parsing rules of the knowledge base.

Default value:

latest

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

total_count

Integer

Definition:

Expected number of reloaded files.

Value range:

N/A

retried_count

Integer

Definition:

Actual number of reloaded files.

Value range:

N/A

Status code: 400

Table 5 Response body parameters

Parameter

Type

Description

error_code

String

Definition:

Error Code.

Value range:

N/A

error_msg

String

Definition:

Error message.

Value range:

N/A

Status code: 500

Table 6 Response body parameters

Parameter

Type

Description

error_code

String

Definition:

Error Code.

Value range:

N/A

error_msg

String

Definition:

Error message.

Value range:

N/A

Example Requests

Re-loading a Document with a Specified ID

/v1/b25446daeb1a41a7953c5deba2b2677a/applications/0ac621de-3624-454e-adcf-8c5b4cf7317c/uni-search/111/files/retry

Example Responses

Status code: 200

Response body for re-loading documents in batches.

{
  "total_count" : 1,
  "retried_count" : 1
}

Status Codes

Status Code

Description

200

Response body for re-loading documents in batches.

400

Incorrect request body parameter.

500

Internal error.

Error Codes

See Error Codes.