v12

latestOpenAPI 3.0.3raw.githubusercontent.com2026-06-1811583196.1 KB
Volumes

Attach volume to VM

Attach a volume to a VM. The VM must be in the same region as the volume. A volume can only be attached to one VM at a time — detach it first if it's already attached elsewhere.

Inside the guest, the volume appears as /dev/vdb, /dev/vdc, etc. (virtio-blk).

post/api/v1/volumes/{id}/attach

Path parameters

idinteger required

Volume ID

Headers

X-Project-IDstring uuid required

Project ID. Required for all mutating operations (create, delete, power actions, resize).

Request body

vm_idstring uuid required

UUID of the VM to attach this volume to. VM must be in the same region as the volume.

Response

Volume attached

successboolean

Example response

{
  "data": {
    "name": "data-vol-1",
    "volume_type": "nvme",
    "size": 100
  }
}