Create an event tag

Creates an event tag in your organization. An event tag defines one kind of event your system sends: its name, the fields every event carries and the length of the video clip shown for each event.

Input. name is required. videoLength is in SECONDS, 0 to 60. fields lists the field definitions, each a name and a type (0 text, 1 true/false, 2 number, 3 decimal); the API accepts up to 100, the Lumana app shows and edits up to 10. Omit _id: Lumana assigns it.

Response. The created event tag. Its _id is the eventTypeId of every event you post with Create an event, and the Event type ID shown under Database → Event tags in Lumana.

Notes. Names are not unique: sending the same body twice creates two event tags.

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-events

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

Id of the event tag. Omit it when creating: Lumana assigns one. Required when updating.

string
required

Name of the event tag, shown in Lumana where an event tag is picked.

number
required

Length of the video clip shown for each event, in SECONDS, 0 to 60. The clip starts at the event time.

fields
array of objects
required

Fields every event of this event tag carries, each a name and a type (0 text, 1 true/false, 2 number, 3 decimal). At most 100; the Lumana app shows and edits up to 10.

fields*
Responses

400

name is missing or empty, videoLength is not a number from 0 to 60, or fields is not an array of at most 100 items.

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
*/*