GET /drivers

Requests the details of drivers visible to the authenticated user.

Parameters

auth

(required)

The authentication token received in response to the call to POST authentication_credentials or GET authentication_token. Applications should pass the authentication token in the custom "X-auth" HTTP header to avoid passing it in in the query string.

system_type

(optional)

Indicates that only drivers from the specified system should be returned.

organisation_id

(optional) *

Indicates that only drivers belonging to the specified organisation should be returned. * Required when retrieving data from the Fleet Manager system. Ignored when retrieving data from the X-Drive system.

driver_ids

(optional) *

A comma separated list of driver identifiers indicating that only drivers with the specified identifiers should be returned. * Ignored when retrieving data from the X-Drive system.

site_id

(optional) *

Indicates that only drivers belonging to the specified site should be returned. NOTE: This parameter cannot be used in conjunction with the driver_ids parameter and will be ignored if both are passed. * Ignored when retrieving data from the Asset Management or X-Drive system.

include_positions

(optional) *

Indicates whether or not to include the last known position of each driver that is returned. Passing a value of 1, t, or true will result in positions being included. * Ignored when retrieving data from the X-Drive system.

include_locations

(optional)

Indicates whether or not to include locations/addesses resolved by reverse-geocoding for the positions that are returned. Passing a value of 1, t, or true will result in locations being included. NOTE: Including locations is substantially slower, and should only be done when absolutely necessary! Where possible, applications should call GET geocoding/location or POST geocoding/coordinates to retrieve locations/addresses when required.

include_associated

(optional) *

Indicates whether or not to include the vehicle associated with each driver that is returned. Passing a value of 1, t, or true will result in the associated vehicle being included. NOTE: This parameter can only be used in conjunction with the include_positions parameter. * Ignored when retrieving data from the X-Drive system.

callback

(optional)

Only available for JSON format. If supplied, the response will use JSONP format with a callback of the given name.

date_format

(optional)

Only available for JSON format. If supplied, the response will contain JSON dates serialized in the specified format. 0 = Timestamp with offset e.g. "\/Date(1346080140000+0500)\/". 2 = ISO8601 e.g. "2012-08-27T15:09:00.0000000+05:00". Applications may pass this parameter in the custom "X-DateFormat" custom HTTP header instead of this query parameter.

globalisation

(optional)

The authenticated user's globalisation preferences as received in response to the call to GET account/profile or in the custom "X-Globalisation" HTTP header returned in response to authenticated calls. Applications should pass this back to the server with every call, either in this parameter, or in the the custom "X-Globalisation" HTTP header if automatic conversion of values is required.

Request Content Type

N/A

Response

Returns a collection of one or more Driver resources in the requested format.

Response Content Type

application/json, application/javascript (JSONP), application/xml or text/csv as requested

Give It A Try...

Enter appropriate parameter values then click on the link which appears to try the API call...

Note: You must have JavaScript support enabled in your browser to use this feature.

auth

(required)

system_type

(optional)

organisation_id

(optional) *

driver_ids

(optional) *

site_id

(optional) *

include_positions

(optional) *

include_locations

(optional)

include_associated

(optional) *

callback

(optional)

date_format

(optional)

globalisation

(optional)

Response format

 

Request Examples

GET /drivers?auth=e722fa0c702f42b68e2fdb771a80caed
GET /drivers.json?auth=e722fa0c702f42b68e2fdb771a80caed
GET /drivers.xml?auth=e722fa0c702f42b68e2fdb771a80caed
GET /drivers.csv?auth=e722fa0c702f42b68e2fdb771a80caed
GET /drivers?auth=e722fa0c702f42b68e2fdb771a80caed&system_type=AssetManagement

Response Examples

JSON body:

[{"SystemType":"AssetManagement","DriverId":"beeaeddf-3e2f-4e9f-9ff9-9d434ea9e3c4","Name":" Krista 0 Musterfrau 0","OtherDeviceDriverId":"10000000294100"},
{"SystemType":"AssetManagement","DriverId":"ea4ea382-8bff-4e3b-b46e-796867c2366e","Name":" Krista 5 Musterfrau 5","OtherDeviceDriverId":"10000000294600"},{"SystemType":"AssetManagement","DriverId":"af8d7efc-60a2-41ee-bc01-446db8d2ebf9","Name":" Krista 7 Musterfrau 7","OtherDeviceDriverId":"00000000057900"}]

XML body:

<ArrayOfDriver xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
	<Driver SystemType="AssetManagement" DriverId="beeaeddf-3e2f-4e9f-9ff9-9d434ea9e3c4">
		<Name>Krista 0 Musterfrau 0</Name>
		<OtherDeviceDriverId>10000000294100</OtherDeviceDriverId>
	</Driver>
	<Driver SystemType="AssetManagement" DriverId="a823a201-8c14-4384-bfbb-f390fd41ebff">
		<Name>Krista 16 Musterfrau 16</Name>
		<OtherDeviceDriverId>10000000295700</OtherDeviceDriverId>
	</Driver>
</ArrayOfDriver>

CSV body:

SystemType,DriverId,OrganisationId,SiteId,Name,EmployeeNumber,DeviceDriverId,OtherDeviceDriverId,LatestPosition,AssociatedVehicle
AssetManagement,e274cb50-d779-4486-9124-7585de39e795,29b66708-c14d-464b-a416-2a2f4950b8ce,,Achim Bernd Rau,,,DF000029287180,,
AssetManagement,294c4e24-e801-47e0-aa0c-a89b60491edf,29b66708-c14d-464b-a416-2a2f4950b8ce,,Alexander Barg,,,DF000028966660,,