Retrieves a list of asynchronous tasks.
Try it now
Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.
RAM authorization
The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:
-
Action: The actions can be used in the
Actionelement of RAM permission policy statements to grant permissions to perform the operation. - API: The API that you can call to perform the action.
- Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.
-
Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.
- For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the
Resourceelement of the policy. - For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the
Resourceelement of the policy.
- For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the
- Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.
- Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.
Action | Access level | Resource type | Condition key | Dependent action |
|---|---|---|---|---|
aimiaobi:ListAsyncTasks | list | *All Resource
| None | None |
Request parameters
Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| AgentKey | string | Yes | The unique identifier of the workspace: 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. Valid values: 0 (Pending), 1 (Running), 2 (Succeeded), 3 (Paused), 4 (Failed and retriable), 5 (Failed and not retriable), and 6 (Canceled). | 1 |
| TaskStatusList | array | No | A term query for a list of task statuses. Valid values: 0 (Pending), 1 (Running), 2 (Succeeded), 3 (Paused), 4 (Failed and retriable), 5 (Failed and not retriable), and 6 (Canceled). | |
integer | No | The task status. | 1 | |
| TaskTypeList | array | No | A term query for a list of task types. | |
string | No | The task category. | test | |
| CreateTimeStart | string | No | The start of the time range to query task creation times. Format: YYYY-MM-DD HH:mm:ss. | 2023-02-19 07:28:11 |
| CreateTimeEnd | string | No | The end of the time range to query task creation times. 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
Element | Type | Description | Example |
|---|---|---|---|
object | PageResult<AsyncTask> | ||
| Code | string | The status code. | successful |
| Current | integer | The current page. | 1 |
| Data | array<object> | The returned data. | |
object | The list of tasks. | ||
| CreateTime | string | The creation date. | 2020-12-23 15:41:58 |
| CreateUser | string | The creator. | 1111 |
| Id | integer | 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 categories. Multiple categories are separated by commas. | test |
| UpdateTime | string | The update date. | 2023-02-16 10:29:16 |
| UpdateUser | string | The user who performed the update. | 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: The request was successful. false: The request failed. | true |
| Total | integer | The total number of records. | 20 |
Examples
Success response
JSON format