Document navigation

Progress Bar Operations

GetTaskProgress

API Request

URLs
GET zstack/v1/task-progresses/{apiId}
Headers
Authorization: OAuth the-session-uuid
Curl Sample
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth 8679db834cfc4b3b93fcbf8521581eff" \
-X GET http://localhost:8080/zstack/v1/task-progresses/7b016e3d2b4647e9abe3183728f77e57?all=false
Request Parameters
Name Type Location Description Optional Value Starting Version
apiId String url Optional. The API ID corresponded by the task. 1.11
all boolean query Optional. Obtains all the progress information. 1.11
systemTags List query Optional. The system tags. 1.11
userTags List query Optional. The user tags. 1.11

API Response

Sample Response
{
  "inventories": [
    {
      "taskUuid": "931102503f64436ea649939ff3957406",
      "taskName": "org.zstack.header.vm.APICreateVmInstanceMsg",
      "type": "Task",
      "content": "Choose backup storage for downloading the image",
      "time": 1.510669257141E12
    }
  ]
}
Name Type Description Starting Version
error ErrorCode The error code. If not null, the operation fails, or vice versa. For more information, see error. 0.6
inventories List See inventories. 0.6
#error
Name Type Description Starting Version
code String The error code, which is a numbered or alphanumeric code that specifies an error. For example, SYS.1000, HOST.1001. 0.6
description String The brief description of the error. 0.6
details String The details about the error. 0.6
elaboration String The reserved field. Default value: null. 0.6
opaque LinkedHashMap The reserved field. Default value: null. 0.6
cause ErrorCode The root error, which is the associated root cause of the current error. If no root error exists, this parameter is null. 0.6
#inventories
Name Type Description Starting Version
taskUuid String 0.6
taskName String 0.6
parentUuid String 0.6
type String 0.6
content String 0.6
opaque LinkedHashMap 0.6
time Long 0.6
totalSteps Integer 0.6
currentStep Integer 0.6
subTasks List See subTasks. 0.6

SDK Sample

Java SDK
GetTaskProgressAction action = new GetTaskProgressAction();
action.apiId = "00c035b586634edeb3bfb21f17e02b40";
action.all = false;
action.sessionId = "dea874a205c04a838e46ff6f48294add";
GetTaskProgressAction.Result res = action.call();
Python SDK
GetTaskProgressAction action = GetTaskProgressAction()
action.apiId = "82f5efb211394297b1d6a4f8d5e5618e"
action.all = false
action.sessionId = "2100b95ab4064c81acc5db473b2a1ef6"
GetTaskProgressAction.Result res = action.call()
API Reference | 4.8.38 | ZStack Cloud · ZCF | ZStack Resource Center