Skip to main content

Update Web Access Control Rule

Update an existing web access control rule identified by ID.

Request

Request-Line

PUT /waap/v1.0/pbrStrategy/webAccessControls/{ruleId} HTTP/1.1

Request Parameters

Path Parameters

ParameterTypeRequiredDescription
ruleIdIntegerMandatoryUnique identifier assigned to the web access control rule.

Body Parameters

ParameterTypeRequiredDescription
nameStringOptionalRule name for web access control. 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.
pathOperatorStringOptionalMatching operator used to evaluate the request path. Supported values: equal, notEqual, contain, notContain, beginsWith, notBeginsWith, endsWith, notEndsWith, regex, notMatchRegex, include, exclude. If not provided, the existing pathOperator will remain unchanged.
pathPatternStringOptionalThe path pattern to be matched against the request URI. The interpretation depends on pathOperator. For example, when pathOperator is contain, the rule triggers if the request path contains this value. If not provided, the existing pathPattern will remain unchanged.
keyTypeStringOptionalThe request attribute used for matching. Supported values: ip, fingerprint, userAgent, cookieId. If provided, keyValue should also be specified. If not provided, the existing pathPattern will remain unchanged.
keyValueString[]OptionalOne or more values used to match against the selected keyType. Multiple values can be provided. If not provided, the existing keyType will remain unchanged.
keyRegexBooleanOptionalIndicates whether keyValue should be interpreted as a regular expression. This field is only applicable when keyType is fingerprint, userAgent, or cookieId. If provided, keyType and keyValue should also be specified. If not provided, the existing keyRegex will remain unchanged.
devTypeString[]OptionalSpecifies the device types that the rule applies to. Supported values: pc, mac, mobile. Multiple device types can be selected. If not provided, the existing devType will remain unchanged.
triggeringProbabilityIntegerOptionalThe probability (in percentage) that the configured action will be triggered when the request matches the rule. Supported values: 100, 90, 80, 70, 60, 50, 40, 30, 20, 10. If not provided, the existing triggeringProbability will remain unchanged.
autoListKeyStringOptionalThe key type used by Auto-Web ACL to automatically control request access. Supported values: ip, fingerprint. If not provided, the existing autoListDuration will remain unchanged.
autoListDurationIntegerOptionalThe duration (in seconds) that the key will remain in the Auto-Web ACL once triggered. The valid range is 0 to 600000. If not provided, the existing pathPattern will remain unchanged.
websitesInteger[]OptionalList of website IDs the rule applies to. If not provided, the existing websites will remain unchanged.

Response

Status Codes, Error Codes and Error Messages

Status CodeError CodeError Message
400Request.BadRequestBad request.
400Name.InvalidName is empty or invalid.
400PathOperator.InvalidPathOperator is empty or invalid.
400PathPattern.InvalidPathPattern is empty or invalid.
400KeyType.InvalidKeyType is empty or invalid.
400KeyValue.InvalidKeyValue is empty or invalid.
400DevType.InvalidDevType is empty or invalid.
400TriggeringProbability.InvalidTriggeringProbability is empty or invalid.
400AutoListKey.InvalidAutoListKey is empty or invalid.
400AutoListDuration.InvalidAutoListDuration is empty or invalid.
404Website.NotFoundWebsite is not found.
404WebAccessControlRule.NotFoundWeb Access Control Rule is not found.

Examples

Update Web Access Control Rule

Request

PUT /waap/v1.0/pbrStrategy/webAccessControls/261700 HTTP/1.1

{
"name": "test",
"description": "test",
"pathOperator": "endsWith",
"pathPattern": "/test",
"keyType": "userAgent",
"keyValue": [
"test"
],
"keyRegex": false,
"devType": [
"mac",
"mobile"
],
"triggeringProbability": 10,
"autoListKey": "ip",
"autoListDuration": 60,
"websites": []
}