Complete newb, and new to using API's. Using Postman, and made it through the Meraki lab pretty decently; however, to run commands against our organizations, networks, etc. what is the proper URL for the GET command? I have the OrgID, and tried using basic Auth, but I still receive 404 Error message?
Solved! Go to Solution.
My preferred method is to test a query in postman. Once I'm getting the desired result I then click the small orange 'Code' link in the top right of postman and it'll bring up a box. Then you can click the drop-down and select the language you want to use (HTTP, Python, PHP, Java, etc...) and it'll generate a code snippet for you to use.
Based on the documentation I would say you need to use the https://api.meraki.com/api/v0? address.
Actually this is even better documentation on how to get setup to use the API.
I'll throw this out there too just in case it's relevant.
404: Not found- No such URL, or you don't have access to the API or organization at all
If you're getting a 404 you may have the correct URL but you may not be using the correct API key, or you're sending it incorrectly. If you are using https://api.meraki.com/api/v0? and still getting a 404 then check this.
I believe you need to verify that you have the API enabled in the organization and that you are using the correct API key. I've seen both of these give 404 errors with the API.
I have full access administrative privileges, so I know that's not the issue. I'm using the following GET string:
Value: <my api key>
Authorization is set to: inherit auth from parent
I'm wondering if this needs to be changed to Basic Auth and enter my username & password, but when I do that, there's no change in the output.
Auth should be "no auth" - at least that's what I use.
Just because you have full admin privilege, doesn't mean you have API access. You have to enable that separately under Organization->Settings, I believe.
Good eye @jdsilva
My original screenshot had the right variables for reference as well. The only things I changed was the xxx for security.
@Adam thanks dude. I got lucky there. I've been trying to learn myself some Python this week and it was just Monday I was playing around with the API a bit. Last week I never would known that 🙂
Agreed, making better use of the API stuff has been looming on my todo list for a while now. I'd like to build some internal dashboards to monitor network uplink status, WAN IPs, highest traffic clients in a short time period, offline devices etc.
That is my goal as well, and now that I have API access I can start playing around. I plan on moving away from Postman and utilizing PS instead.