If this is the script that calls the ORG names:
#SCRIPT THAT CALLS THE ORGS THEN ONLY PRINTS THE ORG NAME ONLY
import requests
import json
url = "https://api.meraki.com/api/v1/organizations"
payload={}
headers = {
'X-Cisco-Meraki-API-Key': 'xxxx'
}
response = requests.request("GET", url, headers=headers, data=payload)
r = json.loads(response.text)
for organizations in r:
print(organizations['name'])
Where does the create session from below get inserted?
First create a session like :
dashboard = meraki.DashboardAPI(api_key)
my_org = dashboard.organizations.getOrganizations()
for org in my_org:
org_id = org['id']
print(org['name'])