Go to documentation repository
Page History
General request format:
http://
...
IP-address:port/web2/secure/events/
Parameters:
from – the oldest date of message search period. 2012-12-27T15%3A19%3A16.000%2B04%3A00
to – the latest date of message search period. 2012-12-27T15%3A19%3A16.000%2B04%3A00
count – maximum number of messages in reply [1, 200]. On default – 20. Server can return more messages if there are few messages in the database.
objectId – object id (CAM:1, GRAY:5 etc.). If parameter is not specified, events are returning for all.
Return codes:
200 - OK
400 - invalid parameter (e.g. date format)
500 - error
503 - error of core connection
504 - time-out (core failed to return data within 2000 milliseconds)
Examples of reply
XML:
<events>
<event>
<description>Record is on</description>
Example request:
http://127.0.0.1:8085/web2/secure/events/
Example response:
XML:
Code Block | ||
---|---|---|
| ||
<events> <event> <description>Recording off</description> <id>{E56B09A0-1A50-E211-840E-005056C00008}</id> |
...
<objectId>CAM:1</objectId> |
...
<ts>2012-12-27T15:43:27+04:00</ts> |
...
</event> |
...
<event> |
...
<description>Recording |
...
off</description> |
...
<id>{4482F63F-1A50-E211-840E-005056C00008}</id> |
...
<objectId>CAM:1</objectId> |
...
<ts>2012-12-27T15:40:50+04:00</ts> |
...
</event> |
...
<event>
...
<event> <description>Recording off</description> |
...
<id>{35D4BE3E-1750-E211-840E-005056C00008}</id> |
...
<objectId>CAM:1</objectId> |
...
<ts>2012-12-27T15:19:16+04:00</ts> |
...
</event> |
...
</events> |
...
JSON:
Code Block | ||
---|---|---|
| ||
[ { |
...
"id" : "{E56B09A0-1A50-E211-840E-005056C00008}", |
...
"description" : " |
...
Recording |
...
off", |
...
"ts" : "2012-12-27T15:43:27.000+04:00", |
...
"objectId" : "CAM:1" |
...
}, { |
...
"id" : "{4482F63F-1A50-E211-840E-005056C00008}", |
...
"description" : " |
...
Recording |
...
off", |
...
"ts" : "2012-12-27T15:40:50.000+04:00", |
...
"objectId" : "CAM:1" |
...
}, { |
...
"id" : "{35D4BE3E-1750-E211-840E-005056C00008}", |
...
"description" : " |
...
Recording off", |
...
"ts" : "2012-12-27T15:19:16.000+04:00", |
...
"objectId" : "CAM:1" |
...
} ] |
Response parameters:
Parameter | Description |
---|---|
from | The oldest date of message search period. 2012-12-27T15%3A19%3A16.000%2B04%3A00 |
to | The latest date of message search period. 2012-12-27T15%3A19%3A16.000%2B04%3A00 |
count | Maximum number of messages in reply [1, 200]. On default – 20. Server can return more messages if there are few messages in the database. |
objectId | Object id (CAM:1, GRAY:5 etc.). If parameter is not specified, events are returning for all. |
Return codes:
200 - OK
400 - invalid parameter (e.g. date format)
500 - error
503 - error of core connection
504 - time-out (core failed to return data within 2000 milliseconds)