Create Bot Rule
Creates a new Bot Management Rule and binds it to one or more websites.
Request
Request-Line
POST /waap/v1.0/botManagementRule HTTP/1.1
Request Parameters
Body Parameters
Parameter | Type | Required | Description |
---|---|---|---|
name | string | Mandatory | The name for a new rule. The name must have 1-26 characters. Valid characters: 0-9, A-Z, a-z, space, . (dot), _ (underline), - (hyphen), () (parentheses), * (asterisk) and + (plus sign). |
description | string | Optional | The description can have 1-200 characters. |
silenceChallengeEnabled | boolean | Optional | Whether to enable silence challenge. Default is false if omitted. |
silenceChallengeAction | string | Optional | Action when silence challenge triggers. Must be "block" or "captcha". This field is required if silenceChallengeEnabled is set to true. |
ajaxEnabled | boolean | Optional | Whether to enable AJAX behavior detection. Default is false if omitted. |
antiDebuggingEnabled | boolean | Optional | Whether to enable anti-debugging behavior detection. Default is false if omitted. |
websites | integer[] | Mandatory | List of website IDs the rule applies to. |
Response
Response Body
Property name | Type | Required | Description |
---|---|---|---|
bot_management_rule_id | integer | Mandatory | Unique identifier assigned to the created bot rule. |
Status Codes, Error Codes and Error Messages
Status Code | Error Code | Error Message |
---|---|---|
400 | Request.BadRequest | Bad request. |
400 | Name.Invalid | Name is empty or invalid. |
400 | SilenceChallengeAction.Invalid | SilenceChallengeAction is empty or invalid. |
404 | Website.NotFound | Website is not found. |
Examples
Create Bot Rule
Request
POST /waap/v1.0/botManagementRule HTTP/1.1
{
"name": "test111",
"description": "111",
"silenceChallengeEnabled": 1,
"silenceChallengeAction": "captcha",
"ajaxEnabled": true,
"antiDebuggingEnabled": true,
"websites": [
110,111
]
}
Successful Response Body
{
"bot_management_rule_id": 40
}