driver_actions_list
To get the manual actions registered for a driver within a time interval, use the resource/driver_actions_list method. Manual actions include assigning a driver to a unit, ending a driver’s assignment, and ignoring automatic driver assignment events (marking as false). To register a manual action, use resource/driver_actions_register.
In Wialon Local, this method is available starting from version 2604.
Endpoint
svc=resource/driver_actions_list¶ms={
"resourceId": <long>,
"driverId": <long>,
"timeFrom": <uint>,
"timeTo": <uint>
}
Parameters
The request must contain the following parameters:
| Parameter | Description |
|---|---|
resourceId |
Resource ID. |
driverId |
Driver ID. |
timeFrom |
Beginning of the interval, UNIX time. |
timeTo |
End of the interval, UNIX time. |
Response
If the request is completed successfully, the response contains the actions grouped by driver ID:
{
"<driver_id>": [
{
"t": <uint>, /* action time, UNIX time */
"u": <long>, /* unit ID */
"a": <uint>, /* action type: 0 for unassignment, 1 for assignment, 2 for ignore */
"lat": <double>, /* latitude */
"lon": <double>, /* longitude */
"f": <uint>, /* flags: 1 when the position is private */
"tt": <uint>, /* time until which the ignore action is active; returned only for the ignore action */
"is": <uint> /* ignored state; returned only for the ignore action when a state is set */
}
]
}
Otherwise, an error code is returned.
Error codes
| Error code | Description |
|---|---|
| 3 | The required messages can’t be retrieved. |
| 4 | Wrong input parameters, or the specified driver isn’t found in the resource. |
| 6 | The operation can’t be completed. |
| 7 | Access denied or resource unavailable. The user may not have the Create, edit, and delete drivers access right on the resource. |