Updated on 2025-12-02 GMT+08:00

Deleting Chunks in Batches

Function

Batch-create chunks based on document and chunk IDs.

URI

DELETE /v1/{project_id}/applications/{application_id}/uni-search/files/{file_id}/docs

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

file_id

Yes

String

Definition:

File ID.

Constraints:

N/A

Value range:

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

Default value:

N/A

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

repo_id

No

String

Definition:

Knowledge base ID. When carried in the request, it specifies the target knowledge base for the query.

Constraints:

N/A

Value range:

N/A

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

Table 4 Request body parameters

Parameter

Mandatory

Type

Description

[items]

Yes

Array of strings

Definition:

List of chunk IDs to be deleted.

Constraints:

N/A

Value range:

Each chunk ID can contain 1 to 64 characters, including only digits, letters, hyphens (-), and underscores (_).

Default value:

N/A

Response Parameters

Status code: 200

Table 5 Response body parameters

Parameter

Type

Description

total

Long

Definition:

Number of records to be deleted.

Value range:

N/A

deleted

Long

Definition:

Number of records deleted.

Value range:

N/A

Example Requests

Batch-create chunks based on document and chunk IDs.

/v1/123/applications/123/uni-search/files/123/docs

[ "111", "222" ]

Example Responses

Status code: 200

Deletion succeeded.

{
  "total" : 1,
  "deleted" : 1
}

Status Codes

Status Code

Description

200

Deletion succeeded.

Error Codes

See Error Codes.