2020-07-07 15:42:01 +00:00
|
|
|
---
|
|
|
|
layout: api
|
2020-07-22 13:28:56 +00:00
|
|
|
page_title: /sys/quotas/config - HTTP API
|
2020-07-07 15:42:01 +00:00
|
|
|
sidebar_title: <code>/sys/quotas/config</code>
|
|
|
|
description: The `/sys/quotas/config` endpoint is used to configure rate limit quotas.
|
|
|
|
---
|
|
|
|
|
|
|
|
# `/sys/quotas/config`
|
|
|
|
|
|
|
|
The `/sys/quotas/config` endpoint is used to configure rate limit quotas.
|
|
|
|
|
|
|
|
## Create or Update the Rate Limit Configuration
|
|
|
|
|
|
|
|
| Method | Path |
|
|
|
|
| :----- | :------------------- |
|
|
|
|
| `POST` | `/sys/quotas/config` |
|
|
|
|
|
|
|
|
### Parameters
|
|
|
|
|
|
|
|
- `enable_rate_limit_audit_logging` `(bool: false)` - If set, starts audit logging
|
|
|
|
of requests that get rejected due to rate limit quota rule violations.
|
|
|
|
|
|
|
|
### Sample Payload
|
|
|
|
|
|
|
|
```json
|
|
|
|
{
|
|
|
|
"enable_rate_limit_audit_logging": true,
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
### Sample Request
|
|
|
|
|
|
|
|
```shell-session
|
|
|
|
$ curl \
|
|
|
|
--request POST \
|
|
|
|
--header "X-Vault-Token: ..." \
|
|
|
|
--data @payload.json \
|
|
|
|
http://127.0.0.1:8200/v1/sys/quotas/config
|
|
|
|
```
|
|
|
|
|
|
|
|
## Get the Rate Limit Configuration
|
|
|
|
|
|
|
|
| Method | Path |
|
|
|
|
| :----- | :------------------- |
|
|
|
|
| `GET` | `/sys/quotas/config` |
|
|
|
|
|
|
|
|
### Sample Request
|
|
|
|
|
|
|
|
```shell-session
|
|
|
|
$ curl \
|
|
|
|
--request GET \
|
|
|
|
--header "X-Vault-Token: ..." \
|
|
|
|
http://127.0.0.1:8200/v1/sys/quotas/config
|
|
|
|
```
|
|
|
|
|
|
|
|
### Sample Response
|
|
|
|
|
|
|
|
```json
|
|
|
|
{
|
|
|
|
"request_id": "259801bd-a0c9-9350-8eb9-26c91afd19c6",
|
|
|
|
"lease_id": "",
|
|
|
|
"lease_duration": 0,
|
|
|
|
"renewable": false,
|
|
|
|
"data": {
|
|
|
|
"enable_rate_limit_audit_logging": false
|
|
|
|
},
|
|
|
|
"warnings": null
|
|
|
|
}
|
|
|
|
```
|