Merge pull request #780 from sever-sever/api-reset

http-api: Add action reset and socket description
This commit is contained in:
Daniil Baturin 2022-05-30 12:41:59 +03:00 committed by GitHub
commit 9dffd71f8f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 22 additions and 0 deletions

View File

@ -125,6 +125,24 @@ For example, get the addresses of a ``dum0`` interface.
"error": null "error": null
} }
/reset
======
The ``reset`` endpoint run a ``reset`` command.
.. code-block:: none
curl --location --request POST 'https://vyos/reset' \
--form data='{"op": "reset", "path": ["ip", "bgp", "192.0.2.11"]}' \
--form key='MY-HTTPS-API-PLAINTEXT-KEY'
respone:
{
"success": true,
"data": "",
"error": null
}
/image /image
====== ======

View File

@ -28,6 +28,10 @@ Configuration
Set the listen port of the local API, this has no effect on the Set the listen port of the local API, this has no effect on the
webserver. The default is port 8080 webserver. The default is port 8080
.. cfgcmd:: set service https api socket
Use local socket for API
.. cfgcmd:: set service https api strict .. cfgcmd:: set service https api strict
Enforce strict path checking Enforce strict path checking