Discussions
Discrepancy between Samsara Activity Report and Drivers Efficiency API End Point
Hey guys,
Quick question! I have noticed that the miles in the Samsara Activity Report over a given time range do not match the miles that I am returning from the API. Although the numbers are not far off, not a single one of them is matching exact, with the majority of them being inflated in the Samsara UI.
Here is an example:
One of my drivers shows 4,226.5 mi in the dashboard, while the value under the totalDistanceDrivenMeters key shows 6539284 or 4063.322695 miles. This is the case with all the drivers.
This data was being pulled through the month of march through both the UI and the dashboard. I will put my API call below for a reference:
RestClient.get"https://api.samsara.com/fleet/drivers/efficiency?startTime=2021-03-01T00:00:00Z&endTime=2021-03-31T23:59:00Z",
{:Authorization => '''}
Any ideas what may be going on?
Posted by Tyler Pulse almost 2 years ago
Fuel Card Data
Is there any way to get at the Fuel Card Data? I would like to create an ad-hoc report that compares fuel purchased to driver HOS state and report errors if anyone is ON-DUTY.
Posted by David C. Moody almost 2 years ago
Plans for allowing more than 30 days worth of data in one call
Hey guys,
Do we have any plans to extend the 30 day limit on the startTime and endTime range? Or is there a way to to do that currently?
Thanks,
Tyler Pulse
Posted by Tyler Pulse over 2 years ago
Is it possible to get or calculate MPG fuel economy ?
Hello! I am looking for ways to get data feed types that would let me calculate the vehicle fuel economy in MPG for a given time period. I found fuelPercents and obdOdometerMeters diagnostic types, but what I am really after is an absolute value of fuel gallons or liters.
Thanks!
Posted by Chris over 2 years ago
Pairing Together endTime and startTime data attributes
Hey all,
I am trying to get Driver Efficiency data between two dates.
It works fine if I just have a startTime or endTime but when I try to pair them through the URL, I get a 400. Here is my URL:
"https://api.samsara.com/fleet/drivers/efficiency?startTime=2020-08-25T00:00:00Z&endTime=2020-08-25T00:00:00Z
What am I doing wrong?
Posted by Tyler Pulse over 2 years ago