Skip to content

Detach volume from VM

POST
/api/v1/volume/detach
curl --request POST \
--url https://console.cloudlogics.com/api/v1/volume/detach \
--header 'Authorization: <Authorization>' \
--header 'Content-Type: application/json' \
--data '{ "flush_confirmed": true, "vm_id": "example", "volume_id": "example" }'

Detach a volume from a virtual machine Requires flush_confirmed=true: the volume must be unmounted inside the guest first, as the platform cannot flush it remotely.

Detach volume request

Media typeapplication/json
object
flush_confirmed

FlushConfirmed is the caller’s statement that the volume has been unmounted, or at least synced, inside the guest. The portal collects it with a confirmation dialog, the same way it does for deletes.

boolean
vm_id
string
volume_id
string
Examplegenerated
{
"flush_confirmed": true,
"vm_id": "example",
"volume_id": "example"
}

Volume detached

Media typeapplication/json
string
Examplegenerated
example

Bad request

Media typeapplication/json
object
data
error
object
code
integer
message
string
page
object
next
string
prev
string
total_size
integer
Examplegenerated
{
"data": "example",
"error": {
"code": 1,
"message": "example"
},
"page": {
"next": "example",
"prev": "example",
"total_size": 1
}
}

Volume or virtual machine not found in this project

Media typeapplication/json
object
data
error
object
code
integer
message
string
page
object
next
string
prev
string
total_size
integer
Examplegenerated
{
"data": "example",
"error": {
"code": 1,
"message": "example"
},
"page": {
"next": "example",
"prev": "example",
"total_size": 1
}
}

Flush not confirmed

Media typeapplication/json
object
data
error
object
code
integer
message
string
page
object
next
string
prev
string
total_size
integer
Examplegenerated
{
"data": "example",
"error": {
"code": 1,
"message": "example"
},
"page": {
"next": "example",
"prev": "example",
"total_size": 1
}
}

Internal server error

Media typeapplication/json
object
data
error
object
code
integer
message
string
page
object
next
string
prev
string
total_size
integer
Examplegenerated
{
"data": "example",
"error": {
"code": 1,
"message": "example"
},
"page": {
"next": "example",
"prev": "example",
"total_size": 1
}
}