How to Create a Custom Event
We provide two ways of creating new custom events.
1. Using API requests
It is possible to add new custom types of events using POST/cameras/{CAMID}/event_processing/events/
request.
For example:
curl -X POST "https://web.skyvr.videoexpertsgroup.com:443/api/v2/cameras/237863/event_processing/events/"
-H "accept: application/json"
-H "Content-Type: application/json"
-H "Authorization: Acc ACCESS_TOKEN" -d "{ \"name\": \"custom_event\", \"notify\": true}"
The response contains capabilities of the new event type:
{
"caps": {
"can_be_triggered": false,
"can_record": false,
"can_snapshot": false,
"is_periodic": false
},
"custom": true,
"name": "custom_event",
"notify": true,
"receive": false
}
2. Using our API Python samples
Get camera’s access token. (located in integrations page of Cloud One)
From the directory containing the python samples, call cameras_create_custom_event.py to create a custom event.
python3 ./cameras_create_custom_event.py -a dfasdfasdfasrwecsdcsdf= -e test
Where -a is the camera’s access token and -e is the name of the new event being created.