API_KEY = security.MERAKI_API_KEY_LIVE
BASE_URL = "https://api.meraki.com/api/v1"
HEADERS = {
"X-Cisco-Meraki-API-Key": API_KEY,
"Content-Type": "application/json"
}
def main():
url = f"{BASE_URL}/networks/L_00000000000000/wireless/connectionStats"
params = {
"ssids": 0,
"timespan": 86400
}
response = requests.get(url, headers=HEADERS, params=params)
print(url)
print(f"Response: {response.status_code}")
print(f"Response: {response.text}")
if __name__ == "__main__":
main()
Response: 200
Response: {"assoc":2562,"auth":4161,"dhcp":55,"dns":150,"success":37457}
Process finished with exit code 0