AI-generated Key Takeaways
-
Updates vehicle data in Fleet Engine, replacing existing data with the provided information.
-
Certain fields like
currentTrips
,availableCapacity
, andname
cannot be updated using this method. -
When updating
attributes
orwaypoints
, the entire field is replaced; usevehicles.updateAttributes
for partial attribute updates. -
The request must specify the vehicle's provider and ID, along with a field mask indicating the fields to be updated.
-
A successful response returns the updated
Vehicle
object.
Writes updated vehicle data to the Fleet Engine.
When updating a Vehicle
, the following fields cannot be updated since they are managed by the server:
currentTrips
availableCapacity
currentRouteSegmentVersion
waypointsVersion
The vehicle name
also 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.
HTTP request
PUT https://fleetengine.googleapis.com/v1/{name=providers/*/vehicles/*}
The URL uses gRPC Transcoding syntax.
Path parameters
Parameters | |
---|---|
name |
Required. Must be in the format |
Query parameters
Parameters | |
---|---|
header |
The standard Fleet Engine request header. |
updateMask |
Required. A field mask indicating which fields of the This is a comma-separated list of fully qualified names of fields. Example: |
Request body
The request body contains an instance of Vehicle
.
Response body
If successful, the response body contains an instance of Vehicle
.