Querying the result of an asynchronous document parsing task
Function
Querying an Asynchronous Document Parsing Task
URI
GET /v1/koosearch/doc-search/tasks/{task_id}
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
task_id |
Yes |
String |
Details: ID of a document parsing task. You can use this ID to query the document parsing status and parsing result. Constraints: It can contain 4 to 64 characters. Only digits, letters, hyphens (-), and underscores (_) are allowed. The value must start with a letter. Default value: N/A. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
Parameter description: Token used for API authentication. For how to obtain the token, see section 3.2 "Authentication." Constraints: N/A. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
task_status |
String |
Parsing task status. success indicates success, error indicates failure, and pending indicates processing. |
task_desc |
String |
Task description, mainly the information when the task fails |
result |
ParsedDocument object |
Document parsing result. This field is contained only when the parsing is successful. |
Parameter |
Type |
Description |
---|---|---|
doc_id |
String |
Document ID, which is generated based on the UUID |
doc_name |
String |
Document |
doc_type |
String |
Document type, for example, PDF or DOCX |
preview_file_url |
String |
Preview file address |
original_file |
String |
Original document path |
file_size |
Integer |
Original document size, in bytes |
pages |
Array of ParsedDocumentPage objects |
Document page information |
images |
Array of ParsedDocumentImage objects |
Document image information |
original_tables |
Array of OriginalTable objects |
Original table information |
Parameter |
Type |
Description |
---|---|---|
page_num |
Integer |
Page number, which indicates the sequence number of a page in the document |
preview_image_url |
String |
Address of the document page preview image |
components |
Array of ParsedDocumentComponent objects |
Paragraph information on the page |
Parameter |
Type |
Description |
---|---|---|
id |
String |
Paragraph ID, which is generated based on the UUID |
text |
String |
Paragraph Content |
component_num |
Integer |
Paragraph code, which indicates the sequence number of a paragraph in the document. The value starts from 1. |
pdf_coordinate |
Array<Array<Integer>> |
Coordinates of a paragraph on the page, corresponding to the upper left, upper right, lower right, and lower left, respectively, for highlighting |
original_table_id |
String |
This parameter has a value only when the table is split. It is used to save the original long table to support the small2big feature. |
Parameter |
Type |
Description |
---|---|---|
image_id |
String |
Image ID, which is the prefix img- and UUID |
url |
String |
Path for uploading the image to OBS |
data |
String |
Base64-encoded image data |
title |
String |
Image title |
desc |
String |
Image description |
width |
Integer |
Image width, |
height |
Integer |
Image height. |
Parameter |
Type |
Description |
---|---|---|
id |
String |
Table ID. ParsedDocumentComponent will reference this identifier to avoid storing multiple copies. |
content |
String |
Form content |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
|
error_msg |
String |
Error description |
Status code: 401
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
|
error_msg |
String |
Error description |
Status code: 500
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
|
error_msg |
String |
Error description |
Example Requests
None
Example Responses
None
Status Codes
Status Code |
Description |
---|---|
200 |
Result of the asynchronous document parsing task |
400 |
Invalid request parameters |
401 |
Authentication error |
500 |
Service content error |
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