Skip to content

POST /api/vms/{id}/reboot

Updated

Reboot a VM by stopping and starting it.

PropertyValue
Scopereadwrite
Request bodynone
Success204 No Content

Endpoint

POST ${baseUrl}/api/vms/${id}/reboot
readwrite

Stop and start a VM.

Use your host URL and API key as shell variables:

baseUrl="https://agent.example.com"
VIRT_AGENT_API_KEY="<your-api-key>"

cURL template

curl --request POST "${baseUrl}/api/vms/${id}/reboot" \
  --header "Authorization: Bearer ${VIRT_AGENT_API_KEY}"
LocationNameTypeRequiredDescription
HeaderAuthorizationbearer tokenyesBearer ${VIRT_AGENT_API_KEY} from a readwrite key.
PathidstringyesVM id.
StatusBodyDescription
204 No ContentnoneReboot request completed at the host API layer. Read the VM afterward for current state.
Terminal window
baseUrl="https://agent.example.com"
VIRT_AGENT_API_KEY="<your-api-key>"
id="demo-api-vm"
curl --request POST "${baseUrl}/api/vms/${id}/reboot" \
--header "Authorization: Bearer ${VIRT_AGENT_API_KEY}"
HTTP/1.1 204 No Content
StatusCodeDescription
401UNAUTHORIZEDAPI key is missing or invalid.
403FORBIDDENKey is read-only or endpoint is outside the key allowlist.
404NOT_FOUNDVM id does not exist.
409INVALID_STATEVM state does not allow reboot.
500CH_ERROR, NETWORK_ERROR, STORAGE_ERROR, or INTERNALHost failed during stop, cleanup, or boot.