Skip to main content

QueryAsyncTask

Queries the details of submitted asynchronous task executions.

Try it now

You can run this API directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After the call succeeds, OpenAPI Explorer can automatically generate SDK code examples. Try it now

Authorization information

The following table describes the authorization information of the API. You can use it in the Action element of a RAM permission policy statement to grant RAM users or RAM roles the permission to call this API. For more information, see the following:
  • Action: the specific permission point.
  • Access level: the access level of each operation. Valid values: Write, Read, or List.
  • Resource type: the resource types that support authorization in the operation. For more information, see the following:
    • Required resource types are marked with a leading *.
    • 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: the other permissions required to successfully perform the operation. The caller must have the permissions of the dependent actions at the same time for the operation to succeed.
ActionAccess levelResource typeCondition keyDependent action
aimiaobi:QueryAsyncTaskget
*All resources
*
    None
None

Request parameters

NameTypeRequiredDescriptionExample value
AgentKeystringYes

Unique ID of the workspace: AgentKey

33a2658aaabf4c24b45d50e575125311_p_beebot_public
TaskIdstringNo

Unique task ID

Note TaskId is not required by default. The system automatically generates it. If subsequent tasks use the same TaskId, the tasks belong to the same conversation group.
3f7045e099474ba28ceca1b4eb6d6e21

Response elements

NameTypeDescriptionExample value
object

PlainResult

Codestring

Status code

success
Dataobject

Business data

CreateTimestring

Creation date

2021-07-25 14:34:33
CreateUserstring

Creator

"12121"
TaskCodestring

Task ID, indicates the specific task.

MaterialDocumentUpload
TaskErrorMessagestring

Task execution error message

error
TaskIdstring

Unique task ID

3f7045e099474ba28ceca1b4eb6d6e21
TaskIntermediateResultstring

Intermediate task execution result. When a task has multiple steps, save the output of each step here. When resuming from a pause, read the intermediate result and continue from there.

"{}"
TaskNamestring

Task name

Task name
TaskParamstring

Task execution input parameters, JSON format

"{\"fileKey\":\"oss://default/xxxx/xxxx/xxx\",\"fileName\":\"xxxxx.doc\"}"
TaskProgressMessagestring

Task execution progress message

"{}"
TaskResultstring

Task execution result message

"{}"
TaskRetryCountstring

Number of task retries

"3"
TaskStatusinteger

Task execution status: 0-Pending, 1-Executing, 2-Execution successful, 3-Paused, 4-Execution failed (retryable), 5-Execution failed (not retryable), 6-Task canceled.

1
UpdateTimestring

Update date

2023-04-27 18:07:43
UpdateUserstring

Updater

"12121"
HttpStatusCodeinteger

HTTP status code

200
Messagestring

Error description

success
RequestIdstring

Unique request ID

867C4ABE-4381-5BC2-9810-5A5F334F71CF
Successboolean

Success status: true for success, false for failure.

true

Examples

Success response JSON format
{
  "Code": "success",
  "Data": {
    "CreateTime": "2021-07-25 14:34:33",
    "CreateUser": 12121,
    "TaskCode": "MaterialDocumentUpload",
    "TaskErrorMessage": "error",
    "TaskId": "3f7045e099474ba28ceca1b4eb6d6e21",
    "TaskIntermediateResult": {},
    "TaskName": "任务名称",
    "TaskParam": {
      "fileKey": "oss://default/xxxx/xxxx/xxx",
      "fileName": "xxxxx.doc"
    },
    "TaskProgressMessage": {},
    "TaskResult": {},
    "TaskRetryCount": 3,
    "TaskStatus": 1,
    "UpdateTime": "2023-04-27 18:07:43",
    "UpdateUser": 12121
  },
  "HttpStatusCode": 200,
  "Message": "success",
  "RequestId": "867C4ABE-4381-5BC2-9810-5A5F334F71CF",
  "Success": true
}

Error codes

For more error codes, visit Error Center.