List a project's edge WAF rules
import requests
url = "https://platform.ankra.app/api/v1/org/projects/{project_id}/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/projects/{project_id}/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/projects/{project_id}/waf/rules \
--header 'Authorization: Bearer <token>'{
"rules": [
{
"id": "<string>",
"zone_id": "<string>",
"set_at_zone": "<string>",
"project_id": "<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 a project's edge WAF rules
The rules set at the project, oldest first. Each applies to every hostname of the project’s zones, after the rules of the zones above them and before the zone’s own; a block still wins. Requires an organisation member.
GET
/
api
/
v1
/
org
/
projects
/
{project_id}
/
waf
/
rules
List a project's edge WAF rules
import requests
url = "https://platform.ankra.app/api/v1/org/projects/{project_id}/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/projects/{project_id}/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/projects/{project_id}/waf/rules \
--header 'Authorization: Bearer <token>'{
"rules": [
{
"id": "<string>",
"zone_id": "<string>",
"set_at_zone": "<string>",
"project_id": "<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"
}
]
}