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

Deleting Document Directories

Function

Delete the knowledge base document directory.

URI

DELETE /v1/{project_id}/applications/{application_id}/uni-search/{repo_id}/directory/{directory_id}

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

directory_id

Yes

String

Definition:

Directory ID.

Constraints:

N/A

Value range:

The maximum length is 64 characters.

Default value:

N/A

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

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

directory_ids

Array of strings

Definition:

ID of the deleted directory or subdirectory.

Value range:

N/A

Example Requests

Delete the knowledge base document directory.

/v1/b25446daeb1a41a7953c5deba2b2677a/applications/5071b12e-8c5c-4181-a15b-41e6ae3915ea/uni-search/ae63178c-f9d1-46c9-96d2-de045dfc6810/directory/ca3e7493-b332-4ce8-8ff3-f921203e9a70

Example Responses

Status code: 200

Response body for deleting a directory.

{
  "directory_ids" : [ "ca3e7493-b332-4ce8-8ff3-f921203e9a70" ]
}

Status Codes

Status Code

Description

200

Response body for deleting a directory.

Error Codes

See Error Codes.