cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3600
Views
4
Helpful
4
Replies

Correct syntax for API call

AutomationDude
Level 5
Level 5

Hey guys,

Trying to use this API call:

https://developer.cisco.com/meraki/api-v1/#!unbind-network

Need some guidance on how to include the optional retainConfigs: true boolean. I've tried a variety of different formats, all of which are leading to different errors. I'm sure there's a correct way to enter this, I just have no idea what it is.

Here is what I'm currently working with:

dashboard.networks.unbindNetwork(
network_id, { "retainConfigs": True }
)

If someone who's used optional params before could offer some guidance on the correct syntax for this API call, it would be much appreciated. Thank you.

1 Accepted Solution

Accepted Solutions

JasonMo
Cisco Employee
Cisco Employee

Hello @AutomationDude,

You'll want to pass the parameters as illustrated:

dashboard.networks.unbindNetwork(networkId, retainConfigs=True)

View solution in original post

4 Replies 4

JasonMo
Cisco Employee
Cisco Employee

Hello @AutomationDude,

You'll want to pass the parameters as illustrated:

dashboard.networks.unbindNetwork(networkId, retainConfigs=True)

Hey @JasonMo,

I did try that as well, but it results in the following error:

TypeError: unbindNetwork() got an unexpected keyword argument 'retainConfigs'

Any ideas on what I could be doing wrong?

AutomationDude
Level 5
Level 5

Nevermind, I just had to update my SDK. Excuse my stupidity.

No worries! Glad you got it working.