Correct syntax for API call

Solved
AutomationDude
Building a reputation

Correct syntax for API call

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
JasonM
Meraki Employee
Meraki 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
JasonM
Meraki Employee
Meraki Employee

Hello @AutomationDude,

 

You'll want to pass the parameters as illustrated:

 

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

AutomationDude
Building a reputation

Hey @JasonM,

 

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
Building a reputation

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

No worries! Glad you got it working.

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.