Query CBT Tasks

GET/zstack/v1/cbt-task
GET/zstack/v1/cbt-task/{uuid}

Headers

Authorization: OAuth the-session-uuid

Curl Example

curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/cbt-task?q=uuid=d6c3daab1c9b3274b5fc4088bd3e51ad
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/cbt-task/cf426711ed6538069d2d4d6d34d5e60a

Queryable Fields

Run the CLI command line tool, enter QueryCbtTask, and press Tab to view all queryable fields and the resource names that support cross-table queries.

API Response

Response Example

{
  "inventories": [
    {
      "uuid": "103f6f8dc6dc3f8b82c1e1923dc751e0",
      "name": "My Task",
      "status": "Running"
    }
  ]
}
NameTypeDescriptionStarting Version
successboolean 4.10.10
inventoriesListFor details, see inventories4.10.10
errorErrorCodeError code. If not null, the operation failed. This field is null when the operation succeeds. For details, see error4.10.10

inventories

NameTypeDescriptionStarting Version
uuidStringResource UUID. Uniquely identifies the resource4.10.10
nameStringResource name4.10.10
descriptionStringDetailed description of the resource4.10.10
createDateTimestampCreation time4.10.10
lastOpDateTimestampLast modification time4.10.10
statusCbtTaskStatusFor details, see status4.10.10

status

NameTypeDescriptionStarting Version
CreatedCbtTaskStatus 4.10.10
StartingCbtTaskStatus 4.10.10
RunningCbtTaskStatus 4.10.10
StoppedCbtTaskStatus 4.10.10
FailedCbtTaskStatus 4.10.10

error

NameTypeDescriptionStarting Version
codeStringError code number. The globally unique identifier of the error, for example, SYS.1000 or HOST.10010.6
descriptionStringBrief description of the error0.6
detailsStringDetailed information about the error0.6
elaborationStringReserved field. Default is null0.6
opaqueLinkedHashMapReserved field. Default is null0.6
causeErrorCodeRoot error. The source error that caused the current error. This field is null if there is no source error0.6

SDK Examples

Java SDK

QueryCbtTaskAction action = new QueryCbtTaskAction();
action.conditions = asList("uuid=bd8fa811d9c234ceada09446fa085967");
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
QueryCbtTaskAction.Result res = action.call();

Python SDK

QueryCbtTaskAction action = QueryCbtTaskAction()
action.conditions = ["uuid=0449908917ce338bba71c107848b7c5c"]
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
QueryCbtTaskAction.Result res = action.call()