Skip to main content

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

ParameterTypeRequiredDescription
serviceIdIntegerMandatoryService ID.

Body Parameters

ParameterTypeRequiredDescription
timeFrameIntegerMandatoryTime to apply the limit (in seconds).
reqLimitIntegerMandatoryMax allowed request number from the same user IP per timeFrame.
ignorePathBooleanOptionalIgnore 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.
ignoreQueryBooleanOptionalIgnore 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 CodeError CodeError Message
400Request.BadRequestBad request.
400ServiceId.InvalidServiceId is empty or invalid.
400TimeFrame.InvalidTimeFrame is empty or invalid.
400ReqLimit.InvalidReqLimit is empty or invalid.
400RateLimit.OperationFailedThe rate limit operation failed.
404ServiceId.NotFoundServiceId 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
}