Stay organized with collections
Save and categorize content based on your preferences.
Fleet Engine provides the SearchTripsRequest endpoint that you can use to find
trips. This document describes two scenarios where you might use this feature.
See SearchTripsRequest for gRPC or trips.Search for REST.
Determine active trips for a vehicle
To do find the active trips for a specific fields, use the SearchTripsRequest
message to set the vehicle_id to the vehicle under consideration and set
active_trips_only to true.
Reconcile vehicle availability between your system and Fleet Engine
In some situations, you might see results returned by SearchVehicles that
don't correspond with the vehicles you know to be available in your system and
your fleet. This happens because SearchVehicles either doesn't show vehicles
with active trips, or pushes them down in the results ranking. One cause of this
is when vehicles have completed trips, but the trip status not been properly set
to either COMPLETE or CANCELED. By using SearchTrips to find open trips,
you can evaluate vehicles to ensure that TripStatus in your system matches
that of Fleet Engine.
To use SearchTrips in this way, set the following in the SearchTripsRequest
message:
vehicle_id should be empty.
active_trips_only should be true.
minimum_staleness should be a time greater than most trip durations; for
example, one hour.
The results of such a request include Trips that are neither COMPLETE nor
CANCELED, and have not been updated in over an hour. You can then examine
these trips to ensure that their status in Fleet Engine is properly updated.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-03-01 UTC."],[[["Fleet Engine's `SearchTripsRequest` helps find trips, useful for identifying active trips and reconciling vehicle availability."],["Use `SearchTripsRequest` with `vehicle_id` and `active_trips_only` to find a specific vehicle's active trips."],["Discrepancies between your system and Fleet Engine's vehicle availability can be addressed by using `SearchTripsRequest` to identify open trips and ensure trip statuses are synchronized."],["Trips older than 7 days are automatically deleted in Fleet Engine."]]],["The `SearchTripsRequest` endpoint in Fleet Engine allows finding trips, focusing on two scenarios. First, setting `vehicle_id` and `active_trips_only` to `true` identifies active trips for a specific vehicle. Second, to reconcile vehicle availability, `vehicle_id` is left empty, `active_trips_only` is `true`, and `minimum_staleness` is set to over an hour. This identifies open, outdated trips (neither `COMPLETE` nor `CANCELED`) for status reconciliation. Trips are only searchable for seven days.\n"]]