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/botRules 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.
silenceChallengeEnabledBooleanOptionalIndicates whether the silence challenge is enabled. Default is false if omitted.
silenceChallengeActionStringOptionalDefines the action when a silence challenge is triggered. Valid values are "block" or "captcha". This field is required if silenceChallengeEnabled is configured as true.
ajaxEnabledBooleanOptionalIndicates whether AJAX behaviour detection is enabled. Default is false if omitted.
antiDebuggingEnabledBooleanOptionalIndicates whether anti-debugging behaviour detection is enabled. Default is false if omitted.
websitesInteger[]MandatoryList of website IDs the rule applies to.

Response

Response Body

Property nameTypeRequiredDescription
ruleIdIntegerMandatoryUnique 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/botRules HTTP/1.1

{
"name": "test111",
"description": "111",
"silenceChallengeEnabled": 1,
"silenceChallengeAction": "captcha",
"ajaxEnabled": true,
"antiDebuggingEnabled": true,
"websites": [
110,111
]
}

Successful Response Body

{
"ruleId": 40
}