Skip to main content

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

ParameterTypeRequiredDescription
namestringMandatoryThe 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).
descriptionstringOptionalThe description can have 1-200 characters.
silenceChallengeEnabledbooleanOptionalWhether to enable silence challenge. Default is false if omitted.
silenceChallengeActionstringOptionalAction when silence challenge triggers. Must be "block" or "captcha". This field is required if silenceChallengeEnabled is set to true.
ajaxEnabledbooleanOptionalWhether to enable AJAX behavior detection. Default is false if omitted.
antiDebuggingEnabledbooleanOptionalWhether to enable anti-debugging behavior detection. Default is false if omitted.
websitesinteger[]MandatoryList of website IDs the rule applies to.

Response

Response Body

Property nameTypeRequiredDescription
bot_management_rule_idintegerMandatoryUnique identifier assigned to the created bot rule.

Status Codes, Error Codes and Error Messages

Status CodeError CodeError Message
400Request.BadRequestBad request.
400Name.InvalidName is empty or invalid.
400SilenceChallengeAction.InvalidSilenceChallengeAction is empty or invalid.
404Website.NotFoundWebsite 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
}