Skip to main content

Update Rate Limiting Rule

Update an existing rate limiting identified by ID.

Request

Request-Line

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

Request Parameters

Path Parameters

ParameterTypeRequiredDescription
ruleIdIntegerMandatoryUnique identifier assigned to the rate limiting 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, cookieId. If not provided, the existing pathPattern will remain unchanged.
rateLimitTypeStringOptionalSpecifies the rate limiting mode. Supported values: rate (Queries per second) or timeWindow (Queries per Time Window). If not provided, the existing rateLimitType will remain unchanged.
rateIntegerOptionalThe maximum number of requests allowed per second. The valid range is 1 to 65535. Required when rateLimitType is rate.
burstIntegerOptionalThe maximum burst capacity above the configured rate. The valid range is 0 to 65535. Required when rateLimitType is rate.
windowUnitStringOptionalThe time unit of the rate limit window. Supported values: second, minute, hour. Required when rateLimitType is timeWindow.
maxRequestsIntegerOptionalThe maximum number of requests allowed within the specified time window. The valid range is 1 to 65535. Required when rateLimitType is timeWindow.
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.
404RateLimitingRule.NotFoundRate Limiting Rule is not found.

Examples

Update Rate Limiting Rule

Request

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

{
"name": "test111",
"description": "test111",
"pathOperator": "contain",
"pathPattern": "/test",
"keyType": "ip",
"rateLimitType": "rate",
"rate": 100,
"burst": 100,
"windowUnit": "minute",
"maxRequests": 0,
"devType": [
"mac"
],
"triggeringProbability": 90,
"autoListKey": "fingerprint",
"autoListDuration": 111,
"websites": []
}