Discussions
API Integration with ESRI GeoEvent
Has anyone used Samsara API on ESRI GeoEvent? I'm using ESRI GeoEvent to call Samsara API. The problem I have is that GeoEvent cannot make consecutive requests for multiple pages of data. It is required for all the results to be returned in one request. I’ve tried the recommendation on Samsara’s site(https://kb.samsara.com/hc/en-us/articles/360006667552-Integrating-with-ESRI-GIS) but had no luck. I got “POST not allowed on /v1/fleet/vehicles/locations (version 2021.06.09)” for the v1 version, and “invalid token” for the new version of the API.
Posted by Chi Zhang over 1 year ago
Welcome to the Samsara Developer Discussion Forum!
This is a place where you can crowd-source solutions and best practices for integrating with Samsara.
We encourage you to post questions, and please don't hesitate to chime in on someone else's post if you have a good solution!
The Samsara product team will be answering questions and moderating the forum.
Posted by Tyler Freckmann over 2 years ago
What source does the odometer reading from v1/fleet/list come from? OBDII or GPS calculation?
We recently released an update to our integration with Samsara and are now supporting both OBDII and GPS calculated meter values from Samsara from the V2 API. Out of curiosity, which of the two sources was feeding the odometer value in the V1 API endpoint "/fleet/list"?
Posted by Ben Weinberg over 2 years ago
how to connect a script to samsara api
i have copied your script code and put my samsara key api, but when it runs an error of authentication appeared
Access to fetch at 'https://api.samsara.com/fleet/vehicles' from origin 'http://localhost' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
how can i do for connect my php system?
script type="text/javascript">
const options = {
method: 'GET',
headers: {
Accept: 'application/json',
Authorization: 'Bearer MY_SAMSARA_KEY'
}
};
fetch('https://api.samsara.com/fleet/vehicles', options)
.then(response => console.log(response))
.catch(err => console.error(err));
</script>
Posted by ricardo almost 2 years ago
How precise is the odometer reading coming from the legacy locations endpoint?
Does the odometer reading returned from the legacy locations endpoint include fractional mileage? For example, it returns meters, and when I convert to miles using division by 1609.344 and then use basic rounding (from midpoint), sometimes I don't get the result I expect (i.e. the mileage reading can round down when I expect it to round up).
I even cross compared with the new vehicle stats history endpoint and the last three digits always seem to be zero, which would tell me I lose precision.
Posted by Taco 🌮 almost 2 years ago
Create Custom Live Share Links
I'd like to generate a Live Share link through an API with a custom destination. Is this possible?
Please note I am not an API dev but before I go down the hole of putting one on this I'd like to know if it's even possible.
My Goal:
Send address and assigned vehicle asset data to Samasara (via Monday.com API) > Generate Live Share Link with custom route and expiration > Send back link to Monday.com with a webhook.
Posted by Kyle over 1 year ago
ETA Calculation
In [https://api.samsara.com/fleet/routes/{id}], how is the eta value being calculated? Is it coming straight from a Google Maps API? Using the vehicle's current speed along with posted speed limits? Any HOS considerations, truck routes, etc.?
Posted by Lucas Ketchum over 1 year ago
Remote Driver App Sign out
I would like to use workflow feature. Our drivers never sign out of Samsara, no matter how many times we remind them. Given this, a workflow cannot be started.
Any ability to remotely sign out a driver in the app?
example. Driver in Off Duty or Sleeper Berth for 2hr and sign out is initiated.
or is there an option to set driver login session timeouts?
Posted by Peter Ragusa almost 2 years ago
Live Share Via API
Is there any plans to manage Live Share links through the API?
Posted by Idas almost 2 years ago
Development / Sandbox site?
Hi all,
Quick question. Looking to add some features to our install of Samsara, using webhooks to communicate between Samsara and other systems we use.
Wondering if there is any way we can get a sandbox or development version of our Samsara account, so that we can test the changes without them going into production.
Thanks!
Posted by Kiran Ramaswamy about 2 years ago