Legacy APIs

[legacy] Get Driver efficiency data grouped by vehicles.

⚠️ LEGACY/DEPRECATED API: This API returns data from the legacy Driver Efficiency (Eco-Driving) product and is unavailable to new customers. Use the Driver Efficiency (Eco-Driving) dataset in the beta Custom Reports API for equivalent data.

This endpoint will return driver efficiency data that has been collected for your organization and grouped by vehicle drivers used based on the time parameters passed in. Results are paginated.

Note: The data from this endpoint comes from the Driver Efficiency (Eco-Driving) Report. The existing /fleet/drivers/efficiency endpoint has now been moved to Legacy.

<b>Rate limit:</b> 5 requests/sec (learn more about rate limits <a href="https://developers.samsara.com/docs/rate-limits" target="_blank">here</a>).

To use this endpoint, select Read Driver Efficiency under the Fuel & Energy category when creating or editing an API token. <a href="https://developers.samsara.com/docs/authentication#scopes-for-api-tokens" target="_blank">Learn More.</a>

Submit Feedback: Likes, dislikes, and API feature requests should be filed as feedback in our <a href="https://forms.gle/zkD4NCH7HjKb7mm69" target="_blank">API feedback form</a>. If you encountered an issue or noticed inaccuracies in the API documentation, please <a href="https://www.samsara.com/help" target="_blank">submit a case</a> to our support team.

get/driver-efficiency/vehicles

Request

  • Base URL
    https://api.samsara.com
  • Auth
    HTTP bearer

Query parameters

startTimestring required

A start time in RFC 3339 format. Must be in multiple of hours and at least 1 day before endTime. Timezones are supported. Note that the most recent 72 hours of data may still be processing and is subject to change and latency, so it is not recommended to request data for the most recent 72 hours. (Examples: 2019-06-11T19:00:00Z, 2015-09-12T14:00:00-04:00).

endTimestring required

An end time in RFC 3339 format. Must be in multiple of hours and no later than 3 hours before the current time. Timezones are supported. Note that the most recent 72 hours of data may still be processing and is subject to change and latency, so it is not recommended to request data for the most recent 72 hours. (Examples: 2019-06-13T19:00:00Z, 2015-09-15T14:00:00-04:00).

vehicleIdsstring

A filter on the data based on this comma-separated list of vehicle IDs and externalIds. Example: vehicleIds=1234,5678,samsara.vin:1HGBH41JXMN109186

dataFormatsstring[]

A comma-separated list of data formats you want to fetch. Valid values: score, raw and percentage. The default data format is score. Example: dataFormats=raw,score

tagIdsstring

A filter on the data based on this comma-separated list of tag IDs. Example: tagIds=1234,5678

parentTagIdsstring

A filter on the data based on this comma-separated list of parent tag IDs, for use by orgs with tag hierarchies. Specifying a parent tag will implicitly include all descendent tags of the parent tag. Example: parentTagIds=345,678

afterstring

If specified, this should be the endCursor value from the previous page of results. When present, this request will return the next page of results that occur immediately after the previous page of results.

Response

OK response.

Example response

{
  "data": [
    {
      "difficultyScore": {
        "overallScore": "4",
        "topographyScore": "5",
        "vehicleWeightScore": "4"
      },
      "percentageData": {
        "anticipationPercentage": 9.5,
        "coastingPercentage": 45.6,
        "cruiseControlPercentage": 45.6,
        "greenBandPercentage": 78.9,
        "highGradeRoadDrivingPercentage": 15.3,
        "highTorquePercentage": 23.4,
        "idlingPercentage": 12.8,
        "overSpeedPercentage": 5.6,
        "wearFreeBrakePercentage": 88.2
      },
      "rawData": {
        "anticipationBrakeEventCount": 17,
        "averageVehicleWeightKg": 14500,
        "coastingDurationMs": 1900800,
        "cruiseControlDurationMs": 3283200,
        "driveTimeDurationMs": 7200000,
        "engineOnDurationMs": 7500000,
        "greenBandDurationMs": 5683200,
        "highGradeRoadDrivingDurationMs": 1108800,
        "highTorqueDurationMs": 1684800,
        "idlingDurationMs": 921600,
        "overSpeedDurationMs": 403200,
        "totalBrakeDurationMs": 1022400,
        "totalBrakeEventCount": 85,
        "wearFreeBrakeDurationMs": 6340800
      },
      "scoreData": {
        "anticipationScore": "C",
        "coastingScore": "C",
        "cruiseControlScore": "B",
        "greenBandScore": "A",
        "highTorqueScore": "A",
        "idlingScore": "B",
        "overSpeedScore": "B",
        "overallScore": "A",
        "wearFreeBrakeScore": "A"
      },
      "vehicleId": "vehicle_001"
    }
  ],
  "pagination": {
    "endCursor": "MjkY",
    "hasNextPage": true
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.