Skip to content

API Integration

Third parties can integrate with audience analytics at different levels:

  • Using a third party CMS/Player: Using the Broox Controller Media Info API to inform of the currently playing media.
  • Listening to trigger events: Subscribing to the presence events and acquiring data such as age, gender, etc.
  • Push Stages via HTTP POST: Set Broox Vision Node to POST periodically the status of the "stage" (current presence detections).
  • Directly querying the analytics data: Via the Broox Studio Analytics API.

Third-party Media Player Integration API

You can run an Audience Analytics solution without Broox Media Player, but to link the current campanng video or media being played with the Broox Studio analytics, you can use the Broox Controller API Endpoint.

The endpoint is listening for HTTP requests on port 9912 of the Broox Controller hosting machine.

See the Broox Controller Development Manual for implementation details.

Real-Time Presence Events Subscription

Presence events are generated by Broox Vision Node.

The presence events are served over MQTT on the Vision Node device address.

The format of the events is of a Profile Type Trigger:

{"cmd":"trigger", "class":"profile", "action": "in", "id": "xuwoxu"}

{
   "cmd":"trigger", "class":"profile", "action": "out", "id": "xuwoxu",
   "age": 33, "gender": "M", "dwell_time": 4, "attention_pct": 10.0,...
}

The contents of the presence events depend on the Vision pipeline used.

Stage state event

You can enable a timed event to send every second (or fraction of second) a state of the Stage (the stage is all the presently detected people).

The format of this message is specific, it's not a trigger but a status command.

It contains an array of boxes with all the detected features:

{"cmd": "status", 
 "sent-by": "stage", 
 "camera": "opencv-nt", 
 "boxes": [
   {"boxtype": "face", "id": "carod", "tags": [], "dwell": 2.7,
      "attention": 85.71, "dominant_emotion": "neutral", "age": 41,
      "gender": "M"}
]} 

See the Broox Vision Node development manual for more.

Stage status via HTTP POST

Pipelines using the StageProcessor or PersonFaceStageProcessor can be configured to periodically POST the status of the "stage" as a JSON object.

When using the StageProcessor, one can set up a timed URL where the current status of the "Stage" is sent periodically. See StageProcessor

The format of the stage data is of an array of Boxes.

[
    {"boxtype": "person",
    "id": "getef",
    "tags": [],
    "dwell": 12,
    "attention": 100.0,
    "dominant_emotion": "calm",
    "face": true,
    "age": 63,
    "gender": "M"},
...
]

See the Broox Vision Node development manual for more.

Accessing Analytics Data

You can query the Broox Studio Analytics data to obtain reports and aggregates of the captured events.

See the Broox Cloud API Development Manual.