Add the ability to reboot and poweroff the system via API
Description
Description
Details
Details
- Version
- -
- Is it a breaking change?
- Perfectly compatible
- Issue type
- Feature (new functionality)
Related Objects
Related Objects
- Mentioned In
- rVYOSONEXd908073cac14: Merge pull request #2521 from vyos/mergify/bp/sagitta/pr-2516
rVYOSONEXcc4773e23ae9: T5767: HTTPS API add reboot and poweroff endpoints
rVYOSONEX36f3c329c2df: T5767: HTTPS API add reboot and poweroff endpoints
rVYOSONEX821eaea09d2e: Merge pull request #2516 from sever-sever/T5767
Event Timeline
Comment Actions
PR https://github.com/vyos/vyos-1x/pull/2516
$ curl -k --location --request POST 'https://192.168.122.14/reboot' \ --form data='{"op": "reboot", "path": ["now"]}' \ --form key='foo' {"success": true, "data": "Warning: there are unsaved configuration changes!\nRun 'save' command if you do not want to lose those changes after reboot/shutdown.\n\n", "error": null} $ curl -k --location --request POST 'https://192.168.122.14/poweroff' \ --form data='{"op": "poweroff", "path": ["now"]}' \ --form key='foo' {"success": true, "data": "Warning: there are unsaved configuration changes!\nRun 'save' command if you do not want to lose those changes after reboot/shutdown.\n\n", "error": null}
Comment Actions
Works fine
$ curl -k --location --request POST 'https://192.168.122.11/reboot' --form data='{"op": "reboot", "path": ["now"]}' --form key='foo' {"success": true, "data": "Warning: there are unsaved configuration changes!\nRun 'save' command if you do not want to lose those changes after reboot/shutdown.\n\n", "error": null}