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
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 |
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 |
Request 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
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 |
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
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Definition: 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" : "Global Accelerator\nBilling\nIssue 01 (Released on 2023-09-08)\nCopyright © Huawei Technologies Co., Ltd. 2023. All Rights Reserved. No part of this document may be reproduced or transmitted in any form or by any means without prior written consent of Huawei Device Co., Ltd.\nTrademarks and Permissions\nHUAWEI and other Huawei trademarks are trademarks of Huawei Technologies Co., Ltd. All other trademarks and trade names mentioned in this document are the property of their respective holders.\nNotice\nThe purchased products, services and features are stipulated by the contract made between Huawei and the customer. All or part of the products, services and features described in this document may not be within the purchase scope or the usage scope. Unless otherwise specified in the contract, all statements, information, and recommendations in this document are provided \"AS IS\" without warranties, guarantees or representations of any kind, either express or implied.\nThe information in this document is subject to change without notice. Every effort has been made in the preparation of this document to ensure accuracy of the contents, but all statements, information, and recommendations in this document do not constitute a warranty of any kind, express or implied.\n1 Billing Overview\nIn this document, you will learn about how global accelerators are billed, how you can renew subscriptions and manage costs, and what happens if your account goes into arrears.\nBilling mode.\nPay-per-use is a postpaid billing mode. You pay as you go and just pay for how long each global accelerator is retained in your account. 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.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot