Help Center/ Cloud Search Service_KooSearch/ API Reference/ API/ APIs/ File Management/ Creating Chunks from a Parsed Document
Updated on 2025-08-13 GMT+08:00

Creating Chunks from a Parsed Document

Function

Create chunks from a specified file.

URI

POST /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

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

Document created successfully.

None

Example Requests

Create chunks from a specified file.

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

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

Example Responses

None

Status Codes

Status Code

Description

200

Document created successfully.

Error Codes

See Error Codes.