Help Center/ Cloud Search Service_KooSearch/ API Reference/ API/ APIs/ File Management/ Viewing the Chunks After Document Parsing
Updated on 2025-12-02 GMT+08:00

Viewing the Chunks After Document Parsing

Function

View the current document and the chunk list after document parsing, including details about each chunk.

URI

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

page_size

No

Integer

Definition:

Number of records displayed on each page, indicating the number of records returned per request. The default value is 10, indicating that 10 records are displayed on each page.

Constraints:

N/A

Value range:

1-65535

Default value:

10

page_num

No

Integer

Definition:

Page number of the current request, indicating the start page from data retrieval. The default value is 1, indicating to start from the first page.

Constraints:

N/A

Value range:

1-65535

Default value:

1

file_type

No

String

Definition:

File type. The value can contain a maximum of 64 characters.

Constraints:

N/A

Value range:

N/A

Default value:

N/A

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

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

docs

Array of FileDocInfo objects

Definition:

File segment list.

Value range:

N/A

page_num

Long

Definition:

Page number in the request.

Value range:

N/A

page_size

Long

Definition:

Page size in the request.

Value range:

N/A

total

Long

Definition:

Total number of segments.

Value range:

N/A

version

Integer

Definition:

Version information.

Value range:

N/A

Table 5 FileDocInfo

Parameter

Type

Description

id

String

Definition:

Chunk ID.

Value range:

N/A

timestamp

String

Definition:

Segment creation timestamp. To ensure proper display of segment data, this field is not updated along with the segment data.

Value range:

N/A

title

String

Definition:

Segment title.

Value range:

N/A

content

String

Definition:

Segment content.

Value range:

N/A

page_num

Long

Definition:

Segment page number, which is not involved in FAQ segment content.

Value range:

N/A

page_num_list

Array of longs

Definition:

Segment page number. When the file type is PDF, a single segment can contain multiple pages.

Value range:

N/A

component_num

Long

Definition:

Segment content sequence number, which is not involved in FAQ fragment content.

Value range:

N/A

element_id

String

Definition:

File element ID.

Value range:

N/A

elements

Array of strings

Definition:

Data element in HTML.

Value range:

N/A

Constraints:

This parameter is supported only in clusters 25.7.T1 or later.

pdf_coordinate

Object

Definition:

Metadata used for locating text during PDF parsing. Example value:

[

[

202,

687

],

[

1031,

687

]

]

Value range:

N/A

Constraints:

This parameter is supported only in clusters 25.7.T1 or later.

Status code: 404

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

View document chunks after parsing.

/v1/b25446daeb1a41a7953c5deba2b2677a/applications/cefb2a59-2f9e-4268-b56b-eab15dc0b9d6/uni-search/files/6c95aa82c4f0bb509e30fa017874101b/docs?page_size=10&file_type=pdf&page_num=1

Example Responses

Status code: 200

Query response body.

{
  "page_num" : 1,
  "page_size" : 1,
  "total" : 1,
  "docs" : [ {
    "id" : "065c6b2f47354b3797e14d1e6a013a7e",
    "timestamp" : "1745827606521",
    "title" : "Global Accelerator Billing",
    "content" : "Pay-per-use: It is a postpaid model where payment is made after usage, and billing is based on the actual usage duration of the acceleration instance. For details, see Billing Modes.\nBilling items",
    "page_num" : 1,
    "component_num" : 1
  } ],
  "version" : 1
}

Status Codes

Status Code

Description

200

Query response body.

404

The file does not exist.

Error Codes

See Error Codes.