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
idstringrequiredThe VPS ID (
vps_…).Body
devicestringrequiredThe free slot for the new drive,
ide0 to ide3. One of ide0, ide1, ide2, ide3.Example
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.
{ "device": "ide3"}Response fields
devicestringThe slot of the new drive.
Errors
Errors are Problem Details with a stable code. Branch on the code, not on the text.
| 400 | Invalid request. The response body is an RFC 7807 Problem Details document. |
| 401 | Unauthorized. Authentication is required. |
| 403 | Forbidden. The caller lacks a required scope or does not own the resource. |
| 404 | Not found. The resource does not exist or is not owned by the caller; code is vps_not_found. |
| 429 | Rate limited. Retry after the limit resets. 429 responses include Retry-After seconds plus X-RateLimit-* headers. |
| 500 | Internal error. Retry later or contact support if the issue persists. |