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

Updating Document Metadata

Function

Update document metadata.

URI

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

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

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

category

No

String

Definition:

Document directory, which corresponds to the leaf nodes in the directory tree. This parameter has only one value.

Constraints:

N/A

Value range:

N/A

Default value:

N/A

tags

No

Array of strings

Definition:

Tag list. Each tag can contain only 1 to 255 letters, digits, hyphens (-), and underscores (_), and must start with a letter or digit.

Constraints:

In 25.2.T1, the following special characters are allowed in URLs: :/.?&=@#%+~!$'(),;*[]

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

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

file_id

String

Definition:

ID of the uploaded file.

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

Table format

/v1/b25446daeb1a41a7953c5deba2b2677a/applications/cefb2a59-2f9e-4268-b56b-eab15dc0b9d6/uni-search/0e7a261c-a543-4f98-915d-7a83ac96595c/files/7bb4d9351fa8a00cd30782bfd29a1766

Example Responses

Status code: 200

Updated document metadata.

{
  "file_id" : "7bb4d9351fa8a00cd30782bfd29a1766"
}

Status Codes

Status Code

Description

200

Updated document metadata.

400

Parameter error.

500

Internal error.

Error Codes

See Error Codes.