Integration¶
Milestone XProtect Analytics Event Integration¶
Queries can be configured to send detections to Milestone XProtect, appearing as Analytics Events.
-
Open the query you want to integrate with Milestone XProtect.
-
Select the Alarm Integration tab in the query editor.
-
Under Milestone XProtect Analytics Event Integration, tick Enable, then fill in the following fields:
- Milestone XProtect host address: The IP address of the Milestone XProtect server.
- Analytics event name: The name of the Milestone XProtect Analytics Event that triggers the query.
- Event display name: The display name of the event that will be shown in the event list.
- Description: The description of the event that will be shown in the event list.
- Timestamp offset (in seconds): The time offset between the Milestone XProtect Analytics Event and the query trigger.
Webhook¶
Queries can be configured to send detections to a Webhook URL.
-
Open the query you want to integrate with a Webhook.
-
Select the Alarm Integration tab in the query editor.
-
Under Webhook, tick Enable, then fill in the following fields:
- URL: The URL of the Webhook.
- Custom header key: The key of the custom header.
- Custom header value: The value of the custom header.
Kafka¶
Query results are stored in Kafka and can be accessed directly by downstream components. Different query types may generate result sets with varying data schemas. This section documents the most common output data schemas used across query types.
Detection¶
The following query types return Detection records:
- Advanced Object Search
- Free Text Search
- Hazardous Area
- Heatmap
- Loitering
- Object Detection
- Object Line Cross Detection
- Object Presence Change
- Object Started.yaml
- Object Stopped.yaml
This is an example Detection record contained in the kafka record value. There are some other non-documented technical fields.
{
"video_id":"c70bd9e9-4207-4d3e-b38c-386beb562bb3",
"frame_time":1747811848918,
"track_id":600,
"frame_width":1280,
"frame_height":960,
"obj_type":"person",
"box":{
"x":418,
"y":145,
"width":49,
"height":239
},
"confidence":0.5888672,
"person_attributes":{
"face_attributes":{
"key_points":{
"right_eye":{
"x":0,
"y":0
},
"left_eye":{
"x":0,
"y":0
},
"nose":{
"x":0,
"y":0
},
"mouth_right":{
"x":0,
"y":0
},
"mouth_left":{
"x":0,
"y":0
}
},
"confidence":0.0,
"box":{
"x":0,
"y":0,
"width":0,
"height":0
}
},
},
"vehicle_attributes":{
"license_plate":{
"confidence":0.0,
"licence_plate":""
}
},
}
Field Descriptions¶
Some of the fields are technical, we only document the main fields:
-
video_id:
string
A unique identifier for the video from which the frame was extracted. Useful for correlating detections with specific video streams. -
frame_time:
integer (timestamp in milliseconds)
Epoch timestamp indicating when the frame was captured, in milliseconds since Unix epoch. This allows alignment with other time-based data streams. -
track_id:
integer
An identifier used to associate detections across frames, i.e., to track the same object over time. Unique per video per object instance. -
frame_width:
integer
Width of the video frame in pixels. Useful for normalizing coordinates or calculating relative positions. -
frame_height:
integer
Height of the video frame in pixels. Likeframe_width
, this helps interpret bounding box dimensions in context. -
obj_type:
string
The semantic class of the detected object, e.g.,"person"
,"car"
, etc. Derived from the object detection model. -
box:
object
Describes the bounding box around the detected object within the frame:- x:
integer
— X-coordinate of the top-left corner of the box. - y:
integer
— Y-coordinate of the top-left corner of the box. - width:
integer
— Width of the bounding box in pixels. - height:
integer
— Height of the bounding box in pixels.
- x:
-
confidence:
float
A score between 0 and 1 indicating the model’s confidence in the detection. Higher values imply greater certainty. -
person_attributes:
object
Further details if the object type isperson
:- face_attributes:
object
- filled if the face of the person has been detected: - key_points: Face key points
- confidence: Confidence of face detection between 0-1
- box: Face bounding box
- face_attributes:
-
vehicle_attributes:
object
Further details if the object type a vehicle class.