ServerMania logo

Edit Network

To edit a network, use the following request:

PUT /settings/networks/:id.xml
PUT /settings/networks/:id.json

XML Request Example

curl -i -X PUT -u user:userpass -H 'Accept: application/xml' -H 'Content-type: application/xml' -d '<network><label>Network API test</label><network_group_id>3</network_group_id><vlan>1</vlan></network>' --url http://test/settings/networks/2.xml

JSON Request Example

curl -i -X PUT -u user:userpass -H 'Accept: application/json' -H 'Content-type: application/json' -d '{"network":{"label":"Network API TEST","network_group_id":"15","vlan":"2"}}' --url http://test/settings/networks/2.json

Where:

id – the network ID

label - the network name

vlan - the number of a VLAN this network belongs to

network_group_id - the ID of the network zone to which this network is attached