Skip to content

Attach volume to VM

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

Attach a volume to a virtual machine

Attach volume request

Media typeapplication/json
object
vm_id
string
volume_id
string
Examplegenerated
{
"vm_id": "example",
"volume_id": "example"
}

Volume attached

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
}
}

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
}
}