Request custom video from device
PUT
/events/custom_clipsSend a request to a camera for video and/or snapshots for a selected date-time window. After the request is sent, it will be processed and the request will be sent to the camera to retrieve the requested media.
Allowed duration can be from 5 seconds to 1 hour between start_ts
and end_ts
. Requested event will upload a video of the requested duration along with a snapshot which is taken from the "center" of the request.
:::info[]
For durations > 5 minutes, the request will be broken up into as many 5-minute duration events as it can, then the remaining will be made into its own event.
:::
After a custom video request is submitted, the server will send the request to retrieve the media from the camera at the nearest opportunity. This event will be added to the event list for the company and can be retrieved using the returned event_id
in the response.
User Role Permissions
The following table shows which user roles are allowed to send requests using this API endpoint.
User Role | Allowed |
---|---|
Partner | |
Partner View | |
Custom Partner | |
Fleet Manager | |
Group Manager | |
User | |
Custom User |
Considerations
Here are some things to consider when implementing the custom video request API endpoint for your application.
By default, cameras ship with a 128 GiB MicroSD and assuming default settings are applied to camera, that gives approximately 70h of continuous recording before the SD card fills.
The setting "Wake-up / Sleep" mode can be enabled for a camera which will allow it to stay connected to the server, even when powered off. When a request is sent to a camera that is in a "Sleep" state, the camera will awake and then process the custom video request.
Request
Unique ID of device
Start date/time for the desired time period.
For duration
d = end_ts
- start_ts
snapshot_only=false
: 5 seconds <= d <= 1 hoursnapshot_only=true
: 5 minutes <= d <= 1 hour
End date/time for desired time period.
Field for adding notes or comments for the event. These will appear in the Notes of the event in the RoscoLive Events page.
Field for adding a data object as stringified JSON to store a set of values for any additional metadata required.
Field for adding a custom event type to display in the RoscoLive UI, otherwise the event will display "Custom Event"
Request samples
Responses
Request metadata object
HTTP status code returned by server
Contains response data
ID of request
Warning description
"OK" if request successful, otherwise "Failed"
{
"meta": {
"code": 200
},
"response": {
"request_id": 1908766,
"warning": "request exists"
},
"result": "OK"
}