get_driver_bindings
To receive information about driver assignments and separations during a specified time interval, use the resource/get_driver_bindings method.
Endpoint
svc=resource/get_driver_bindings¶ms={"resourceId":<long>,
"unitId":<long>,
"driverId":<long>,
"timeFrom":<uint>,
"timeTo":<uint>}
This method returns a compact list of assignment and separation times with the corresponding unit IDs. Depending on the server configuration, it can use the same driver-assignment event data as the
eventsmethods, but its response remains limited to thetandufields. To retrieve the full event data, use theresource_driversdetector with events/load and events/get. To get the current assignment state, use events/get_last.
You can’t execute this request simultaneously with the following requests:
Parameters
| Name | Description |
|---|---|
resourceId |
Resource ID. |
unitId |
Unit ID. Use 0 for all units. |
driverId |
Driver ID. Use 0 for all drivers. |
timeFrom |
The beginning of the interval. |
timeTo |
The end of the interval. |
Response
{
"<text>":[{ /* driver ID */
"t":<uint>, /* time of assignment/separation */
"u":<long> /* unit ID in case of assignment, 0 in case of separation */
},
...],
...
}
Error codes
| Error code | Description |
|---|---|
| 4 | Failed to fetch the list of drivers or wrong input parameters. |
| 7 | No Request reports and messages or View drivers access right to the resource; no View object and its basic properties right to the unit; or the resource, unit, driver, or event service is unavailable. |