Getting Country code information from Meraki API

Solved
CCNA
Conversationalist

Getting Country code information from Meraki API

So currently at my Job, I am required to do some boring security Audit where I look over all our Meraki devices network traffic analytics. What I'm looking for in that audit is any traffic that is not from the US or Canada. I currently have to this manually which takes quite a bit of time out of my day. I'm trying to build a script in python that does this task for me and I've been able to get certain traffic fields but can't figure out how to get the country code where traffic is coming from. This is what I've been messing around with:link.

Would love any help on other ways I could possibly do this. 

Thanks!

1 Accepted Solution

Hi @CCNA (slick name, btw!),

 

The screenshot is super helpful. Unfortunately I don't think this is exposed via API at the moment--however, you can work with your account rep to open a feature request for this.

 

A good way in general to check for these things is to check the API Index, where you could type in "country" as a response attribute and find all the operations that return it. This is how I for example checked whether this was exposed. 

 

Kindly,

John

View solution in original post

7 Replies 7
ww
Kind of a big deal
Kind of a big deal

I have never seen a country code in meraki. Did you find that info on the dashboard?

ammahend
Building a reputation

Network-Wide >>General>>County/Region

ammahend_0-1724287291968.png

 

ammahend
Building a reputation

sorry I did not read the original response.

CCNA
Conversationalist

CCNA_0-1724337013656.pngCCNA_1-1724337116940.png

You can see in this example there a field of country/region that I want to pull from the API. But not sure how. 

Hi @CCNA (slick name, btw!),

 

The screenshot is super helpful. Unfortunately I don't think this is exposed via API at the moment--however, you can work with your account rep to open a feature request for this.

 

A good way in general to check for these things is to check the API Index, where you could type in "country" as a response attribute and find all the operations that return it. This is how I for example checked whether this was exposed. 

 

Kindly,

John

CCNA
Conversationalist

Thanks John, I'm sort of in a intern role (hence which is why I was given this task). But i'll talk to our rep to see if this is something possible. Thanks for your help! very new to this so your response is very helpful. Thank you!

ammahend
Building a reputation

I think it may be much easier analyzing this on the perimeter firewall

Get notified when there are additional replies to this discussion.