Skip to main content

Upsert Rate Limit

Creates or updates rate limit for website acceleration service.

Request

Request-Line

POST /cdn/v1.0/services/{serviceId}/rateLimit HTTP/1.1

Request Parameters

Path Parameters

ParameterTypeRequiredDescription
serviceIdIntegerMandatoryService ID.

Body Parameters

ParameterTypeRequiredDescription
timeWindowIntegerMandatoryTime to apply the limit (in seconds).
requestLimitIntegerMandatoryThe maximum number of requests allowed from the same user IP within the specified time frame.
ignoreUrlPathBooleanOptionalIgnore URLs, apply a single limit for all URLs from the same user IP. Default is false. If omitted on update, the current value will be retained. Default is false.
ignoreQueryStringBooleanOptionalIgnore Query String when counting requests. Default is false. If omitted on update, the current value will be retained. Default is false.

Response

Status Codes, Error Codes and Error Messages

Status CodeError CodeError Message
400Request.BadRequestBad request.
400InvalidCustomer.IdEmptyCustomer id can be empty or invalid.
400InvalidService.IdIncorrectService id is empty or invalid.
400ServiceId.IdPermissionServiceId can not be found or unknown.
400InvalidRateLimit.TimeWindowInvalid time window value.
400InvalidRateLimit.RequestLimitInvalid request limit value.

Examples

Upsert Rate Limit

Request

POST /cdn/v1.0/services/228331/rateLimit HTTP/1.1

{
"timeWindow": 60,
"requestLimit": 10000000,
"ignoreUrlPath": true,
"ignoreQueryString": true
}

Successful Response Body

HTTP/1.1 200