diff --git a/unifi/controller.py b/unifi/controller.py index 7b4663f..4a56276 100644 --- a/unifi/controller.py +++ b/unifi/controller.py @@ -193,6 +193,14 @@ def restart_ap_name(self, name): if ap.get('state', 0) == 1 and ap.get('name', None) == name: self.restart_ap(ap['mac']) + def archive_all_alerts(self): + """Archive all Alerts + """ + js = json.dumps({'cmd': 'archive-all-alarms'}) + params = urllib.urlencode({'json': js}) + answer = self._read(self.api_url + 'cmd/evtmgr', params) + print "Archived all Alerts" + def create_backup(self): """Ask controller to create a backup archive file, response contains the path to the backup file.