02-07-2024 01:20 AM
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.
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.
02-07-2024 02:22 AM
I am also having the same issue whether http requesting or browsing to the endppoint
02-07-2024 03:39 AM
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
02-07-2024 06:03 AM
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
02-07-2024 04:06 AM
I am using the Live one https://api.meraki.com/api/v1/
02-07-2024 05:55 AM
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.
02-07-2024 04:21 AM
I was missing X-Cisco-Meraki-API-Key as header when using the Developer Site that's why I was getting the 404 error.
When added, now everything works fine.
02-07-2024 04:41 AM
Yeah - you definitely need that... (glad to see you obfuscated your actual key!)
02-07-2024 07:21 AM
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.
10-13-2024 06:18 PM
I’m reaching out to get some additional insights into an issue I’m encountering with the Meraki API. I’m facing consistent 404 errors when trying to retrieve the Network ID for my organization, and I’d like to clarify a few points to see if you might have any clues that could help.
Full Administrator Access: I’ve verified that I have full administrator rights on my sandbox environment, so permissions should not be the issue.
API Key Testing: I have tried using two different API keys with the same result. Both keys work fine for retrieving the organization ID, which confirms they have some access. However, I receive a 404 error specifically when trying to access the /networks endpoint for both my Production organization ID and the sandbox organization ID.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide