Skip to main content

GetParseResult

Retrieve document parsing results. You can query the document's parsing status and obtain the parsing results.

Operation description

Prerequisites
  • You have activated Alibaba Cloud Model Studio and Tongyi Gold services.
  • Obtain the workspaceId: obtain the workspace identifier.

Debug

You can run this API directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After a successful call, OpenAPI Explorer can automatically generate SDK code examples. Debug

Authorization information

The following table describes the authorization information for this API, which can be used in the Action element of a RAM policy statement to grant a RAM user or RAM role permission to call this API. For more details:
  • Action: the specific permission point.
  • Access level: the access level of each operation. Valid values: Write, Read, or List.
  • Resource type: the resource types supported for authorization in the operation. For more details:
    • Required resource types are marked with a preceding asterisk (*).
    • For operations that do not support resource-level authorization, All resources is used.
  • Condition key: the condition keys defined by the cloud service itself.
  • Dependent operation: other permissions required to successfully perform the operation. The caller must also have the permissions of the dependent operations for the operation to succeed.
ActionAccess levelResource typeCondition keyDependent operation
dianjin:GetParseResultnone
*All resources
*
    None
None

Request syntax

POST /{workspaceId}/api/library/document/getParseResult HTTP/1.1

Request parameters

NameTypeRequiredDescriptionExample value
workspaceIdstringYes

Path parameter, the workspace ID.

llm-xxxxx
bodyobjectNo

The request body.

docIdstringYes

The document ID.

873648346573245
libraryIdstringYes

The document library ID.

sjdgdsfg
useUrlResultbooleanNo

Specifies whether to return the result as a URL. When it is true, the parsing result is returned in resultUrl, and result is empty. When it is false, the parsing result is returned in result, and resultUrl is empty.

false

Response parameters

NameTypeDescriptionExample value
object

ResultCode

successboolean

Indicates whether the request was successful.

true
dataTypestring

The data type.

null
timestring

The timestamp.

2024-04-24 11:54:34
errCodestring

The error code.

0
messagestring

The error message.

ok
dataobject

The response data.

fileTypestring

The file type.

pdf
providerTypestring

The provider type.

null
requestIdstring

The request ID.

b0a202e2-5031-4589-a6d7-39185f0d8d01
resultobject

The parsing result.

{ "Status": "Success", "Data": {}, "Message": null, "TaskId": "docmind-20240601-123abc" }
statusstring

The document parsing status.

WaitRefresh
resultUrlstring

The parsing result returned as a URL, which can be downloaded directly. Note: only pdf, doc, docx, ppt, and pptx file types have parsing results.

https://xxx.oss-cn-beijing.aliyuncs.com/library/3mjeoywx7z/1826661605606129665.json
requestIdstring

The request ID.

0abb793617204049360065953ec6dd
costlong

The time consumed.

null

Examples

Success response JSON format
{
  "success": true,
  "dataType": null,
  "time": "2024-04-24 11:54:34",
  "errCode": 0,
  "message": "ok",
  "data": {
    "fileType": "pdf",
    "providerType": null,
    "requestId": "b0a202e2-5031-4589-a6d7-39185f0d8d01",
    "result": {
      "Status": "Success",
      "Data": {},
      "Message": null,
      "TaskId": "docmind-20240601-123abc"
    },
    "status": "WaitRefresh",
    "resultUrl": "https://xxx.oss-cn-beijing.aliyuncs.com/library/3mjeoywx7z/1826661605606129665.json"
  },
  "requestId": "0abb793617204049360065953ec6dd",
  "cost": 0
}

Error codes

Visit the Error Center to view more error codes.