Skip to main content

Volume

Block-storage volumes that can be created, attached to instances, resized, uploaded and deleted.

Resource base path: /restapi/volume

MethodPathDescription
POST/restapi/volume/createVolumeCreate Volume
GET/restapi/volume/volumeListVolume List
GET/restapi/volume/resizeVolumeResize Volume
GET/restapi/volume/attachVolumeAttach Volume
GET/restapi/volume/detachVolumeDetach Volume
POST/restapi/volume/uploadVolumeUpload 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

FieldTypeRequiredDescription
diskSizeinteger (int64)NoDisk size in GB.
namestringNoName of the resource.
zoneUuidstringNoUUID of the zone the resource belongs to.
storageOfferingUuidstringNoUUID 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

CodeDescription
200Successful operation.
401Invalid authentication credentials.
550Permission 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

ParameterInTypeRequiredDescription
zoneUuidquerystring✅ YesUUID of the zone the resource belongs to.
uuidquerystringNoUUID of the resource.
vmUuidquerystringNoUUID of the virtual-machine instance.
jobIdquerystringNoJob 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

CodeDescription
200Successful operation.
401Invalid authentication credentials.
550Permission 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

ParameterInTypeRequiredDescription
uuidquerystring✅ YesUUID of the resource.
storageOfferingUuidquerystring✅ YesUUID of the storage offering.
diskSizequeryinteger (int64)✅ YesDisk size in GB.
isShrinkqueryboolean✅ 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

CodeDescription
200Successful operation.
401Invalid authentication credentials.
550Permission 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

ParameterInTypeRequiredDescription
uuidquerystring✅ YesUUID of the resource.
instanceUuidquerystring✅ YesUUID 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

CodeDescription
200Successful operation.
401Invalid authentication credentials.
550Permission 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

ParameterInTypeRequiredDescription
uuidquerystring✅ YesUUID 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

CodeDescription
200Successful operation.
401Invalid authentication credentials.
550Permission 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

FieldTypeRequiredDescription
namestringNoName of the resource.
checksumstringNo
formatstring✅ YesFormat (QCOW2, OVA, RAW,VHDX,VHD) Example: VHD
zoneUuidstringNoUUID of the zone the resource belongs to.
urlstringNo
{
"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

CodeDescription
200Successful operation.
401Invalid authentication credentials.
550Permission 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

ParameterInTypeRequiredDescription
uuidpathstring✅ YesUUID 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

CodeDescription
200Successful operation.
401Invalid authentication credentials.
550Permission denied.
{
"uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"status": "Active"
}