Undo Snapshot Creation

PUT/zstack/v1/volumes/{uuid}/actions

Headers

Authorization: OAuth the-session-uuid

Body

{
  "undoSnapshotCreation": {
    "snapShotUuid": "7677380457d136629f44c93c99978acc"
  },
  "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 PUT -d '{"undoSnapshotCreation":{"snapShotUuid":"7677380457d136629f44c93c99978acc"}}' \
http://localhost:8080/zstack/v1/volumes/7fc32ad187c939d8aca65977560c2714/actions

Parameter List

NameTypeLocationDescriptionAllowed ValuesStarting Version
uuidStringurlThe UUID of the resource. Uniquely identifies the resource 4.7.0
snapShotUuidStringbody (Contained in the undoSnapshotCreation structure)  4.7.0
systemTags (Optional)ListbodySystem tags 4.7.0
userTags (Optional)ListbodyUser tags 4.7.0

API Response

Response Example

{
  "inventory": {
    "uuid": "7c3af161f36e3c2ca8661e8f825a9a4d",
    "name": "test-volume",
    "primaryStorageUuid": "c5b8c1bc2db337ac83b5a867046e145d",
    "vmInstanceUuid": "d6d25288e0973da58921dc13cb58c653",
    "diskOfferingUuid": "5547f17f3df234278ce7f44bb8fdf131",
    "rootImageUuid": "a976ad9fc6493bd88ea7ef05e9028dc1",
    "installPath": "/zstack_ps/rootVolumes/acct-36c27e8ff05c4780bf6d2fa65700f22e/vol-7c3af161f36e3c2ca8661e8f825a9a4d/7c3af161f36e3c2ca8661e8f825a9a4d.qcow2",
    "type": "Root",
    "format": "qcow2",
    "size": 107374182400,
    "actualSize": 21474836480,
    "deviceId": 0,
    "state": "Enabled",
    "status": "Ready",
    "createDate": "Nov 14, 2017 2:20:57 PM",
    "lastOpDate": "Nov 14, 2017 2:20:57 PM"
  }
}
NameTypeDescriptionStarting Version
successboolean 4.7.0
inventoryVolumeInventoryFor details, see inventory4.7.0
errorErrorCodeThe error code. If not null, the operation failed. This field is null when the operation succeeds. For details, see error4.7.0

inventory

NameTypeDescriptionStarting Version
uuidStringThe UUID of the resource. Uniquely identifies the resource4.7.13
nameStringResource name4.7.13
descriptionStringDetailed description of the resource4.7.13
primaryStorageUuidStringData Storage UUID4.7.13
vmInstanceUuidStringVirtual Machine UUID4.7.13
diskOfferingUuidStringDisk offering UUID4.7.13
rootImageUuidString 4.7.13
installPathString 4.7.13
typeString 4.7.13
formatString 4.7.13
sizeLong 4.7.13
actualSizeLong 4.7.13
deviceIdInteger 4.7.13
stateString 4.7.13
statusString 4.7.13
createDateTimestampCreation time4.7.13
lastOpDateTimestampLast modification time4.7.13
isShareableBoolean 4.7.13
volumeQosString 4.7.13
lastDetachDateTimestamp 4.7.13
lastVmInstanceUuidString 4.7.13

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
elaborationStringA reserved field. The default value is null0.6
opaqueLinkedHashMapA reserved field. The default value is null0.6
causeErrorCodeThe root error. The source error that caused the current error. If no root error exists, this field is null0.6

SDK Examples

Java SDK

UndoSnapshotCreationAction action = new UndoSnapshotCreationAction();
action.uuid = "7fc32ad187c939d8aca65977560c2714";
action.snapShotUuid = "7677380457d136629f44c93c99978acc";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
UndoSnapshotCreationAction.Result res = action.call();

Python SDK

UndoSnapshotCreationAction action = UndoSnapshotCreationAction()
action.uuid = "7fc32ad187c939d8aca65977560c2714"
action.snapShotUuid = "7677380457d136629f44c93c99978acc"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
UndoSnapshotCreationAction.Result res = action.call()