Alerts - change alert type enabled to true/false via api

Solved
AleSuarez
Comes here often

Alerts - change alert type enabled to true/false via api

I get the alert type status via this api

https://api.meraki.com/api/v1/organizations/organizationId/assurance/alerts

 

do you have an example about changing only the enable parameter to true or false ? 

 

I have to change only this option 

 

'type': 'ipConflict', 'enabled'  to False

 

this is the complete get response for the get API of each network.

 

{'defaultDestinations': {'emails': [], 'snmp': False, 'allAdmins': True, 'httpServerIds': []}, 'alerts': [{'type': 'ampMalwareDetected', 'enabled': True, 'alertDestinations': {'emails': [], 'snmp': False, 'allAdmins': False, 'httpServerIds': []}, 'filters': {}}, {'type': 'ampMalwareBlocked', 'enabled': False, 'alertDestinations': {'emails': [], 'snmp': False, 'allAdmins': False, 'httpServerIds': []}, 'filters': {}}, {'type': 'applianceDown', 'enabled': False, 'alertDestinations': {'emails': [], 'snmp': False, 'allAdmins': False, 'httpServerIds': []}, 'filters': {'timeout': 60}}, {'type': 'failoverEvent', 'enabled': False, 'alertDestinations': {'emails': [], 'snmp': False, 'allAdmins': False, 'httpServerIds': []}, 'filters': {}}, {'type': 'dhcpNoLeases', 'enabled': False, 'alertDestinations': {'emails': [], 'snmp': False, 'allAdmins': False, 'httpServerIds': []}, 'filters': {}}, {'type': 'ipConflict', 'enabled': False, 'alertDestinations': {'emails': [], 'snmp': False, 'allAdmins': False, 'httpServerIds': []}, 'filters': {}}, {'type': 'ip6Conflict', 'enabled': False, 'alertDestinations': {'emails': [], 'snmp': False, 'allAdmins': False, 'httpServerIds': []}, 'filters': {}}, {'type': 'dhcp6naRenumber', 'enabled': False, 'alertDestinations': {'emails': [], 'snmp': False, 'allAdmins': False, 'httpServerIds': []}, 'filters': {}}, {'type': 'dhcp6pdRenumber', 'enabled': False, 'alertDestinations': {'emails': [], 'snmp': False, 'allAdmins': False, 'httpServerIds': []}, 'filters': {}}, {'type': 'cellularUpDown', 'enabled': False, 'alertDestinations': {'emails': [], 'snmp': False, 'allAdmins': False, 'httpServerIds': []}, 'filters': {}}, {'type': 'clientConnectivity', 'enabled': False, 'alertDestinations': {'emails': [], 'snmp': False, 'allAdmins': False, 'httpServerIds': []}, 'filters': {'clients': []}}, {'type': 'vrrp', 'enabled': False, 'alertDestinations': {'emails': [], 'snmp': False, 'allAdmins': False, 'httpServerIds': []}, 'filters': {}}, {'type': 'vpnConnectivityChange', 'enabled': False, 'alertDestinations': {'emails': [], 'snmp': False, 'allAdmins': False, 'httpServerIds': []}, 'filters': {}}, {'type': 'settingsChanged', 'enabled': False, 'alertDestinations': {'emails': [], 'snmp': False, 'allAdmins': False, 'httpServerIds': []}, 'filters': {}}, {'type': 'usageAlert', 'enabled': False, 'alertDestinations': {'emails': [], 'snmp': False, 'allAdmins': False, 'httpServerIds': []}, 'filters': {'threshold': 104857600, 'period': 1200}}, {'type': 'weeklyUmbrella', 'enabled': False, 'alertDestinations': {'emails': [], 'snmp': False, 'allAdmins': False, 'httpServerIds': []}, 'filters': {}}, {'type': 'prefixStarvation', 'enabled': False, 'alertDestinations': {'emails': [], 'snmp': False, 'allAdmins': False, 'httpServerIds': []}, 'filters': {}}], 'muting': {}}

1 Accepted Solution
alemabrahao
Kind of a big deal

I sent you a DM

I am not a Cisco Meraki employee. My suggestions are based on documentation of Meraki best practices and day-to-day experience.

Please, if this post was useful, leave your kudos and mark it as solved.

View solution in original post

5 Replies 5
alemabrahao
Kind of a big deal

To change the enabled parameter of a specific alert using the Meraki API, you can make a PUT request to update only the required field. For example, you can do this for the ipConflict alert type to true or false.

I am not a Cisco Meraki employee. My suggestions are based on documentation of Meraki best practices and day-to-day experience.

Please, if this post was useful, leave your kudos and mark it as solved.
AleSuarez
Comes here often

I have resolved width a replace , with all entire response in the PUT ... , could not find a way to modify only one field, could you show me an example?

alemabrahao
Kind of a big deal

I sent you a DM

I am not a Cisco Meraki employee. My suggestions are based on documentation of Meraki best practices and day-to-day experience.

Please, if this post was useful, leave your kudos and mark it as solved.
AleSuarez
Comes here often

I will check it, thanks.

AleSuarez
Comes here often

it works, its confusing because the audit logs  shows all the parameters width the actual values.

thanks

Get notified when there are additional replies to this discussion.