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

Method: providers.vehicles.list

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

Returns a paginated list of vehicles associated with a provider that match the request options.

HTTP request

GET https://fleetengine.googleapis.com/v1/{parent=providers/*}/vehicles

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.

Query parameters

Parameters
header

object (RequestHeader)

The standard Fleet Engine request header.

pageSize

integer

The maximum number of vehicles to return. Default value: 100.

pageToken

string

The value of the nextPageToken provided by a previous call to vehicles.list so that you can paginate through groups of vehicles. The value is undefined if the filter criteria of the request is not the same as the filter criteria for the previous call to vehicles.list.

minimumCapacity

integer

Specifies the required minimum capacity of the vehicle. All vehicles returned will have a maximumCapacity greater than or equal to this value. If set, must be greater or equal to 0.

tripTypes[]

enum (TripType)

Restricts the response to vehicles that support at least one of the specified trip types.

maximumStaleness

string (Duration format)

Restricts the response to vehicles that have updated their locations within the specified duration at the time of the call. If present, must be a valid positive duration.

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

vehicleTypeCategories[]

enum (Category)

Required. Restricts the response to vehicles with one of the specified type categories.

requiredAttributes[]

string

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 response to vehicles with the specified attributes. This field is a conjunction/AND operation. Your app can specify up to 100 attributes; however, the combined key:value string length cannot exceed 1024 characters.

requiredOneOfAttributes[]

string

Restricts the response to 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. Format: key1:value1|key2:value2|key3:value3...

requiredOneOfAttributeSets[]

string

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
(requiredOneOfAttributes[0][0] AND requiredOneOfAttributes[0][1] AND
...)
OR
(requiredOneOfAttributes[1][0] AND requiredOneOfAttributes[1][1] AND
...)

Restricts the response to vehicles that match 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. Each repeated string should be of the format "key1:value1|key2:value2|key3:value3".

vehicleState

enum (VehicleState)

Restricts the response to vehicles that have this vehicle state.

onTripOnly

boolean

Only return the vehicles with current trip(s).

Request body

The request body must be empty.

Response body

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

vehicles.list response message.

JSON representation
{
  "vehicles": [
    {
      object (Vehicle)
    }
  ],
  "nextPageToken": string,
  "totalSize": string
}
Fields
vehicles[]

object (Vehicle)

Vehicles matching the criteria in the request. The maximum number of vehicles returned is determined by the pageSize field in the request.

nextPageToken

string

Token to retrieve the next page of vehicles, or empty if there are no more vehicles that meet the request criteria.

totalSize

string (int64 format)

Required. Total number of vehicles matching the request criteria across all pages.