Create manual event
POSThttps://demo.frigate.video/api/events/:camera_name/:label/create
Creates a manual event in the database. Returns a success message or an error if the event is not found. NOTES:
- Creating a manual event does not trigger an update to /events MQTT topic.
- If a duration is set to null, the event will need to be ended manually by calling /events/{event_id}/end.
Request​
Path Parameters
camera_name Camera Namerequired
label Labelrequired
- application/json
Body
sub_label object
score object
duration object
include_recording object
draw object
pre_capture object
Responses​
- 200
- 422
Successful Response
- application/json
- Schema
- Example (auto)
Schema
successSuccess (boolean)required
messageMessage (string)required
event_idEvent Id (string)required
{
"success": true,
"message": "string",
"event_id": "string"
}
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
import json
conn = http.client.HTTPSConnection("demo.frigate.video")
payload = json.dumps({
"sub_label": "string",
"score": 0,
"duration": 0,
"include_recording": True,
"draw": {},
"pre_capture": 0
})
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
conn.request("POST", "/api/events/:camera_name/:label/create", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
ResponseClear