...
Configuration Article | CA-20220907-TP-28 VDG Sense | API | Functions | Events |
|
Table of Contents |
---|
Note: This function requires an API license.
...
The parameters deviceid and serverid can be used to get events from a specific device (from a specific server).
Request
|
parameter | type | remarks |
---|---|---|
startid | [id] | events with an id > startid are returned. |
starttime | [timestamp] | events with a (local) timestamp >= startdate are returned. |
endtime | [timestamp] | events with a (local) timestamp <= enddate are returned. |
types | [string] | comma separated list of types the event must match, i.e. Alarm,SceneR. |
limit | [number] | determines the limit of the resulting event count. |
deviceid | [UID] | filters events from a specific device. |
serverid | [UID] | filters events from a specific server. |
ValueContains | [string] | Only returns events if the value of the event contains the text in this parameter |
ValueEquals | [string] | Only returns events if the value of the event equals the text in this parameters |
CarRLicensePlateFound only | ||
parameter | type | remarks |
licenseplate | [string] | events with the specified license plate are returned (Case sensitive) |
licenseplatedistance | [number] | the number of characters that should match with the entered licenseplate. ( 0 = all chars should match; 1 = one char can differ, 2 = two chars can differ etc.) |
#91;/table#93;
lt;result errorcode=quot;0">
Response | ||
---|---|---|
|
| |||
lt; |
result errorcode=quot;0"> | ||
<event> | ||
<eventid></eventid> |
<eventtype></eventtype> |
<eventdescription></eventdescription> |
<eventvalue></eventvalue> |
<eventtime></eventtime> |
<serverid></serverid> |
<serverdescription></serverdescription> |
<deviceid></deviceid> |
<devicedescription></devicedescription> |
</ |
event> | ||
... | ||
lt;/eventsgt; | ||
lt;/resultgt; | ||
[table class="code-table table table-bordered" colwidth="15% | 25% | 60%"] |
node | value | remarks |
/result | ||
@errorcode | [number] | See error codes below |
/result/events | ||
@count | [number] | The number of events. |
lastEventId | [UID] | id of the last event. |
/result/events/event | ||
eventid |
| id of event. |
eventype |
| type of event. (Available in API version < 2.7.1) |
eventdescription | description of event. | |
eventvalue | value of event. | |
eventtime |
| Time stamp of event in UTC time. |
serverid |
| Id of server where the event occurred. |
serverdescription |
| Description of the server |
deviceid |
| Id of device which triggered the event. |
devicedescription | Description of the device |
#91;/table#93;
#91;table class="code-table table table-bordered" colwidth="15%
25%
error code | description | remarks |
---|---|---|
0 | Ok | Ok, no error |
-2 | No device | No device found for the supplied camareaid/deviceid |
-4 | Invalid timestamp | Invalid datetime format. See Timestamp. |
Example
Retrieve the last evenid..
To get the latest event id ommit the startid or give it a zero or negative value.
Command url:
|
|
Result:
|
|