I am trying to locate all Raspberry Pis in an org. Lucky for me, they all have a MAC address that starts with b8:27:eb. So I start with this code:
try:
for client in dashboard.networks.getNetworkClients(net['id'],total_pages='all',timespan=7*86400,mac="b8:27:eb"):
if(client['mac'].startswith("b8:27:eb:")):
print(f'"{net['name']}",{client['mac']},{client['ip']},"{client['description']}"')
except meraki.exceptions.APIError as e:
print(f"Skipping {net['name']}: {e.reason}",file=sys.stderr)
I hit a network with about 20,000 clients, and no Raspberry Pi's, and all I get is:
networks, getNetworkClients - 504 Gateway Time-out
If I remove the mac="b8:27:eb" filter it woks perfectly - but oh so slow. It seems it spends so long searching (and finding nothing), and the lack of anything being returned causes the Meraki gateway to time out.
@JohnIngram