Events
Events are user-defined sets of conditions to look for in one or multiple booths over a specified time period.
There are two main concepts that are part of this:
Event Definitions
Event definitions constitute the rules to consider something an event. An example of an event definition would be a daily check to see if the doors were open at any point while the booth was in bake mode.
These are the fields that make up an event definition:
id: ID of the event definition in the system.name: Name the user gives the event definition.description: A short description for what the event definition looks for.category: One of an arbitrarily defined set of categories:- Safety & Regulatory
- Booth Utilization
- Cycle Production
- Energy Consumption
- Service Adherence
- Other
min_duration: The number of consecutive minutes the condition needs to happen for in order to consider it an event.evaluation_period: How often events for the event definition are searched for and created. One of "daily" or "weekly".event_type: Whether this event definition is for aggregate data or immediate readings. "aggregate" for the former, "tag" for the latter.booth_ids: The list of booth IDs for which to evaluate the conditions.account_id: The account the event definition belongs to.rules: A list of embedded structures constituting a condition. The nested structure has this fields:tag: The name of the tag as the PLC reports it. Spaces are removed for names that have them.op: The operation to perform. One of<,<=,==,>=,>,in,not_in, orlikevalue: The value to perform the operation on. Can be of any type depending on the operator.
created_by: The ID in the system of the user who created the event definition.last_edited_by: The ID in the system of the user who last edited the event definition.created_at: Timestamp for when the event definition was created.updated_at: Timestamp for when the event definition was last edited.
Events
Events are the instances that were found for an event definition. They belong to a specific booth, event definition, and event group.
These are the fields an event has:
id: ID of the event in the system.start_time: Timestamp of when the conditions in the event definition started.duration_minutes: Number of consecutive minutes that the conditions were met for.booth_id: ID of the booth the event was found for.event_definition_id: ID of the event definition an event is an instance of.event_notification_id: ID of the event group the event belongs to.