QuestionQ33
Controller-Based Network AutomationDrag the code snippets from the bottom onto the boxes in the code to configure the set_alerts function to send an email to all admins if a setting is modified by using the Cisco Meraki API. Not all options are used.
Drag & Drop
def set_alerts(network_id, default_emails, alert_emails, meraki_url, meraki_apiKey): url = meraki_url + "/networks/"+network_id+ headers = { "X-Cisco-Meraki-API-Key": meraki_apiKey, "Content-Type": "application/json" } payload = { "defaultDestinations": { "emails": default_emails, "snmp": False, "allAdmins": False }, "alerts": [ { "type": , "enabled": True, "alertDestinations": { "emails": alert_emails, "snmp": False, "allAdmins": }, "filters": {} } ] } response = requests.request(, url, headers = headers, data = json.dumps(payload)).text return response
Community Discussion