venus/api-ref/source/v1/custom-config.inc
howardlee 14928a697d Unify interface description
Change-Id: I70662a6a4873539a6229d3b53ae04da8b04fd733
2023-08-22 10:51:12 +08:00

70 lines
1023 B
ReStructuredText

.. -*- rst -*-
Custom Config
=============
Users can customize some important configurations, such as the retention days of ElasticSearch index.
Get custom config
~~~~~~~~~~~~~~~~~
.. rest_method:: GET /v1/custom_config
Get all custom config.
Response codes
--------------
.. rest_status_code:: success ../status.yaml
- 1
.. rest_status_code:: error ../status.yaml
- -1
Response
--------
**Example: JSON response**
.. literalinclude:: ./samples/custom-config/get-custom-config-show-response.json
:language: javascript
Set custom config
~~~~~~~~~~~~~~~~~
.. rest_method:: POST /v1/custom_config
Set one custom config.
Request
-------
.. rest_parameters:: parameters.yaml
- id: id
- value: value
Response codes
--------------
.. rest_status_code:: success ../status.yaml
- 1
.. rest_status_code:: error ../status.yaml
- -1
Response
--------
**Example: JSON response**
.. literalinclude:: ./samples/custom-config/set-custom-config-show-response.json
:language: javascript