跳到主要内容

Update Bot Rule

Updates an existing Bot Management Rule identified by ID.

Request

Request-Line

PUT /waap/v1.0/botRules/{ruleId} HTTP/1.1

Request Parameters

Path Parameters

ParameterTypeRequiredDescription
ruleIdIntegerMandatoryUnique identifier assigned to the bot rule.

Body Parameters

ParameterTypeRequiredDescription
nameStringOptionalThe 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). If not provided, the existing name will remain unchanged.
descriptionStringOptionalThe description can have 1-200 characters. If not provided, the existing description will remain unchanged.
silenceChallengeEnabledBooleanOptionalIndicates whether the silence challenge is enabled. If omitted, the existing setting remains unchanged.
silenceChallengeActionStringOptionalSpecifies the action when a silence challenge is triggered. Valid values are "block" or "captcha".
ajaxEnabledBooleanOptionalIndicates whether AJAX behaviour detection is enabled. If omitted, the existing setting remains unchanged.
antiDebuggingEnabledBooleanOptionalIndicates whether anti-debugging behaviour detection is enabled. If omitted, the existing setting remains unchanged.
websitesInteger[]OptionalList of website IDs the rule applies to. Must contain at least one valid ID. If omitted, the existing websites remains unchanged.

Response

Status Codes, Error Codes and Error Messages

Status CodeError CodeError Message
400Request.BadRequestBad request.
400RuleId.InvalidRuleId is empty or invalid.
400Name.InvalidName is empty or invalid.
404BotManagementRule.NotFoundBot Management Rule is not found.
404Website.NotFoundWebsite is not found.

Examples

Update Bot Rule

Request

PUT /waap/v1.0/botRules/40 HTTP/1.1

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