venus/api-ref/source/v1/custom-config.inc
inspurericzhang cb884cefe7 improve the desc of apis
Change-Id: Icd2e183f21e22d5c4023b62201146d90a4609877
2023-02-23 09:31:21 +00:00

70 lines
1.0 KiB
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