GET /v2/disk-images
Returns an array containing a list of existing disk images.
{
"success":true,
"disk_images": [
{
"id":"$image_id",
"label":"$image_label",
"size": $image_size,
"cost_per_hour": $image_cost,
"owner": {
"id": "$owner_id",
"name": "$owner_name"
},
"storage_volume": {
"id": "$volume_id",
"size": "$volume_size",
"label": "$volume_label",
"type": "$volume_type",
"system_disk": $volume_system,
// if shared_disk is equal to false, then
// 'virtual_machine' field will exist if the
// disk is attached to a virtual machine
"shared_disk": $shared_disk,
"virtual_machine": {
"id": "$vm_id",
"label": "$vm_label",
"attach_time": "$attach_time"
}
// if shared_disk is equal to true, then
// 'virtual_machines' field will exist if the
// disk is attached to at least one virtual machine
"shared_disk": $shared_disk, //if = 'true'
"virtual_machines": [{
"id": "$vm_id",
"label": "$vm_label",
"attach_time": "$attach_time",
},
{ ... },
{
"id": "$vm_id",
"label": "$vm_label",
"attach_time": "$attach_time"
}
]
}
}
]
}
PUT /v2/disk-images
{
"storage_volume_id": $volume_id,
"label": $image_label
}
{
"success":true,
"disk_image": {
"id": $image_id
}
}
DELETE /v2/disk-images/$IMAGE_ID
Usuwa obraz $IMAGE_ID
.
{
"success":true
}