Disable SNMP using API

Solved
SamehAbdalla
Here to help

Disable SNMP using API

Hello,

 

We currently have SNMP traps enabled and configured on a customer org with hundreds of networks (in the alerting section). I need to use API to disable it, has anyone tried that before or know the endpoint to target that?

SamehAbdalla_0-1731944149109.png

 

Thanks,

Sameh

1 Accepted Solution
David_Jirku
Meraki Employee
Meraki Employee
6 Replies 6
David_Jirku
Meraki Employee
Meraki Employee

Yes: https://developer.cisco.com/meraki/api-v1/update-network-snmp/

and also https://developer.cisco.com/meraki/api-v1/update-organization-snmp/

 

access - The type of SNMP access. Can be one of 'none' (disabled)

 

Are you trying to just turn off traps but leave SNMP on otherwise?  

 

https://developer.cisco.com/meraki/api-v1/update-network-snmp-traps/

 

 

SamehAbdalla
Here to help

I'm trying to disable SNMP on network level alerting config completely. like in this screenshot:

SamehAbdalla_0-1731945017034.png

 

David_Jirku
Meraki Employee
Meraki Employee

Try using the new https://developer.cisco.com/meraki/api-v1/update-network-snmp-traps/ endpoint. You have to have Early Access enabled in the org. 

 

You can then set the mode: "'mode' must be one of: 'disabled', 'v1/v2c' or 'v3'"

 
SamehAbdalla
Here to help

I see many opt-in setting under early-access. did you mean this one?

Early API Access

David_Jirku
Meraki Employee
Meraki Employee

Yes.

SamehAbdalla
Here to help

Thanks a lot @David_Jirku it worked!
just for reference in case anyone looks for the same solution:

this is the endpoint url: /networks/{networkId}/snmp/traps
and the payload should be like this:
"mode": "disabled",
"access": "none",
"communityString": "",
"users": []

Get notified when there are additional replies to this discussion.