Documentation Index
Fetch the complete documentation index at: https://samsara-showcase.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Overview
The/fleet/vehicles/stats endpoint is designed to give you a snapshot of telematics data at a given point in time.
The key feature is the time query parameter. This allows you to specify a point in time that you’d like to snapshot. The time parameter defaults to “now” if not provided.
There are many different types of telematics data that you can query for. See the Query Parameters section for a complete list.
Current Snapshot
The following request will provide you with a current snapshot of the locations of all of your vehicles:data array, which contains an entry for each vehicle in the fleet. In this example, there are two vehicles: "Big Red", and "Little Red". Each vehicle contains a gps field which contains its last GPS ping.
gps field contains a time, which is the timestamp of the GPS ping. You may notice that Big Red’s timestamp is 2 months older than Little Red’s. This is because the endpoint returns the last known value for the stat type requested. In this case, Big Red has been retired, so its last GPS ping was from a long time ago. Currently, there is no way to filter out inactive or retired vehicles.
Historical Snapshot
If you want to get a snapshot of telematics data for a historical point in time, you can use thetime query parameter. This is different from a Historical Report because it will simply provide the last known stat value for that point in time - as opposed to all the stat value readings for a given time range.
For example, the following request will tell me the location of all my vehicles at 2020-07-25T00:00:00Z: