venus/api-ref/source/v1/custom-config.inc
inspurericzhang c87cf723cf improve api doc format
Change-Id: I5ec8290c04ea112c14e30c6aee3568097faa62b8
2023-03-20 06:47:20 +00: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