The HTTP Trigger feature in ANSVIS allows users to send event data via HTTP requests to external servers. This is useful for integrating with web services, automation systems, or other cloud-based platforms.
Steps to Configure an HTTP Trigger:
1. Access the Event Action Configuration
- Navigate to the Event Action Configuration panel in the ANSVIS Client.
- From the Event Action Type dropdown, select HTTP. This will open the HTTP trigger configuration panel.
2. Create or Select a Saved Configuration
- If you have existing configurations, you can select them from the Saved Configurations dropdown.
- For a new configuration, use the default New Unsaved Configuration.
3. Configure the HTTP Request
- URL: Enter the target URL where the event data will be sent.
- Example:
http://127.0.0.1:8002/HttpServer
- Example:
- Method: Choose the HTTP request method:
- GET: Sends data as query parameters in the URL.
- POST: Sends data in the request body (used for more complex data).
4. Configure GET Method (For Simple Requests)
- If using GET, the event data will be sent as part of the URL.
- Example: The Example URL section will show a preview of the final URL format including the event details, such as:
- Click Send Test Trigger to verify the connection.
5. Configure POST Method (For Complex Data)
- If you select POST, you can send more detailed event data.
- Append Image: If checked, the system will attach images related to the event in the HTTP request.
- Style: Choose the data format style for the event:
- Standard: Sends basic event data.
- Standard-Verbose: Sends more detailed event data.
- Custom Event Data: Allows for user-defined data formatting.
- PLC Server: Integrates with PLC systems.
- Fully Custom: Enables fully customized data formatting.
6. Set Authentication (If Required)
- Login Required: If the target server requires login, check this option.
- Login URL: Enter the URL for authentication.
- Login POST Data: Provide the login credentials (usually email and password).
- Token Type and Token Name: If the server uses token-based authentication, specify the token type and token name.
7. Example Post Data
- In the Example Post Data field, you will see the structure of the data being sent
8. Test and Save
- Send Test Trigger: Use this button to send a test HTTP request to verify the configuration.
- Save Current Configuration: Save your HTTP trigger settings for future use.
9. Advanced Options
- Rule Type: this will display the selected rule that will trigger the HTTP request (e.g., Presence-Duration).
- Pipeline Option: If your setup uses a processing pipeline, you can select it here (if no pipeline, select "No Pipeline").
10. Final Step
- After setting up the configuration, click Save to apply the HTTP trigger settings.
Example Post Data
The example post data can be viewed when selecting Method: Post from the HTTP Type
Boundary Crossing
{
"EventName": "Person Up",
"CameraID": 263740131,
"CameraName": "Subway",
"Detections": [
{
"RuleType": "Boundary Crossing",
"DetectionData": [
{
"Name": "person",
"ModelClassID": {
"ModelID": 263740004,
"Class": 1
},
"ModelClassName": {
"Model": "GenericModel v1.0",
"Class": "person"
},
"DeploymentGroupID": 263740166,
"DeploymentGroupName": "Counting People going up",
"CameraID": 263740131,
"CameraName": "Subway",
"TrackID": 16,
"Detections": [
{
"Time": "2023-06-14T13:39:30.055Z",
"BoundingBox": {
"Left": 230,
"Top": 169,
"Right": 325,
"Bottom": 464
},
"Score": 0.970784723758698,
"Image": 1,
"ModelClassID": {
"ModelID": 263740004,
"Class": 1
},
"ModelClassName": {
"Model": "GenericModel v1.0",
"Class": "person"
}
}
],
"Result": "{\"GlobalIncrements\":1,\"Increments\":1,\"TriggerTime\":\"2023-06-14T13:39:30.055Z\",\"DeltaIncrements\":1,\"LastCountResultTriggered\":\"1904-01-01T00:00:00.000Z\",\"TodaysIncrements\":1,\"LastHourIncrements\":1,\"LastMinuteIncrements\":1}",
"ExtraVisionResult": ""
}
]
}
],
"Images": [
{
"ID": 1,
"Image": "/9j/4AAQS..."
}
]
}
- GlobalIncrements: Total number of counts/increments since the Dg was created.
- Increments: Total number of counts/increments since the Dg was started.
- TriggerTime: Time the last Trigger was issued
- DeltaIncrements; This is 1 or highest depending on the configuration of the "Trigger When X counts have cross the boundary" value.
- LastCountResultTriggered: The time the last trigger was issued.
- TodaysIncrements, LastHourIncrements, LastMinuteIncrements give some history info.
Presence: Type Every Detection and Object Appearing
{
"EventName": "People and Bags",
"CameraID": 263740131,
"CameraName": "Subway",
"Detections": [
{
"RuleType": "Presence",
"DetectionData": [
{
"Name": "person",
"ModelClassID": {
"ModelID": 263740004,
"Class": 1
},
"ModelClassName": {
"Model": "GenericModel v1.0",
"Class": "person"
},
"DeploymentGroupID": 263740157,
"DeploymentGroupName": "Presence-Every Detection",
"CameraID": 263740131,
"CameraName": "Subway",
"TrackID": 3,
"Detections": [
{
"Time": "2023-06-18T16:19:24.041Z",
"BoundingBox": {
"Left": 217,
"Top": 512,
"Right": 303,
"Bottom": 571
},
"Score": 0.523541510105133,
"Image": 19,
"ModelClassID": {
"ModelID": 263740004,
"Class": 1
},
"ModelClassName": {
"Model": "GenericModel v1.0",
"Class": "person"
}
}
],
"Result": "",
"ExtraVisionResult": ""
}
]
}
],
"Images": [
{
"ID": 19,
"Image": "/9j/4AAQSkZJRgABA..."
}
]
}
For the Type: Object Appearing and Every Detection, the result value will include static count per object as extra information.
"Result": "2"
Presence: Type Object Disappearing and Duration
{
"EventName": "Person Disappearing",
"CameraID": 263740131,
"CameraName": "Subway",
"Detections": [
{
"RuleType": "Presence",
"DetectionData": [
{
"Name": "person",
"ModelClassID": {
"ModelID": 263740004,
"Class": 1
},
"ModelClassName": {
"Model": "GenericModel v1.0",
"Class": "person"
},
"DeploymentGroupID": 263740167,
"DeploymentGroupName": "Presence-Object Disappearing",
"CameraID": 263740131,
"CameraName": "Subway",
"TrackID": 1,
"Detections": [
{
"Time": "2023-06-18T16:26:20.644Z",
"BoundingBox": {
"Left": 510,
"Top": 79,
"Right": 557,
"Bottom": 241
},
"Score": 0.991934835910797,
"Image": 90,
"ModelClassID": {
"ModelID": 263740004,
"Class": 1
},
"ModelClassName": {
"Model": "GenericModel v1.0",
"Class": "person"
}
},
{
"Time": "2023-06-18T16:26:20.873Z",
"BoundingBox": {
"Left": 524,
"Top": 84,
"Right": 585,
"Bottom": 238
},
"Score": 0.954885542392731,
"Image": 91,
"ModelClassID": {
"ModelID": 263740004,
"Class": 1
},
"ModelClassName": {
"Model": "GenericModel v1.0",
"Class": "person"
}
},
{
"Time": "2023-06-18T16:26:21.106Z",
"BoundingBox": {
"Left": 0,
"Top": 0,
"Right": 0,
"Bottom": 0
},
"Score": 0,
"Image": 92,
"ModelClassID": {
"ModelID": 263740004,
"Class": 1
},
"ModelClassName": {
"Model": "GenericModel v1.0",
"Class": "person"
}
}
],
"Result": "0.22939",
"ExtraVisionResult": ""
}
]
}
],
"Images": [
{
"ID": 90,
"Image": "/9j/4AAQSkZJR..."
},
{
"ID": 91,
"Image": "/9j/4AAQSkZJR..."
}, {
"ID": 92,
"Image": "/9j/4AAQSkZJR..."
}
]
}
For Object Disappearing and Duration:
"Result": "0.22939"
The Result value is the time in seconds the object was visible before it got triggered.


Counting
{
"EventName": "People Counting",
"CameraID": 263740138,
"CameraName": "Stockholm1",
"Detections": [
{
"RuleType": "Static Count",
"DetectionData": [
{
"Name": "person",
"ModelClassID": {
"ModelID": 0,
"Class": 1
},
"ModelClassName": {
"Model": "",
"Class": ""
},
"DeploymentGroupID": 263740165,
"DeploymentGroupName": "Counting",
"CameraID": 263740138,
"CameraName": "Stockholm1",
"TrackID": 0,
"Detections": [
{
"Time": "2023-06-18T16:45:25.717Z",
"BoundingBox": {
"Left": 899,
"Top": 492,
"Right": 968,
"Bottom": 660
},
"Score": 0.922159314155579,
"Image": 62,
"ModelClassID": {
"ModelID": 263740106,
"Class": 1
},
"ModelClassName": {
"Model": "generalmodel v1.0",
"Class": "person"
}
},
{
"Time": "2023-06-18T16:45:25.717Z",
"BoundingBox": {
"Left": 1189,
"Top": 494,
"Right": 1220,
"Bottom": 591
},
"Score": 0.983369469642639,
"Image": 62,
"ModelClassID": {
"ModelID": 263740106,
"Class": 1
},
"ModelClassName": {
"Model": "generalmodel v1.0",
"Class": "person"
}
}
],
"Result": "2",
"ExtraVisionResult": ""
}
]
}
],
"Images": [
{
"ID": 62,
"Image": "/9j/4AAQSkZJ..."
}
]
}
For counting, you get the number of objects found or the percentage of cover in percent.
"Result": "2"
"Result": "10.4"
Path
{
"EventName": "Path",
"CameraID": 263740131,
"CameraName": "Subway",
"Detections": [
{
"RuleType": "Path",
"DetectionData": [
{
"Name": "person",
"ModelClassID": {
"ModelID": 263740004,
"Class": 1
},
"ModelClassName": {
"Model": "GenericModel v1.0",
"Class": "person"
},
"DeploymentGroupID": 263740168,
"DeploymentGroupName": "Path",
"CameraID": 263740131,
"CameraName": "Subway",
"TrackID": 4,
"Detections": [
{
"Time": "2023-06-18T16:55:13.388Z",
"BoundingBox": {
"Left": 144,
"Top": 82,
"Right": 205,
"Bottom": 231
},
"Score": 0.984375894069672,
"Image": 1,
"ModelClassID": {
"ModelID": 263740004,
"Class": 1
},
"ModelClassName": {
"Model": "GenericModel v1.0",
"Class": "person"
}
},
{
"Time": "2023-06-18T16:55:14.769Z",
"BoundingBox": {
"Left": 377,
"Top": 78,
"Right": 420,
"Bottom": 235
},
"Score": 0.982803285121918,
"Image": 2,
"ModelClassID": {
"ModelID": 263740004,
"Class": 1
},
"ModelClassName": {
"Model": "GenericModel v1.0",
"Class": "person"
}
}
],
"Result": "1.381467",
"ExtraVisionResult": ""
}
]
}
],
"Images": [
{
"ID": 1,
"Image": "/9j/4AAQSkZJRg..."
},
{
"ID": 2,
"Image": "/9j/4AAQSkZJRg..."
}
]
}
This rule will return 2 Detections/images.
The first when it first is detected in the Start ROI, and the second when is detected in the End ROI.
The Result time is in second between these detections


"Result": "1.381467"
Inclusive
{
"EventName": "Inclusive",
"CameraID": 263740125,
"CameraName": "Beach",
"Detections": [
{
"RuleType": "Inclusive",
"DetectionData": [
{
"Name": "umbrella",
"ModelClassID": {
"ModelID": 263740004,
"Class": 26
},
"ModelClassName": {
"Model": "GenericModel v1.0",
"Class": "umbrella"
},
"DeploymentGroupID": 263740169,
"DeploymentGroupName": "Inclusive",
"CameraID": 263740125,
"CameraName": "Beach",
"TrackID": 4,
"Detections": [
{
"Time": "2023-06-18T17:06:57.191Z",
"BoundingBox": {
"Left": 498,
"Top": 520,
"Right": 924,
"Bottom": 842
},
"Score": 0.582290649414062,
"Image": 7,
"ModelClassID": {
"ModelID": 263740004,
"Class": 26
},
"ModelClassName": {
"Model": "GenericModel v1.0",
"Class": "umbrella"
}
},
{
"Time": "2023-06-18T17:06:57.191Z",
"BoundingBox": {
"Left": 994,
"Top": 566,
"Right": 1091,
"Bottom": 656
},
"Score": 0.736806929111481,
"Image": 0,
"ModelClassID": {
"ModelID": 263740004,
"Class": 1
},
"ModelClassName": {
"Model": "GenericModel v1.0",
"Class": "person"
}
},
{
"Time": "2023-06-18T17:06:57.191Z",
"BoundingBox": {
"Left": 514,
"Top": 703,
"Right": 788,
"Bottom": 1034
},
"Score": 0.962017774581909,
"Image": 0,
"ModelClassID": {
"ModelID": 263740004,
"Class": 1
},
"ModelClassName": {
"Model": "GenericModel v1.0",
"Class": "person"
}
}
],
"Result": "{\"items\" :[\"person\"],\"counts\":[2]}",
"ExtraVisionResult": ""
}
]
}
],
"Images": [
{
"ID": 7,
"Image": "/9j/4AAQSkZk,,,"
}
]
}
This returns the count of every inclusive object.
Result": "{\"items\" :[\"person\"],\"counts\":[2]}"