IP Skipping
The link provided below directs to a detailed page that elaborates on the concept of IP skipping within our system.
It's important to note that almost every endpoint related to IP skipping, with the notable exceptions of the index
and delete
endpoints, will return an IP skipping resource upon a successful call.
{
"hash": "01HQ5K3P97DY8EX9Y90YT1K6XA",
"title": "192.0.2.1",
"items": [
{
"hash": "01HQJ5GS1NXBP562CCQFQB6XN7",
"ip_range": "24.52.81.2/32"
},
{
"hash": "01HQJ5GW9NXBCC62CCQFQB6XN7",
"ip_range": "14.51.82.2/32"
}
]
}
Create IP Skipping List
POST
/residential-users/{
residential_user_hash}/ips-skipping
Query Parameters
Name | Type | Description |
---|---|---|
residential_user_hash | String | Hash of the user |
Body Parameters
Name | Type | Description |
---|---|---|
title | String | Title of the IP skipping list |
Example request:
curl -X POST "https://resi-api.iproyal.com/v1/residential-users/<residential_user_hash>/ips-skipping" \
-H "Authorization: Bearer <your_api_token>" \
-H "Content-Type: application/json" \
-d '{
"title": "Your Title"
}'
<?php
$api_token = '<your_api_token>';
$residential_user_hash = '<residential_user_hash>';
$title = 'Your Title';
$url = "https://resi-api.iproyal.com/v1/residential-users/$residential_user_hash/ips-skipping";
$data = ['title' => $title];
$options = [
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $api_token",
'Content-Type: application/json'
],
CURLOPT_POSTFIELDS => json_encode($data)
];
$ch = curl_init();
curl_setopt_array($ch, $options);
$response = curl_exec($ch);
if (curl_errno($ch)) {
echo 'Error:' . curl_error($ch);
} else {
echo $response;
}
curl_close($ch);
?>
import requests
api_token = '<your_api_token>'
residential_user_hash = '<residential_user_hash>'
title = 'Your Title'
url = f'https://resi-api.iproyal.com/v1/residential-users/{residential_user_hash}/ips-skipping'
data = {
'title': title
}
headers = {
'Authorization': f'Bearer {api_token}',
'Content-Type': 'application/json'
}
response = requests.post(url, json=data, headers=headers)
print(response.text)
const https = require('https');
const api_token = '<your_api_token>';
const residential_user_hash = '<residential_user_hash>';
const title = 'Your Title';
const data = JSON.stringify({
title: title
});
const options = {
hostname: 'resi-api.iproyal.com',
path: `/v1/residential-users/${residential_user_hash}/ips-skipping`,
method: 'POST',
headers: {
'Authorization': `Bearer ${api_token}`,
'Content-Type': 'application/json',
'Content-Length': data.length
}
};
const req = https.request(options, (res) => {
let responseData = '';
res.on('data', (chunk) => {
responseData += chunk;
});
res.on('end', () => {
console.log(responseData);
});
});
req.on('error', (error) => {
console.error('Error:', error.message);
});
req.write(data);
req.end();
Get IP Skipping Lists
GET
/residential-users/{
residential_user_hash}/ips-skipping
Query Parameters
Name | Type | Description |
---|---|---|
residential_user_hash | String | Hash of the user |
Example request:
curl -X GET "https://resi-api.iproyal.com/v1/residential-users/<residential_user_hash>/ips-skipping" \
-H "Authorization: Bearer <your_api_token>" \
-H "Content-Type: application/json"
<?php
$api_token = '<your_api_token>';
$residential_user_hash = '<residential_user_hash>';
$url = "https://resi-api.iproyal.com/v1/residential-users/$residential_user_hash/ips-skipping";
$options = [
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $api_token",
'Content-Type: application/json'
]
];
$ch = curl_init();
curl_setopt_array($ch, $options);
$response = curl_exec($ch);
if (curl_errno($ch)) {
echo 'Error:' . curl_error($ch);
} else {
echo $response;
}
curl_close($ch);
?>
import requests
api_token = '<your_api_token>'
residential_user_hash = '<residential_user_hash>'
url = f'https://resi-api.iproyal.com/v1/residential-users/{residential_user_hash}/ips-skipping'
headers = {
'Authorization': f'Bearer {api_token}',
'Content-Type': 'application/json'
}
response = requests.get(url, headers=headers)
print(response.status_code)
print(response.json())
const https = require('https');
const api_token = '<your_api_token>';
const residential_user_hash = '<residential_user_hash>';
const options = {
hostname: 'resi-api.iproyal.com',
path: `/v1/residential-users/${residential_user_hash}/ips-skipping`,
method: 'GET',
headers: {
'Authorization': `Bearer ${api_token}`,
'Content-Type': 'application/json'
}
};
const req = https.request(options, (res) => {
let responseData = '';
res.on('data', (chunk) => {
responseData += chunk;
});
res.on('end', () => {
console.log(responseData);
});
});
req.on('error', (error) => {
console.error('Error:', error.message);
});
req.end();
Update IP Skipping List
UPDATE
/residential-users/{
residential_user_hash}/ips-skipping/{
ips_skipping_hash}
Query Parameters
Name | Type | Description |
---|---|---|
residential_user_hash | String | Hash of the user |
ips_skipping_hash | String | Hash of the IPs skipping list |
Body Parameters
Name | Type | Description |
---|---|---|
title | String | Title of the skipping list |
ip_ranges | Array | Ranges to be added to the list |
Example request:
curl -X PUT "https://resi-api.iproyal.com/v1/residential-users/<residential_user_hash>/ips-skipping/<ips_skipping_hash>" \
-H "Authorization: Bearer <your_api_token>" \
-H "Content-Type: application/json" \
-d '{
"title": "New Title",
"ip_ranges": ["192.168.0.0/24", "10.0.0.0/8"]
}'
<?php
$api_token = '<your_api_token>';
$residential_user_hash = '<residential_user_hash>';
$ips_skipping_hash = '<ips_skipping_hash>';
$title = 'New Title';
$ip_ranges = ['192.168.0.0/24', '10.0.0.0/8'];
$url = "https://resi-api.iproyal.com/v1/residential-users/$residential_user_hash/ips-skipping/$ips_skipping_hash";
$data = [
'title' => $title,
'ip_ranges' => $ip_ranges
];
$options = [
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $api_token",
'Content-Type: application/json'
],
CURLOPT_POSTFIELDS => json_encode($data)
];
$ch = curl_init();
curl_setopt_array($ch, $options);
$response = curl_exec($ch);
if (curl_errno($ch)) {
echo 'Error:' . curl_error($ch);
} else {
echo $response;
}
curl_close($ch);
?>
import requests
api_token = '<your_api_token>'
residential_user_hash = '<residential_user_hash>'
ips_skipping_hash = '<ips_skipping_hash>'
url = f'https://resi-api.iproyal.com/v1/residential-users/{residential_user_hash}/ips-skipping/{ips_skipping_hash}'
data = {
'title': 'New Title',
'ip_ranges': ['192.168.0.0/24', '10.0.0.0/8']
}
headers = {
'Authorization': f'Bearer {api_token}',
'Content-Type': 'application/json'
}
response = requests.put(url, json=data, headers=headers)
print(response.status_code)
print(response.text)
const https = require('https');
const api_token = '<your_api_token>';
const residential_user_hash = '<residential_user_hash>';
const ips_skipping_hash = '<ips_skipping_hash>';
const title = 'New Title';
const ip_ranges = ['192.168.0.0/24', '10.0.0.0/8'];
const data = JSON.stringify({ title, ip_ranges });
const options = {
hostname: 'resi-api.iproyal.com',
path: `/v1/residential-users/${residential_user_hash}/ips-skipping/${ips_skipping_hash}`,
method: 'PUT',
headers: {
'Authorization': `Bearer ${api_token}`,
'Content-Type': 'application/json',
'Content-Length': data.length
}
};
const req = https.request(options, (res) => {
let responseData = '';
res.on('data', (chunk) => {
responseData += chunk;
});
res.on('end', () => {
console.log(responseData);
});
});
req.on('error', (error) => {
console.error('Error:', error.message);
});
req.write(data);
req.end();
Delete IP Skipping List
DELETE
/residential-users/{
residential_user_hash}/ips-skipping/{
ips_skipping_hash}
Query Parameters
Name | Type | Description |
---|---|---|
residential_user_hash | String | Hash of the user |
ips_skipping_hash | String | Hash of the IPs skipping list |
Example request:
curl -X DELETE "https://resi-api.iproyal.com/v1/residential-users/<residential_user_hash>/ips-skipping/<ips_skipping_hash>" \
-H "Authorization: Bearer <your_api_token>" \
-H "Content-Type: application/json"
<?php
$api_token = '<your_api_token>';
$residential_user_hash = '<residential_user_hash>';
$ips_skipping_hash = '<ips_skipping_hash>';
$url = "https://resi-api.iproyal.com/v1/residential-users/$residential_user_hash/ips-skipping/$ips_skipping_hash";
$options = [
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $api_token",
'Content-Type: application/json'
]
];
$ch = curl_init();
curl_setopt_array($ch, $options);
$response = curl_exec($ch);
if (curl_errno($ch)) {
echo 'Error:' . curl_error($ch);
} else {
echo $response;
}
curl_close($ch);
?>
import requests
api_token = '<your_api_token>'
residential_user_hash = '<residential_user_hash>'
ips_skipping_hash = '<ips_skipping_hash>'
url = f'https://resi-api.iproyal.com/v1/residential-users/{residential_user_hash}/ips-skipping/{ips_skipping_hash}'
data = {
'title': 'New Title',
'ip_ranges': ['192.168.0.0/24', '10.0.0.0/8']
}
headers = {
'Authorization': f'Bearer {api_token}',
'Content-Type': 'application/json'
}
response = requests.put(url, json=data, headers=headers)
print(response.status_code)
print(response.text)
const https = require('https');
const api_token = '<your_api_token>';
const residential_user_hash = '<residential_user_hash>';
const ips_skipping_hash = '<ips_skipping_hash>';
const options = {
hostname: 'resi-api.iproyal.com',
path: `/v1/residential-users/${residential_user_hash}/ips-skipping/${ips_skipping_hash}`,
method: 'DELETE',
headers: {
'Authorization': `Bearer ${api_token}`,
'Content-Type': 'application/json'
}
};
const req = https.request(options, (res) => {
let responseData = '';
res.on('data', (chunk) => {
responseData += chunk;
});
res.on('end', () => {
console.log(responseData);
});
});
req.on('error', (error) => {
console.error('Error:', error.message);
});
req.end();
Last updated