Hi HodyCrouch,
I'm having some issues with get client calls and timespans myself.
I'm accessing the Meraki API with a python (v3) script. I've refered to the Meraki API documentation and source code found here: https://github.com/meraki/dashboard-api-python/blob/master/meraki.py
The particular call I'm using is found on line 1349 "def getclients(apikey, serialnum, timestamp=86400, suppressprint=False😞"
I want to see all the clients connected to a particular MX device over the last month. It's the timespan piece that I don't understand. For example:
networkClients = meraki.getclients(apikey, greeceNodes[node])
Here the networkClients is meant to be a returned list of clients and greeceNodes[node] is the serial number of an MX device in my Greek networks. That said, I'm not sure where to put the timespan or how to format it, and the source code is not clear about it.
on lines 1353 - 1355 of the source code, the timespan={2}:
geturl = '{0}/devices/{1}/clients?timespan={2}'.format(str(base_url), |
| str(serialnum), |
| str(timestamp)) |
I'm not sure what this timespan={2} means.
Any ideas on how to gather data from the monthly timespan?