How To Get a Driver's Duty Status Logs Using the SDK

Applies To

  • SDK
  • HOS
  • API Call

Procedure

  1. Go to the MyGeotab SDK Runner: https://my.geotab.com/sdk/api/apiRunner.html 
  2. Enter the server, database and your credentials to log in
  3. Enter the following API call and Click Run
api.call("Get", {
"typeName": "DutyStatusLog",
"search": {
"UserSearch": {"id":"b1"}, 
"fromDate":"2018-06-01T00:00:00.000Z",
"toDate":"2018-06-02T05:00:00.000Z"
}
}, function(result) {
console.log("Done: ", result);
}, function(e) {
console.error("Failed:", e);
});

 

Additional Information

Note: The timestamp in fromDate and toDate are in UTC

The User ID can be found from the URL of the User Edit page, MyGeotab > Administraion > Users > 

https://my.geotab.com/database_name/#user,id:b1