Set one hostname's edge WAF policy
import requests
url = "https://platform.ankra.app/api/v1/org/dns/zones/{zone}/waf/hostnames/{hostname}"
payload = {}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://platform.ankra.app/api/v1/org/dns/zones/{zone}/waf/hostnames/{hostname}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request PUT \
--url https://platform.ankra.app/api/v1/org/dns/zones/{zone}/waf/hostnames/{hostname} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{}'{
"waf_settings": {
"zone_id": "<string>",
"zone_name": "<string>",
"waf": {
"mode": "block",
"sensitivity": "standard"
},
"inherits": true,
"effective": {
"mode": "<string>",
"sensitivity": "<string>",
"source": "zone",
"source_zone": "<string>"
},
"hostnames": [
{
"hostname": "<string>",
"waf": {
"mode": "block",
"sensitivity": "standard"
},
"set_at_zone": "<string>",
"updated_at": "2023-11-07T05:31:56Z"
}
]
}
}DNS
Set one hostname's edge WAF policy
Gives one hostname, the zone name or a name below it, a policy that wins over every zone policy. It needs no record yet and survives external-dns rewriting the hostname’s records. Requires an organisation admin; Ankra Cloud checks the zone is the organisation account’s own and audits the change.
PUT
/
api
/
v1
/
org
/
dns
/
zones
/
{zone}
/
waf
/
hostnames
/
{hostname}
Set one hostname's edge WAF policy
import requests
url = "https://platform.ankra.app/api/v1/org/dns/zones/{zone}/waf/hostnames/{hostname}"
payload = {}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://platform.ankra.app/api/v1/org/dns/zones/{zone}/waf/hostnames/{hostname}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request PUT \
--url https://platform.ankra.app/api/v1/org/dns/zones/{zone}/waf/hostnames/{hostname} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{}'{
"waf_settings": {
"zone_id": "<string>",
"zone_name": "<string>",
"waf": {
"mode": "block",
"sensitivity": "standard"
},
"inherits": true,
"effective": {
"mode": "<string>",
"sensitivity": "<string>",
"source": "zone",
"source_zone": "<string>"
},
"hostnames": [
{
"hostname": "<string>",
"waf": {
"mode": "block",
"sensitivity": "standard"
},
"set_at_zone": "<string>",
"updated_at": "2023-11-07T05:31:56Z"
}
]
}
}Authorizations
Path Parameters
Body
application/json