Method: providers.trips.search

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

string

Required. Must be in the format providers/{provider}. The provider must be the Project ID (for example, sample-cloud-project) of the Google Cloud Project of which the service account making this call is a member.

Request body

The request body contains data with the following structure:

JSON representation
{
  "header": {
    object (RequestHeader)
  },
  "vehicleId": string,
  "activeTripsOnly": boolean,
  "pageSize": integer,
  "pageToken": string,
  "minimumStaleness": string
}
Fields
header

object (RequestHeader)

The standard Fleet Engine request header.

vehicleId

string

The vehicle associated with the trips in the request. If unspecified, the returned trips do not contain:

  • currentRouteSegment
  • remainingWaypoints
  • remainingDistanceMeters
  • etaToFirstWaypoint
activeTripsOnly

boolean

If set to true, the response includes Trips that influence a driver's route.

pageSize

integer

If not set, the server decides the number of results to return.

pageToken

string

Set this to a value previously returned in the SearchTripsResponse to continue from previous results.

minimumStaleness

string (Duration format)

If specified, returns the trips that have not been updated after the time (current - minimumStaleness).

A duration in seconds with up to nine fractional digits, ending with 's'. Example: "3.5s".

Response body

trips.search response message.

If successful, the response body contains data with the following structure:

JSON representation
{
  "trips": [
    {
      object (Trip)
    }
  ],
  "nextPageToken": string
}
Fields
trips[]

object (Trip)

The list of trips for the requested vehicle.

nextPageToken

string

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.