cancel
Showing results forĀ 
Search instead forĀ 
Did you mean:Ā 
cancel
59
Views
0
Helpful
1
Replies

Get Snapshot Image

Elanp
Community Member

I am able to generate a snapshot of a camera using the /devices/{serial}/camera/generateSnapshot endpoint and receive a 202 response with a snapshot url and expiry time. However when I make a GET request to the snapshot url that was returned, it gives me a 400 error with a response of

'<?xml version="1.0" encoding="iso-8859-1"?>\n<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"\n "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\n<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">\n <head>\n <title>400 Bad Request</title>\n </head>\n <body>\n <h1>400 Bad Request</h1>\n </body>\n</html>'

How do I get the actual image bytes once it is generated?

Thank you

1 Reply 1

Philip D'Ath
Meraki Community All-Star
Meraki Community All-Star

I find that the snapshot is not available immediately after calling generateSnapshot.  You have to wait for the camera to generate it and then upload it.  Think of generateSnapshot more like a queued request.

You'll need to implement a delay and retry logic to fetch it.