POST /virtual_machines/:id/rebuild_network 

Rebuilds the network for specified VS

Sections:

Request Parameters

virtual_machine_id - ID of the virtual server

shutdown_type - type of the VS shutdown: hard, graceful or soft

required_startup - set 1 to start up the VS automatically after build, otherwise set 0

force* - set 1 to specify the VS shutdown type ("shutdown_type") and whether VS should start up automatically after the reboot ("required_startup").

PLEASE NOTE: If the force reboot option is enabled, the system tries to enter the virtual server. Then, if the transaction fails, the virtual server will be rebooted.

In case the force reboot option is disabled and system can not enter the virtual server, the network rebuild operation will fail.

Response Parameters

201 Status and modified virtual machine returned on success

JSON Request example

 curl -X POST -u user:userpass <api_url>/virtual_machines/:virtual_machine_id/rebuild_network.json?force=1&shutdown_type=hard&required_startup=1 -H 'Accept: application/json' -H 'Content-type: application/json'

XML Request example

  curl -X POST -u user:userpass <api_url>/virtual_machines/:virtual_machine_id/rebuild_network.xml?force=1&shutdown_type=hard&required_startup=1 -H 'Accept: application/xml' -H 'Content-type: application/xml'