REST API Methods
User data methods
Initialize user data database (batch data creation)
URL:
<domain>/init/Data:
{
'profiles': [
{
'cat_ids': [<cat_id>,],
'app_ids': [<app_id>,],
'profile': {
'page_id': <page_id>,
'id': <id>
}
}, ...
],
'nets': [{'ip': <ipv4>, 'profile_id': <profile_id>, 'prefix_len': <prefix_len4>}, ...],
'nets6': [{'ip': <ipv6>, 'profile_id': <profile_id>, 'prefix_len': <prefix_len6>}, ...],
'blockpages': [{'id': <page_id>, 'type': <blockpage_type>}, ...],
'napts': [
{
'ip': <ipv4>,
"profile_id": <profile_id>,
"lower_port_bound": <lower_port_bound>,
"upper_port_bound": <upper_port_bound>
},
]
}
Result: 204 No body
Profile methods
Fetch all profiles
URL:
<domain>/profilesResult: 200 OK
Add a profile
URL:
<domain>/profilesData:
{
"profile": {
"id": int,
"page_id": int
},
"cat_ids": [int, ],
"app_ids": [int, ],
}
Result: 201 Created
Fetch a specific profile
URL:
<domain>/profiles/<id>Result: 200 OK
Update a specific profile
<domain>/profiles
Data:
{
"app_ids": [int, ],
"cat_ids": [int, ],
"profile": {
"plan_id": int,
"provider_id": int,
"white_list_only": bool,
"hide_block_reason": bool,
"empty_dns_answer": bool,
"page_id": int,
"tls": bool
}
}
Result: 200 OK
Blockpage methods
Get all blockpages
URL:
<domain>/blockpageResult: 200 OK
Create a blockpage
URL:
<domain>/blockpageData:
{
"type": int,
"id": int
}
Result: 200 OK
Get a specific blockpage
URL:
<domain>/blockpage/<page_id>
Result: 200 OK
Update a blockpage
URL:
<domain>/blockpage/<page_id>Data:
{
"type": int
}
Result: 200 OK
Delete a blockpage
URL:
<domain>/blockpage/<page_id>
Result: 204 No Content, no body
Lists methods
Create an allow- or denylist
<domain>/profile/<profile_id>/bw_list
Data:
{
"type": "string", //"allow" or "deny" only
"domains": ["string", "string", ]
}
Result: 201 Created
Create an allow- or denylist with multiple entries
<domain>/profile/<profile_id>/bw_list/batch
Data:
{
"type": "string", //"allow" or "deny" only
"domains": ["string", "string", ]
}
Result: 201 Created
Update a domain in an allow- or denylist
<domain>/profile/<profile_id>/bw_list/<domain>
Data:
{
"type": "string", //"allow" or "deny" only
"domain": "string",
"profile_id": int
}
Result: 200 OK
Delete a domain from an allow- or denylist:
<domain>/profile/<profile_id>/bw_list/<domain>
Result: 204 No Content, no body
IPv4 network methods
Create an IPv4 address entry
URL:
<domain>/netData:
{
"ip": "string", //IPv4 address in canonical form
"profile_id": int,
"prefix_len": int
}
Result: 201 Created
Get an IPv4 address entry
URL:
<domain>/net/<int_ip>Result: 200 OK
Update an IPv4 address entry
URL:
<domain>/net/<int_ip>Data:
{
"ip": "string", //IPv4 address in canonical form
"profile_id": int,
"prefix_len": int
}
Result: 200 OK
Delete an IPv4 address
URL:
<domain>/net/<int_ip>Result: 204 No Content, no body
IPv6 network methods
Create an IPv6 address entry
URL:
<domain>/net6Data:
{
"ip": "string", //IPv6 address in canonical form
"prefix_len": int,
"profile_id": int
}
Result: 201 Created
Get an IPv6 address entry
URL:
<domain>/net6/<ipv6>Result: Dictionary with IPv6 and profile_id data
Update an IPv6 address entry
URL:
<domain>/net6/<ipv6>Data:
{
"ip": "string", //IPv6 address in canonical form
"prefix_len": int,
"profile_id": int
}
Result: 200 OK
Delete an IPv6 address
URL:
<domain>/net6/<ipv6>Result: 204 No Content, no body
IPv4 NAT methods
Create an IPv4 NAT entry
URL:
<domain>/napt/Data:
{
"ip": "string", //IPv4 address in canonical form
"lower_port_bound": int,
"upper_port_bound": int,
"profile_id": int
}
Result: 201 Created
Create multiple IPv4 NAT entries
URL:
<domain>/napt/batchData:
[
{
"ip": "string", //IPv4 address in canonical form
"lower_port_bound": int,
"upper_port_bound": int,
"profile_id": int
},
]
Result: 201 Created
Get all IPv4 NAT entries by IP
URL:
<domain>/napt/<int_ip>Result: 200 OK
Get a specific IPv4 NAT entry
URL:
<domain>/napt/<int_ip>/<lower_port_bound>/<upper_port_bound>Result: 200 OK
Update an IPv4 NAT entry
URL:
<domain>/napt/<int_ip>/<lower_port_bound>/<upper_port_bound>Data:
{
"ip": "string", //IPv4 address in canonical form
"lower_port_bound": int,
"upper_port_bound": int,
"profile_id": int
}
Result: 200 OK
Delete an IPv4 NAT entry
URL:
<domain>/napt/<int_ip>/<lower_port_bound>/<upper_port_bound>Result: 204 No Content, no body
Delete multiple IPv4 NAT entries
URL:
<domain>/napt/batchData:
[
{
"ip": "string", //IPv4 address in canonical form
"lower_port_bound": int,
"upper_port_bound": int,
"profile_id": int
},
]
Result: 204 No Content, no body
AppBlocker methods
Get a list of all available AppBlocker categories
URL:
<domain>/app_aware/application/Result: 200 OK