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

MV snapshot API not consistent

Highlighted
Here to help

MV snapshot API not consistent

Hi, I'm working with MV snapshot API but I got non consistent picture.

 

If I try to get a snapshot on the past using this url:

 

{{baseUrl}}/networks/{{networkId}}/cameras/{{serial}}/snapshot (with proper values set)

 

and with this body (an example)

 

{
"timestamp": "2019-03-13T12:01:58+00:00"
}
 
I got a snapshot with non person inside, but if I view the video at the same time point I have a person. I have no way to identify the real timespan of the snapshot as this would require to have a timestamp overlay on the picture (which id desirable) or the cam looking at a precise clock to compare time differences.
 
I suspect the snapshot takes the nearest keyframe from the video which is not always the required timestamp.
10 REPLIES 10
Meraki Employee

Re: MV snapshot API not consistent

Hi webfrank, this issue should be fixed. Are you still seeing snapshots returning a different photo/frame when passing in a historical timestamp, from what you see in dashboard?

Here to help

Re: MV snapshot API not consistent

Hi, with latest firmware, 3.28, I can retrieve the correct snapshot. I cannot get it immediately but I should wait about 3 minutes before calling the api otherwise I got error. 

Meraki Employee

Re: MV snapshot API not consistent

I'm testing on 3.29, and the wait time goes down to about 30 seconds. If you need something faster than that, then make the API call without passing in the historical timestamp parameter.

Getting noticed

Re: MV snapshot API not consistent

Hello @chengineer do i need to enable something to be able to call the snapshot API? I only get 404

Meraki Employee

Re: MV snapshot API not consistent

Hi @Rafaetero, make sure your API key has write access (since it's a POST call), and also in the headers, only pass in the "X-Cisco-Meraki-API-Key" key/value, and not "Content-Type": "application/json" (since there's a bug if you do).

Getting noticed

Re: MV snapshot API not consistent

Sorry @chengineer  but what i am saying is that when the API returns the snapshot URL I can not fetch that image. I can only access to it via a browser. I can not make a http get request to the image url and get it back, do you have any example of that? 

 

 

Getting noticed

Re: MV snapshot API not consistent

Fetching any image on the internet works with my code, but the Snapshot URL only returns HTML, not an image

Getting noticed

Re: MV snapshot API not consistent

 I don't know why, it started working. Now it returns the image and not the HTML anymore

Getting noticed

Re: MV snapshot API not consistent

Found the problem, i can only get the image through code after i visited it through the browser...

Getting noticed

Re: MV snapshot API not consistent

Nop! I got some support, it happens that the image takes 5 seconds to be generated

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.