Events Api
Extended api for existing trackon api with various filters such as pagination, sorting etc.
Base URL
- Base path
/api2/events
.
Authorization
- Requires
Cookie
:JSESSIONID=session_id
Events
GET /
Description: Retrive events of various vehicles at once with various filters.
Query Parameters
Parameter | Type | Description | Required | Default |
---|---|---|---|---|
type |
string[] |
Array of event types to filter | Yes | - |
deviceIds |
string[] |
Array of device IDs to filter | Yes | - |
from |
string |
Start date/time for event filtering | Yes | - |
to |
string |
End date/time for event filtering | Yes | - |
sort |
string |
Sort order ('asc' or 'desc') | No | - |
page |
number |
Page number for pagination | No | 1 |
limit |
number |
Number of items per page | No | 20 |
Note: For array parameters (
type
anddeviceIds
), repeat the parameter name for each value in the query string. Example:?type=value1&type=value2
cURL Request:
curl -X GET "https://api.trackongps.com/api2/events?type=ignitionOn&type=ignitionOff&deviceIds=device1&deviceIds=device2&from=2023-10-01T00:00:00Z&to=2023-10-31T23:59:59Z&sort=asc&page=1&limit=20" \
-H "Cookie: JSESSIONID=your_session_id" \
-H "Content-Type: application/json"
Response:
200 OK - Response Body
[
{
"id": 250957374,
"type": "ignitionOff",
"eventtime": "2025-04-13T22:15:46.000+00:00",
"deviceid": 685,
"positionid": 1323734299,
"geofenceid": null,
"attributes": "{}",
"maintenanceid": null
},
{
"id": 250957248,
"type": "ignitionOff",
"eventtime": "2025-04-13T23:45:00.000+00:00",
"deviceid": 685,
"positionid": 1323733079,
"geofenceid": null,
"attributes": "{}",
"maintenanceid": null
},
{
"id": 250964495,
"type": "ignitionOff",
"eventtime": "2025-04-14T00:28:17.000+00:00",
"deviceid": 685,
"positionid": 1323821904,
"geofenceid": null,
"attributes": "{}",
"maintenanceid": null
}
]