Skip to content

Set the boot order of a VPS

POST /api/v2/vps/{id}/iso/actions/set-boot-order

Sets the order in which the VPS tries its boot devices. Send the boot disk (scsi0 or virtio0) and CD/DVD drives (ide0 to ide3) in the order you want. Take the names from bootOrder.availableDevices[].id on GET /api/v2/vps/{id}/iso. Devices the VPS does not have are left out of the saved order. The new order applies the next time the VPS starts. Mounting and unmounting an ISO already change the boot order.

Authentication: An API key with the scopes write:vm and write:storage and vm:write. About keys and scopes

Request

Path parameters

idstringrequired
The VPS ID (vps_…).

Body

bootOrderarray of stringrequired
Device names, first device first.

Example

POST /api/v2/vps/{id}/iso/actions/set-boot-order
curl -X POST "https://cloud.hostup.se/api/v2/vps/vps_01hxa3b4c5d6e7f8g9h0j1k2m3/iso/actions/set-boot-order" \
-H "Authorization: Bearer $HOSTUP_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"bootOrder": [
"ide2",
"scsi0"
]
}'

Responses

200 The boot order was saved.

Response 200
{
"bootOrder": [
"ide2",
"scsi0"
]
}
Response fields
bootOrderarray of string
The boot order as sent. It still lists devices the VPS does not have, which were left out of the saved order.

Errors

Errors are Problem Details with a stable code. Branch on the code, not on the text.

400Invalid request. The response body is an RFC 7807 Problem Details document.
401Unauthorized. Authentication is required.
403Forbidden. The caller lacks a required scope or does not own the resource.
404Not found. The resource does not exist or is not owned by the caller; code is vps_not_found.
429Rate limited. Retry after the limit resets. 429 responses include Retry-After seconds plus X-RateLimit-* headers.
500Internal error. Retry later or contact support if the issue persists.