ServerMania logo

Edit Network Interface

To edit network interface details, use the following request:

PUT /virtual_machines/:virtual_machine_id/network_interfaces/:id.xml
PUT /virtual_machines/:virtual_machine_id/network_interfaces/:id.json

XML Request Example

curl -i -X PUT -u user:userpass -H 'Accept: application/xml' -H 'Content-type: application/xml' -d '<network_interface><label>eth0(test)</label><rate_limit>64</rate_limit><primary>true</primary></network_interface>' --url http://test/virtual_machines/23/network_interfaces/12.xml

JSON Request Example

curl -i -X PUT -u user:userpass -H 'Accept: application/json' -H 'Content-type: application/json' -d '{"network_interface":{"label":"eth0(test 2)","rate_limit":"32","primary":"false"}}' --url http://test/virtual_machines/23/network_interfaces/12.json

Where:

label - the label of a network interface 

rate_limit - the port speed of a network interface