Volume
Block-storage volumes that can be created, attached to instances, resized, uploaded and deleted.
Resource base path: /restapi/volume
| Method | Path | Description |
|---|---|---|
POST | /restapi/volume/createVolume | Create Volume |
GET | /restapi/volume/volumeList | Volume List |
GET | /restapi/volume/resizeVolume | Resize Volume |
GET | /restapi/volume/attachVolume | Attach Volume |
GET | /restapi/volume/detachVolume | Detach Volume |
POST | /restapi/volume/uploadVolume | Upload Volume |
DELETE | /restapi/volume/deleteVolume/{uuid} | Delete Volume |
note
apikey and secretkey are required HTTP headers on every request and are omitted from the parameter tables below. See Authentication.
Create Volume
Create Volume.
POST /restapi/volume/createVolume
Request body
| Field | Type | Required | Description |
|---|---|---|---|
diskSize | integer (int64) | No | Disk size in GB. |
name | string | No | Name of the resource. |
zoneUuid | string | No | UUID of the zone the resource belongs to. |
storageOfferingUuid | string | No | UUID of the storage offering. |
{
"diskSize": 1,
"name": "example-name",
"zoneUuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"storageOfferingUuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}
Example request
curl -X POST \
"https://portal.your-domain.com/restapi/volume/createVolume" \
-H "apikey: YOUR_API_KEY" \
-H "secretkey: YOUR_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{
"diskSize": 1,
"name": "example-name",
"zoneUuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"storageOfferingUuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}'
Responses
| Code | Description |
|---|---|
200 | Successful operation. |
401 | Invalid authentication credentials. |
550 | Permission denied. |
{
"listVolumeResponse": [
{
"volumeType": "string",
"vmInstanceName": "example-name",
"zoneUuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"createdTimeStamp": 1,
"errorMessage": "string",
"isShrink": true,
"isActive": true,
"uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"storageDiskSize": "string",
"jobId": "string",
"storageOfferingName": "example-name",
"vmUuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"domainName": "example-name",
"name": "example-name",
"storageOfferingUuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"status": "Active"
}
],
"count": 1
}
Volume List
Volume List.
GET /restapi/volume/volumeList
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
zoneUuid | query | string | ✅ Yes | UUID of the zone the resource belongs to. |
uuid | query | string | No | UUID of the resource. |
vmUuid | query | string | No | UUID of the virtual-machine instance. |
jobId | query | string | No | Job ID returned by the asynchronous operation. |
Example request
curl -X GET \
"https://portal.your-domain.com/restapi/volume/volumeList?zoneUuid=a1b2c3d4-e5f6-7890-abcd-ef1234567890" \
-H "apikey: YOUR_API_KEY" \
-H "secretkey: YOUR_SECRET_KEY"
Responses
| Code | Description |
|---|---|
200 | Successful operation. |
401 | Invalid authentication credentials. |
550 | Permission denied. |
{
"listVolumeResponse": [
{
"volumeType": "string",
"vmInstanceName": "example-name",
"zoneUuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"createdTimeStamp": 1,
"errorMessage": "string",
"isShrink": true,
"isActive": true,
"uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"storageDiskSize": "string",
"jobId": "string",
"storageOfferingName": "example-name",
"vmUuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"domainName": "example-name",
"name": "example-name",
"storageOfferingUuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"status": "Active"
}
],
"count": 1
}
Resize Volume
Resize Volume.
GET /restapi/volume/resizeVolume
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
uuid | query | string | ✅ Yes | UUID of the resource. |
storageOfferingUuid | query | string | ✅ Yes | UUID of the storage offering. |
diskSize | query | integer (int64) | ✅ Yes | Disk size in GB. |
isShrink | query | boolean | ✅ Yes |
Example request
curl -X GET \
"https://portal.your-domain.com/restapi/volume/resizeVolume?uuid=a1b2c3d4-e5f6-7890-abcd-ef1234567890&storageOfferingUuid=a1b2c3d4-e5f6-7890-abcd-ef1234567890&diskSize=VALUE&isShrink=VALUE" \
-H "apikey: YOUR_API_KEY" \
-H "secretkey: YOUR_SECRET_KEY"
Responses
| Code | Description |
|---|---|
200 | Successful operation. |
401 | Invalid authentication credentials. |
550 | Permission denied. |
{
"listVolumeResponse": [
{
"volumeType": "string",
"vmInstanceName": "example-name",
"zoneUuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"createdTimeStamp": 1,
"errorMessage": "string",
"isShrink": true,
"isActive": true,
"uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"storageDiskSize": "string",
"jobId": "string",
"storageOfferingName": "example-name",
"vmUuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"domainName": "example-name",
"name": "example-name",
"storageOfferingUuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"status": "Active"
}
],
"count": 1
}
Attach Volume
Attach Volume.
GET /restapi/volume/attachVolume
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
uuid | query | string | ✅ Yes | UUID of the resource. |
instanceUuid | query | string | ✅ Yes | UUID of the virtual-machine instance. |
Example request
curl -X GET \
"https://portal.your-domain.com/restapi/volume/attachVolume?uuid=a1b2c3d4-e5f6-7890-abcd-ef1234567890&instanceUuid=a1b2c3d4-e5f6-7890-abcd-ef1234567890" \
-H "apikey: YOUR_API_KEY" \
-H "secretkey: YOUR_SECRET_KEY"
Responses
| Code | Description |
|---|---|
200 | Successful operation. |
401 | Invalid authentication credentials. |
550 | Permission denied. |
{
"listVolumeResponse": [
{
"volumeType": "string",
"vmInstanceName": "example-name",
"zoneUuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"createdTimeStamp": 1,
"errorMessage": "string",
"isShrink": true,
"isActive": true,
"uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"storageDiskSize": "string",
"jobId": "string",
"storageOfferingName": "example-name",
"vmUuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"domainName": "example-name",
"name": "example-name",
"storageOfferingUuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"status": "Active"
}
],
"count": 1
}
Detach Volume
Detach Volume.
GET /restapi/volume/detachVolume
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
uuid | query | string | ✅ Yes | UUID of the resource. |
Example request
curl -X GET \
"https://portal.your-domain.com/restapi/volume/detachVolume?uuid=a1b2c3d4-e5f6-7890-abcd-ef1234567890" \
-H "apikey: YOUR_API_KEY" \
-H "secretkey: YOUR_SECRET_KEY"
Responses
| Code | Description |
|---|---|
200 | Successful operation. |
401 | Invalid authentication credentials. |
550 | Permission denied. |
{
"listVolumeResponse": [
{
"volumeType": "string",
"vmInstanceName": "example-name",
"zoneUuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"createdTimeStamp": 1,
"errorMessage": "string",
"isShrink": true,
"isActive": true,
"uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"storageDiskSize": "string",
"jobId": "string",
"storageOfferingName": "example-name",
"vmUuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"domainName": "example-name",
"name": "example-name",
"storageOfferingUuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"status": "Active"
}
],
"count": 1
}
Upload Volume
Upload Volume.
POST /restapi/volume/uploadVolume
Request body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | No | Name of the resource. |
checksum | string | No | |
format | string | ✅ Yes | Format (QCOW2, OVA, RAW,VHDX,VHD) Example: VHD |
zoneUuid | string | No | UUID of the zone the resource belongs to. |
url | string | No |
{
"name": "example-name",
"checksum": "string",
"format": "VHD",
"zoneUuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"url": "string"
}
Example request
curl -X POST \
"https://portal.your-domain.com/restapi/volume/uploadVolume" \
-H "apikey: YOUR_API_KEY" \
-H "secretkey: YOUR_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "example-name",
"checksum": "string",
"format": "VHD",
"zoneUuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"url": "string"
}'
Responses
| Code | Description |
|---|---|
200 | Successful operation. |
401 | Invalid authentication credentials. |
550 | Permission denied. |
{
"listVolumeResponse": [
{
"volumeType": "string",
"vmInstanceName": "example-name",
"zoneUuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"createdTimeStamp": 1,
"errorMessage": "string",
"isShrink": true,
"isActive": true,
"uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"storageDiskSize": "string",
"jobId": "string",
"storageOfferingName": "example-name",
"vmUuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"domainName": "example-name",
"name": "example-name",
"storageOfferingUuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"status": "Active"
}
],
"count": 1
}
Delete Volume
Delete Volume.
DELETE /restapi/volume/deleteVolume/{uuid}
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
uuid | path | string | ✅ Yes | UUID of the resource. |
Example request
curl -X DELETE \
"https://portal.your-domain.com/restapi/volume/deleteVolume/a1b2c3d4-e5f6-7890-abcd-ef1234567890" \
-H "apikey: YOUR_API_KEY" \
-H "secretkey: YOUR_SECRET_KEY"
Responses
| Code | Description |
|---|---|
200 | Successful operation. |
401 | Invalid authentication credentials. |
550 | Permission denied. |
{
"uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"status": "Active"
}