An engineer must list every network for a specific Meraki organization. The engineer must call the organization’s network endpoint and save the returned JSON inventory to disk. Drag the code snippets from the bottom into the boxes in the code to construct the artifact. Not all options are used.
Drag an item to a slot, or select an item and then a slot.
import requests, json
base = "https://api.meraki.com/api/v1"
org_id = "123456"
api_key = "abcd1234"
headers = {
"": api_key,
"Accept": "application/json"
}
resp = requests.(
f"{base}//{org_id}/",
headers=headers,
timeout=30
)
resp.raise_for_status()
with open("org_networks.json", "w") as f:
json.dump(resp.json(), f, indent=2)