Stop a CBT Task

POST/zstack/v1/cbt-task/disable/{uuid}

Headers

Authorization: OAuth the-session-uuid

Body

{
  "params": {
    "force": false
  },
  "systemTags": [],
  "userTags": []
}

The systemTags and userTags fields in the above example are optional. They are listed to indicate that the body can contain these two fields.

Curl Example

curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X POST -d '{"params":{"force":false}}' \
http://localhost:8080/zstack/v1/cbt-task/disable/5a86262807b4363e95f2e57d2970d189

Parameter List

NameTypeLocationDescriptionAllowed ValuesStarting Version
uuidStringurlResource UUID. Uniquely identifies the resource 4.10.10
force (optional)booleanbody (included in the params structure)  4.10.10
systemTags (optional)ListbodySystem tags 4.10.10
userTags (optional)ListbodyUser tags 4.10.10

API Response

Response Example

{
  "inventory": {
    "uuid": "5ca9c15a50c53f0dac359a64841d7b2b",
    "name": "My Task",
    "status": "Stopped"
  }
}
NameTypeDescriptionStarting Version
successboolean 4.10.10
inventoryCbtTaskInventoryFor details, see inventory4.10.10
errorErrorCodeError code. If not null, the operation failed. This field is null when the operation succeeds. For details, see error4.10.10

inventory

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

DisableCbtTaskAction action = new DisableCbtTaskAction();
action.uuid = "5a86262807b4363e95f2e57d2970d189";
action.force = false;
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
DisableCbtTaskAction.Result res = action.call();

Python SDK

DisableCbtTaskAction action = DisableCbtTaskAction()
action.uuid = "5a86262807b4363e95f2e57d2970d189"
action.force = false
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
DisableCbtTaskAction.Result res = action.call()