Undo Snapshot Creation
Headers
Authorization: OAuth the-session-uuidBody
{
"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/actionsParameter List
| Name | Type | Location | Description | Allowed Values | Starting Version |
|---|---|---|---|---|---|
| uuid | String | url | The UUID of the resource. Uniquely identifies the resource | 4.7.0 | |
| snapShotUuid | String | body (Contained in the undoSnapshotCreation structure) | 4.7.0 | ||
| systemTags (Optional) | List | body | System tags | 4.7.0 | |
| userTags (Optional) | List | body | User 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"
}
}| Name | Type | Description | Starting Version |
|---|---|---|---|
| success | boolean | 4.7.0 | |
| inventory | VolumeInventory | For details, see inventory | 4.7.0 |
| error | ErrorCode | The error code. If not null, the operation failed. This field is null when the operation succeeds. For details, see error | 4.7.0 |
inventory
| Name | Type | Description | Starting Version |
|---|---|---|---|
| uuid | String | The UUID of the resource. Uniquely identifies the resource | 4.7.13 |
| name | String | Resource name | 4.7.13 |
| description | String | Detailed description of the resource | 4.7.13 |
| primaryStorageUuid | String | Data Storage UUID | 4.7.13 |
| vmInstanceUuid | String | Virtual Machine UUID | 4.7.13 |
| diskOfferingUuid | String | Disk offering UUID | 4.7.13 |
| rootImageUuid | String | 4.7.13 | |
| installPath | String | 4.7.13 | |
| type | String | 4.7.13 | |
| format | String | 4.7.13 | |
| size | Long | 4.7.13 | |
| actualSize | Long | 4.7.13 | |
| deviceId | Integer | 4.7.13 | |
| state | String | 4.7.13 | |
| status | String | 4.7.13 | |
| createDate | Timestamp | Creation time | 4.7.13 |
| lastOpDate | Timestamp | Last modification time | 4.7.13 |
| isShareable | Boolean | 4.7.13 | |
| volumeQos | String | 4.7.13 | |
| lastDetachDate | Timestamp | 4.7.13 | |
| lastVmInstanceUuid | String | 4.7.13 |
error
| Name | Type | Description | Starting Version |
|---|---|---|---|
| code | String | The error code number. A globally unique identifier for the error, for example, SYS.1000, HOST.1001 | 0.6 |
| description | String | A brief description of the error | 0.6 |
| details | String | The detailed error information | 0.6 |
| elaboration | String | A reserved field. The default value is null | 0.6 |
| opaque | LinkedHashMap | A reserved field. The default value is null | 0.6 |
| cause | ErrorCode | The root error. The source error that caused the current error. If no root error exists, this field is null | 0.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()