Get preview clips for time range
GEThttps://demo.frigate.video/api/preview/:camera_name/start/:start_ts/end/:end_ts
Gets all preview clips for a specified camera and time range. Returns a list of preview video clips that overlap with the requested time period, ordered by start time. Use camera_name='all' to get previews from all cameras. Returns an error if no previews are found.
Request​
Path Parameters
camera_name objectrequired
start_ts Start Tsrequired
end_ts End Tsrequired
Responses​
- 200
- 422
Successful Response
- application/json
- Schema
- Example (auto)
Schema
- Array [
- ]
cameraCamera (string)required
Camera name for this preview
srcSrc (string)required
Path to the preview video file
typeType (string)required
MIME type of the preview video (video/mp4)
startStart (number)required
Unix timestamp when the preview starts
endEnd (number)required
Unix timestamp when the preview ends
[
{
"camera": "string",
"src": "string",
"type": "string",
"start": 0,
"end": 0
}
]
Validation Error
- application/json
- Schema
- Example (auto)
Schema
detail object[]
{
"detail": [
{
"loc": [
"string",
0
],
"msg": "string",
"type": "string"
}
]
}
- python
- nodejs
- javascript
- curl
- rust
- HTTP.CLIENT
- REQUESTS
import http.client
conn = http.client.HTTPSConnection("demo.frigate.video")
payload = ''
headers = {
'Accept': 'application/json'
}
conn.request("GET", "/api/preview/:camera_name/start/:start_ts/end/:end_ts", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
ResponseClear