Go to documentation repository
GET http://IP address:port/web2/secure/events/
Parameter | Description |
---|---|
from | The oldest date of message search period. Example: 2012-12-27T15%3A19%3A16.000%2B03%3A00 |
to | The latest date of message search period. Example: 2012-12-27T15%3A19%3A16.000%2B03%3A00 |
count | Maximum number of messages in reply in the range [1, 200]. Default is 20. Server can return more messages if there are few messages in the database |
objectId | Object class and object ID, which are separated by a colon. Examples: CAM:1, GRAY:5, PEOPLE_COUNTER:1, and so on. Events can be received from several objects separated by commas. Example: objectId=CAM:1,PEOPLE_COUNTER:1—the response contains events from camera 1 and counter 1. If the object ID is not specified in the parameter, then the events from all objects of the specified class are returned. Example: objectId=CAM—the response contains events from all cameras |
action | Event type. If the parameter is specified, then the response contains only events of the specified type. Examples:
|
GET http://127.0.0.1:8085/web2/secure/events?from=2021-05-26T14%3A30%3A30.000%2B03%3A00&to=2021-05-26T15%3A40%3A30.000%2B03%3A00&count=5&objectId=MACRO:7
XML:
<events> <event> <description>Action executed</description> <id>{3AED63A0-19BE-EB11-9020-B42E99FDB342}</id> <objectId>MACRO:7</objectId> <addInfo>event1</addInfo> <params0>User 1</params0> <params1>1</params1> <params2/> <params3/> <ts>2021-05-26T14:58:05+03:00</ts> <type>Empty</type> </event> <event> <description>Action executed</description> <id>{26840B9A-19BE-EB11-9020-B42E99FDB342}</id> <objectId>MACRO:7</objectId> <addInfo>event2</addInfo> params0>User 1</params0> <params1>1</params1> <params2/> <params3/> <ts>2021-05-26T14:58:04+03:00</ts> <type>Empty</type> </event> </events>
JSON:
[ { "id": "{3AED63A0-19BE-EB11-9020-B42E99FDB342}", "objectId": "MACRO:7", "ts": "2021-05-26T14:58:05.000+03:00", "description": "Action executed", "addInfo": "event1", "type": "Empty", "params2": "", "params3": "", "params1": "1", "params0": "User 1" }, { "id": "{26840B9A-19BE-EB11-9020-B42E99FDB342}", "objectId": "MACRO:7", "ts": "2021-05-26T14:58:04.000+03:00", "description": "Action executed", "addInfo": "event2", "type": "Empty", "params2": "", "params3": "", "params1": "1", "params0": "User 1" } ]
Return codes:
200—OK
400—invalid parameter (for example, date format)
500—error
503—error of core connection
504—time-out (core failed to return data within 2000 milliseconds)
Note
You can also get events of the video subsystem in blocks using the WebSocket communication protocol. To do this, add the ActiveWebSocket registry key with the value 1 at the following path
\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\AxxonSoft\AxxonPSIM\WebServer2 and enable push notifications in the settings of the WebServer 2.0.
In this case, a general request format is used with ws/:
GET http://IP address:port/web2/secure/ws/events/