Give a project an edge WAF policy
import requests
url = "https://platform.ankra.app/api/v1/org/projects/{project_id}/waf"
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/projects/{project_id}/waf', 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/projects/{project_id}/waf \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{}'{
"waf_settings": {
"project_id": "<string>",
"waf": {
"mode": "block",
"sensitivity": "standard"
},
"inherits": true,
"updated_at": "2023-11-07T05:31:56Z"
}
}DNS
Give a project an edge WAF policy
Every zone of the project without a policy of its own follows it, ahead of the organisation zone; a zone’s or hostname’s own policy still wins. Requires an organisation admin; Ankra Cloud checks the project is one the organisation lists and audits the change.
PUT
/
api
/
v1
/
org
/
projects
/
{project_id}
/
waf
Give a project an edge WAF policy
import requests
url = "https://platform.ankra.app/api/v1/org/projects/{project_id}/waf"
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/projects/{project_id}/waf', 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/projects/{project_id}/waf \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{}'{
"waf_settings": {
"project_id": "<string>",
"waf": {
"mode": "block",
"sensitivity": "standard"
},
"inherits": true,
"updated_at": "2023-11-07T05:31:56Z"
}
}Authorizations
Body
application/json