Retrieves a list of asynchronous tasks.
Try it now
You can run this API directly in OpenAPI Explorer, sparing you the trouble of calculating signatures. After a successful run, OpenAPI Explorer can automatically generate SDK code examples.
Try it now
RAM authorization
The following table describes the authorization information for this API. You can use it in the Action element of a RAM permission 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 action. Details are as follows:
- Required resource types are marked with a leading *.
- For actions that do not support resource-level authorization,
All Resourcesis used.
- Condition key: The condition keys defined by the cloud service itself.
- Dependent action: The other permissions required to successfully perform the action. The caller must have the permissions of all dependent actions before the action can succeed.
| Action | Access level | Resource type | Condition key | Dependent action |
|---|---|---|---|---|
| aimiaobi:ListAsyncTasks | list | *All Resources * |
| None |
Request parameters
| Name | Type | Required | Description | Example |
|---|---|---|---|---|
| AgentKey | string | Yes | Workspace unique identifier: AgentKey | cd327c3d5d5e44159cc716e23bfa530e_p_beebot_public |
| TaskName | string | No | A term query for the task name. | Task name |
| TaskCode | string | No | A term query for the task code. | MaterialDocumentUpload |
| TaskType | string | No | A term query for the task type. | None |
| TaskStatus | integer | No | A term query for the task status (0: Pending, 1: Running, 2: Succeeded, 3: Paused, 4: Failed and retriable, 5: Failed and not retriable, 6: Canceled) | 1 |
| TaskStatusList | array | No | A term query for a list of task statuses (0: Pending, 1: Running, 2: Succeeded, 3: Paused, 4: Failed and retriable, 5: Failed and not retriable, 6: Canceled) | |
| TaskStatusList | integer | No | The task status. | 1 |
| TaskTypeList | array | No | A term query for a list of task types. | |
| TaskTypeList | string | No | The task category. | test |
| CreateTimeStart | string | No | The start time for querying task creation. Format: YYYY-MM-DD HH:mm:ss | 2023-02-19 07:28:11 |
| CreateTimeEnd | string | No | The end time for querying task creation. Format: YYYY-MM-DD HH:mm:ss | 2023-03-18 02:00:00 |
| Current | integer | No | The current page number. | 1 |
| Size | integer | No | The number of entries per page. Default value: 10. | 10 |
Response elements
| Name | Type | Description | Example |
|---|---|---|---|
| object | PageResult | ||
| Code | string | The status code. | successful |
| Current | integer | The current page. | 1 |
| Data | array<object> | The returned data. | |
| Data | object | The list of tasks. | |
| CreateTime | string | Creation date | 2020-12-23 15:41:58 |
| CreateUser | string | Created by | 1111 |
| Id | long | The primary key ID of the task. | 1 |
| TaskCode | string | The task identifier, which specifies the task. | MaterialDocumentUpload |
| TaskDefinition | string | The optional task definition configuration in JSON format. These parameters overwrite the system's default configuration. | {} |
| TaskEndTime | string | The actual end time of the task. | 2023-03-09 00:00:00 |
| TaskErrorMessage | string | The error message from the task execution for the client. | Internal system error |
| TaskExecuteTime | string | The time when the task is scheduled to run. The system polls only for tasks that are due. If this parameter is empty, the task runs immediately. | 2023-10-14 14:30:00 |
| TaskId | string | The unique task ID. It is equivalent to the Id parameter. | 3f7045e099474ba28ceca1b4eb6d6e21 |
| TaskInnerErrorMessage | string | The internal error message from the task execution. Sensitive information, such as exception stacks and internal thread stacks, is recorded here. | System error |
| TaskIntermediateResult | string | The intermediate result of the task execution. If a task consists of multiple steps, the output of each step can be saved here. When the task resumes from a paused state, it can read this intermediate result and continue execution. | {} |
| TaskName | string | The task name. | Task name |
| TaskParam | string | The input parameters for the task execution, in JSON format. | {} |
| TaskProgressMessage | string | The progress information of the task execution. | {} |
| TaskResult | string | The result information of the task execution. | {} |
| TaskRetryCount | string | The number of times the task has been retried. | 1 |
| TaskStartTime | string | The actual start time of the task. | 2023-03-20 10:53:00 |
| TaskStatus | integer | The execution status of the task. Valid values: 0 (Pending), 1 (Running), 2 (Succeeded), 3 (Paused), 4 (Failed and retriable), 5 (Failed and not retriable), 6 (Canceled). | 1 |
| TaskType | string | The task category. Multiple task categories are separated by commas. | test |
| UpdateTime | string | Update date | 2023-02-16 10:29:16 |
| UpdateUser | string | Updated by | 111 |
| HttpStatusCode | integer | The HTTP status code. | 200 |
| Message | string | The error description. | successful |
| RequestId | string | The unique ID of the request. | 428DCC0D-3C63-5306-BD1B-124396AB97BE |
| Size | integer | The number of records per page. | 10 |
| Success | boolean | Indicates whether the request was successful: true for success, false for failure. | true |
| Total | integer | The total number of records. | 20 |
Examples
Success response
JSON format