ServerMania logo

Assign Disk to VS

To assign a disk to VS, use the following request:

POST /settings/disks/:id/assign.xml
POST /settings/disks/:id/assign.json

XML Request Example

curl -i -X POST http://test/settings/disks/12/assign.xml -d '<disk><temporary_virtual_machine_id>1</temporary_virtual_machine_id></disk>' -u user:userpass -H 'Accept: application/xml' -H 'Content-type: application/xml' 

JSON Request Example

curl -i -X POST http://test/settings/disks/12/assign.json -d '{"disk": {"temporary_virtual_machine_id":"1"}}' -u user:userpass -H 'Accept: application/json' -H 'Content-type: application/json'

Where:

temporary_virtual_machine_id - ID of the VS, to which you assign the disk