Use this API to make a Recording Capture Request
This API allows you to Request a Recording from your Camera. You can request historical Recordings or real-time Recordings. This API will generate an Event in the Smarter AI cloud, associating the requested recordings with that Event for easier access and playback from the Smarter AI Dashboard.
The process is asynchronous so the API will return a request ID. You can use this request ID to poll your request status using the Recording Request Status API or subscribe to our Webhooks to receive the request status asynchronously.
Once you make the request, it can be served immediately or queued based on the camera state.
- Online and Not in the parking mode - The request will be executed immediately.
- Online but in the parking mode - The request will be queued. Smarter AI Cloud will wake the camera up and execute the request.
- Offline (Irrespective of parking mode state) - The request will be queued. Once the camera comes back online, the request will be executed.
Queue Constraints
- Smarter AI Service will queue at most 16 requests per camera.
- The default queue time is 24 hours (1440 minutes). You can set other queue times from 1 minute to 5000 minutes. The request will expire after this time is over. In this scenario, Smarter AI cloud will send a Webhook notification with the status
EXPIRED
.
Retry Mechanism
- After sending a recording request to the camera, the service will re-add the request to the queue if the camera responds that the device is busy.
- At 10-minute intervals, the service will then retry sending the request to online cameras and not in parking mode.
Recording request status
Your Recording Request can have the following status throughout its lifecycle.
SENT
- The request is sent to the Camera.ONGOING
- The request is being processed by the Camera.COMPLETED
- The request has been completed. You can play the Event or retrieve the videos.FAIL
- The request has failed. Check thefailureReason
field in the Recording Request status API or Webhook message for details.DUPLICATE
- A request for the same time range for the same camera exists. The Service will return the duplicate request ID in therequestId
field over the Recording Request status API or Webhook message.QUEUED
- The request has been queued to execute later.EXPIRED
- The request wasQUEUED
, but the queue time is over.
Using the label field
- The label field allows you to exercise custom behavior for your Recording Request. Smarter AI can create different Triggers with a set of labels that you can pass in this parameter. The API will fire a Trigger-based Event, giving the freedom to associate all features a Trigger-based Event can have, such as voice alert or chime. The Trigger-based Event is always real-time, so it will ignore the
startTimestamp
.