Getting 404 Not Found when using Meraki Developer Hub

bbyw
Conversationalist

Getting 404 Not Found when using Meraki Developer Hub

Hello!

I'm trying to write a script in Python for my organization that will use Meraki API.

 

However, since yesterday, I've been running into one issue. Namely when I try to use the Meraki Developer Hub site I'm getting all the time the 404 Not Found response.

bbyw_0-1707297551835.png


I'm using correct organization ID as when I run some simple script locally from my computer I'm getting some results.

What could be the issue? I've been researching this topic and saw similar but could not find any answer that would enable me to use the Developer Hub.

 

8 Replies 8
Ralph-AprolisUK
Just browsing

I am also having the same issue whether http requesting or browsing to the endppoint

GreenMan
Meraki Employee
Meraki Employee

Is this a particular problem with a specific endpoint - or all endpoints?

I've just been running a few basic test calls via the developer Hub and they appear to work fine

If you're using a Python script, I'm not sure how the Develop Hub page is involved..?   Unless maybe you're separately testing calls which you later use in your script, perhaps

We are able to get the API-Key fine, but when querying devices the request is

 

Method: GET, RequestUri: 'https://api.meraki.com/api/v1/organizations/xxxxx/devices', Version: 1.1, Content: <null>, Headers:
{
X-Cisco-Meraki-API-Key: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Accept: application/json
}

 

we are using C#.net and passing the API-key and organisationId

 

The response is Response status code does not indicate success: 404 (Not Found).<br>Response status code does not indicate success: 404 (Not Found). https://api.meraki.com/api/v1/organizations/xxxxxx/devices

Ralph-AprolisUK
Just browsing

I am using the Live one https://api.meraki.com/api/v1/

404 is a pretty general error - you may need to post your whole call for people to advise.  The original question here was specific to the Developer Hub page, where there used to be a more obvious option for including your own API key in the call (which is essential, in any call, of course).   Remember to hide the API key itself, if you do post.

bbyw
Conversationalist

I was missing X-Cisco-Meraki-API-Key as header when using the Developer Site that's why I was getting the 404 error.

 

bbyw_0-1707308500583.jpeg

 

 

When added, now everything works fine.


GreenMan
Meraki Employee
Meraki Employee

Yeah - you definitely need that...   (glad to see you obfuscated your actual key!)

This is a frequent issue lately ever since we made this change back in Nov 2023. 

 

"API interactive Documentation update


Improved security by providing test keys to run request against the API and restricting user sensitive API keys to be pasted in the documentation."

 

The default API key is for a sandbox environment Org

 

For example this call works https://developer.cisco.com/meraki/api-v1/get-organizations/ because it simply returns the Org the API key has access to.

 

"id": "1215707",
"name": "API Demo Organization"

 

But when you run other endpoints that specify an Org, networks, etc that API key of course wouldn't work in your own Org. So, as @bbyw mentioned you need to add your API key if you want to use the dev site against your own Org. 

 

One more example using the get Org networks call. If you put your Org ID in it will produce a 404 error because the default API doesn't have access to your Org. If you instead used the demo Org ID mentioned above 1215707 the call works as expected.

Ryan / Meraki Solutions Engineer

If you found this post helpful, please give it Kudos. If my answer solves your problem please click Accept as Solution so others can benefit from it.
Get notified when there are additional replies to this discussion.
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.