Unmount an ISO image from a VPS
POST /api/v2/vps/{id}/iso/actions/unmount
Empties a CD/DVD drive of the VPS and puts the boot disk first in the boot order again. The drive stays on the VPS and the image stays in your ISO list. Take the drive from mounted[].device on GET /api/v2/vps/{id}/iso. The cloud-init drive cannot be emptied and returns 403. To delete the image itself, use DELETE /api/v2/vps/{id}/iso/{volid}.
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
devicestringThe CD/DVD drive,
ide0 to ide3. Default ide2. One of ide0, ide1, ide2, ide3.Example
curl -X POST "https://cloud.hostup.se/api/v2/vps/vps_01hxa3b4c5d6e7f8g9h0j1k2m3/iso/actions/unmount" \ -H "Authorization: Bearer $HOSTUP_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "device": "ide2" }'curl -X POST "https://cloud.hostup.se/api/v2/vps/vps_01hxa3b4c5d6e7f8g9h0j1k2m3/iso/actions/unmount" \ -H "Authorization: Bearer $HOSTUP_API_KEY" \ -H "Content-Type: application/json"Responses
200 The drive is empty.
{ "device": "ide2"}Response fields
devicestringThe drive that was emptied.
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 | The drive is the cloud-init drive. |
| 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. |