cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
12241
Views
10
Helpful
8
Replies

Dashboard API - Enable VLANs on new network?

michael.lorincz
Level 2
Level 2

We're trying to import VLANs and Subnets into Meraki with API after we create a new network, also with API. The problem seems to be that by default the new networks are 'vlans disabled' single subnet type network. Is there a way to 'ENABLE VLANS' after the network is created or possibly enable it during network creation via initial API call?

1 Accepted Solution

Accepted Solutions

Dcooper
Cisco Employee
Cisco Employee

Your correct, this is a manual process for now unless you script it out. If your using templates this obviously will not be an issue.

Here is a Python Script to enable VLANS. This is not supported by Meraki Support but will do the trick - https://www.dropbox.com/s/gvefg6i48ll4ltt/enable_vlans.py?dl=0

View solution in original post

8 Replies 8

MilesMeraki
Level 8
Level 8

After creating multiple VLANs via the API doesn't it automatically enable the VLAN functionality on the device?

Eliot F | Simplifying IT with Cloud Solutions
Found this helpful? Give me some Kudos! (click on the little up-arrow below)

Dcooper
Cisco Employee
Cisco Employee

Your correct, this is a manual process for now unless you script it out. If your using templates this obviously will not be an issue.

Here is a Python Script to enable VLANS. This is not supported by Meraki Support but will do the trick - https://www.dropbox.com/s/gvefg6i48ll4ltt/enable_vlans.py?dl=0

Bless you kind sir! Crisis averted! 🙂

Templates are not an option in this case (long story). Thanks again!!

Another quick note: There isn't a easy way in the API or scripting to bulk pull the network names so that is going to be the drawback.

djonesax
Community Member

This script is helpful but I want to run it for 1400 networks versus just one. The part I am struggling with is creating the exact URL when there is a part of the URL is not available in the API.

Example.

https://n##.meraki.com/networknamri/n/xQB--djb/manage/support

Can someone help me figure out how to get a correlation of network names to that text in red with out having to click on 1400 networks?

Thanks,

David

OK, I figured this out. Once logged into the dashboard you can hit this URL to get the list of administered networks. This was a HUGE win for us so I hope it helps someone else.

https://{shardnumber}.meraki.com/manage/organization/administered_orgs

Thanks,

David

Good stuff David! Also as we discussed in email, the new copyFromNetworkId parameter for creating a network can be used to clone from a base network that simply has VLANs enabled already. Take care.

Solutions Architect @ Cisco Meraki | API & Developer Ecosystem

DexterLabora
Cisco Employee
Cisco Employee

Enable VLANs is now a supported endpoint!

Postman Collection - Enable VLANs

Enable/Disable VLANs for the given network

PUT /networks/{{networkId}}/vlansEnabledState