ANSWERED

When a driver logs in and logs out to ELD

Hello. We are looking to pull driver worked hours for payroll purposes. We know how long a driver has worked for from the APIs available. We also see the flags of "driving", "onDuty", and "offDuty". But we do not see flags for login/logout, as that will be indicative of when a driver clocks in and out.
ANSWERED

CORS Policy blocking Local File Application

Hi There, The company I work for recently got Samsara products, and I'm trying to increase functionality and automate some of the workload through the Api. So far from the thorough documentation it's been a breeze, but the problem is that for the application I've created, there is no webserver it's running on. I'm solely using client JavaScript to write the program and the CORS policy set up on the API's end is blocking my request since my origin locally, 'null' is invalid according to the policy. Is it possible on Samsara's end to change the "Access-Control-Allow-Origin" http header to be changed to a value of " * " (Meaning any origin is valid)? This would allow for my program to have access and to the API, and make it so I don't need to host a webserver for the application. Thank you, I appreciate the help. Thanks for the help
ANSWERED

how to get 'test/simulation' data

building an application for equipment insurance. The concept is as follows: 1)gather gps coordinates from API 2)compare coordinates against fires burning 3)execute result to user... I don't have a fleet of vehicles out there. but I would like the functionality to enable testing various coordinate locations of vehicles/equipment/objects. help appreciated
ANSWERED

GetVehicleStatsFeed returned cursor is confusing

Hello, Could you please elaborate on how endCursor that is returned by "fleet/vehicles/stats/feed" api works under the hood? Does it create a snapshot whenever we make a call and return that snapshot id as the cursor? How do I make sure I get all the vehicle stats between time A and B without loosing any data? Thanks, Roman
ANSWERED

A recommendation on how to track revision history using hours of service data

Hello there. I'm currently working on a pilot integration with Samsara API. And I have a requirement to track revision history using hours of service data. Maybe you have a recommendation on the best practice to do it? Unfortunately, I haven't found any suitable API method for this purpose. Many thanks for considering my request.
ANSWERED

Is there a way we can add a pdf attachment to a route created via Rest API ?

We can successfully create route with multiple stops , however we need a pdf document to be attached to the route . Is that possible using api ?
ANSWERED

Retrieve odometer after an ignition off event

Hi, I was wondering if there was webhook functionality to retrieve the odometer reading after an ignition off event. Is that capability present in your platform?
ANSWERED

Daily Logs - Pagination

We are using the HOS daily-logs endpoint to get the drivers daily summary. If we call the endpoint for a single date, the endpoint returns 512 records, and the hasNextPage property is true - so we make a subsequent call to fetch more records. We are hitting an issue where the first 5 pages returns 512 records, and the subsequent 11 pages return between 25 and 40 records on each request. The time taken to complete each request appears to be constant. Why do we get an inconsistent number of records? The last pagination request returns with the following error: {"message":"Internal Server Error","requestId":"ptjravzm-wntlexvd"}
ANSWERED

Route audit-logs feed missing events.

https://api.samsara.com/fleet/routes/audit-logs/feed Hi We are calling the routes audit-logs fead every 5 seconds. Each time we call we use the "endCursor" from the previous call as the "after" parameter. Occasionally we are missing a route stop departure. If i go back and call the end point with the same "endCursor" i see in the log, the route stop departure shows up. Why is it not showing up the first time? How do I troubleshoot this? What logs can I give you? The only thing I can think of trying is to stop using the new "endCursor" when the returned data field is empty. Would this make a difference? Is the calling every 5 seconds a reasonable use pattern? Thanks
ANSWERED

Construct URL to view asset

I am looking to construct a URL to view one asset over a period of time. I have constructed a URL using my Asset ID but was wondering if you could help me with the the last portion of the URL, the number. I could use help constructing the number based on date and time period that I want to view the asset location.