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 |
Required. Must be in the format |
Query parameters
Parameters | |
---|---|
header |
The standard Fleet Engine request header. |
page |
The maximum number of vehicles to return. Default value: 100. |
page |
The value of the |
minimum |
Specifies the required minimum capacity of the vehicle. All vehicles returned will have a |
trip |
Restricts the response to vehicles that support at least one of the specified trip types. |
maximum |
Restricts the response to vehicles that have sent location updates to Fleet Engine within the specified duration. Stationary vehicles still transmitting their locations are not considered stale. If present, must be a valid positive duration. A duration in seconds with up to nine fractional digits, ending with ' |
vehicle |
Required. Restricts the response to vehicles with one of the specified type categories. |
required |
Callers can form complex logical operations using any combination of the
Restricts the response to 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. Each repeated string should be of the format "key:value". |
required |
Restricts the response to vehicles with at least one of the specified attributes in each |
required |
Similar to
Restricts the response to vehicles that match all the attributes in a |
vehicle |
Restricts the response to vehicles that have this vehicle state. |
on |
Only return the vehicles with current trip(s). |
filter |
Optional. A filter query to apply when listing vehicles. See http://aip.dev/160 for examples of the filter syntax. This field is designed to replace the This filter functions as an AND clause with other constraints, such as Note that the only queries supported are on vehicle attributes (for example, Also, all attributes are stored as strings, so the only supported comparisons against attributes are string comparisons. In order to compare against number or boolean values, the values must be explicitly quoted to be treated as strings (for example, |
viewport |
Optional. A filter that limits the vehicles returned to those whose last known location was in the rectangular area defined by the viewport. |
Request body
The request body must be empty.
Response body
vehicles.list
response message.
If successful, the response body contains data with the following structure:
JSON representation |
---|
{
"vehicles": [
{
object ( |
Fields | |
---|---|
vehicles[] |
Vehicles matching the criteria in the request. The maximum number of vehicles returned is determined by the |
next |
Token to retrieve the next page of vehicles, or empty if there are no more vehicles that meet the request criteria. |
total |
Required. Total number of vehicles matching the request criteria across all pages. |
Viewport
A latitude-longitude viewport, represented as two diagonally opposite low
and high
points. A viewport is considered a closed region, i.e. it includes its boundary. The latitude bounds must range between -90 to 90 degrees inclusive, and the longitude bounds must range between -180 to 180 degrees inclusive. Various cases include:
If
low
=high
, the viewport consists of that single point.If
low.longitude
>high.longitude
, the longitude range is inverted (the viewport crosses the 180 degree longitude line).If
low.longitude
= -180 degrees andhigh.longitude
= 180 degrees, the viewport includes all longitudes.If
low.longitude
= 180 degrees andhigh.longitude
= -180 degrees, the longitude range is empty.If
low.latitude
>high.latitude
, the latitude range is empty.
Both low
and high
must be populated, and the represented box cannot be empty (as specified by the definitions above). An empty viewport will result in an error.
For example, this viewport fully encloses New York City:
{ "low": { "latitude": 40.477398, "longitude": -74.259087 }, "high": { "latitude": 40.91618, "longitude": -73.70018 } }
JSON representation |
---|
{ "low": { object ( |
Fields | |
---|---|
low |
Required. The low point of the viewport. |
high |
Required. The high point of the viewport. |