Generate list of public IP's

RJ_1
Here to help

Generate list of public IP's

I'm not sure if this is the easiest way to accomplish this task, but I'm trying to generate a list of Public IP's from each organization's MX we maintain, hopefully in a csv that has the orgs name next to it, or something to that effect. Is this doable across multiple organizations via the api or webapp?

 

I think a list would be very handy in security scanning and general inventory use. Thanks!

5 Replies 5
ShawnHu
Meraki Employee
Meraki Employee

You might want to check this Meraki Tools google sheet plugin. The only thing you need is an API key.

https://workspace.google.com/marketplace/app/meraki_tools/11340767263 

RJ_1
Here to help

Hi Shawn,

 

Thanks for sharing that awesome tool! I've added it into Google Sheets but the API key seems to work only for one organization. Is there a way to run this against each organization?

ShawnHu
Meraki Employee
Meraki Employee

Hi RJ,

 

Yes, you can run it against multiple organizations by using the Looper option. Here is an example to get all uplink statuses from multiple organizations. 

You wouldn't have organization names but with the id you can differentiate them. 

 

ShawnHu_0-1639705758089.png

 

RJ_1
Here to help

Hi Shawn,

 

I think we are getting closer, I was able to generate the api key and use looper. There are the organizations listed inside the Looper drop down, I don't see network ID's. Most of the responses show "API access is disabled for this organization. To make API requests for this organization you must first enable API access." Does this mean I have to enable API access for each organization?

ShawnHu
Meraki Employee
Meraki Employee

Hi RJ,
 You are right, API needs to be toggled per organization. The bonus point is now you can activate the API by using the API. 
 
Use the below endpoints to get your organization IDs first and then enable API on the organization level. (Replace the <key> and {organizationId} with your own values.)
 
curl -L -H 'X-Cisco-Meraki-API-Key:<key>' -H 'Content-Type: application/json' -X GET 'https://api.meraki.com/api/v1/organizations'
 
curl -L -H 'X-Cisco-Meraki-API-Key: <key>' -H 'Content-Type: application/json' -X PUT --data-binary '{"api": {"enabled": true}}' 'https://api.meraki.com/api/v1/organizations/{organizationId}'
Get notified when there are additional replies to this discussion.