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
| Parameter | Type | Required | Description |
|---|---|---|---|
| ruleId | Integer | Mandatory | Unique identifier assigned to the rate limiting rule. |
Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| name | String | Optional | Rule name for web access control. If not provided, the existing name will remain unchanged. |
| description | String | Optional | The description can have 1-200 characters. If not provided, the existing description will remain unchanged. |
| pathOperator | String | Optional | Matching 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. |
| pathPattern | String | Optional | The 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. |
| keyType | String | Optional | The request attribute used for matching. Supported values: ip, fingerprint, cookieId. If not provided, the existing pathPattern will remain unchanged. |
| rateLimitType | String | Optional | Specifies 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. |
| rate | Integer | Optional | The maximum number of requests allowed per second. The valid range is 1 to 65535. Required when rateLimitType is rate. |
| burst | Integer | Optional | The maximum burst capacity above the configured rate. The valid range is 0 to 65535. Required when rateLimitType is rate. |
| windowUnit | String | Optional | The time unit of the rate limit window. Supported values: second, minute, hour. Required when rateLimitType is timeWindow. |
| maxRequests | Integer | Optional | The maximum number of requests allowed within the specified time window. The valid range is 1 to 65535. Required when rateLimitType is timeWindow. |
| devType | String[] | Optional | Specifies 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 |
| triggeringProbability | Integer | Optional | The 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. |
| autoListKey | String | Optional | The 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. |
| autoListDuration | Integer | Optional | The 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. |
| websites | Integer[] | Optional | List 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 Code | Error Code | Error Message |
|---|---|---|
| 400 | Request.BadRequest | Bad request. |
| 400 | Name.Invalid | Name is empty or invalid. |
| 400 | PathOperator.Invalid | PathOperator is empty or invalid. |
| 400 | PathPattern.Invalid | PathPattern is empty or invalid. |
| 400 | KeyType.Invalid | KeyType is empty or invalid. |
| 400 | KeyValue.Invalid | KeyValue is empty or invalid. |
| 400 | DevType.Invalid | DevType is empty or invalid. |
| 400 | TriggeringProbability.Invalid | TriggeringProbability is empty or invalid. |
| 400 | AutoListKey.Invalid | AutoListKey is empty or invalid. |
| 400 | AutoListDuration.Invalid | AutoListDuration is empty or invalid. |
| 404 | Website.NotFound | Website is not found. |
| 404 | RateLimitingRule.NotFound | Rate 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": []
}