How to update the dot11r for SSID? (python)

SOLVED
FireROR
Conversationalist

How to update the dot11r for SSID? (python)

Hi,

 

I need to update the dot11r settings for my network.

 

The code I used to update the settings are:

response = dashboard.wireless.updateNetworkWirelessSsid(
n['id'], ssid['number'],

ssid['dot11r']= {'enabled': True, 'adaptive': True}
)

 

Python error message is

 

Traceback (most recent call last):
File "/home/user/updatessid.py", line 31, in <module>
response = dashboard.wireless.updateNetworkWirelessSsid(
TypeError: Wireless.updateNetworkWirelessSsid() takes 3 positional arguments but 4 were given

 

I tried to follow the example here

https://developer.cisco.com/meraki/api-v1/#!update-network-wireless-ssid

 

response = dashboard.wireless.updateNetworkWirelessSsid(
    network_id, number, 
    name='My SSID', 
    enabled=True
)

 

What is the correct way to update the dot11r settings?

1 ACCEPTED SOLUTION
alemabrahao
Kind of a big deal
Kind of a big deal

import requests

url = "https://api.meraki.com/api/v1/networks/{networkId}/wireless/ssids/{number}"

payload = '''{
    "dot11w": {},
    "dot11r": { "adaptive": true },
    "oauth": {},
    "localRadius": {
        "passwordAuthentication": {},
        "certificateAuthentication": {
            "clientRootCaCertificate": {}
        }
    },
I am not a Cisco Meraki employee. My suggestions are based on documentation of Meraki best practices and day-to-day experience.

Please, if this post was useful, leave your kudos and mark it as solved.

View solution in original post

9 REPLIES 9
alemabrahao
Kind of a big deal
Kind of a big deal

I think that there is no PAI to update 802.11, look:

 

https://developer.cisco.com/meraki/api/#!update-network-ssid

I am not a Cisco Meraki employee. My suggestions are based on documentation of Meraki best practices and day-to-day experience.

Please, if this post was useful, leave your kudos and mark it as solved.

Sorry I'm worng:

 

https://developer.cisco.com/meraki/api-v1/#!update-network-wireless-ssid

I am not a Cisco Meraki employee. My suggestions are based on documentation of Meraki best practices and day-to-day experience.

Please, if this post was useful, leave your kudos and mark it as solved.

alemabrahao_0-1667502565829.png

 

I am not a Cisco Meraki employee. My suggestions are based on documentation of Meraki best practices and day-to-day experience.

Please, if this post was useful, leave your kudos and mark it as solved.
FireROR
Conversationalist

https://developer.cisco.com/meraki/api-v1/#!update-network-wireless-ssid

 

what's different between your link and mine?

 

Not supported?

alemabrahao
Kind of a big deal
Kind of a big deal

the first link is API v0 second Is v1.

I am not a Cisco Meraki employee. My suggestions are based on documentation of Meraki best practices and day-to-day experience.

Please, if this post was useful, leave your kudos and mark it as solved.
FireROR
Conversationalist

I tried again with new code.

 

response = dashboard.wireless.updateNetworkWirelessSsid(
n['id'], ssid['number'],
dot11r=[{'enabled': True, 'adaptive': True}]
)

 

Here is what I got.

meraki.exceptions.APIError: wireless, updateNetworkWirelessSsid - 400 Bad Request, {'errors': ["'dot11r' must be an object"]}

alemabrahao
Kind of a big deal
Kind of a big deal

import requests

url = "https://api.meraki.com/api/v1/networks/{networkId}/wireless/ssids/{number}"

payload = '''{
    "dot11w": {},
    "dot11r": { "adaptive": true },
    "oauth": {},
    "localRadius": {
        "passwordAuthentication": {},
        "certificateAuthentication": {
            "clientRootCaCertificate": {}
        }
    },
I am not a Cisco Meraki employee. My suggestions are based on documentation of Meraki best practices and day-to-day experience.

Please, if this post was useful, leave your kudos and mark it as solved.

Thank you!

FireROR
Conversationalist

Got it workinig with following code.

 

response = dashboard.wireless.updateNetworkWirelessSsid(
n['id'], ssid['number'],
dot11r={'enabled': True, 'adaptive': True}
)

 

Thank you!

Get notified when there are additional replies to this discussion.