Search for MAC or IP addr in organization

dbd
Comes here often

Search for MAC or IP addr in organization

Perhaps this was done already but I'm looking for an API that can retrieve network id with a given MAC or IP address (WAN/LAN) in organization? Is there such an API?

 

Thanks in advance!

7 Replies 7
jdsilva
Kind of a big deal

Nope, that API endpoint does not exist.

 

You'd have to grab every device in the Org (https://api.meraki.com/api_docs#return-the-inventory-for-an-organization) and then grab every client for each device (https://api.meraki.com/api_docs#list-the-clients-of-a-device-up-to-a-maximum-of-a-month-ago) until you find it.

 

Or, you could grab every network in an Org (https://api.meraki.com/api_docs#list-the-networks-in-an-organization) and then list every client in each network (https://api.meraki.com/api_docs#list-the-clients-that-have-used-this-network-in-the-timespan) until you find your client.

 

😞

MarkD_BT
Getting noticed

I can confirm this does work utilising the method from @jdsilva  I have created a script in powershell that does this but as stated it takes a long time to process.. Which is possibly the way my script is written but it works for searching for mac's at least. I search org > network > device then search for clients on the security appliance. We do have 350 sites to search through. You can take that as a basis on whether it is worth setting up. It has allowed us to find some user's who were serial bandwidth hogs and locate which sites they had been to.  

TonyC
Meraki Employee
Meraki Employee

@dbd Could you elaborate on what you are trying to do, create or build with our API? Any details would be appreciated. We're considering a feature that that matches what you're asking for.

Thanks,
Tony
dbd
Comes here often

First of all, thanks to everyone's response.

 

@TonyC 

I used Postman to send "API" request to get network information such as networks, devices, static routes, etc. My question: is it possible to create/ build / scripting an API (using Postman if possible)  to obtain network id  info with a given known IP/MAC address within organization? Hope it clear...

 

Thanks.

Steinbep
Getting noticed

This is an older piece of code but should get you what you need. 

 

https://github.com/steinbep/Meraki-API---Python/blob/master/find_machine.py

dbd
Comes here often

Thanks @Steinbep . With my very limited knowledge of python I think your recommendation of python script may work. now I gotta go to figure out how to run a python script which i'd never done it before 🙂 .

Steinbep
Getting noticed

@dbd @it will work. It’s what I use. You just need the api key.
 And org id. You can run this from idle or any other ide you want. 

Get notified when there are additional replies to this discussion.