Update a specific rate limiting rule. See [eCDN Rate Limiting Rules](https://developer.salesforce.com/docs/commerce/commerce-api/guide/cdn-rate-limiting-rules.html).
Operation ID: updateRateLimitingRulecurl "https://{shortCode}.api.commercecloud.salesforce.com/cdn/zones/v1/organizations/{organizationId}/zones/{zoneId}/rate-limiting/rules/{ruleId}" \
-X PATCH \
-H "content-type: application/json" \
-d '{
"description": "Rate limit /path1.",
"expression": "(http.request.uri.path matches \\\"^/path1/.*\\\")",
"characteristics": [
"cf.unique_visitor_id"
],
"action": "block",
"period": 60,
"requestsPerPeriod": 50,
"mitigationTimeout": 600,
"countingExpression": "(http.request.uri.path matches \\\"^/path1/.*\\\" and http.response.code eq 400)",
"enabled": true,
"position": {
"before": "2c0fc9fa937b11eaa1b71c4d701ab86e",
"after": "2c0fc9fa937b11eaa1b71c4d701ab86e"
}
}'
An identifier for the organization the request is being made by
f_ecom_zzxy_prd
{
"description": "Rate limit /path1.",
"expression": "(http.request.uri.path matches \\\"^/path1/.*\\\")",
"characteristics": [
"cf.unique_visitor_id"
],
"action": "block",
"period": 60,
"requestsPerPeriod": 50,
"mitigationTimeout": 600,
"countingExpression": "(http.request.uri.path matches \\\"^/path1/.*\\\" and http.response.code eq 400)",
"enabled": true,
"position": {
"before": "2c0fc9fa937b11eaa1b71c4d701ab86e",
"after": "2c0fc9fa937b11eaa1b71c4d701ab86e"
}
}
The description of the rate limiting rule.
Rate limit /path1.
The expression that defines when to evaluate the rate limiting rule.
(http.request.uri.path matches \"^/path1/.*\")
Set of parameters defining how to group requests when tracking the request rate.
[
null
]
The action applied by the rate limiting rule. Valid actions are "block", "managed_challenge", "js_challenge", "legacy_captcha", and "log".
block
The period of time to consider when evaluating the request rate (in seconds). Valid values are 10, 60, 120, 300, and 600.
60
The limit for the number of requests in the specified period of time.
50
After the rate is reached, the rate limiting rule applies the rule action to further requests for the period of time defined in this field (in seconds). When set to 0, the rule throttles requests over the maximum configured rate. When greater than 0, the action is presented for the selected duration after the configured rate is exceeded. Valid values are 0, 60, 120, 300, 600, 3600, and 86400.
600
The expression that defines what kind of requests we want to rate limit.
(http.request.uri.path matches \"^/path1/.*\" and http.response.code eq 400)
Whether or not the rate limiting rule is enabled.
true
Used to specify the position of a rule.
Successfully updated the rate limiting rule requested by the caller.
{
"data": {
"ruleId": "ffffe61cf25e4ec49c34b029ff3060f7",
"description": "Rate limit /path1",
"expression": "http.request.uri.path matches \"^/path1/.*\"",
"characteristics": [
"cf.unique_visitor_id"
],
"action": "block",
"period": 60,
"requestsPerPeriod": 50,
"mitigationTimeout": 600,
"countingExpression": "http.request.uri.path matches \"^/path1/.*\" and http.response.code eq 400",
"enabled": false,
"lastUpdated": "2022-12-14T21:25:22.329194Z"
}
}
A rate limiting rule.