Avatar

Get list of drivers for a specific day

0

What diagnostic would I need to run to retrieve a list of drivers for a specified date?

jmb_engineer

Please sign in to leave a comment.

5 comments

0
Avatar
var apiMethod = {
"method" : "Get",
"params" : {
"typeName" : "User",
"credentials" : (authObj.result.credentials),
"search" : {
"fromDate" : beginningOfDay,
"toDate" : endOfDay
}
}
};



This is the object I'm passing to geotab and the results aren't what I assumed they would be. For instance, I expected this to retrieve all users from a specified date range, the beginning of the day to the end of the day. However, the results give me users who have a lastAccessDate from several days prior to the date range I am providing. What does this mean?

 

jmb_engineer 0 votes
0
Avatar

Can you clarify the use-case? Is it that you want a list of driver's who have taken a trip (driven) in a time range or a list of users who have accessed the MyGeotab system?

Steve Hansen 0 votes
0
Avatar

I'm looking for a list of drivers who have taken a trip in a date range.

Thanks for your time

jmb_engineer 0 votes
0
Avatar

I think the best way is to use Trips API to get all trips in the range. Then loop through the trips and collect unique drivers.

Steve Hansen 0 votes