Upsert Rate Limit
Creates or updates rate limit for website acceleration service.
Request
Request-Line
POST /waap/v1.0/services/{serviceId}/rateLimit HTTP/1.1
Request Parameters
Path Parameters
Parameter | Type | Required | Description |
---|---|---|---|
serviceId | Integer | Mandatory | Service ID. |
Body Parameters
Parameter | Type | Required | Description |
---|---|---|---|
timeFrame | Integer | Mandatory | Time to apply the limit (in seconds). |
reqLimit | Integer | Mandatory | Max allowed request number from the same user IP per timeFrame. |
ignorePath | Boolean | Optional | Ignore URLs, apply a single limit for all URLs from user IP. If omitted during creation the value defaults to false; if omitted during an update the existing value is retained. |
ignoreQuery | Boolean | Optional | Ignore Query String when counting requests. If omitted during creation the value defaults to false; if omitted during an update the existing value is retained. |
Response
Status Codes, Error Codes and Error Messages
Status Code | Error Code | Error Message |
---|---|---|
400 | Request.BadRequest | Bad request. |
400 | ServiceId.Invalid | ServiceId is empty or invalid. |
400 | TimeFrame.Invalid | TimeFrame is empty or invalid. |
400 | ReqLimit.Invalid | ReqLimit is empty or invalid. |
400 | RateLimit.OperationFailed | The rate limit operation failed. |
404 | ServiceId.NotFound | ServiceId is not found. |
Examples
Upsert Rate Limit
Request
POST /waap/v1.0/services/12345/rateLimit HTTP/1.1
{
"timeFrame": 60,
"reqLimit": 100,
"ignorePath": true,
"ignoreQuery": true
}