List the edge WAF rules of a zone
import requests
url = "https://platform.ankra.app/api/v1/org/dns/zones/{zone}/waf/rules"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://platform.ankra.app/api/v1/org/dns/zones/{zone}/waf/rules', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://platform.ankra.app/api/v1/org/dns/zones/{zone}/waf/rules \
--header 'Authorization: Bearer <token>'{
"rules": [
{
"id": "<string>",
"zone_id": "<string>",
"set_at_zone": "<string>",
"hostname": "<string>",
"description": "<string>",
"action": "block",
"path_prefix": "<string>",
"methods": [
"<string>"
],
"sources": [
"<string>"
],
"rule_ids": [
123
],
"enabled": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
]
}DNS
List the edge WAF rules of a zone
Every rule that applies to hostnames at or below the zone, set there or at the organisation zone above it, broadest zone first, with the zone each was set at. Requires an organisation member.
GET
/
api
/
v1
/
org
/
dns
/
zones
/
{zone}
/
waf
/
rules
List the edge WAF rules of a zone
import requests
url = "https://platform.ankra.app/api/v1/org/dns/zones/{zone}/waf/rules"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://platform.ankra.app/api/v1/org/dns/zones/{zone}/waf/rules', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://platform.ankra.app/api/v1/org/dns/zones/{zone}/waf/rules \
--header 'Authorization: Bearer <token>'{
"rules": [
{
"id": "<string>",
"zone_id": "<string>",
"set_at_zone": "<string>",
"hostname": "<string>",
"description": "<string>",
"action": "block",
"path_prefix": "<string>",
"methods": [
"<string>"
],
"sources": [
"<string>"
],
"rule_ids": [
123
],
"enabled": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
]
}