ServerMania logo

Add Whitelisted IP

To add an IP to the list of whitelisted IPs:

POST /users/:user_id/user_white_lists.xml
POST /users/:user_id/user_white_lists.json

XML Request Example

curl -i -X POST -H 'Accept: application/xml' -H 'Content-type: application/xml' -u user:userpass -d '<user_white_list><ip>127.0.0.111</ip></user_white_list>'http://test/users/9/user_white_lists.xml 

JSON Request Example

curl -i -X POST -H 'Accept: application/json' -H 'Content-type: application/json' -d '{"user_white_list":{"ip":"109.123.105.178","description":"qsas"}}' -u user:userpass http://test/users/:user_id/user_white_lists.json

Where:

ip - IP address, from which a user can login to the Control panel