Help using python for updating an access point management interface

Solved
Captain
Getting noticed

Help using python for updating an access point management interface

Dear Members,

 

Trying to update an access point device management interface by using the function  

 

import meraki

dashboard = meraki.DashboardAPI(api_key="my_api_key")

payload = {"wan1": {
"usingStaticIp": False,
"vlan": "100"
}

result = dashboard.devices.updateDeviceManagementInterface(serial_key, payload)

print(result)

The result is the following output:

 

 
updateDeviceManagementInterface() takes 2 positional arguments but 3 were given
 
Process finished with exit code 0
 

 

 

When running the function below

 

result = dashboard.devices.getDeviceManagementInterface(serial_key)
print("Device Management Interface:")
print(result)

 

The result is the following output:

 

 
Device Management Interface:
{'wan1': {'usingStaticIp': False, 'vlan': None}}
 

 

It looks like I am using the correct structure but it doesn't work.

 

 

This are the arguments that the function expects:

Captain_0-1629910612176.png

 

 

Can you please help me find and correct it? 

 

 

 

Best Regards,

1 Accepted Solution
ww
Kind of a big deal
Kind of a big deal

import meraki

dashboard = meraki.DashboardAPI(api_key="my_api_key")
serial_key= "xxxxxxx"

payload = {
"usingStaticIp": False,
"vlan": "100"
}

result = dashboard.devices.updateDeviceManagementInterface(serial_key, wan1=payload)

print(result)

Cant tell exactly, but it thinks the payload= are 2 args now and with the serial that makes 3

But If you move wan1=  to the result it works.

View solution in original post

5 Replies 5
ww
Kind of a big deal
Kind of a big deal

Try add the

"wanEnabled": "not configured",

Captain
Getting noticed

Hi,

 

Added it and getting the same message:

 

updateDeviceManagementInterface() takes 2 positional arguments but 3 were given
Process finished with exit code 0
ww
Kind of a big deal
Kind of a big deal

import meraki

dashboard = meraki.DashboardAPI(api_key="my_api_key")
serial_key= "xxxxxxx"

payload = {
"usingStaticIp": False,
"vlan": "100"
}

result = dashboard.devices.updateDeviceManagementInterface(serial_key, wan1=payload)

print(result)

Cant tell exactly, but it thinks the payload= are 2 args now and with the serial that makes 3

But If you move wan1=  to the result it works.

PhilipDAth
Kind of a big deal
Kind of a big deal

There seems to be a closing brace missing.

 

payload = {"wan1": {
"usingStaticIp": False,
"vlan": "100"
}

 

Should probably be:

 

payload = {"wan1": {
"usingStaticIp": False,
"vlan": "100"}
}

 

Captain
Getting noticed

Many thanks, that was it!

 

Get notified when there are additional replies to this discussion.
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.
Labels