본문으로 바로가기

Driver Status DutyStatusAvailability and DutyStatusAvailabilitySearch

RKoon-1279
원글 작성자

I want to just get the status of the driver. No other stuff and really do not want to pass the date either. Just current status. I thought I would use the DutyStatusAvailability but it does not give me the current status.. Do I need to use the DutyStatusAvailabilitySearch  

Below is my code that works just to get availability but no status.

Ideas? Thoughts?

 

{ "method": "Get", "params": { "search": { "UserSearch": { "id": "*****" } }, "typeName": "DutyStatusAvailability", "credentials": { "database": "mydatabase", "path": "ThisServer", "sessionId": "mysessionid", "userName": "myusername" } } }

 

대화에 참여하기

You need to be logged in to reply to this post and participate in the Geotab Community discussions.

최고 답변

jpaz-1560
Geotabber

@RKoon_664​ Updated response.

 

You should be able to retrieve the status for the driver by making an API call to DutyStatusLog. You do need to provide a fromDate with the current date and time for getting the latest status along with the includeBoundaryLogs as true. This will retrieve the latest status for the driver.

 

{ "method": "Get", "params": { "typeName": "DutyStatusLog", "search": { "includeBoundaryLogs": "true", "userSearch": { "id": "MY_ID" }, "fromDate": "2022-01-31T19:29:14.018Z" }, "credentials": { "database": "DATABASE", "userName": "USERNAME", "sessionId": "SESSION_ID" } } }

 

 

답글 1개

jpaz-1560
Geotabber

@RKoon_664​ Updated response.

 

You should be able to retrieve the status for the driver by making an API call to DutyStatusLog. You do need to provide a fromDate with the current date and time for getting the latest status along with the includeBoundaryLogs as true. This will retrieve the latest status for the driver.

 

{ "method": "Get", "params": { "typeName": "DutyStatusLog", "search": { "includeBoundaryLogs": "true", "userSearch": { "id": "MY_ID" }, "fromDate": "2022-01-31T19:29:14.018Z" }, "credentials": { "database": "DATABASE", "userName": "USERNAME", "sessionId": "SESSION_ID" } } }

 

 

여전히 궁금한 점이 있으신가요?