白名单

下面提供的链接指向一个详细的页面,详细说明了我们系统中的“白名单”的概念。

IP白名单


值得注意的是,几乎所有端点都与白名单相关,除了indexdelete 等值得注意的例外情况外,将在成功调用时返回白名单条目资源。

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

创建白名单条目

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

查询参数

正文参数

請求範例

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 /residential-users/{ residential_user_hash }/whitelist-entries/{ whitelist_entry_hash }

查询参数

請求範例

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 /residential-users/{ residential_user_hash }/whitelist-entries/

查询参数

請求範例

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 /residential-users/{ residential_user_hash }/whitelist-entries/{ whitelist_entry_hash }

查询参数

正文参数

請求範例

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 /residential-users/{ residential_user_hash }/whitelist-entries/{ whitelist_entry_hash }

查询参数

請求範例

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