Cloud Panel

Change the disk

POST/api/v1/vms/{vm_uuid}/disk/change-class

Moves the root disk between shared and dedicated while the server runs. The data stays in place and the new price applies from the next hour.

Parameters

NameInDescription
vm_uuidpath, stringrequiredServer id, from Create a VM or List VMs

Request body

FieldTypeDescription
storage_class_idintegerrequiredThe new disk id, from List disks

Example request

curl -X POST "https://platform.serverscamp.com/api/v1/vms/$VM_UUID/disk/change-class" \
  -H "Authorization: Bearer $API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "storage_class_id": 19
  }'

Answer

Status 200 with this body.

FieldTypeDescription
vm_uuidstringrequired
statusstringrequiredqueued: the change runs in the background while the server runs
disk_gbintegerrequiredRoot disk size after the change, GB
storage_class_idintegerrequiredDisk id after the change
{
  "vm_uuid": "6f1c2a9e-4b3d-4e8a-9c71-2d5e8f0a1b34",
  "status": "queued",
  "disk_gb": 50,
  "storage_class_id": 19
}

Errors

StatusWhen
400A disk the root disk cannot move to, or the one it has
401No token, or a token that is not valid
409The server is busy with another operation
422The body or a parameter is not what the operation takes

Every operation can also answer 401 without a valid token. All errors