diff options
| author | rebortg <github@ghlr.de> | 2023-11-26 13:34:49 +0100 | 
|---|---|---|
| committer | rebortg <github@ghlr.de> | 2023-11-26 13:34:49 +0100 | 
| commit | 54da140062ece6ee42a20619e892bb8f23983746 (patch) | |
| tree | 3144a0ca17f2eceaa5310a27e5084e895ad4bddc /docs/automation | |
| parent | 4ca2e09a2a807f7224ab3f24b47981be2b175b8b (diff) | |
| parent | 5953d6f69748c82cbd9eafbe662163924ae719e6 (diff) | |
| download | vyos-documentation-54da140062ece6ee42a20619e892bb8f23983746.tar.gz vyos-documentation-54da140062ece6ee42a20619e892bb8f23983746.zip | |
Merge branch 'master' of github.com:vyos/vyos-documentation
Diffstat (limited to 'docs/automation')
| -rw-r--r-- | docs/automation/vyos-api.rst | 37 | 
1 files changed, 37 insertions, 0 deletions
| diff --git a/docs/automation/vyos-api.rst b/docs/automation/vyos-api.rst index efd00dd8..afcc1767 100644 --- a/docs/automation/vyos-api.rst +++ b/docs/automation/vyos-api.rst @@ -143,6 +143,43 @@ The ``reset`` endpoint run a ``reset`` command.       "error": null     } +/reboot +======= + +To initiate a reboot use the ``reboot`` endpoint. + +.. code-block:: none + +   curl --location --request POST 'https://vyos/reboot' \ +   --form data='{"op": "reboot", "path": ["now"]}' \ +   --form key='MY-HTTPS-API-PLAINTEXT-KEY' + +   respone: +   { +     "success": true, +     "data": "", +     "error": null +   } + +/poweroff +========= + +To power off the system use the ``poweroff`` endpoint. + +.. code-block:: none + +   curl --location --request POST 'https://vyos/poweroff' \ +   --form data='{"op": "poweroff", "path": ["now"]}' \ +   --form key='MY-HTTPS-API-PLAINTEXT-KEY' + +   respone: +   { +     "success": true, +     "data": "", +     "error": null +   } + +  /image  ====== | 
