Create an event

Posts one event of an event tag: something that happened in your system at a given time, in view of one camera. Lumana stores it for search and, when an alert is configured on this event tag and this camera, raises an alert in alert monitoring.

Input.

  • eventTypeId: the _id of the event tag, shown as Event type ID under Database → Event tags in Lumana.
  • cameraId: the camera whose video shows the event. It must be a camera of your organization.
  • orgId: the id of your organization, the one the credentials belong to.
  • timestamp: when the event happened, Unix epoch MILLISECONDS, UTC. Omitted, the time Lumana receives the request.
  • fields: the values of the event tag fields, keyed by field name, for example { "receiptId": "R-1042", "amount": 54.9, "refund": true }.

Response. { "success": true } once the event is accepted. Alerts are raised afterwards: the response does not say whether one was.

Notes. eventTypeId and fields are not checked against your event tags: an event with an unknown eventTypeId is accepted and raises no alert, and field values are stored as sent.

Raise an alert in alert monitoring

  1. Create the event tag in Lumana under Database → Event tags → Create event tag, or with Create an event tag. Give it a name, a video length and up to 10 fields, then note its id: the Event type ID column of the event tags list, or _id in the response.
  2. Create the alert in Lumana under Alerts → Configure alerts. Choose the category Integrations and the type Event tag, then complete the sentence When (event tag) triggered on (camera), wait (duration): pick the event tag, the camera your events are posted for, and how long to wait before the alert is raised (1 to 500 seconds, minutes or hours; 10 seconds by default). Under Then, add the actions you want, such as notifications. Name the alert and save it. The default configuration shows the alert in alert monitoring; with a custom configuration, keep Display alert → Alert page on.
  3. Post events with Create an event: eventTypeId is the event tag id, cameraId the camera chosen in the alert, orgId your organization id, and fields the values of the event tag fields.
  4. Watch alert monitoring under Alerts → Monitoring. Each event raises an alert on that camera once the wait has passed; the alert time is the event timestamp plus the wait.

Rules that decide whether an event raises an alert:

  • The alert must be enabled and match both the event tag and the camera of the event. Events of the same event tag on other cameras are stored and searchable but raise no alert: create one alert per camera.
  • Every matching event raises its own alert. Field values are not conditions of the alert and there is no de-duplication, so send only the events you want alerts for.
  • Events whose fields contain doorStatus: "close" or type: "lock.locked" (in any letter case) never raise an alert.
  • Notifications are not sent for an alert older than the organization's notification time limit, 15 minutes unless changed. Post events as they happen: a late event still raises an alert, without notifications.
  • The alert message is Event tag detected unless you write your own in the alert's custom configuration (Alert message). It can use the variables {{event_tag_name}}, {{event_tag_id}} and {{event_fields}} (every field value, as name: value, name: value).

Required scope: write:custom-event-instances

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params
string
required

Id of the camera whose video shows the event; a camera of your organization. An alert is raised only on the camera chosen in the alert.

string
required

Id of the event tag the event belongs to: its _id, the Event type ID under Database → Event tags in Lumana.

fields
object

Values of the event tag fields, keyed by field name: text as a string, true/false as a boolean, number and decimal as a number. Stored as sent, not checked against the event tag.

string
required

Id of your organization, the one the credentials belong to. Any other value answers 400.

number

When the event happened, Unix epoch milliseconds, UTC. Omitted, the time Lumana receives the request.

Responses

400

orgId is not the organization of the credentials (orgId is not match), cameraId is not a camera of the organization (Invalid cameraId), or a value has the wrong type.

500

Internal server error.

Language
Credentials
OAuth2
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json
*/*