Whitelists

The link provided below directs to a detailed page that elaborates on the concept of a whitelist within our system.

IP Whitelisting


It's important to note that almost every endpoint related to whitelists, with the notable exceptions of the index and delete endpoints, will return a whitelist entry resource upon a successful call.

WhitelistEntryResource
{
    "hash": "01HQ5K3P97DY8EX9Y90YT1K6XA",
    "ip": "192.0.2.1",
    "port": "23234",
    "type": "http|https",
    "configuration": "_country-br_streaming-1_skipispstatic-1"
}

Create Whitelist Entry

POST /residential-users/{ residential_user_hash }/whitelist-entries

Query Parameters

NameTypeDescription

residential_user_hash

String

Hash of the user

Body Parameters

NameTypeDescription

ip

String

Ip of the entry

port

Integer

Port that will be used

configuration

String

Proxy configuration

Example request:

curl -X POST "https://resi-api.iproyal.com/v1/residential-users/<residential_user_hash>/whitelist-entries" \
     -H "Authorization: Bearer <your_api_token>" \
     -H "Content-Type: application/json" \
     -d '{
           "ip": "192.168.1.1",
           "port": 8080,
           "configuration": "some_configuration"
         }'

Get Whitelist Entry

GET /residential-users/{ residential_user_hash }/whitelist-entries/{ whitelist_entry_hash }

Query Parameters

NameTypeDescription

residential_user_hash

String

Hash of the user

whitelist_entry_hash

String

Hash of the entry

Example request:

curl -X GET "https://resi-api.iproyal.com/v1/residential-users/<residential_user_hash>/whitelist-entries/<whitelist_entry_hash>" \
     -H "Authorization: Bearer <your_api_token>"

Get Whitelist Entries

GET /residential-users/{ residential_user_hash }/whitelist-entries/

Query Parameters

NameTypeDescription

residential_user_hash

String

Hash of the user

page

Integer

Number of the page

per_page

Integer

Number of whitelist entries per page

Example request:

curl -X GET "https://resi-api.iproyal.com/v1/residential-users/<residential_user_hash>/whitelist-entries?page=<page>&per_page=<per_page>" \
     -H "Authorization: Bearer <your_api_token>"

Update Whitelist Entry

UPDATE /residential-users/{ residential_user_hash }/whitelist-entries/{ whitelist_entry_hash }

Query Parameters

NameTypeDescription

residential_user_hash

String

Hash of the user

whitelist_entry_hash

String

Hash of the entry

Body Parameters

NameTypeDescription

configuration

String

Proxy configuration

Example request:

curl -X PUT "https://resi-api.iproyal.com/v1/residential-users/<residential_user_hash>/whitelist-entries/<whitelist_entry_hash>" \
     -H "Authorization: Bearer <your_api_token>" \
     -H "Content-Type: application/json" \
     -d '{
           "configuration": {}
         }'

Delete Whitelist Entry

DELETE /residential-users/{ residential_user_hash }/whitelist-entries/{ whitelist_entry_hash }

Query Parameters

NameTypeDescription

residential_user_hash

String

Hash of the user

whitelist_entry_hash

String

Hash of the entry

Example request:

curl -X DELETE "https://resi-api.iproyal.com/v1/residential-users/<residential_user_hash>/whitelist-entries/<whitelist_entry_hash>" \
     -H "Authorization: Bearer <your_api_token>"

Last updated