Skip to main content

GetTaskResult

Retrieves the result of an asynchronous task.

Debug

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

RAM authorization

The following table describes the authorization information of the API. You can use it in the Action element of a RAM policy statement to grant a RAM user or RAM role the permission to call this API. Details are as follows:
  • Action: the specific permission point.
  • Access level: the access level of each action. Valid values: Write, Read, or List.
  • Resource type: the resource types that support authorization for the operation. Details are as follows:
    • 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 action: other permissions required to successfully perform the operation. The caller must also have the permissions of the dependent actions for the operation to succeed.
ActionAccess levelResource typeCondition keyDependent action
dianjin:GetTaskResultget
*All Resources
*
    None
None

Request syntax

GET /{workspaceId}/api/task/result HTTP/1.1

Request parameters

NameTypeRequiredDescriptionExample value
workspaceIdstringYes

The workspace ID.

llm-xxxx
taskIdstringYes

The task ID.

17071319

Response elements

NameTypeDescriptionExample value
objectResultCode
costlongThe time consumed.null
dataobjectThe result of the asynchronous task.

PDF translation task

The returned file_url is a downloadable file address.
{
  "file_url": "https://finllmworks.oss-cn-zhangjiakou.aliyuncs.com/render_pdf/5336180997111160501.pdf"
}
{ "file_url": "https://finllmworks.oss-cn-zhangjiakou.aliyuncs.com/render_pdf/5336180997111160501.pdf" }
dataTypestringThe data type.null
errCodestringThe error code.0
messagestringThe error message.ok
requestIdstringThe request ID.9D5D6BB5-BEAE-53C8-A70A-7275CC1F856C
successbooleanIndicates whether the request was successful.true
timestringThe timestamp.2024-04-24 11:54:34

Examples

Success response JSON format
{
  "cost": 0,
  "data": {
    "file_url": "https://finllmworks.oss-cn-zhangjiakou.aliyuncs.com/render_pdf/5336180997111160501.pdf"
  },
  "dataType": null,
  "errCode": 0,
  "message": "ok",
  "requestId": "9D5D6BB5-BEAE-53C8-A70A-7275CC1F856C",
  "success": true,
  "time": "2024-04-24 11:54:34"
}

Error codes

Visit the Error Center to view more error codes.