cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
4554
Views
2
Helpful
9
Replies

How to update the dot11r for SSID? (python)

haixiangwang
Visitor

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

Accepted Solutions

aleabrahao
Meraki Community All-Star
Meraki Community All-Star
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 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

aleabrahao
Meraki Community All-Star
Meraki Community All-Star

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 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.

aleabrahao
Meraki Community All-Star
Meraki Community All-Star

Sorry I'm worng:

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

I am not a Cisco 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.

aleabrahao
Meraki Community All-Star
Meraki Community All-Star

image.png

I am not a Cisco 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.

haixiangwang
Visitor

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

what's different between your link and mine?

Not supported?

aleabrahao
Meraki Community All-Star
Meraki Community All-Star

the first link is API v0 second Is v1.

I am not a Cisco 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.

haixiangwang
Visitor

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"]}

aleabrahao
Meraki Community All-Star
Meraki Community All-Star
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 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!

haixiangwang
Visitor

Got it workinig with following code.

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

Thank you!