Skip to content

Attach Volume / Attach Volume to Node

PUT
/api/v1/block_storage/{block_id}/vm/attach/
curl --request PUT \
--url 'https://api.e2enetworks.com/myaccount/api/v1/block_storage/{block_id}/vm/attach/?project_id=<PROJECT_ID>&apikey=<API_KEY>&location=<LOCATION>' \
--header 'Authorization: Bearer <API_TOKEN>' \
--header 'Content-Type: application/json' \
--data '"{\n \"vm_id\": {{vm_id}}\n}"'

Attach Volume and Attach Volume to Node share this request; the body you send decides which one runs.

block_id
required
string

Path parameter block_id.

project_id
required
integer

Identifier of the project to scope the request to. Required integer project ID.

Example

<PROJECT_ID>
apikey
required
string

API key used to authenticate the request

Example

<API_KEY>
location
required
string

Specifies the target location for attaching the volume

Example

<LOCATION>
Media typeapplication/json
One of:

JSON-formatted string specifying the VM ID for the volume attachment

string

Example

{
"vm_id": {{vm_id}}
}

Successful response

Media typeapplication/json
object
code

HTTP status code indicating the result of the attach volume request

integer
data
object
image_id

Unique identifier of the attached image

integer
vm_id

Identifier of the virtual machine

integer
errors
object
message

Human-readable status message for the attach volume operation.

string

Example

{
"code": 200,
"data": {
"image_id": 1234,
"vm_id": 1234
},
"message": "Block Storage is Attached to VM."
}