Go to documentation repository
Documentation for Axxon One 2.0. Documentation for other versions of Axxon One is available too.
On this page:
Get all events for a specified interval
{ "method": "axxonsoft.bl.events.EventHistoryService.ReadEvents", "data": { "range": { "begin_time": "20200225T125548.340", "end_time": "20200225T130548.341" }, "limit": 30, "offset": 0, "descending": false } }
where:
- descending—event sorting: if = false, then the events in the response are sorted by time in ascending order. If true, then the events are sorted in descending order.
- limit—maximum number of events in the response.
Get events by filter
The following parameters can be set as a filter:
- type—type of event; the actual types of events are given in the axxonsoft\bl\events.proto file;
- subjects—subject of event (server, device, archive, detector, and so on);
- values—exact value of event;
- texts—brief description of event.
Get events about status change of a specific camera
{ "method": "axxonsoft.bl.events.EventHistoryService.ReadEvents", "data": { "range": { "begin_time": "20200225T152806.572", "end_time": "20200225T153806.572" }, "filters": { "filters": [ { "type": "ET_IpDeviceStateChangedEvent", "subjects": "hosts/Server1/DeviceIpint.10" } ] }, "limit": 300, "offset": 0, "descending": false } }
Get events about disconnection of all cameras
{ "method": "axxonsoft.bl.events.EventHistoryService.ReadEvents", "data": { "range": { "begin_time": "20200226T074425.274", "end_time": "20200226T075425.274" }, "filters": { "filters": [ { "type": "ET_IpDeviceStateChangedEvent", "values": "IPDS_DISCONNECTED" } ] }, "limit": 300, "offset": 0, "descending": false } }
Get events from all license plate recognition detectors of a domain
{ "method": "axxonsoft.bl.events.EventHistoryService.ReadEvents", "data": { "range": { "begin_time": "20211020T120000.000", "end_time": "20211020T200000.000" }, "filters": { "filters": [ { "type": "ET_DetectorEvent", "values": "DG_LPR_DETECTOR" } ] }, "limit": 10000, "descending": true } }
Search by text in event
The subject and the text of event are specified in filter.
Search by a specific camera for all events that contain the word FOOD (10 events limit)
{ "method": "axxonsoft.bl.events.EventHistoryService.ReadTextEvents", "data": { "range": { "begin_time": "20231030T014305.137", "end_time": "20231030T232305.137" }, "filters": { "filters": [ { "subjects": "hosts/Server/DeviceIpint.7/SourceEndpoint.video:0:0", "filter_containing_text_parts": false, "texts": "FOOD" } ] }, "limit":10, "offset":0, "descending": false } }
where:
- range—time period for which the events are received from the event source;
- subjects—subject of the event (server, device, archive, detector, and so on);
- filter_containing_text_parts—boolean value: if = true, then the response contains only the string with the search text specified in texts. If = false, then the response contains the entire receipt with the text specified in texts;
- limit—maximum number of events in the response.
- descending—event sorting: if = false, then the events in the response are sorted by time in ascending order. If true, then the events are sorted in descending order.
Get all alerts
{ "method": "axxonsoft.bl.events.EventHistoryService.ReadAlerts", "data": { "range": { "begin_time": "20200225T150142.437", "end_time": "20200225T151142.437" }, "limit":100, "offset":0, "descending": false } }
Note
If an operator’s comment was specified for the alarm, it will be in the response with the border coordinates.
Get alerts by filter
Alarms start time on a specific camera
{ "method": "axxonsoft.bl.events.EventHistoryService.ReadAlerts", "data": { "range": { "begin_time": "20200225T150845.757", "end_time": "20200225T151845.758" }, "filters": { "filters": [ { "subjects": "hosts/Server1/DeviceIpint.7/SourceEndpoint.video:0:0", "values": "BEGAN" } ] }, "limit":100, "offset":0, "descending": false } }
Search for license plate recognition events
Search for a specific license plate
{ "method": "axxonsoft.bl.events.EventHistoryService.ReadLprEvents", "data": { "range": { "begin_time": "20200226T104305.137", "end_time": "20200226T105305.137" }, "filters": { "filters": [ { "subjects": "hosts/Server1/DeviceIpint.1/SourceEndpoint.video:0:0", "values":"Н829МУ777" } ] }, "limit":50, "offset":0, "descending": false } }
Search by a part of a license plate
{ "method": "axxonsoft.bl.events.EventHistoryService.ReadLprEvents", "data": { "range": { "begin_time": "20200226T104305.137", "end_time": "20200226T105305.137" }, "filters": { "filters": [ { "subjects": "hosts/Server1/DeviceIpint.1/SourceEndpoint.video:0:0" } ] }, "limit":50, "offset":0, "search_predicate":"*82*", "descending": false } }
Subscription to events
If you subscribe, you will be notified as events occur.
Subscription to receive events from the License plate recognition detector
{ "method": "axxonsoft.bl.events.DomainNotifier.PullEvents", "data": { "subscription_id": "a003ed13-3b8f-4cef-a450-0199dc259h35", "filters": { "include": [{ "event_type":"ET_DetectorEvent", "subject":"hosts/Server1/AVDetector.1/EventSupplier" }, { "event_type":"ET_DetectorEvent", "subject":"hosts/Server1/AVDetector.2/EventSupplier" }, { "event_type":"ET_DetectorEvent", "subject":"hosts/Server2/AVDetector.1/EventSupplier" } ] } } }
where:
- subscription_id—subscription ID (it is set arbitrarily in UUID format; mandatory parameter);
- event_type—event type (optional parameter). You can find the list of available event types in the Events.proto file in the EEventType enumeration.
- subject—subject of the event (detectors in this example; optional parameter).
To receive events using a subscription, do the following:
- Run a request with the PullEvents method, which opens a channel for event transmission. Events get into this channel as they occur. The channel remains active until a request with the DisconnectEventChannel method is executed to close it.
The request body with the DisconnectEventChannel method:{ "method": "axxonsoft.bl.events.DomainNotifier.DisconnectEventChannel", "data": { "subscription_id": "a003ed13-3b8f-4cef-a450-0199dc259h35" } }
Note
The value of the subscription_id field must be the same in all requests.
Subscription to receive the number of objects counted by the Neural counter
{ "method": "axxonsoft.bl.events.DomainNotifier.PullEvents", "data": { "subscription_id": "a003ed13-3b8f-4cef-a450-0199dc259h35", "filters": { "include": { "event_type": "ET_DetectorEvent", "subject" : "hosts/Server/DeviceIpint.1/SourceEndpoint.video:0:0" } } } }
where:
- subscription_id—subscription ID (it is set arbitrarily in UUID format; mandatory parameter);
- event_type—event type (optional parameter);
- subject—subject of the event (camera in this example; optional parameter).
The response will contain an event, and the event fields will contain information about the number of objects:
"details": [ { "lots_objects": { "object_count": 3 } } ],
where:
- object_count—the number of objects counted by the Neural counter.
Subscription to receive events about the state of objects
{ "method": "axxonsoft.bl.events.DomainNotifier.PullEvents", "data": { "subscription_id": "a003ed13-3b8f-4cef-a450-0199dc259h35", "filters": { "include": { "event_type": "ET_ObjectActivatedEvent", "subject": "" } } } }
where:
- subscription_id—subscription ID (it is set arbitrarily in UUID format; mandatory parameter);
- event_type—event type (optional parameter);
- subject—subject of the event (optional parameter).
The response will contain an event, and the event fields will contain information about the state of objects within the entire time since they were added to the system:
{ "event_type": "ET_ObjectActivatedEvent", "subject": "", "body": { "@type": "type.googleapis.com/axxonsoft.bl.events.ObjectActivatedEvent", "guid": "88c930c5-89a7-4382-a004-119a8ea56c78", "is_activated": true, "timestamp": "20221003T065757.170118", "object_id_ext": { "access_point": "hosts/Server/DeviceIpint.1/SourceEndpoint.audio:0", "friendly_name": "Camera" },
where:
- is_activated—the state of object (activated or not).
Subscription to receive events from an event source (POS devices)
{ "method": "axxonsoft.bl.events.DomainNotifier.PullEvents", "data": { "subscription_id": "a003ed13-3b8f-4cef-a450-0199dc259h35", "filters": { "include": [{ "event_type":"ET_TextEvent", "subject":"hosts/Server/DeviceIpint.7/SourceEndpoint.video:0:0" } ] } } }
where:
- subscription_id—subscription ID (it is set arbitrarily in UUID format; mandatory parameter);
- event_type—event type (optional parameter);
- subject—subject of the event (optional parameter).
Overview
Content Tools