How Does Snapshot API Work?

Solved
onyeze
New here

How Does Snapshot API Work?

Please I'm trying to understand how the Snapshot API works for the Meraki Cameras.
 
1. Do I require access to the Meraki dashboard all the time I have to use the Snapshot API like generating a snapshot of what the camera sees at the specified time and return a link to that image? 
 
2. What are the Snapshot API calls flows or procedures? 
 
3. What happens if there is loss of Internet access and the API Client can’t reach Meraki Dashboard or the Dashboard can’t reach the cameras? 
 
3. Can snapshots be taken when Internet access is restored for past recordings?
 
I would appreciate any documentations or diagrams that can aid my understanding. 
 
Many thanks
1 Accepted Solution
BrechtSchamp
Kind of a big deal

Indeed, internet connectivity is required for two things:

  • For the API client to reach the dashboard API
  • For the dashboard to reach the camera

If either of those things is not available, the snapshot will not work. But them being unavailable doesn't stop the camera from recording as it records locally to it's on-board SSD drive.

 

As soon as both are available (again) the snapshot can be taken. Via the timestamp parameter of the API you can specify from which point in time you need a snapshot. If there is footage from that time, the call will be successful. If not, you'll get an error. There are a number of reasons why the footage could be unavailable, a few examples:

  • camera wasn't scheduled to record
  • camera is set to motion based recording and there was no movement at that time(range)
  • camera was offline (e.g. power problem)
  • timestamp is too far back in time and that footage has already been deleted

View solution in original post

3 Replies 3
BrechtSchamp
Kind of a big deal

Let's take these one at a time:

  1. The API client uses API access keys to get access to the API. An API key is linked to the account that generated the key and inherits it's access rights. The advantage of the fact that it's a separate key is that you can change your password every once in a while without impacting your scripts' access.
  2. The snapshot API call is:

    POST /networks/[networkId]/cameras/[serial]/snapshot

    Documentation can be found here: https://documenter.getpostman.com/view/897512/meraki-dashboard-api/2To9xm?version=latest#53147d40-de...
  3. If the client has no internet access you'll get an exception or an error. It'll be different depending on the technology you're using to do the API call. If the dashboard can't reach the camera or if there is no footage stored for the timestamp you specify, you will also get an error.
  4. The camera doesn't need internet connectivity to record. So once the connectivity is restored the snapshot can still be taken.

Hope that answers your questions!

onyeze
New here

Thanks for your quick response and explanations which I found very useful. I guess it has to do with the baseurl which is a public endpoint in the POST request. 

 

POST "{{baseUrl}}/networks/{{networkId}}/cameras/{{serial}}/snapshot" \

 

If internet connectivity is restored can I take snapshot of past recordings. E.g. If Internet access is restored at 16:00, can I take snapshot of recordings in the past say at 15:30? 

 

Many thanks 

BrechtSchamp
Kind of a big deal

Indeed, internet connectivity is required for two things:

  • For the API client to reach the dashboard API
  • For the dashboard to reach the camera

If either of those things is not available, the snapshot will not work. But them being unavailable doesn't stop the camera from recording as it records locally to it's on-board SSD drive.

 

As soon as both are available (again) the snapshot can be taken. Via the timestamp parameter of the API you can specify from which point in time you need a snapshot. If there is footage from that time, the call will be successful. If not, you'll get an error. There are a number of reasons why the footage could be unavailable, a few examples:

  • camera wasn't scheduled to record
  • camera is set to motion based recording and there was no movement at that time(range)
  • camera was offline (e.g. power problem)
  • timestamp is too far back in time and that footage has already been deleted
Get notified when there are additional replies to this discussion.