Step-by-step procedure
Authenticate to the cloud platform via the Python shell.
The following variables should be available now:
>>> base_url # the base URL 'https://eu8-cloud.acronis.com' >>> auth # the 'Authorization' header value with the access token {'Authorization': 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6ImMwMD...'}
Define a variable named
params
, and then assign an object with theid
parameter to dismiss one or more alerts by IDs to this variable:>>> params = { ... # ID of the alert(s) to remove ... "id": "54f3318a-6e72-49d7-b94f-b9909df96d16" ... }
Send a DELETE request to the
/api/alert_manager/v1/alerts
endpoint:>>> response = requests.delete(f'{base_url}/api/alert_manager/v1/alerts', headers=auth, params=params)
Check the status code of the response:
>>> response.status_code 204
Status code 204 means that the alerts were dismissed successfully.