I'd like to share a project I made when I needed to get a simple count of DFS events on my wireless networks on a defined timespan (in days) , for a specific netID or the whole organization, for a specific type of device.
You can add into parameters the type of event you want to monitor (here for example : dfs_event)
I have a few comments about the implementation of the script:
Use only one session object and pass it as parameter instead of the apikey. At the moment you are generating for each request a new session object which generates a higher load on your script and on the meraki backend
span argument: add the default parameter. That way you won't have to check, if it got provided or not. Just use it 😃
At the moment you are not checking for an invalid input on the parameters, so your code might fail. Try something like this: