Skip to content

Add an empty CD/DVD drive

POST /api/v2/vps/{id}/iso/actions/attach-empty

Adds an empty CD/DVD drive to the VPS in the slot you name. Pick a slot with type: available in availableDevices on GET /api/v2/vps/{id}/iso. The call does not check the slot. A drive already in it is replaced by an empty one. You do not need this before mounting. POST /api/v2/vps/{id}/iso/actions/mount creates the drive in a free slot itself.

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

devicestringrequired
The free slot for the new drive, ide0 to ide3. One of ide0, ide1, ide2, ide3.

Example

POST /api/v2/vps/{id}/iso/actions/attach-empty
curl -X POST "https://cloud.hostup.se/api/v2/vps/vps_01hxa3b4c5d6e7f8g9h0j1k2m3/iso/actions/attach-empty" \
-H "Authorization: Bearer $HOSTUP_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"device": "ide3"
}'

Responses

200 The empty drive was added.

Response 200
{
"device": "ide3"
}
Response fields
devicestring
The slot of the new drive.

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.