Hello there
I am trying to make a POST request using node to the snapshot API for the MV22 camera
But i only manage to get a 404
This is the URL i am using
```
https://api.meraki.com/api/v0/networks/NETWORK/cameras/SERIAL/snapshot
```
Any help would be appreciated, because i don't find the answer
Solved! Go to solution.
Ok, after using the shard url it started returning a 400, so then I removed the content type application/json and it worked.
This returns me the URL for the snapshot, after trying to make a GET request to this url it gives me a 404 error again. I don't find any documentation at all about how to get this snapshot or what headers does it expect
The problem seems to be that when you request a snapshot, this snapshot is not inmediately available, you have to wait 5 seconds before being able to download it through a GET request.
So what i did is to wait 5 seconds after requesting the snapshot, then fetching it, and it works
To summarize:
- Request the snapshot to the Shard url
- Do not use content type, there is a bug
- Wait 5 seconds
- Download image
What are you calling it from? Code? Postman?
Have you tried calling it using the specific shard url?
From code, which one is the shard url?
It's a more specific one with a number. See the note about "redirect" on this link :
https://documentation.meraki.com/zGeneral_Administration/Other_Topics/The_Cisco_Meraki_Dashboard_API
OK, I remembered slightly wrong. This person was getting a 400, not a 404.
Ok, after using the shard url it started returning a 400, so then I removed the content type application/json and it worked.
This returns me the URL for the snapshot, after trying to make a GET request to this url it gives me a 404 error again. I don't find any documentation at all about how to get this snapshot or what headers does it expect
The problem seems to be that when you request a snapshot, this snapshot is not inmediately available, you have to wait 5 seconds before being able to download it through a GET request.
So what i did is to wait 5 seconds after requesting the snapshot, then fetching it, and it works
To summarize:
- Request the snapshot to the Shard url
- Do not use content type, there is a bug
- Wait 5 seconds
- Download image
Thanks for reporting back!
Hi folks, well, as of today, the API is currently returning a 404 when I perform a GET on the URL of the image returned in the JSON response from the Camera Snapshot API.
I waited much longer than 5 seconds to try to GET the image. The URL to the image was in the format of:
https://spn3.meraki.com/stream/jpeg/snapshot/b9a47b53df1a68b9VHN2Q1NmNlZTYxO......
Not sending the content-type header is not a good idea. If you don't send it the post body is ignored, meaning the timestamp is ignored, so you get a snapshot from now instead of the timestamp you send.