Create Event
POSThttps://demo.frigate.video/api/events/:camera_name/:label/create
Create Event
Request
Path Parameters
camera_name Camera Namerequired
label Labelrequired
- application/json
Body
source_type object
sub_label object
score object
duration object
include_recording object
draw 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({
"source_type": "string",
"sub_label": "string",
"score": 0,
"duration": 0,
"include_recording": True,
"draw": {}
})
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