To assign an IP Address or several IP addresses to a particular user, so that they could create a VS based on it, use the following request:

POST /settings/networks/:network_id/ip_addresses/assign.xml
POST /settings/networks/:network_id/ip_addresses/assign.json

XML Request example

curl -i -X POST -H 'Accept: application/xml' -H 'Content-type: application/xml' -u user:userpass --url http://onapp.test//settings/networks/:network_id/ip_addresses/assign.xml -d '<ip_addresses type="array"><id>79</id><id>80</id></ip_addresses><user_id>1</user_id>'

JSON Request example

curl -i -X POST -H 'Accept: application/json' -H 'Content-type: application/json' -u user:userpass --url http://onapp.test/settings/networks/:network_id/ip_addresses/assign.json -d '{"ip_addresses":["79", "80"],"user_id":"1"}'


ip_addresses - send the IDs of required IP addresses. Be aware, that starting with OnApp 5.4 version, string IP address representation will be implemented.

user_id - indicate ID of the user, to whom you want to assign an IP address