Change VS Owner

Use the following request to reassign a VS to another user:

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

XML Request example

curl -i -X POST -H 'Accept: application/xml' -H 'Content-type: application/xml' -u user:password --url 'http://onapp.test/virtual_machines/:id/change_owner.xml?user_id=2582&custom_recipes_action=none&backups_action=move'

JSON Request example

curl -i -X POST -H 'Accept: application/json' -H 'Content-type: application/json' -u user:password --url
'http://onapp.test/virtual_machines/:id/change_owner.json?user_id=2582&custom_recipes_action=none&backups_action=move'

Required parameter:

user_id* – input ID of a new VS owner

custom_recipes_action - select one of the following options for virtual server's recipes:

  • none - recipes owner will not be changed
  • move - recipes owner will be changed
  • copy - recipes will be copied to new virtual servers owner

backups_action - select one of the following options for virtual server's backups:

  • none - backup owner will not be changed
  • move - backup owner will be changed

  • Instead ofvirtualserver ID (:virtual_machine_id) you may usevirtualserver identifier (:virtual_machine_identifier).
  • If VS can not be reassigned to another user, you will get an error message:
    "Errors: New owner has reached his backup creation limit or doesn't have enough disk space."