Here's a simple V1 example...
btw this is using meraki 1.0.0b11
Note that the V1 API names are not the same as in V0, the one to get the Bluetooth settings for a network is...
https://developer.cisco.com/meraki/api-v1/#!get-network-wireless-bluetooth-settings
import os
import sys
import meraki
# set the key in the environment as MERAKI_DASHBOARD_API_KEY
# also define the org id in the environment
ORG_ID = os.environ.get("ORG_ID")
def main():
dashboard = meraki.DashboardAPI(
api_key='',
base_url='https://api.meraki.com/api/v1/',
print_console=False,
output_log=False,
wait_on_rate_limit=True
)
try:
networks = dashboard.organizations.getOrganizationNetworks(ORG_ID)
except meraki.APIError as e:
print(f'Meraki API error: {e}')
sys.exit(1)
except Exception as e:
print(f'some other error: {e}')
sys.exit(1)
for net in networks:
if 'wireless' in net['productTypes']:
print(net['name'])
try:
settings = dashboard.wireless.getNetworkWirelessBluetoothSettings(net['id'])
except meraki.APIError as e:
print(f'Meraki API error: {e}')
pass
except Exception as e:
print(f'some other error: {e}')
pass
else:
print(settings)
if __name__ == '__main__':
main()