Event Specification

This page outlines the structure of event payloads generated by the App Signal. It details the types of events, the fields within the event data, and provides examples for each event data, and provides examples for each event type.

Event Types

The type field in the event object specifies the nature of the event being reported. Currently, the possible values for this field are:

  • activity: Represents an activity detected by the camera system, such as a person entering or leaving a zone

Activity Types

The activityType field within the data object specifies the direction of the activity:

  • in: Represents an individual entering a specified region

  • out: Represents an individual leaving a specified region

Event Data

Each event contains a data object with various fields that provide information about the detected activity. Below is a description of the fields within this object:

Field
Type
Description

activityType

string

The type of activity ("in", "out")

trackingId

integer

A unique identifier for the tracked entity

interestRegionId

string

The ID of the interest region (can be line or zone) where

the activity occurred

cameraId

string

The ID of the camera capturing the event

date

timestamp

The timestamp of the event (in milliseconds)

points

array

Coordinates or additional spatial information (currently unused)

gender

string

The gender of the detected person:

- "m": Male

- "f": Female

age

string

The age group of the detected person:

- "a": Adult

- "e": Elderly

- "k": Kid/Child

confidence

integer

Confidence level in the detection, expressed as a percentage

occupancy

integer

The number of individuals in the region during the event

dwellTime

integer

The time (in seconds) that the individual spent in the

region (optional)

interestRegionName

string

The name of the region where the activity occurred

locationCode

string/null

An optional identifier code for the location (may be null)

locationName

string

The name of the location where the event took place

Event Examples

Here are examples of JSON payloads for different event types.

Line Out

{
  "type": "activity",
  "data": {
    "activityType": "out",
    "trackingId": 132,
    "interestRegionId": "669e7ab70af90c4da80cda30",
    "cameraId": "65f1e3ec00dddd37f9afb77d",
    "date": 1727966295019,
    "points": [],
    "gender": "f",
    "age": "k",
    "confidence": 82,
    "interestRegionName": "ES Office Entrance",
    "locationCode": null,
    "locationName": "Edge Signal HQ"
  },
  "timestamp": 1727966295019
}

Line In

{
  "type": "activity",
  "data": {
    "activityType": "in",
    "trackingId": 131,
    "interestRegionId": "669e7ab70af90c4da80cda30",
    "cameraId": "65f1e3ec00dddd37f9afb77d",
    "date": 1727966222085,
    "points": [],
    "gender": "m",
    "age": "e",
    "confidence": 87,
    "interestRegionName": "ES Office Entrance",
    "locationCode": null,
    "locationName": "Edge Signal HQ"
  },
  "timestamp": 1727966222085
}

Zone In

{
  "type": "activity",
  "data": {
    "activityType": "in",
    "trackingId": 1714,
    "interestRegionId": "66b33da6ea506bdb51dd8ee1",
    "cameraId": "65fc23004d75c70f530d3f6c",
    "date": 1727966331054,
    "points": [],
    "gender": "f",
    "age": "k",
    "confidence": 93,
    "occupancy": 1,
    "interestRegionName": "Waiting Area",
    "locationCode": null,
    "locationName": "Edge Signal HQ"
  },
  "timestamp": 1727966331054
}

Zone Out

{
  "type": "activity",
  "data": {
    "activityType": "out",
    "trackingId": 1714,
    "interestRegionId": "66b33da6ea506bdb51dd8ee1",
    "cameraId": "65fc23004d75c70f530d3f6c",
    "date": 1727966337020,
    "points": [],
    "gender": "f",
    "age": "e",
    "occupancy": 0,
    "dwellTime": 13,
    "interestRegionName": "Waiting Area",
    "locationCode": null,
    "locationName": "Edge Signal HQ"
  },
  "timestamp": 1727966337020
}

Last updated