get a last event of devices
GET
/partners/companies/{company_name}/devices/lasteventReturns a list of latest events from devices in the company passed into the request.
Request
Path Params
company_name
string
required
Company name in RoscoLive
Query Params
inactive
boolean
optional
A flag for including inactive devices in the response if set to true
Example:
false
Request samples
Responses
Success(200)
HTTP Code: 200
Content Type : JSONapplication/json
Data Schema
meta
object
required
Request metadata object
code
integer
required
HTTP status code returned by server
response
object
required
Contains response data
devices
array [object {11}]
required
List of devices for the passed in Company Name
result
string
required
"OK" if request successful, otherwise "Fail"
Example
{
"meta": {
"code": 200
},
"response": {
"devices": [
{
"device_id": "12345",
"driver_id": 12345,
"driver_name": "Thomas Hudson",
"events": [
{
"endtime": "2022-10-18T18:47:19.0Z",
"id": "1909786",
"name": "InputSensor9",
"starttime": "2022-10-18T18:47:09.0Z"
},
{
"endtime": "2022-10-18T18:47:19.0Z",
"id": "1909786",
"name": "InputSensor9",
"starttime": "2022-10-18T18:47:09.0Z"
}
],
"general_status": "pending_awake",
"gps": {
"dir": "84",
"dst": "2756",
"key": true,
"lan": "40.70168685913086",
"lon": "-73.81008148193359",
"spd": "40",
"timestamp": "2024-01-01T17:32:41.0Z"
},
"ignition": {
"state": true,
"ts": "2024-05-04T23:57:01.0Z"
},
"modem_rssi": "-51",
"online": false,
"sleep": 2,
"vehicle_name": "Truck 1"
},
{
"device_id": "12345",
"driver_id": 12345,
"driver_name": "Mrs. Monique Aufderhar DVM",
"events": [
{
"endtime": "2022-10-18T18:47:19.0Z",
"id": "1909786",
"name": "InputSensor9",
"starttime": "2022-10-18T18:47:09.0Z"
},
{
"endtime": "2022-10-18T18:47:19.0Z",
"id": "1909786",
"name": "InputSensor9",
"starttime": "2022-10-18T18:47:09.0Z"
}
],
"general_status": "offline",
"gps": {
"dir": "84",
"dst": "2756",
"key": false,
"lan": "40.70168685913086",
"lon": "-73.81008148193359",
"spd": "40",
"timestamp": "2024-01-01T17:32:41.0Z"
},
"ignition": {
"state": true,
"ts": "2024-05-04T23:57:01.0Z"
},
"modem_rssi": "-51",
"online": false,
"sleep": 2,
"vehicle_name": "Truck 1"
},
{
"device_id": "12345",
"driver_id": 12345,
"driver_name": "Robin Welch MD",
"events": [
{
"endtime": "2022-10-18T18:47:19.0Z",
"id": "1909786",
"name": "InputSensor9",
"starttime": "2022-10-18T18:47:09.0Z"
}
],
"general_status": "awake",
"gps": {
"dir": "84",
"dst": "2756",
"key": false,
"lan": "40.70168685913086",
"lon": "-73.81008148193359",
"spd": "40",
"timestamp": "2024-01-01T17:32:41.0Z"
},
"ignition": {
"state": true,
"ts": "2024-05-04T23:57:01.0Z"
},
"modem_rssi": "-51",
"online": true,
"sleep": 2,
"vehicle_name": "Truck 1"
}
]
},
"result": "OK"
}
Last modified: 6 months ago