SSID Get Radius host IP or URL


SSID Get Radius host IP or URL

I have a working API that is pulling the status of all SSIDs in my network. Everything is working well except when I add the last line below to pull the radiusServer host. Can anyone correct me on the syntax to pull the radius host ip or url?


ssidname = ssid['name']
ssidnumber = str(ssid['number'])
if ssid['enabled'] == True:
ssidenabled = 'Yes'
if ssid['enabled'] == False:
ssidenabled = 'No'
authmode = ssid['authMode']
splashpage = ssid['splashPage']
Radius = ssid["radiusServer"]



Getting noticed

Re: SSID Get Radius host IP or URL

in Python: 

when Radius is enabled on SSID the result dict will have a key "radiusServers" which will contain a list of dicts, for every radius server, however, if the SSID does not have Radius active then the key will not exist and you can't address it via [""].

Use dict get() method to check if the key exists.


{'authMode': '8021x-radius',
 'availabilityTags': [],
 'availableOnAllAps': True,
 'bandSelection': 'Dual band operation with Band Steering',
 'concentratorNetworkId': 'N_111111111111111111',
 'dot11r': {'adaptive': False, 'enabled': False},
 'dot11w': {'enabled': True, 'required': False},
 'enabled': True,
 'encryptionMode': 'wpa-eap',
 'ipAssignmentMode': 'VPN',
 'mandatoryDhcpEnabled': True,
 'minBitrate': 12,
 'name': 'thisismyssidname',
 'number': 2,
 'perClientBandwidthLimitDown': 0,
 'perClientBandwidthLimitUp': 0,
 'perSsidBandwidthLimitDown': 0,
 'perSsidBandwidthLimitUp': 0,
 'radiusAccountingEnabled': False,
 'radiusAttributeForGroupPolicies': 'Filter-Id',
 'radiusAuthenticationNasId': '$NODE_MAC$:$VAP_NUM$', #this seems to be future settings in MR28
 'radiusCalledStationId': '$NODE_MAC$:$VAP_NAME$',  #this seems to be future settings in MR28
 'radiusCoaEnabled': True,
 'radiusFailoverPolicy': None,
 'radiusLoadBalancingPolicy': None,
 'radiusOverride': False,
 'radiusProxyEnabled': False,
 'radiusServers': [{'host': '',
                    'id': 111111111111111111,
                    'port': 1812},
                   {'host': '',
                    'id': 222222222222222222,
                    'port': 1812}],
 'radiusTestingEnabled': False,
 'splashPage': 'None',
 'ssidAdminAccessible': False,
 'visible': True,
 'vlanId': 888,
 'wpaEncryptionMode': 'WPA1 and WPA2'}





ssids = dashboard.wireless.getNetworkWirelessSsids(networkId)
for ssid in ssids:
  radius_server_list = []
  if ssid.get("radiusServers"): #Only execute if radiusServers key exists
    for server in ssid.get("radiusServers"):





Just browsing

Re: SSID Get Radius host IP or URL

sorry.... stupid cisco took the old account

Welcome to the Meraki Community!
To start contributing, simply sign in with your Cisco account. If you don't yet have a Cisco account, you can sign up.