Cloud Panel

Reinstall

POST/api/v1/vms/{vm_uuid}/reinstall

A fresh root disk with the image you give. The addresses, the network, attached volumes, the SSH key and the password stay; snapshots and backups stay in the account.

Parameters

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

Request body

FieldTypeDescription
vm_template_idintegerrequiredImage id, from List images; the same system or another one

Example request

curl -X POST "https://platform.serverscamp.com/api/v1/vms/$VM_UUID/reinstall" \
  -H "Authorization: Bearer $API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "vm_template_id": 5
  }'

Answer

Status 202 with this body.

FieldTypeDescription
vm_uuidstringrequired
from_template_namestring, optionalSystem before
to_template_namestring, optionalSystem after
stepstringrequiredqueued, applying, done or failed
started_atstringrequired
completed_atstring, optional
errorstring, optionalWhat went wrong, when step is failed
{
  "vm_uuid": "6f1c2a9e-4b3d-4e8a-9c71-2d5e8f0a1b34",
  "from_template_name": "Ubuntu 26.04 LTS",
  "to_template_name": "Debian 13",
  "step": "queued",
  "started_at": "2026-11-01T10:05:00+00:00",
  "completed_at": null,
  "error": null
}

Wait until it is ready

The answer comes at once and the work runs in the background. The job's own status shows how far it got.

Check the status

Ask Reinstall status with the server's id; the field to watch is step:

curl "https://platform.serverscamp.com/api/v1/vms/$VM_UUID/reinstall/status" \
  -H "Authorization: Bearer $API_TOKEN"
stepWhat it means
queuedWaiting for its turn
applyingThe change runs
doneFinished
failedSomething went wrong; the error field says what

Wait in a loop

Ask every few seconds until it gets there, and stop on an error.

# VM_UUID: vm_uuid of the server, from the answer above
while true; do
  JOB=$(curl -s "https://platform.serverscamp.com/api/v1/vms/$VM_UUID/reinstall/status" -H "Authorization: Bearer $API_TOKEN")
  STEP=$(echo "$JOB" | jq -r .step)
  echo "$STEP"
  [ "$STEP" = done ] && break
  [ "$STEP" = failed ] && { echo "$JOB" | jq -r .error; exit 1; }
  sleep 5
done

The bash version needs jq.

Errors

StatusWhen
400An image that is not accepted
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