I found a solution ! def get_meraki_devices_with_fields(network_id, api_key):
url = f"https://api.meraki.com/api/v1/networks/{network_id}/sm/devices"
headers = {
"X-Cisco-Meraki-API-Key": api_key,
"Content-Type": "application/json"
}
params = {
"fields[]": ["ownerEmail", "ip", "lastConnected", "location"]
}
response = requests.get(url, headers=headers, params=params)
response.raise_for_status()
return response.json() The API documentation wasn't great to be honest, and their "example code" doesn't work. Luckily, chatGPT had the answer for me. Thank you for taking time and effort in helping me alemabrahao!
... View more