Create Bot Rule
Create a new Bot Management Rule and binds it to one or more websites.
Request
Request-Line
POST /waap/v1.0/botRules 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 | Indicates whether the silence challenge is enabled. Default is false if omitted. |
| silenceChallengeAction | String | Optional | Defines the action when a silence challenge is triggered. Valid values are "block" or "captcha". This field is required if silenceChallengeEnabled is configured as true. |
| ajaxEnabled | Boolean | Optional | Indicates whether AJAX behaviour detection is enabled. Default is false if omitted. |
| antiDebuggingEnabled | Boolean | Optional | Indicates whether anti-debugging behaviour detection is enabled. Default is false if omitted. |
| websites | Integer[] | Mandatory | List of website IDs the rule applies to. |
Response
Response Body
| Property name | Type | Required | Description |
|---|---|---|---|
| ruleId | 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/botRules HTTP/1.1
{
"name": "test111",
"description": "111",
"silenceChallengeEnabled": 1,
"silenceChallengeAction": "captcha",
"ajaxEnabled": true,
"antiDebuggingEnabled": true,
"websites": [
110,111
]
}
Successful Response Body
{
"ruleId": 40
}