ServerMania logo

Get List of Whitelist IPs

To get the list of IPs entered to the list, use the following request:

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

XML Request Example

curl -i -X GET -H 'Accept: application/xml' -H 'Content-type: application/xml' -u user:userpass --url http://test/users/8/user_white_lists.xml 

JSON Request Example

curl -i -X GET -H 'Accept: application/json' -H 'Content-type: application/json' -u user:userpass --url http://test/users/8/user_white_lists.json 

XML Output Example

<user_white_lists>
   <user_white_list>
      <created_at>2011-04-21T15:38:14+03:00</created_at>
      <description>My IP</description>
      <id>2</id>
      <ip>192.168.112.1</ip>
      <updated_at>2011-04-21T15:38:14+03:00</updated_at>
      <user_id>8</user_id>
   </user_white_list>
...
<user_white_list></user_white_list>
...
</user_white_lists> 

Where:

created_at - the date when this record in DB was created

description - an optional description

id - the record ID

ip - the IP from which this user can log in to CP

updated_at - the date when this record in DB was updated

user_id - the ID of a user for whom this whitelist was created