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

Method: archive.providers.vehicles.collectCalls

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

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

HTTP request

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

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
vehicle

string

Required. Must be in the format providers/{provider}/vehicles/{vehicle}. 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 vehicles. Only vehicles 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 vehicles 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 vehicles.list call. Provide this to retrieve the subsequent page.

When paginating, all other parameters provided to vehicles.list 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:

vehicles.collectCalls response message. Next id: 3

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

object (VehicleApiCall)

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

nextPageToken

string

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

VehicleApiCall

Describes an API call related to a vehicle. Next id: 7

JSON representation
{
  "serverTime": string,

  // Union field call can be only one of the following:
  "createVehicle": {
    object (CreateVehicleCall)
  },
  "getVehicle": {
    object (GetVehicleCall)
  },
  "updateVehicle": {
    object (UpdateVehicleCall)
  },
  "searchVehicles": {
    object (SearchVehiclesCall)
  }
  // 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 vehicle. call can be only one of the following:
createVehicle

object (CreateVehicleCall)

Result is a create vehicle call.

getVehicle

object (GetVehicleCall)

Result is a get vehicle call.

updateVehicle

object (UpdateVehicleCall)

Result is an update vehicle call.

searchVehicles

object (SearchVehiclesCall)

Result is a search vehicles call.

CreateVehicleCall

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

JSON representation
{
  "request": {
    object (CreateVehicleRequest)
  },
  "response": {
    object (Vehicle)
  },
  "errorResponse": {
    object (ErrorResponse)
  }
}
Fields
request

object (CreateVehicleRequest)

The request message sent to create the vehicle.

response

object (Vehicle)

The vehicle entity created.

errorResponse

object (ErrorResponse)

The errorResponse returned.

CreateVehicleRequest

vehicles.create request message.

JSON representation
{
  "header": {
    object (RequestHeader)
  },
  "parent": string,
  "vehicleId": string,
  "vehicle": {
    object (Vehicle)
  }
}
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.

vehicleId

string

Required. Unique Vehicle 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 '#'.
vehicle

object (Vehicle)

Required. The Vehicle entity to create. When creating a Vehicle, the following fields are required:

  • vehicleState
  • supportedTripTypes
  • maximumCapacity
  • vehicleType

When creating a Vehicle, the following fields are ignored:

  • name
  • currentTrips
  • availableCapacity
  • currentRouteSegment
  • currentRouteSegmentEndPoint
  • currentRouteSegmentVersion
  • currentRouteSegmentTraffic
  • route
  • waypoints
  • waypointsVersion
  • remainingDistanceMeters
  • remainingTimeSeconds
  • eta_to_next_waypoint
  • navigationStatus

All other fields are optional and used if provided.

GetVehicleCall

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

JSON representation
{
  "request": {
    object (GetVehicleRequest)
  },
  "response": {
    object (Vehicle)
  },
  "errorResponse": {
    object (ErrorResponse)
  }
}
Fields
request

object (GetVehicleRequest)

The request message sent to get the vehicle.

response

object (Vehicle)

The vehicle entity returned.

errorResponse

object (ErrorResponse)

The errorResponse returned.

GetVehicleRequest

vehicles.get request message.

JSON representation
{
  "header": {
    object (RequestHeader)
  },
  "name": string,
  "currentRouteSegmentVersion": string,
  "waypointsVersion": string
}
Fields
header

object (RequestHeader)

The standard Fleet Engine request header.

name

string

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

currentRouteSegmentVersion

string (Timestamp format)

Indicates the minimum timestamp (exclusive) for which Vehicle.current_route_segment is retrieved. If the route is unchanged since this timestamp, the currentRouteSegment field is not set in the response. If a minimum is unspecified, the currentRouteSegment 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".

waypointsVersion

string (Timestamp format)

Indicates the minimum timestamp (exclusive) for which Vehicle.waypoints data is retrieved. If the waypoints are unchanged since this timestamp, the vehicle.waypoints data is not set in the response. If this field is unspecified, vehicle.waypoints 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".

UpdateVehicleCall

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

JSON representation
{
  "request": {
    object (UpdateVehicleRequest)
  },
  "response": {
    object (Vehicle)
  },
  "errorResponse": {
    object (ErrorResponse)
  }
}
Fields
request

object (UpdateVehicleRequest)

The request message sent to update the vehicle.

response

object (Vehicle)

The vehicle entity returned.

errorResponse

object (ErrorResponse)

The errorResponse returned.

UpdateVehicleRequest

`vehicles.update request message.

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

object (RequestHeader)

The standard Fleet Engine request header.

name

string

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

vehicle

object (Vehicle)

Required. The Vehicle entity values to apply. When updating a Vehicle, the following fields may not be updated as they are managed by the server.

  • currentTrips
  • available_capacity
  • currentRouteSegmentVersion
  • waypointsVersion

Furthermore, the vehicle name cannot be updated.

If the attributes field is updated, all the vehicle's attributes are replaced with the attributes provided in the request. If you want to update only some attributes, see the vehicles.updateAttributes method. Likewise, the waypoints field can be updated, but must contain all the waypoints. currently on the vehicle, and no other waypoints.

updateMask

string (FieldMask format)

Required. A field mask indicating which fields of the Vehicle to update. At least one field name must be provided.

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

SearchVehiclesCall

Describes an vehicles.search API call. Next id: 4

JSON representation
{
  "request": {
    object (SearchVehiclesRequest)
  },
  "response": {
    object (SearchVehiclesResponse)
  },
  "errorResponse": {
    object (ErrorResponse)
  }
}
Fields
request

object (SearchVehiclesRequest)

The request message sent to search for a vehicle.

response

object (SearchVehiclesResponse)

The searchVehicles entity returned.

errorResponse

object (ErrorResponse)

The errorResponse returned.

SearchVehiclesRequest

vehicles.search request message.

JSON representation
{
  "header": {
    object (RequestHeader)
  },
  "parent": string,
  "pickupPoint": {
    object (TerminalLocation)
  },
  "dropoffPoint": {
    object (TerminalLocation)
  },
  "pickupRadiusMeters": integer,
  "count": integer,
  "minimumCapacity": integer,
  "tripTypes": [
    enum (TripType)
  ],
  "maximumStaleness": string,
  "vehicleTypes": [
    {
      object (VehicleType)
    }
  ],
  "requiredAttributes": [
    {
      object (VehicleAttribute)
    }
  ],
  "requiredOneOfAttributes": [
    {
      object (VehicleAttributeList)
    }
  ],
  "requiredOneOfAttributeSets": [
    {
      object (VehicleAttributeList)
    }
  ],
  "orderBy": enum (VehicleMatchOrder),
  "includeBackToBack": boolean,
  "tripId": string,
  "currentTripsPresent": enum (CurrentTripsPresent)
}
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.

pickupPoint

object (TerminalLocation)

Required. The pickup point to search near.

dropoffPoint

object (TerminalLocation)

The customer's intended dropoff location. The field is required if tripTypes contains TripType.SHARED.

pickupRadiusMeters

integer

Required. Defines the vehicle search radius around the pickup point. Only vehicles within the search radius will be returned. Value must be between 400 and 10000 meters (inclusive).

count

integer

Required. Specifies the maximum number of vehicles to return. The value must be between 1 and 50 (inclusive).

minimumCapacity

integer

Required. Specifies the number of passengers being considered for a trip. The value must be greater than or equal to one. The driver is not considered in the capacity value.

tripTypes[]

enum (TripType)

Required. Represents the type of proposed trip. Eligible vehicles are those that can support at least one of the specified trip type.

EXCLUSIVE and SHARED may not be included together. SHARED is not supported when currentTripsPresent is CURRENT_TRIPS_PRESENT_UNSPECIFIED.

maximumStaleness

string (Duration format)

Restricts the search to only those vehicles that have updated their locations within the specified duration. If this field is not set, the server uses five minutes as the default value.

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

vehicleTypes[]

object (VehicleType)

Required. Restricts the search to vehicles with one of the specified types. At least one vehicle type must be specified.

requiredAttributes[]

object (VehicleAttribute)

Callers can form complex logical operations using any combination of the requiredAttributes, requiredOneOfAttributes, and requiredOneOfAttributeSets fields.

requiredAttributes is a list; requiredOneOfAttributes uses a message which allows a list of lists. In combination, the two fields allow the composition of this expression:

(requiredAttributes[0] AND requiredAttributes[1] AND ...)
AND
(requiredOneOfAttributes[0][0] OR requiredOneOfAttributes[0][1] OR
...)
AND
(requiredOneOfAttributes[1][0] OR requiredOneOfAttributes[1][1] OR
...)

Restricts the search to only those vehicles with the specified attributes. This field is a conjunction/AND operation. A max of 50 requiredAttributes is allowed. This matches the maximum number of attributes allowed on a vehicle.

requiredOneOfAttributes[]

object (VehicleAttributeList)

Restricts the search to only those vehicles with at least one of the specified attributes in each VehicleAttributeList. Within each list, a vehicle must match at least one of the attributes. This field is an inclusive disjunction/OR operation in each VehicleAttributeList and a conjunction/AND operation across the collection of VehicleAttributeList.

requiredOneOfAttributeSets[]

object (VehicleAttributeList)

requiredOneOfAttributeSets provides additional functionality.

Similar to requiredOneOfAttributes, requiredOneOfAttributeSets uses a message which allows a list of lists, allowing expressions such as this one:

(requiredAttributes[0] AND requiredAttributes[1] AND ...)
AND
(requiredOneOfAttributeSets[0][0] AND
requiredOneOfAttributeSets[0][1] AND
...)
OR
(requiredOneOfAttributeSets[1][0] AND
requiredOneOfAttributeSets[1][1] AND
...)

Restricts the search to only those vehicles with all the attributes in a VehicleAttributeList. Within each list, a vehicle must match all of the attributes. This field is a conjunction/AND operation in each VehicleAttributeList and inclusive disjunction/OR operation across the collection of VehicleAttributeList.

orderBy

enum (VehicleMatchOrder)

Required. Specifies the desired ordering criterion for results.

includeBackToBack

boolean

Indicates if a vehicle with a single active trip is eligible for another match. If false, vehicles with assigned trips are excluded from the search results. If true, search results include vehicles with TripStatus of ENROUTE_TO_DROPOFF.

This field is only considered if a single tripType of EXCLUSIVE is specified.

The default value is false.

tripId

string

Indicates the trip associated with this SearchVehicleRequest.

currentTripsPresent

enum (CurrentTripsPresent)

Restricts vehicles from appearing in the search results based on their current trips.

When currentTripsPresent is NONE or ANY, tripTypes can be either EXCLUSIVE or SHARED, but not both.

VehicleAttributeList

A list-of-lists datatype for vehicle attributes.

JSON representation
{
  "attributes": [
    {
      object (VehicleAttribute)
    }
  ]
}
Fields
attributes[]

object (VehicleAttribute)

A list of attributes in this collection.

VehicleMatchOrder

Specifies the order of the vehicle matches in the response.

Enums
UNKNOWN_VEHICLE_MATCH_ORDER Default, used for unspecified or unrecognized vehicle matches order.
PICKUP_POINT_ETA Ascending order by vehicle driving time to the pickup point.
PICKUP_POINT_DISTANCE Ascending order by vehicle driving distance to the pickup point.
DROPOFF_POINT_ETA Ascending order by vehicle driving time to the dropoff point. This order can only be used if the dropoff point is specified in the request.
PICKUP_POINT_STRAIGHT_DISTANCE Ascending order by straight-line distance from the vehicle's last reported location to the pickup point.
COST Ascending order by the configured match cost. Match cost is defined as a weighted calculation between straight-line distance and ETA. Weights are set with default values and can be modified per customer. Please contact Google support if these weights need to be modified for your project.

CurrentTripsPresent

Specifies the types of restrictions on a vehicle's current trips.

Enums
CURRENT_TRIPS_PRESENT_UNSPECIFIED Only vehicles without trips can appear in search results. A validation exception is thrown if includeBackToBack is true. See the includeBackToBack flag for more details.
NONE Vehicles without trips can appear in search results. A validation exception is thrown if includeBackToBack is true.
ANY Vehicles with at most 5 current trips and 10 waypoints are included in the search results. A validation exception is thrown if includeBackToBack is true.

SearchVehiclesResponse

vehicles.search response message.

JSON representation
{
  "matches": [
    {
      object (VehicleMatch)
    }
  ]
}
Fields
matches[]

object (VehicleMatch)

List of vehicles that match the SearchVehiclesRequest criteria, ordered according to SearchVehiclesRequest.order_by field.

VehicleMatch

Contains the vehicle and related estimates for a vehicle that match the points of active trips for the vehicle SearchVehiclesRequest.

JSON representation
{
  "vehicle": {
    object (Vehicle)
  },
  "vehiclePickupEta": string,
  "vehiclePickupDistanceMeters": integer,
  "vehiclePickupStraightLineDistanceMeters": integer,
  "vehicleDropoffEta": string,
  "vehiclePickupToDropoffDistanceMeters": integer,
  "tripType": enum (TripType),
  "vehicleTripsWaypoints": [
    {
      object (Waypoint)
    }
  ],
  "vehicleMatchType": enum (VehicleMatchType),
  "requestedOrderedBy": enum (VehicleMatchOrder),
  "orderedBy": enum (VehicleMatchOrder)
}
Fields
vehicle

object (Vehicle)

Required. A vehicle that matches the request.

vehiclePickupEta

string (Timestamp format)

The vehicle's driving ETA to the pickup point specified in the request. An empty value indicates a failure in calculating ETA for the vehicle. If SearchVehiclesRequest.include_back_to_back was true and this vehicle has an active trip, vehiclePickupEta includes the time required to complete the current active trip.

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".

vehiclePickupDistanceMeters

integer

The distance from the Vehicle's current location to the pickup point specified in the request, including any intermediate pickup or dropoff points for existing trips. This distance comprises the calculated driving (route) distance, plus the straight line distance between the navigation end point and the requested pickup point. (The distance between the navigation end point and the requested pickup point is typically small.) An empty value indicates an error in calculating the distance.

vehiclePickupStraightLineDistanceMeters

integer

Required. The straight-line distance between the vehicle and the pickup point specified in the request.

vehicleDropoffEta

string (Timestamp format)

The complete vehicle's driving ETA to the drop off point specified in the request. The ETA includes stopping at any waypoints before the dropoffPoint specified in the request. The value will only be populated when a drop off point is specified in the request. An empty value indicates an error calculating the ETA.

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".

vehiclePickupToDropoffDistanceMeters

integer

The vehicle's driving distance (in meters) from the pickup point to the drop off point specified in the request. The distance is only between the two points and does not include the vehicle location or any other points that must be visited before the vehicle visits either the pickup point or dropoff point. The value will only be populated when a dropoffPoint is specified in the request. An empty value indicates a failure in calculating the distance from the pickup to drop off point specified in the request.

tripType

enum (TripType)

Required. The trip type of the request that was used to calculate the ETA to the pickup point.

vehicleTripsWaypoints[]

object (Waypoint)

The ordered list of waypoints used to calculate the ETA. The list includes vehicle location, the pickup points of active trips for the vehicle, and the pickup points provided in the request. An empty list indicates a failure in calculating ETA for the vehicle.

vehicleMatchType

enum (VehicleMatchType)

Type of the vehicle match.

requestedOrderedBy

enum (VehicleMatchOrder)

The order requested for sorting vehicle matches.

orderedBy

enum (VehicleMatchOrder)

The actual order that was used for this vehicle. Normally this will match the 'orderBy' field from the request; however, in certain circumstances such as an internal server error, a different method may be used (such as PICKUP_POINT_STRAIGHT_DISTANCE).

Waypoint

Describes intermediate points along a route.

JSON representation
{
  "latLng": {
    object (LatLng)
  },
  "eta": string
}
Fields
latLng

object (LatLng)

The location of this waypoint.

eta

string (Timestamp format)

The estimated time that the vehicle will arrive at this waypoint.

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".

VehicleMatchType

Type of vehicle match.

Enums
UNKNOWN Unknown vehicle match type
EXCLUSIVE The vehicle currently has no trip assigned to it and can proceed to the pickup point.
BACK_TO_BACK The vehicle is currently assigned to a trip, but can proceed to the pickup point after completing the in-progress trip. ETA and distance calculations take the existing trip into account.
CARPOOL The vehicle has sufficient capacity for a shared ride.
CARPOOL_BACK_TO_BACK The vehicle will finish its current, active trip before proceeding to the pickup point. ETA and distance calculations take the existing trip into account.