Advanced Rules
Create an advanced rule
post/waap/v1/domains/{domain_id}/advanced-rules
Path parameters
domain_idinteger required
The domain ID
The domain ID
Request body
Example request
{
"name": "Block foobar bot",
"action": {
"block": {
"action_duration": "12h"
}
},
"source": "request.rate_limit([], '.*events', 5, 200, [], [], '', 'ip') and not ('mb-web-ui' in request.headers['Cookie'] or 'mb-mobile-ios' in request.headers['Cookie'] or 'session-token' in request.headers['Cookie']) and not request.headers['session']"
}Response
Successful Response
Example response
{
"name": "Block foobar bot",
"action": {
"block": {
"action_duration": "12h"
}
},
"source": "request.rate_limit([], '.*events', 5, 200, [], [], '', 'ip') and not ('mb-web-ui' in request.headers['Cookie'] or 'mb-mobile-ios' in request.headers['Cookie'] or 'session-token' in request.headers['Cookie']) and not request.headers['session']"
}