Cannot create network through Meraki Python API

Solved
hcoq
Conversationalist

Cannot create network through Meraki Python API

Hi!

 

I'm trying to create a network within my organization through the python API but I get this message and I cannot figure why is this method not recognized as it is in the documentation.

 

hcoq_0-1625559413851.png

 

I have tried to update my pip installer, and upgrade the meraki library but no better results.

I am creating/updating organizations well with my code but I cannot create a Network, and that is a problem.

Here is my code for the creation of network :

 

hcoq_1-1625559671209.png

 

Thanks in advance for your answers!

 

 

 

1 Accepted Solution
AutomationDude
Building a reputation

Hello hcoq,

 

Nice method you got there!

 

I believe you're running into an error here because the call is dashboard.organizations instead of dashboard.networks (Naturally because we are creating this network at the org level).

 

Here's a link to the API endpoint:

 

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

 

I may be getting ahead of myself here, but you may run into further errors because you seem to be inputting net_type and tags as strings but the expected input for this is a list. You can use the split() method to turn a string to a list.

 

Hope this helps, everything else looks great!

 

View solution in original post

2 Replies 2
AutomationDude
Building a reputation

Hello hcoq,

 

Nice method you got there!

 

I believe you're running into an error here because the call is dashboard.organizations instead of dashboard.networks (Naturally because we are creating this network at the org level).

 

Here's a link to the API endpoint:

 

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

 

I may be getting ahead of myself here, but you may run into further errors because you seem to be inputting net_type and tags as strings but the expected input for this is a list. You can use the split() method to turn a string to a list.

 

Hope this helps, everything else looks great!

 

Thank you, that solves my problem! I have been consulting the older documentation so I think this is the main source of my problems. I did get that tags error so it's corrected all right now 🙂

Get notified when there are additional replies to this discussion.