On-demand Rides and Deliveries Solution is currently available only to select partners. Contact sales to learn more.

Method: archive.providers.trips.collectCalls

Stay organized with collections Save and categorize content based on your preferences.

Returns a list of all API calls referencing a trip within the given time window.

HTTP request

GET https://fleetengine.googleapis.com/v1/archive/{trip=providers/*/trips/*}:collectCalls

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
trip

string

Required. Must be in the format providers/{provider}/trips/{trip}. 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.

Query parameters

Parameters
header

object (RequestHeader)

Optional. The standard Fleet Engine request header.

dataset

string

Optional. Name of the Cloud Logging sink dataset.

timeWindow

object (TimeWindow)

Required. The time window for which to list trips. Only trips that had at least one update performed during the time window will be returned.

modifyingCallsOnly

boolean

Optional. If true then only modifying API calls like create and update will be included in the results. If unspecified, all API calls will be returned.

pageSize

integer

Optional. The maximum number of trips to return. The service may return fewer than this value. If unspecified, the server will decide the number of results to return.

pageToken

string

Optional. A page token, received from a previous ListTrips call. Provide this to retrieve the subsequent page.

When paginating, all other parameters provided to ListTrips must match the call that provided the page token.

maximumBytesBilled

string (Int64Value format)

Optional. This parameter is used to limit BigQuery costs. Limits the bytes billed for this request. Requests with bytes billed above this limit will fail (without incurring a charge). If the parameter is not specified, the system uses the default project limit set by BigQuery. This is either unlimited, or whatever you have specified as your project default with BigQuery. See BigQuery documentation for details.

Request body

The request body must be empty.

Response body

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

trips.collectCalls response message. Next id: 3

JSON representation
{
  "apiCalls": [
    {
      object (TripApiCall)
    }
  ],
  "nextPageToken": string
}
Fields
apiCalls[]

object (TripApiCall)

The list of API calls for the requested trip and time window. Calls are sorted from oldest to most recent based on server time.

nextPageToken

string

Pass this token in the CollectTripCallsRequest to continue to list results. If all results have been returned, this field is an empty string or not present in the response.

TripApiCall

Describes an API call related to a task. Next id: 6

JSON representation
{
  "serverTime": string,

  // Union field call can be only one of the following:
  "createTrip": {
    object (CreateTripCall)
  },
  "getTrip": {
    object (GetTripCall)
  },
  "updateTrip": {
    object (UpdateTripCall)
  }
  // End of list of possible types for union field call.
}
Fields
serverTime

string (Timestamp format)

The timestamp of the call being received by the server.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

Union field call. The actual API call description related to the trip. call can be only one of the following:
createTrip

object (CreateTripCall)

Result is a create trip call.

getTrip

object (GetTripCall)

Result is a get trip call.

updateTrip

object (UpdateTripCall)

Result is an update trip call.

CreateTripCall

Describes a trips.create API call. Next id: 4

JSON representation
{
  "request": {
    object (CreateTripRequest)
  },
  "response": {
    object (Trip)
  },
  "errorResponse": {
    object (ErrorResponse)
  }
}
Fields
request

object (CreateTripRequest)

The request message sent to create the trip.

response

object (Trip)

The trip entity created.

errorResponse

object (ErrorResponse)

The errorResponse returned.

CreateTripRequest

trips.create request message.

JSON representation
{
  "header": {
    object (RequestHeader)
  },
  "parent": string,
  "tripId": string,
  "trip": {
    object (Trip)
  }
}
Fields
header

object (RequestHeader)

The standard Fleet Engine request header.

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.

tripId

string

Required. Unique Trip ID. Subject to the following restrictions:

  • Must be a valid Unicode string.
  • Limited to a maximum length of 64 characters.
  • Normalized according to Unicode Normalization Form C.
  • May not contain any of the following ASCII characters: '/', ':', '?', ',', or '#'.
trip

object (Trip)

Required. Trip entity to create.

When creating a Trip, the following fields are required:

  • tripType
  • pickupPoint

The following fields are used if you provide them:

  • numberOfPassengers
  • vehicleId
  • dropoffPoint
  • intermediateDestinations

Only EXCLUSIVE trips support multiple destinations.

When vehicleId is set for a shared trip, you must supply the list of Trip.vehicle_waypoints to specify the order of the remaining waypoints for the vehicle, otherwise the waypoint order will be undetermined.

When you specify Trip.vehicle_waypoints, the list must contain all the remaining waypoints of the vehicle's trips, with no extra waypoints. You must order these waypoints such that for a given trip, the pickup point is before intermediate destinations, and all intermediate destinations come before the drop-off point. An EXCLUSIVE trip's waypoints must not interleave with any other trips.

The tripId, waypointType and location fields are used, and all other TripWaypoint fields in vehicleWaypoints are ignored.

All other Trip fields are ignored.

GetTripCall

Describes a trips.get API call. Next id: 4

JSON representation
{
  "request": {
    object (GetTripRequest)
  },
  "response": {
    object (Trip)
  },
  "errorResponse": {
    object (ErrorResponse)
  }
}
Fields
request

object (GetTripRequest)

The request message sent to get the trip.

response

object (Trip)

The trip entity returned.

errorResponse

object (ErrorResponse)

The errorResponse returned.

GetTripRequest

trips.get request message.

JSON representation
{
  "header": {
    object (RequestHeader)
  },
  "name": string,
  "view": enum (TripView),
  "currentRouteSegmentVersion": string,
  "remainingWaypointsVersion": string,
  "routeFormatType": enum (PolylineFormatType),
  "currentRouteSegmentTrafficVersion": string,
  "remainingWaypointsRouteVersion": string
}
Fields
header

object (RequestHeader)

The standard Fleet Engine request header.

name

string

Required. Must be in the format providers/{provider}/trips/{trip}. 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.

view

enum (TripView)

The subset of Trip fields that should be returned and their interpretation.

currentRouteSegmentVersion

string (Timestamp format)

Indicates the minimum timestamp (exclusive) for which Trip.route or Trip.current_route_segment data are retrieved. If route data are unchanged since this timestamp, the route field is not set in the response. If a minimum is unspecified, the route data are always retrieved.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

remainingWaypointsVersion

string (Timestamp format)

Indicates the minimum timestamp (exclusive) for which Trip.remaining_waypoints are retrieved. If they are unchanged since this timestamp, the remainingWaypoints are not set in the response. If this field is unspecified, remainingWaypoints is always retrieved.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

routeFormatType

enum (PolylineFormatType)

The returned current route format, LAT_LNG_LIST_TYPE (in Trip.route), or ENCODED_POLYLINE_TYPE (in Trip.current_route_segment). The default is LAT_LNG_LIST_TYPE.

currentRouteSegmentTrafficVersion

string (Timestamp format)

Indicates the minimum timestamp (exclusive) for which Trip.current_route_segment_traffic is retrieved. If traffic data are unchanged since this timestamp, the currentRouteSegmentTraffic field is not set in the response. If a minimum is unspecified, the traffic data are always retrieved. Note that traffic is only available for On-Demand Rides and Deliveries Solution customers.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

remainingWaypointsRouteVersion

string (Timestamp format)

Indicates the minimum timestamp (exclusive) for which Trip.remaining_waypoints.traffic_to_waypoint and Trip.remaining_waypoints.path_to_waypoint data are retrieved. If data are unchanged since this timestamp, the fields above are not set in the response. If remainingWaypointsRouteVersion is unspecified, traffic and path are always retrieved.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

PolylineFormatType

The type of polyline format.

Enums
UNKNOWN_FORMAT_TYPE The format is unspecified or unknown.
LAT_LNG_LIST_TYPE A list of google.type.LatLng.
ENCODED_POLYLINE_TYPE A polyline encoded with a polyline compression algorithm. Decoding is not yet supported.

UpdateTripCall

Describes an trips.update API call. Next id: 4

JSON representation
{
  "request": {
    object (UpdateTripRequest)
  },
  "response": {
    object (Trip)
  },
  "errorResponse": {
    object (ErrorResponse)
  }
}
Fields
request

object (UpdateTripRequest)

The request message sent to update the trip.

response

object (Trip)

The trip entity returned.

errorResponse

object (ErrorResponse)

The errorResponse returned.

UpdateTripRequest

trips.update request message.

JSON representation
{
  "header": {
    object (RequestHeader)
  },
  "name": string,
  "trip": {
    object (Trip)
  },
  "updateMask": string
}
Fields
header

object (RequestHeader)

The standard Fleet Engine request header.

name

string

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

trip

object (Trip)

Required. The Trip associated with the update.

The following fields are maintained by the Fleet Engine. Do not update them using Trip.update.

  • currentRouteSegment
  • currentRouteSegmentEndPoint
  • currentRouteSegmentTraffic
  • currentRouteSegmentTrafficVersion
  • currentRouteSegmentVersion
  • dropoffTime
  • eta_to_next_waypoint
  • intermediateDestinationsVersion
  • lastLocation
  • name
  • numberOfPassengers
  • pickupTime
  • remainingDistanceMeters
  • remainingTimeToFirstWaypoint
  • remainingWaypoints
  • remainingWaypointsVersion
  • route

When you update the Trip.vehicle_id for a shared trip, you must supply the list of Trip.vehicle_waypoints to specify the order of the remaining waypoints, otherwise the order will be undetermined.

When you specify Trip.vehicle_waypoints, the list must contain all the remaining waypoints of the vehicle's trips, with no extra waypoints. You must order these waypoints such that for a given trip, the pickup point is before intermediate destinations, and all intermediate destinations come before the drop-off point. An EXCLUSIVE trip's waypoints must not interleave with any other trips. The tripId, waypointType and location fields are used, and all other TripWaypoint fields in vehicleWaypoints are ignored.

To avoid a race condition for trips with multiple destinations, you should provide Trip.intermediate_destinations_version when updating the trip status to ENROUTE_TO_INTERMEDIATE_DESTINATION. The Trip.intermediate_destinations_version passed must be consistent with Fleet Engine's version. If it isn't, the request fails.

updateMask

string (FieldMask format)

Required. The field mask indicating which fields in Trip to update. The updateMask must contain at least one field.

This is a comma-separated list of fully qualified names of fields. Example: "user.displayName,photo".