Method: providers.vehicles.get
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
HTTP 请求
GET https://fleetengine.googleapis.com/v1/{name=providers/*/vehicles/*}
网址采用 gRPC 转码语法。
路径参数
参数 |
name |
string
必需。必须采用 providers/{provider}/vehicles/{vehicle} 格式。提供程序必须是发出此调用的服务账号所属的 Google Cloud 项目的项目 ID(例如 sample-cloud-project )。
|
查询参数
参数 |
header |
object (RequestHeader )
标准的 Fleet Engine 请求标头。
|
currentRouteSegmentVersion |
string (Timestamp format)
表示检索 Vehicle.current_route_segment 的最小时间戳(不包括该时间戳)。如果路线自此时间戳起保持不变,则响应中不会设置 currentRouteSegment 字段。如果未指定最小值,则始终会检索 currentRouteSegment 。 采用 RFC 3339 标准,生成的输出将始终在末尾带 Z,并使用 0、3、6 或 9 个小数位。也接受除“Z”以外的偏移量。示例:"2014-10-02T15:01:23Z" 、"2014-10-02T15:01:23.045123456Z" 或 "2014-10-02T15:01:23+05:30" 。
|
waypointsVersion |
string (Timestamp format)
指示检索 Vehicle.waypoints 数据的最小时间戳(不包括该时间戳)。如果自此时间戳起路点保持不变,则响应中不会设置 vehicle.waypoints 数据。如果未指定此字段,则始终检索 vehicle.waypoints 。 采用 RFC 3339 标准,生成的输出将始终在末尾带 Z,并使用 0、3、6 或 9 个小数位。也接受除“Z”以外的偏移量。示例:"2014-10-02T15:01:23Z" 、"2014-10-02T15:01:23.045123456Z" 或 "2014-10-02T15:01:23+05:30" 。
|
响应正文
如果成功,则响应正文包含一个 Vehicle
实例。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-08-31。
[null,null,["最后更新时间 (UTC):2025-08-31。"],[[["\u003cp\u003eRetrieves a vehicle's real-time information, such as location and status, from the Fleet Engine.\u003c/p\u003e\n"],["\u003cp\u003eRequires specifying the provider and vehicle IDs in the URL path.\u003c/p\u003e\n"],["\u003cp\u003eOptionally, allows filtering the retrieved data by timestamps for route segment and waypoints.\u003c/p\u003e\n"],["\u003cp\u003eRequest body should be left empty.\u003c/p\u003e\n"],["\u003cp\u003eA successful response provides detailed vehicle data including its current state and attributes.\u003c/p\u003e\n"]]],["This document details retrieving a vehicle from the Fleet Engine using a `GET` request. The URL format is `https://fleetengine.googleapis.com/v1/{name=providers/*/vehicles/*}`, with the `name` path parameter specifying the provider and vehicle. Query parameters include `header` for the Fleet Engine request header, `currentRouteSegmentVersion` and `waypointsVersion` which allow for conditional data retrieval based on timestamps. The request body is empty, and a successful response contains a `Vehicle` instance.\n"],null,["# Method: providers.vehicles.get\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Query parameters](#body.QUERY_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n\nReturns a vehicle from the Fleet Engine.\n\n### HTTP request\n\n`GET https://fleetengine.googleapis.com/v1/{name=providers/*/vehicles/*}`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|--------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `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. |\n\n### Query parameters\n\n| Parameters ||\n|------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `header` | `object (`[RequestHeader](/maps/documentation/mobility/fleet-engine/reference/trips/rest/v1/RequestHeader)`)` The standard Fleet Engine request header. |\n| `currentRouteSegmentVersion` | `string (`[Timestamp](https://protobuf.dev/reference/protobuf/google.protobuf/#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. Uses RFC 3339, where generated output will always be Z-normalized and uses 0, 3, 6 or 9 fractional digits. Offsets other than \"Z\" are also accepted. Examples: `\"2014-10-02T15:01:23Z\"`, `\"2014-10-02T15:01:23.045123456Z\"` or `\"2014-10-02T15:01:23+05:30\"`. |\n| `waypointsVersion` | `string (`[Timestamp](https://protobuf.dev/reference/protobuf/google.protobuf/#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. Uses RFC 3339, where generated output will always be Z-normalized and uses 0, 3, 6 or 9 fractional digits. Offsets other than \"Z\" are also accepted. Examples: `\"2014-10-02T15:01:23Z\"`, `\"2014-10-02T15:01:23.045123456Z\"` or `\"2014-10-02T15:01:23+05:30\"`. |\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nIf successful, the response body contains an instance of [Vehicle](/maps/documentation/mobility/fleet-engine/reference/trips/rest/v1/providers.vehicles#Vehicle)."]]