diff --git a/cbw_api_toolbox/cbw_api.py b/cbw_api_toolbox/cbw_api.py index 991c473..8204593 100644 --- a/cbw_api_toolbox/cbw_api.py +++ b/cbw_api_toolbox/cbw_api.py @@ -794,3 +794,12 @@ def operating_systems(self): logging.error("Error::{}".format(response.text)) return None return self._cbw_parser(response) + + def server_reboot(self, server_id, params=None): + """POST request to /api/v3/vulnerabilities/servers//reboot to reboot a server""" + response = self._request("PATCH", [ROUTE_SERVERS, server_id, "reboot"], params) + if response.status_code != 200: + logging.error("Error::{}".format(response.text)) + return None + + return self._cbw_parser(response) diff --git a/setup.py b/setup.py index f810591..24f60f7 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ description='CyberWatch Api Tools.', long_description=open('README.md').read().strip(), long_description_content_type="text/markdown", - version='2.2.2', + version='2.2.3', author='CyberWatch SAS', author_email='support-it+api@cyberwatch.fr', license='MIT',