cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

REST API help

Highlighted
Conversationalist

REST API help

Hello everyone,

 

My apologies, I am very new to using APIs and I have reviewed the Dashboard API doc but am still unable to figure out how to get the results I need.

 

All I need to do is to produce a report that displays the subnet for each of our networks, name of the network, and filtered for only VLAN 1.

 

Thanks everyone for your help,

Tom

3 REPLIES 3
Highlighted
Meraki Employee

Re: REST API help

Hi @TommyD not sure exactly what type of report you're after and which doc you reviewed, but it wouldn't be in the "Networks" section of the API docs, that refers to Dashboard Networks and their properties.  What you probably need to leverage is the "List the VLANs for this network" or "Return a VLAN" API calls which include subnet info in the returned data.  

Highlighted
Conversationalist

Re: REST API help

Hello,

 

Thank you for your help,  The purpose of trying to generate a json or if possible a CSV export is we are using another product called DCRUM, which we are needing to import all of the locations (Network Names) and their corresponding subnets, but each Network has several subnets associated to them.  We only need the ones filtered on VLAN 1.   I can't find a report that lists the following

 

Subnet,NetworkName,VLAN

111.222.333.0,MyNetwork,1

 

I hope this helps, thanks again,

Tom

Highlighted
Meraki Employee

Re: REST API help

Sounds like you might need to use one API call to list the networks in an organization, and then run a loop to make a 2nd API call for each  returned network to list the VLANs for each network but only process the VLAN 1 info.  You should be able to grab your organization id by going to https://dashboard.meraki.com/api/v0/organizations in a browser where you're logged into Dashboard.  Once you have your Org ID, you could use the GET https://dashboard.meraki.com/api/v0/organizations/{{organizationid}}/networks and it would return a list of each network in that Org, from there you could gather the network names.  Then for each network that got returned, there would be a unique networkId and for each network you could use GET https://dashboard.meraki.com/api/v0/networks/{{networkId}}/vlans which should return a list of all VLANs for each network, and you could just process the single VLAN with "id":1 for VLAN 1 and skip the rest.  The returned information includes the subnet as well.  Hope that helps a little but I'd suggest opening a case with Meraki Support to assist with getting started.

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.