Section |
---|
Column |
---|
| Panel |
---|
borderColor | #CCCCCC |
---|
bgColor | #FFFFFF |
---|
titleBGColor | #F0F0F0 |
---|
borderStyle | solid |
---|
title | On this page: |
---|
| |
|
|
Get all events for a specified interval
Code Block |
---|
{
"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 - —the type of event; the actual types of events are given in the axxonsoft\bl\events.proto file;
- subjects
—subject - —the source 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
Code Block |
---|
{
"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
Code Block |
---|
{
"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
Code Block |
---|
{
"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 the filter.
Search by a specific camera for all events that contain the word FOOD (10 events limit)
Code Block |
---|
{
"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 - —the time period for which the events are received from the event source;
- subjects
—subject - —the source 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 - If true, then
the - events are sorted in descending order.
Get all alerts
Code Block |
---|
{
"method": "axxonsoft.bl.events.EventHistoryService.ReadAlerts",
"data": {
"range": {
"begin_time": "20200225T150142.437",
"end_time": "20200225T151142.437"
},
"limit":100,
"offset":0,
"descending": false
}
} |
Info |
---|
|
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
Code Block |
---|
{
"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
Code Block |
---|
{
"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
Code Block |
---|
{
"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
Code Block |
---|
{
"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 - —the event type (optional parameter). You can find the list of available event types in the Events.proto file in
the - the EEventType enumeration.
- subject
—subject - —the source 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:
Code Block |
---|
{
"method": "axxonsoft.bl.events.DomainNotifier.DisconnectEventChannel",
"data": {
"subscription_id": "a003ed13-3b8f-4cef-a450-0199dc259h35"
}
} |
Info |
---|
|
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
Before using this method, you must perform authorization using the Bearer token (see Bearer authorization). The response will contain both the token_name and the token_value values. You must use the received token in the metadata of the gRPC request.
Info |
---|
|
- The token's lifetime is four hours.
- Once the token expires, you must update it.
|
Code Block |
---|
{
"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 - —the event type (optional parameter);
- subject
—subject - —the source 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 counted objects:
Code Block |
---|
"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
Code Block |
---|
{
"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 - —the event type (optional parameter);
- subject
—subject - —the source 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:
Code Block |
---|
{
"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)
Code Block |
---|
{
"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 - —the event type (optional parameter);
- subject
—subject - —the source of
the - event (optional parameter).