Documentation for Axxon Next 4.5.0 - 4.5.10. Documentation for other versions of Axxon Next is available too.

Previous page Next page

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

On this page:

Get all events within a given interval

{
    "method": "axxonsoft.bl.events.EventHistoryService.ReadEvents",
    "data": {
        "range": {
            "begin_time": "20200225T125548.340",
            "end_time": "20200225T130548.341"
        },
        "limit": 30,
        "offset": 0,
		"descending": false
    }
}

If descending = false, then the events in the response will be sorted by time in ascending order. If descending = true, then the events will be sorted in descending order.

limit - the limit 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, etc.);
  • 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 about domain LRP detectors

{
    "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 tracker (2 events limit)

{
    "method": "axxonsoft.bl.events.EventHistoryService.ReadTextEvents",
    "data": {
        "range": {
            "begin_time": "20200226T082741.159",
            "end_time": "20200226T083741.160"
        },
        "filters": {
            "filters": [
                {
                    "subjects": "hosts/Server1/DeviceIpint.7/SourceEndpoint.video:0:0",
                    "texts": "tracker"
                }
            ]
        },
        "limit": 2,
        "offset": 0,
		"descending": false
    }
}

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 frame coordinates.

Get alerts by filter

Start of alarms for 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 LPR events

Search for a specific number

{
    "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М7"
                }
            ]
        },
        "limit":50,
        "offset":0,
		"descending": false
    }
}

Search by part of a number

{
    "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 get events

If you subscribe, you will be notified as events occur.

Subscription to get LRP events

{
    "method": "axxonsoft.bl.events.DomainNotifier.PullEvents",
    "data": {
        "subscription_id": "a000ed13-3b8f-4cef-a450-0199dc259w37",
        "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 (set arbitrarily in UUID format; mandatory parameter).
  • event_type - event type (optional parameter).
  • subject - subject of the event (detectors in this example; optional parameter).

To get events using a subscription, it is necessary:

  1. Run a request with the PullEvents method.
    After receiving the "200 OK" response, the events will be accumulated.
  2. After the required time interval, run a request with the DisconnectEventChannel method.
    You will receive a list of events that occurred between the two requests.

The request body with the DisconnectEventChannel method:

{
    "method": "axxonsoft.bl.events.DomainNotifier.DisconnectEventChannel",
    "data": {
        "subscription_id": "a003ed13-3b8f-4cef-a450-0199dc259w37"
    }
}

Note

The value of the subscription_id field should not be different in the requests.

  • No labels