Skip to main content

Create manual event

POST 

https://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

Body

    sub_label object
    anyOf
    string
    score object
    anyOf
    number
    duration object
    anyOf
    integer
    include_recording object
    anyOf
    boolean
    draw object
    anyOf
    object
    pre_capture object
    anyOf
    integer

Responses​

Successful Response

Schema
    successSuccess (boolean)required
    messageMessage (string)required
    event_idEvent Id (string)required
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"))
Request Collapse all
Base URL
https://demo.frigate.video/api
Parameters
— pathrequired
— pathrequired
Body
{
  "sub_label": "string",
  "score": 0,
  "duration": 0,
  "include_recording": true,
  "draw": {},
  "pre_capture": 0
}
ResponseClear

Click the Send API Request button above and see the response here!