Querying Running Tasks
Function
This API is used to query running tasks.
Calling Method
For details, see Calling APIs.
URI
GET /v3/{project_id}/running-tasks
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Definition Project ID. For details, see Obtaining a Project ID. Constraints N/A Range The value returned by the IAM API is used, which contains 32 characters. Default Value N/A |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| limit | No | Integer | Definition Number of running tasks returned on each page Constraints N/A Range N/A Default Value 1000 |
| offset | No | Integer | Definition Index location. The query starts from the next data specified by offset. When you query resources on subsequent pages, set offset to the location returned in the response body for the previous query. Constraints The value of offset must be a non-negative number. Range N/A Default Value N/A |
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| X-Auth-Token | Yes | String | Definition User token. It can be obtained by calling the IAM API. The value of X-Subject-Token in the response header is the user token. Constraints N/A Range Obtain the value by calling the IAM API for obtaining the user token. Default Value N/A |
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| total | Integer | Definition Total number of running tasks Range N/A |
| tasks | Array of RunningTasks objects | Definition List of running tasks Range N/A |
| Parameter | Type | Description |
|---|---|---|
| task_id | String | Definition Task ID Range N/A |
| operate_type | String | Definition Operation type Range |
| task_time | String | Definition Task time Range N/A |
| server_name | String | Definition VM name Range N/A |
| server_id | String | Definition VM ID Range N/A |
| keypair_name | String | Definition Key pair name Range N/A |
Example Requests
None
Example Responses
Status code: 200
OK
{
"total" : 1,
"tasks" : [ {
"task_id" : "aee8d2fe-5484-4753-9177-5a38dc15546c",
"operate_type" : "FAILED_RESET",
"task_time" : "2015-07-16 04:10:52",
"server_name" : "Test",
"server_id" : "c9aa197b-a6b6-4c33-b3a6-fa0b4ec50006",
"keypair_name" : "KeyPair-xt"
} ]
} Status Codes
| Status Code | Description |
|---|---|
| 200 | OK |
Error Codes
See Error Codes.