Assign Service Add-on to VS

To assign service add-on to a VS, use the following request:

POST /virtual_machines/:virtual_machine_id/service_addons.xml
POST /virtual_machines/:virtual_machine_id/service_addons.json 

XML Request Example

curl "http://onapp.test/virtual_machines/12/service_addons.xml" -d '<service_addon_id>4</service_addon_id>' -X POST \ -u user:userpass \ -H "Accept: application/xml" \ -H "Content-Type: application/xml"

JSON Request Example

curl "http://onapp.test/virtual_machines/12/service_addons.json" -d '{"service_addon_id":"4"}' -X POST \ -u user:userpass \ -H "Accept: application/json" \ -H "Content-Type: application/json"


Where:

service_addon_id – ID of the service add-on, which you want to assign to the VS