Retrieves asynchronous tasks.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
bdrc:DescribeTasks |
none |
*All Resource
|
None | None |
Request syntax
GET /api/v1/tasks HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| TaskStatus |
string |
No |
Specifies the status of tasks to query. If this parameter is omitted, the API returns tasks in all states. Valid values: |
RUNNING |
| NextToken |
string |
No |
A pagination token. To retrieve the next page of results, set this parameter to the |
cae**********699 |
| MaxResults |
integer |
No |
The maximum number of entries to return per page. The valid range is 10 to 500. If this parameter is omitted or its value is less than 10, a default value of 10 is used. Values greater than 500 are treated as 500. |
10 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
BaseResponse<ListResult |
||
| Data |
object |
The returned data. |
|
| Content |
array<object> |
The list of tasks. |
|
|
object |
|||
| TaskId |
string |
The task ID. |
t-0000e4w0u1v592zdf6s7 |
| TaskName |
string |
The task name. |
empty |
| TaskDescription |
string |
The task description. |
empty |
| TaskType |
string |
The task type. Valid values: |
UPDATE_RESOURCES |
| TaskPriority |
string |
The task priority. Valid values: |
HIGH |
| RequestId |
string |
The request ID. |
AE43C4CB-8074-5EBD-9806-8CA6D12800B1 |
| TaskDetail |
string |
The task details. |
{"resourceTypes":["ACS::ECS::Instance","ACS::OSS::Bucket","ACS::OTS::Instance","ACS::NAS::FileSystem"]} |
| ExecutionId |
string |
The execution ID. This parameter is currently unused and returns an empty string. |
empty |
| Progress |
integer |
The progress of the task, ranging from 0 to 10,000. |
100 |
| TaskStatus |
string |
The task status. Valid values: |
RUNNING |
| ErrorMessage |
string |
The error message returned if the task fails. |
device not online |
| StartTime |
integer |
The task's start time, represented as a Unix timestamp in seconds. |
1724983927 |
| CompleteTime |
integer |
The task's completion time, represented as a Unix timestamp in seconds. |
1724983927 |
| ExpireTime |
integer |
The task's expiration time, represented as a Unix timestamp in seconds. |
1724983927 |
| TaskResult |
string |
The result of the task. |
{"resourceCounts":[{"resourceType":"ACS::OSS::Bucket","count":2},{"resourceType":"ACS::NAS::FileSystem","count":3}]} |
| NextToken |
string |
The pagination token used to retrieve the next page of results. If this parameter is empty, no more results are available. |
f4b8c2504545a3b41af5e75147d17d12e3818a0b9b2ff9a2 |
| MaxResults |
integer |
The maximum number of entries returned per page. |
10 |
| TotalCount |
integer |
The total number of entries matching the request criteria. This parameter is optional and is not returned by default. |
100 |
| RequestId |
string |
The unique ID of the request. |
AE43C4CB-8074-5EBD-9806-8CA6D12800B1 |
Examples
Success response
JSON format
{
"Data": {
"Content": [
{
"TaskId": "t-0000e4w0u1v592zdf6s7",
"TaskName": " empty",
"TaskDescription": " empty",
"TaskType": "UPDATE_RESOURCES",
"TaskPriority": "HIGH",
"RequestId": "AE43C4CB-8074-5EBD-9806-8CA6D12800B1",
"TaskDetail": "{\"resourceTypes\":[\"ACS::ECS::Instance\",\"ACS::OSS::Bucket\",\"ACS::OTS::Instance\",\"ACS::NAS::FileSystem\"]}",
"ExecutionId": "empty",
"Progress": 100,
"TaskStatus": "RUNNING",
"ErrorMessage": "device not online",
"StartTime": 1724983927,
"CompleteTime": 1724983927,
"ExpireTime": 1724983927,
"TaskResult": "{\"resourceCounts\":[{\"resourceType\":\"ACS::OSS::Bucket\",\"count\":2},{\"resourceType\":\"ACS::NAS::FileSystem\",\"count\":3}]}"
}
],
"NextToken": "f4b8c2504545a3b41af5e75147d17d12e3818a0b9b2ff9a2",
"MaxResults": 10,
"TotalCount": 100
},
"RequestId": "AE43C4CB-8074-5EBD-9806-8CA6D12800B1"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.