Events

List the device events during a given time interval. Get devices events list by querying POST to /gkevent/eventquery with a Ventra API using username and password which is in uppercase and SHA-256. When call the POST method to /gkevent/eventquery, the system will return an array of all devices with its all data

Parameters
Name of Parameter Type Description
username string Required username provide by ventracloud
password string Required SHA-256 of your password which is uppercase
serialno string Query specific serialno event.
afterSerialno number Query events which serialno > afterSerialno.(not include)
beforeSerialno number Query events which serialno <= beforeSerialno.(include)
appdevid number EventCode, Query specific event type event. The following appdevids are Online(0), Reboot(2), Offline(3), GPIO0(8), GPIO1(9), GPIO2(10), GPIO3(11), DiskError(12), OverSpeed(13), Idle(14), VideoLoss(15), GSensor(16), Trigger in(51), Trigger Out(52), SD BackupNormal(90), SD Backupgsonsor(91), SD Backupgpio0(92), Lost Record Cover(98).
type number Type for appdevid (if need).
date string Query events for one day. Date format YYYY-MM-DD
afterDate string Query events which after day(include). Date format YYYY-MM-DD
beforeDate string Query events which before day(include). Date format YYYY-MM-DD
afterTime string Query events which after time format(include). time format YYYY-MM-DDTHH:mm:ss for local time or YYYY-MM-DDTHH:mm:ssZ for UTC time
beforeTime string Query events which before time format(include). time format YYYY-MM-DDTHH:mm:ss for local time or YYYY-MM-DDTHH:mm:ssZ for UTC time
afterUpdatetime string Query events which after afterUpdatetime. Time format YYYY-MM-DDTHH:mm:ss or YYYY-MM-DDTHH:mm:ssZ for UTC time
beforeUpdatetime string Query events which before afterUpdatetime. Time format YYYY-MM-DDTHH:mm:ss or YYYY-MM-DDTHH:mm:ssZ for UTC time
deviceid string Query events of device.
hasLoopdata boolean Query events that have loopdata
downloadtype number Query UDP events input 0, download events input 1, not download events input 2
columns string array Select specific columns for response. ex: ["serialno", "deviceid", ...]. The following column names are serialno, deviceid, type, eventtime, eventtimeutc, updatetime, download, try, fenceid, fencename, radius, centerx, centery, vehiclex, vehicley, downloadtype, checkstatus, memo, loopdata, appdevid
Example

Get device events list by querying POST to URL /gkevent/eventquery with username and password

URL https://www.ventracloud.com/gkevent/eventquery POST /gkevent/eventquery Content-Type: application/json; charset=utf-8
{
    "username":"APIdemo",
    "password":"58F0DB19BE70BFD8E53E1CAC8C32514853E97D0A44DA9B68A72046B7730BD5A6",
    "afterDate":"2018-12-01",
    "hasLoopdata": true,
    "downloadtype": 0,
    "columns": ["serialno", "deviceid", "eventtime", "loopdata"]
}

Response

The response is an array of device events with details.

[
    {
        "serialno": "1749",
        "deviceid": "TT001041",
        "appdevid": 201,
        "eventtime": "2018-12-18T05:09:47.000Z",
        "updatetime": "2018-12-18T05:09:49.143Z",
        "download": 0,
        "try": 0,
        "fenceid": null,
        "fencename": null,
        "radius": null,
        "centerx": null,
        "centery": null,
        "vehiclex": null,
        "vehicley": null,
        "checkstatus": null,
        "memo": null,
        "loopdata": "$AS+999=0000000000000000"
    },
    {
        "serialno": "1750",
        "deviceid": "TT001041",
        "appdevid": 201,
        "eventtime": "2018-12-18T05:10:45.000Z",
        "updatetime": "2018-12-18T05:10:47.323Z",
        "download": 0,
        "try": 0,
        "fenceid": null,
        "fencename": null,
        "radius": null,
        "centerx": null,
        "centery": null,
        "vehiclex": null,
        "vehicley": null,
        "checkstatus": null,
        "memo": null,
        "loopdata": "$AS+999=0000000000000000"
    },
    ...
]


  • Contact Us

    Contact Us


  • SHA-256 Converter

    SHA-256 Converter