Get Task Progress

GET/zstack/v1/task-progresses/{apiId}

Headers

Authorization: OAuth the-session-uuid

Curl Example

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

Parameter List

NameTypeLocationDescriptionAllowed ValuesStarting Version
apiId (Optional)StringurlThe API ID of the task 1.11
all (Optional)booleanquerySpecify to get all progress information 1.11
systemTags (Optional)ListquerySystem tags 1.11
userTags (Optional)ListqueryUser tags 1.11

API Response

Response Example

{
  "inventories": [
    {
      "taskUuid": "931102503f64436ea649939ff3957406",
      "taskName": "org.zstack.header.vm.APICreateVmInstanceMsg",
      "type": "Task",
      "content": "Choose backup storage for downloading the image",
      "time": 1510669257141.0
    }
  ]
}
NameTypeDescriptionStarting Version
errorErrorCodeThe error code. If not null, the operation failed. This field is null when the operation succeeds. See error for details0.6
inventoriesListSee inventories for details0.6

error

NameTypeDescriptionStarting Version
codeStringThe error code number. A globally unique identifier for the error, for example, SYS.1000, HOST.10010.6
descriptionStringA brief description of the error0.6
detailsStringThe detailed error information0.6
elaborationStringReserved field. Default is null0.6
opaqueLinkedHashMapReserved field. Default is null0.6
causeErrorCodeThe root error that caused the current error. If no root error exists, this field is null0.6

inventories

NameTypeDescriptionStarting Version
taskUuidString 0.6
taskNameString 0.6
parentUuidString 0.6
typeString 0.6
contentString 0.6
opaqueLinkedHashMap 0.6
timeLong 0.6
totalStepsInteger 0.6
currentStepInteger 0.6
subTasksListSee subTasks for details0.6

SDK Examples

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()