AI-generated Key Takeaways
- 
          Retrieve all trips associated with a specific vehicle using a POST request. 
- 
          Specify the provider and vehicle ID in the request to filter the trips. 
- 
          The response includes trip details and a token for pagination to retrieve more results if available. 
- 
          Optionally, refine the search by specifying whether to include only active trips, limiting the number of results, and setting a minimum staleness for data retrieval. 
Get all the trips for a specific vehicle.
HTTP request
POST https://fleetengine.googleapis.com/v1/{parent=providers/*}/trips:search
The URL uses gRPC Transcoding syntax.
Path parameters
| Parameters | |
|---|---|
| parent | 
 Required. Must be in the format  | 
Request body
The request body contains data with the following structure:
| JSON representation | 
|---|
| {
  "header": {
    object ( | 
| Fields | |
|---|---|
| header | 
 The standard Fleet Engine request header. | 
| vehicleId | 
 The vehicle associated with the trips in the request. If unspecified, the returned trips do not contain: 
 | 
| activeTripsOnly | 
 If set to true, the response includes Trips that influence a driver's route. | 
| pageSize | 
 If not set, the server decides the number of results to return. | 
| pageToken | 
 Set this to a value previously returned in the  | 
| minimumStaleness | 
 If specified, returns the trips that have not been updated after the time  A duration in seconds with up to nine fractional digits, ending with ' | 
Response body
trips.search response message.
If successful, the response body contains data with the following structure:
| JSON representation | 
|---|
| {
  "trips": [
    {
      object ( | 
| Fields | |
|---|---|
| trips[] | 
 The list of trips for the requested vehicle. | 
| nextPageToken | 
 Pass this token in the SearchTripsRequest to page through list results. The API returns a trip list on each call, and when no more results remain the trip list is empty. |