Help Center/ Cloud Search Service_KooSearch/ API Reference/ API/ APIs/ File Management/ Updating the Chunk Content of a Parsed Document
Updated on 2025-08-13 GMT+08:00

Updating the Chunk Content of a Parsed Document

Function

Updates the content of a chunk of a specified document based on the document ID and chunk ID.

URI

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

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

doc_id

Yes

String

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

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

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

title

No

String

Definition:

Title.

Constraints:

N/A

Value range:

The value contains 1 to 1000 characters.

Default value:

N/A

content

Yes

String

Definition:

Content.

Constraints:

N/A

Value range:

The value contains 1 to 10,000 characters.

Default value:

N/A

page_num

No

Long

Definition:

Page number of the document.

Constraints:

N/A

Value range:

0-65536

Default value:

0

component_num

No

Long

Definition:

Chunk sequence number.

Constraints:

N/A

Value range:

1-65536

Default value:

N/A

Response Parameters

Status code: 200

Update succeeded.

None

Example Requests

Update document chunks after parsing.

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

{
  "title" : "title-xxxxxx",
  "content" : "content-xxxxxx"
}

Example Responses

None

Status Codes

Status Code

Description

200

Update succeeded.

Error Codes

See Error Codes.