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

Name
Type
Description

residential_user_hash

String

Hash of the user

Body Parameters

Name
Type
Description

ip

String

Ip of the entry

port

Integer

Port that will be used

configuration

String

Proxy configuration

note

String

Proxy note

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"
         }'

Example response:

{
    "hash": "01JVRVH56YYVG2RZDFA123ABCD",
    "ip": "192.168.1.1",
    "port": 8080,
    "type": "?",
    "configuration": "some_configuration",
    "note": null
}

Get Whitelist Entry

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

Query Parameters

Name
Type
Description

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>"

Example response:

{
    "hash": "01JVRVH56YYVG2RZDFA123ABCD",
    "ip": "192.168.1.1",
    "port": 8080,
    "type": "?",
    "configuration": "some_configuration",
    "note": null
}

Get Whitelist Entries

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

Query Parameters

Name
Type
Description

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>"

Example response:

{
    "data": [
        {
            "hash": "01JVRVH56YYVG2RZDFA123ABCD",
            "ip": "192.168.1.1",
            "port": 8080,
            "type": "?",
            "configuration": "some_configuration",
            "note": null
        }
    ],
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "path": "/",
        "per_page": 20,
        "to": 1,
        "total": 1
    }
}

Update Whitelist Entry

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

Query Parameters

Name
Type
Description

residential_user_hash

String

Hash of the user

whitelist_entry_hash

String

Hash of the entry

Body Parameters

Name
Type
Description

configuration

String

Proxy configuration

note

String

Proxy note

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": "updated_configuration"
         }'

Example response:

{
    "hash": "01JVRVH56YYVG2RZDFA123ABCD",
    "ip": "192.168.1.1",
    "port": 8080,
    "type": "?",
    "configuration": "updated_configuration",
    "note": null
}

Delete Whitelist Entry

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

Query Parameters

Name
Type
Description

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