Method: providers.trips.search
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
HTTP リクエスト
POST https://fleetengine.googleapis.com/v1/{parent=providers/*}/trips:search
この URL は gRPC Transcoding 構文を使用します。
パスパラメータ
パラメータ |
parent |
string
必須。providers/{provider} の形式で指定してください。プロバイダは、この呼び出しを行うサービス アカウントがメンバーになっている Google Cloud プロジェクトのプロジェクト ID(sample-cloud-project など)にする必要があります。
|
リクエスト本文
リクエストの本文には、次の構造のデータが含まれます。
JSON 表現 |
{
"header": {
object (RequestHeader )
},
"vehicleId": string,
"activeTripsOnly": boolean,
"pageSize": integer,
"pageToken": string,
"minimumStaleness": string
} |
フィールド |
header |
object (RequestHeader )
標準の Fleet Engine リクエスト ヘッダー。
|
vehicleId |
string
リクエスト内のルートに関連付けられている車両。指定されていない場合、返されるルートには以下の情報は含まれません。
currentRouteSegment
remainingWaypoints
remainingDistanceMeters
etaToFirstWaypoint
|
activeTripsOnly |
boolean
true に設定した場合、レスポンスにはドライバーのルートに影響するルートが含まれます。
|
pageSize |
integer
設定しない場合、返される結果の数はサーバーが決定します。
|
pageToken |
string
前の結果から続行するには、以前に SearchTripsResponse で返された値に設定します。
|
minimumStaleness |
string (Duration format)
指定すると、(current - minimumStaleness) 以降に更新されていないルートを返します。 s で終わる小数 9 桁までの秒単位の期間。例: "3.5s" 。
|
レスポンスの本文
trips.search のレスポンス メッセージを返します。
成功した場合、レスポンスの本文には次の構造のデータが含まれます。
JSON 表現 |
{
"trips": [
{
object (Trip )
}
],
"nextPageToken": string
} |
フィールド |
trips[] |
object (Trip )
リクエストされた車両のルートのリスト。
|
nextPageToken |
string
このトークンを SearchTripsRequest で渡して、リストの結果を表示します。API は呼び出しのたびにルートリストを返し、それ以上の結果がなくなると、ルートリストは空になります。
|
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-08-31 UTC。
[null,null,["最終更新日 2025-08-31 UTC。"],[[["\u003cp\u003eRetrieve all trips associated with a specific vehicle using a POST request.\u003c/p\u003e\n"],["\u003cp\u003eSpecify the provider and vehicle ID in the request to filter the trips.\u003c/p\u003e\n"],["\u003cp\u003eThe response includes trip details and a token for pagination to retrieve more results if available.\u003c/p\u003e\n"],["\u003cp\u003eOptionally, refine the search by specifying whether to include only active trips, limiting the number of results, and setting a minimum staleness for data retrieval.\u003c/p\u003e\n"]]],[],null,["# Method: providers.trips.search\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Request body](#body.request_body)\n - [JSON representation](#body.request_body.SCHEMA_REPRESENTATION)\n- [Response body](#body.response_body)\n - [JSON representation](#body.SearchTripsResponse.SCHEMA_REPRESENTATION)\n\nGet all the trips for a specific vehicle.\n\n### HTTP request\n\n`POST https://fleetengine.googleapis.com/v1/{parent=providers/*}/trips:search`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|----------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `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. |\n\n### Request body\n\nThe request body contains data with the following structure:\n\n| JSON representation |\n|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"header\": { object (/maps/documentation/mobility/fleet-engine/reference/trips/rest/v1/RequestHeader) }, \"vehicleId\": string, \"activeTripsOnly\": boolean, \"pageSize\": integer, \"pageToken\": string, \"minimumStaleness\": string } ``` |\n\n| Fields ||\n|--------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `header` | `object (`[RequestHeader](/maps/documentation/mobility/fleet-engine/reference/trips/rest/v1/RequestHeader)`)` The standard Fleet Engine request header. |\n| `vehicleId` | `string` The vehicle associated with the trips in the request. If unspecified, the returned trips do not contain: - `currentRouteSegment` - `remainingWaypoints` - `remainingDistanceMeters` - `etaToFirstWaypoint` |\n| `activeTripsOnly` | `boolean` If set to true, the response includes Trips that influence a driver's route. |\n| `pageSize` | `integer` If not set, the server decides the number of results to return. |\n| `pageToken` | `string` Set this to a value previously returned in the `SearchTripsResponse` to continue from previous results. |\n| `minimumStaleness` | `string (`[Duration](https://protobuf.dev/reference/protobuf/google.protobuf/#duration)` format)` If specified, returns the trips that have not been updated after the time `(current - minimumStaleness)`. A duration in seconds with up to nine fractional digits, ending with '`s`'. Example: `\"3.5s\"`. |\n\n### Response body\n\ntrips.search response message.\n\nIf successful, the response body contains data with the following structure:\n\n| JSON representation |\n|-------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"trips\": [ { object (/maps/documentation/mobility/fleet-engine/reference/trips/rest/v1/providers.trips#Trip) } ], \"nextPageToken\": string } ``` |\n\n| Fields ||\n|-----------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `trips[]` | `object (`[Trip](/maps/documentation/mobility/fleet-engine/reference/trips/rest/v1/providers.trips#Trip)`)` The list of trips for the requested vehicle. |\n| `nextPageToken` | `string` Pass this token in the SearchTripsRequest to page through list results. The API returns a trip list on each call, and when no more results remain the trip list is empty. |"]]