/sys/quotas/rate-limit
The /sys/quotas/rate-limit
endpoint is used to create, edit and delete rate limit quotas.
Create or update a rate limit quota
This endpoint is used to create a rate limit quota with an identifier, name
.
A rate limit quota must include a rate
value with an optional path
that can
either be a namespace or mount.
Method | Path |
---|---|
POST | /sys/quotas/rate-limit/:name |
Parameters
name
(string: "")
- The name of the quota.path
(string: "")
- Path of the mount or namespace to apply the quota. A blank path configures a global rate limit quota. For examplenamespace1/
adds a quota to a full namespace,namespace1/auth/userpass
adds a quota touserpass
innamespace1
. Updating this field on an existing quota can have "moving" effects. For example, updatingauth/userpass
tonamespace1/auth/userpass
moves this quota from being a global mount quota to a namespace specific mount quota. Quotas on a non-root namespace are not inherited by child namespaces. Note, namespaces are supported in Enterprise only.rate
(float: 0.0)
- The maximum number of requests in a given interval to be allowed by the quota rule. Therate
must be positive.interval
(string: "")
- The duration to enforce rate limiting for (default"1s"
).block_interval
(string: "")
- If set, when a client reaches a rate limit threshold, the client will be prohibited from any further requests until after the 'block_interval' has elapsed.
Sample payload
Sample request
Delete a rate limit quota
A rate limit quota can be deleted by name
.
Method | Path |
---|---|
DELETE | /sys/quotas/rate-limit/:name |
Sample request
Get a rate limit quota
A rate limit quota can be retrieved by name
.
Method | Path |
---|---|
GET | /sys/quotas/rate-limit/:name |
Sample request
Sample response
List rate limit quotas
This endpoint returns a list of all the rate limit quotas.
Method | Path |
---|---|
LIST | /sys/quotas/rate-limit |
Sample request
Sample response