ip
when specifying an IP address in the rule.{
"configuration": {
"target": "ip",
"value": "198.51.100.4"
},
"mode": "challenge",
"notes": "This rule is enabled because of an event that occurred on date X."
}
curl --location --request POST 'https://api.cloudflare.com/client/v4/user/firewall/access_rules/rules' \
--header 'Content-Type: application/json' \
--data-raw '{
"configuration": {
"target": "ip",
"value": "198.51.100.4"
},
"mode": "challenge",
"notes": "This rule is enabled because of an event that occurred on date X."
}'
{
"errors": [],
"messages": [],
"result": {
"allowed_modes": [
"whitelist",
"block",
"challenge",
"js_challenge",
"managed_challenge"
],
"configuration": {
"target": "ip",
"value": "198.51.100.4"
},
"created_on": "2014-01-01T05:20:00.12345Z",
"id": "92f17202ed8bd63d69a66b86a49a8f6b",
"mode": "challenge",
"modified_on": "2014-01-01T05:20:00.12345Z",
"notes": "This rule is enabled because of an event that occurred on date X."
},
"success": true
}