CreateVolumeSnapshotGroup

API Request

URLs
POST zstack/v1/volume-snapshots/group
Headers
Authorization: OAuth the-session-uuid
Body
{
  "params": {
    "rootVolumeUuid": "901cae4fd9f43a1ca20da4146ddaec50",
    "name": "test"
  },
  "systemTags": [],
  "userTags": []
}
Note: In the preceding sample, both systemTags and userTags are optional. These two fields can be included in the body structure.
Curl Sample
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X POST -d '{"params":{"rootVolumeUuid":"901cae4fd9f43a1ca20da4146ddaec50","name":"test"}}' http://localhost:8080/zstack/v1/volume-snapshots/group
Request Parameters
Name Type Location Description Optional Value Starting Version
rootVolumeUuid String body (contained in the params structure) The root volume UUID. 3.6.0
name String body (contained in the params structure) The resource name. 3.6.0
description String body (contained in the params structure) Optional. The detailed description of the resource. 3.6.0
resourceUuid String body (contained in the params structure) Optional. The resource UUID. 3.6.0
tagUuids List body (contained in the params structure) Optional. The tag UUID list. 3.6.0
systemTags List body Optional. The system tags. 3.6.0
userTags List body Optional. The user tags. 3.6.0

API Response

Sample Response
{
  "inventory": {
    "uuid": "4b13e23059033e2dbfac63b5b16eba11",
    "snapshotCount": 1.0,
    "name": "group",
    "vmInstanceUuid": "9ff17180fded31c2b9e4e5751ebcb2ba",
    "createDate": "Nov 14, 2017 10:20:57 PM",
    "lastOpDate": "Nov 14, 2017 10:20:57 PM",
    "volumeSnapshotRefs": [
      {
        "volumeSnapshotUuid": "e83b2d306f0d353a889096ca0b44b444",
        "volumeSnapshotGroupUuid": "4b13e23059033e2dbfac63b5b16eba11",
        "deviceId": 0.0,
        "snapshotDeleted": false,
        "volumeUuid": "edc07fe8d8a335ec8aa00f23b88fc1c6",
        "volumeName": "ROOT-volume",
        "volumeType": "Root",
        "volumeSnapshotInstallPath": "/Cloud_ps/to/path/snap.qcow2",
        "volumeSnapshotName": "group-ROOT-volume",
        "createDate": "Nov 14, 2017 10:20:57 PM",
        "lastOpDate": "Nov 14, 2017 10:20:57 PM"
      }
    ]
  }
}
Name Type Description Starting Version
error ErrorCode The error code. If not null, the operation fails, or vice versa. For more information, see error. 3.6.0
inventory VolumeSnapshotGroupInventory See inventory. 3.6.0
#error
Name Type Description Starting Version
code String The error code, which is a numbered or alphanumeric code that specifies an error. For example, SYS.1000, HOST.1001. 3.6.0
description String The brief description of the error. 3.6.0
details String The details about the error. 3.6.0
elaboration String The reserved field. Default value: null. 3.6.0
opaque LinkedHashMap The reserved field. Default value: null. 3.6.0
cause ErrorCode The root error, which is the associated root cause of the current error. If no root error exists, this parameter is null. 3.6.0
#inventory
Name Type Description Starting Version
uuid String The resource UUID. 3.6.0
snapshotCount Integer The number of snapshots in the snapshot group. 3.6.0
name String The resource name. 3.6.0
description String The detailed description of the resource. 3.6.0
vmInstanceUuid String The VM instance UUID. 3.6.0
createDate Timestamp The creation date. 3.6.0
lastOpDate Timestamp The last operation date. 3.6.0
volumeSnapshotRefs List See volumeSnapshotRefs. 3.6.0
#volumeSnapshotRefs
Name Type Description Starting Version
volumeSnapshotUuid String The volume snapshot UUID. 3.6.0
volumeSnapshotGroupUuid String The snapshot group UUID. 3.6.0
deviceId int The device ID of the volume when the snapshot is taken. 3.6.0
snapshotDeleted boolean Whether the snapshot is deleted. 3.6.0
volumeUuid String The volume UUID. 3.6.0
volumeName String The volume name. 3.6.0
volumeType String The volume type. 3.6.0
volumeSnapshotInstallPath String The path to install the snapshot. 3.6.0
volumeSnapshotName String The snapshot name. 3.6.0
createDate Timestamp The creation date. 3.6.0
lastOpDate Timestamp The last operation date. 3.6.0

SDK Sample

Java SDK
CreateVolumeSnapshotGroupAction action = new CreateVolumeSnapshotGroupAction();
action.rootVolumeUuid = "901cae4fd9f43a1ca20da4146ddaec50";
action.name = "test";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
CreateVolumeSnapshotGroupAction.Result res = action.call();
Python SDK
CreateVolumeSnapshotGroupAction action = CreateVolumeSnapshotGroupAction()
action.rootVolumeUuid = "901cae4fd9f43a1ca20da4146ddaec50"
action.name = "test"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
CreateVolumeSnapshotGroupAction.Result res = action.call()

DeleteVolumeSnapshotGroup

API Request

URLs
DELETE zstack/v1/volume-snapshots/group/{uuid}?deleteMode={deleteMode}
Headers
Authorization: OAuth the-session-uuid
Curl Sample
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X DELETE http://localhost:8080/zstack/v1/volume-snapshots/group/f7b2175eebba3161b029689cb32f9b14?deleteMode=Permissive
Request Parameters
Name Type Location Description Optional Value Starting Version
uuid String url The resource UUID. 3.6.0
deleteMode String body Optional. The delete mode. 3.6.0
systemTags List body Optional. The system tags. 3.6.0
userTags List body Optional. The user tags. 3.6.0

API Response

Sample Response
{
  "results": [
    {
      "success": false,
      "error": {
        "code": "SYS.1001",
        "description": "internal error"
      }
    }
  ]
}
Name Type Description Starting Version
error ErrorCode The error code. If not null, the operation fails, or vice versa. For more information, see error. 3.6.0
results List See results. 3.6.0
#error
Name Type Description Starting Version
code String The error code, which is a numbered or alphanumeric code that specifies an error. For example, SYS.1000, HOST.1001. 3.6.0
description String The brief description of the error. 3.6.0
details String The details about the error. 3.6.0
elaboration String The reserved field. Default value: null. 3.6.0
opaque LinkedHashMap The reserved field. Default value: null. 3.6.0
cause ErrorCode The root error, which is the associated root cause of the current error. If no root error exists, this parameter is null. 3.6.0
#results
Name Type Description Starting Version
snapshotUuid String The snapshot UUID. 3.6.0
volumeUuid String The volume UUID. 3.6.0
success boolean 3.6.0
error ErrorCode See error. 3.6.0
#error
Name Type Description Starting Version
code String The error code, which is a numbered or alphanumeric code that specifies an error. For example, SYS.1000, HOST.1001. 3.6.0
description String The brief description of the error. 3.6.0
details String The details about the error. 3.6.0
elaboration String The reserved field. Default value: null. 3.6.0
opaque LinkedHashMap The reserved field. Default value: null. 3.6.0
cause ErrorCode The root error, which is the associated root cause of the current error. If no root error exists, this parameter is null. 3.6.0

SDK Sample

Java SDK
DeleteVolumeSnapshotGroupAction action = new DeleteVolumeSnapshotGroupAction();
action.uuid = "f7b2175eebba3161b029689cb32f9b14";
action.deleteMode = "Permissive";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
DeleteVolumeSnapshotGroupAction.Result res = action.call();
Python SDK
DeleteVolumeSnapshotGroupAction action = DeleteVolumeSnapshotGroupAction()
action.uuid = "f7b2175eebba3161b029689cb32f9b14"
action.deleteMode = "Permissive"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
DeleteVolumeSnapshotGroupAction.Result res = action.call()

UpdateVolumeSnapshotGroup

API Request

URLs
PUT zstack/v1/volume-snapshots/group/{uuid}/actions
Headers
Authorization: OAuth the-session-uuid
Body
{
  "updateVolumeSnapshotGroup": {
    "name": "new name"
  },
  "systemTags": [],
  "userTags": []
}
Note: In the preceding sample, both systemTags and userTags are optional. These two fields can be included in the body structure.
Curl Sample
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X PUT -d '{"updateVolumeSnapshotGroup":{"name":"new name"}}' http://localhost:8080/zstack/v1/volume-snapshots/group/c39089cddbd836628f346b14beafe2d3/actions
Request Parameters
Name Type Location Description Optional Value Starting Version
name String body (contained in the updateVolumeSnapshotGroup structure) Optional. The resource name. 3.6.0
description String body (contained in the updateVolumeSnapshotGroup structure) Optional. The detailed description of the resource. 3.6.0
uuid String url The resource UUID. 3.6.0
systemTags List body Optional. The system tags. 3.6.0
userTags List body Optional. The user tags. 3.6.0

API Response

Sample Response
{
  "inventory": {
    "uuid": "a261086918fe3c04be683430f15920a2",
    "snapshotCount": 1.0,
    "name": "group",
    "vmInstanceUuid": "98ac921100b43981b493071b6430bb2b",
    "createDate": "Nov 14, 2017 10:20:57 PM",
    "lastOpDate": "Nov 14, 2017 10:20:57 PM",
    "volumeSnapshotRefs": [
      {
        "volumeSnapshotUuid": "7ac8675cd8a9389ca343a2a7d49c47d7",
        "volumeSnapshotGroupUuid": "a261086918fe3c04be683430f15920a2",
        "deviceId": 0.0,
        "snapshotDeleted": false,
        "volumeUuid": "6fb0e4a0c3d6315bbb5c08a1a33bc231",
        "volumeName": "ROOT-volume",
        "volumeType": "Root",
        "volumeSnapshotInstallPath": "/Cloud_ps/to/path/snap.qcow2",
        "volumeSnapshotName": "group-ROOT-volume",
        "createDate": "Nov 14, 2017 10:20:57 PM",
        "lastOpDate": "Nov 14, 2017 10:20:57 PM"
      }
    ]
  }
}
Name Type Description Starting Version
error ErrorCode The error code. If not null, the operation fails, or vice versa. For more information, see error. 3.6.0
inventory VolumeSnapshotGroupInventory See inventory. 3.6.0
#error
Name Type Description Starting Version
code String The error code, which is a numbered or alphanumeric code that specifies an error. For example, SYS.1000, HOST.1001. 3.6.0
description String The brief description of the error. 3.6.0
details String The details about the error. 3.6.0
elaboration String The reserved field. Default value: null. 3.6.0
opaque LinkedHashMap The reserved field. Default value: null. 3.6.0
cause ErrorCode The root error, which is the associated root cause of the current error. If no root error exists, this parameter is null. 3.6.0
#inventory
Name Type Description Starting Version
uuid String The resource UUID. 3.6.0
snapshotCount Integer The number of snapshots in the snapshot group. 3.6.0
name String The resource name. 3.6.0
description String The detailed description of the resource. 3.6.0
vmInstanceUuid String The VM instance UUID. 3.6.0
createDate Timestamp The creation date. 3.6.0
lastOpDate Timestamp The last operation date. 3.6.0
volumeSnapshotRefs List See volumeSnapshotRefs. 3.6.0
#volumeSnapshotRefs
Name Type Description Starting Version
volumeSnapshotUuid String The volume snapshot UUID. 3.6.0
volumeSnapshotGroupUuid String The snapshot group UUID. 3.6.0
deviceId int The device ID of the volume when the snapshot is taken. 3.6.0
snapshotDeleted boolean Whether the snapshot is deleted. 3.6.0
volumeUuid String The volume UUID. 3.6.0
volumeName String The volume name. 3.6.0
volumeType String The volume type. 3.6.0
volumeSnapshotInstallPath String The path to install the snapshot. 3.6.0
volumeSnapshotName String The snapshot name. 3.6.0
createDate Timestamp The creation date. 3.6.0
lastOpDate Timestamp The last operation date. 3.6.0

SDK Sample

Java SDK
UpdateVolumeSnapshotGroupAction action = new UpdateVolumeSnapshotGroupAction();
action.name = "new name";
action.uuid = "c39089cddbd836628f346b14beafe2d3";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
UpdateVolumeSnapshotGroupAction.Result res = action.call();
Python SDK
UpdateVolumeSnapshotGroupAction action = UpdateVolumeSnapshotGroupAction()
action.name = "new name"
action.uuid = "c39089cddbd836628f346b14beafe2d3"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
UpdateVolumeSnapshotGroupAction.Result res = action.call()




Download

Already filled the basic info? Click here.

Enter at least 2 characters.
Invalid mobile number.
Enter at least 4 characters.
Invalid email address.
Wrong code. Try again. Send Code Resend Code (60s)

An email with a verification code will be sent to you. Make sure the address you provided is valid and correct.

Download

Not filled the basic info yet? Click here.

Invalid email address or mobile number.

Email Us

contact@zstack.io
ZStack certification training consulting
Enter at least 2 characters.
Invalid mobile number.
Enter at least 4 characters.
Invalid email address.
Wrong code. Try again. Send Code Resend Code (60s)

Email Us

contact@zstack.io

The download link is sent to your email address.

If you don't see it, check your spam folder, subscription folder, or AD folder. After receiving the email, click the URL to download the documentation.

The download link is sent to your email address.

If you don't see it, check your spam folder, subscription folder, or AD folder.
Or click on the URL below. (For Internet Explorer, right-click the URL and save it.)

Thank you for using ZStack products and services.

Submit successfully.

We'll connect soon.

Thank you for choosing ZStack products and services.

Back to Top