cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Snapshot API not working 404

SOLVED
Getting noticed

Snapshot API not working 404

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

1 ACCEPTED SOLUTION

Accepted Solutions
Getting noticed

Re: Snapshot API not working 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

View solution in original post

10 REPLIES 10
Kind of a big deal

Re: Snapshot API not working 404

What are you calling it from?  Code? Postman?

 

Have you tried calling it using the specific shard url?

Getting noticed

Re: Snapshot API not working 404

From code, which one is the shard url?

Kind of a big deal

Re: Snapshot API not working 404

This sounds familiar...

Kind of a big deal

Re: Snapshot API not working 404

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

Kind of a big deal

Re: Snapshot API not working 404

Getting noticed

Re: Snapshot API not working 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

View solution in original post

Here to help

Re: Snapshot API not working 404

Thank you!!!
It would really be nice for this to be added in documentation somewhere.
Kind of a big deal

Re: Snapshot API not working 404

Thanks for reporting back!

Just browsing

Re: Snapshot API not working 404

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......

Just browsing

Re: Snapshot API not working 404

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.

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.