Edit RateLimit
This API is used to add/edit ratelimit for website acceleration service.
1. Request Definition
- API URL
https://cdn-api.swiftfederation.com/v2.0/services/{serviceId}/ratelimit
- Request Method
POST
- Request Header
Refer to HTTP Request Headers
- Request Body
Request Body Data Format: JSON
| Field | Required | Type | Description |
|---|---|---|---|
| time_frame | Mandatory | int | Time to apply the limit for, sec. |
| req_limit | Mandatory | int | Max allowed request number from the same user IP per time_frame. |
| ignore_path | Optional | boolean | Ignore URLs, apply a single limit for all URLs from user IP. |
| ignore_query | Optional | boolean | Ignore Query String when counting requests. |
- Request Body Example
{
"time_frame": 60,
"req_limit": 100,
"ignore_path": true,
"ignore_query": true
}
2. Response Definition
- Response Header
Refer to HTTP Response Headers
- Response Body
No response body for this API.