The Meraki Community
Register or Sign in
cancel
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • About Mathias_Morning
Mathias_Morning

Mathias_Morning

Conversationalist

Member since Feb 1, 2018

‎02-13-2018
Kudos given to
User Count
Uberseehandel
Uberseehandel
1
View All

Community Record

4
Posts
0
Kudos
0
Solutions

Badges

1st Birthday
Lift-Off View All
Latest Contributions by Mathias_Morning
  • Topics Mathias_Morning has Participated In
  • Latest Contributions by Mathias_Morning

Re: API - POSTMAN - Adding multiple VLANs with one POST

by Mathias_Morning in Developers & APIs
‎02-02-2018 04:42 AM
‎02-02-2018 04:42 AM
Hi everyone,  I finally managed this issue by a simple bash script and it worked perfectly. All you need is a CSV file with this format : VLAN1,101,10.4.134.0/26,10.4.134.62 VLAN2,102,10.4.134.64/26,10.4.134.126 Which is Vlan_name,vlan_id,subnet,MX_IP   And then create a bash script with this code (admitting that your CSV file is in the same folder and named vlans.scv) : #/bin/bash! for enreg in `cat vlans.csv` do Vlan_name=`echo $enreg | awk -F"," '{ print $1 }'` Vlan_id=`echo $enreg | awk -F"," '{ print $2 }'` Vlan_subnet=`echo $enreg | awk -F"," '{ print $3 }'` Mx_ip=`echo $enreg | awk -F"," '{ print $4 }'` echo "Sending POST request for Vlan $Vlan_id : " curl -L -H 'X-Cisco-Meraki-API-Key: <INSERT_YOUR_KEY_HERE>' -H 'Content-Type: application/json' -X POST --data-binary '{"id":"'$Vlan_id'","name":"'$Vlan_name'","applianceIp":"'$Mx_ip'","subnet":"'$Vlan_subnet'"}' 'https://dashboard.meraki.com/api/v0/networks/<INSERT_YOUR_NETWORK_ID_HERE>/vlans' done   Then execute !   Hopes it can help someone 🙂     ... View more

Re: API - POSTMAN - Adding multiple VLANs with one POST

by Mathias_Morning in Developers & APIs
‎02-01-2018 07:41 AM
‎02-01-2018 07:41 AM
Thanks, I will have a look at all this. I found some really nice python scripts templates that I just have to modify a little bit.     ... View more

Re: API - POSTMAN - Adding multiple VLANs with one POST

by Mathias_Morning in Developers & APIs
‎02-01-2018 05:28 AM
‎02-01-2018 05:28 AM
Thanks for your answer. I wanted to be sure that there is no easiest way before starting to script. Long time not doing it but it's always nice to get back to programming so let's go 🙂 Have a nice day ... View more

API - POSTMAN - Adding multiple VLANs with one POST

by Mathias_Morning in Developers & APIs
‎02-01-2018 02:43 AM
‎02-01-2018 02:43 AM
Hi everyone !   Big user of Meraki for a few month, my organization started to become to big to only use the Web Interface.   So after my first API requests with postman, I am trying to add a lot of VLANS with one click ! It will be helpfull as all my new networks have the same IP addresses logic but I change one number as they are interconnected with a site-to-site VPN.   So the idea is to be able to create 100+ Vlans with one command.   I successfully managed to create one. It's quite simple but no way to create more in one shot.   Am I forced to script it ?    Here is my last idea, based on the format of the result from the GET vlans : [ { "id":54, "networkId": "L_xxx", "name": "testA", "applianceIp": "10.4.54.254", "subnet": "10.4.54.0/24", "dnsNameservers": "upstream_dns" }, { "id":55, "networkId": "L_xxx", "name": "testB", "applianceIp": "10.4.55.254", "subnet": "10.4.55.0/24", "dnsNameservers": "upstream_dns" } ]   If anyone could help me or just tell me that there is no way and that I have to make a script, it will be very nice !   Have a nice day, ... View more
Kudos given to
User Count
Uberseehandel
Uberseehandel
1
View All
Powered by Khoros
custom.footer.
  • Community Guidelines
  • Cisco Privacy
  • Khoros Privacy
  • Privacy Settings
  • Terms of Use
© 2023 Meraki