Method: providers.trips.search
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
किसी वाहन की सभी यात्राएं देखें.
एचटीटीपी अनुरोध
POST https://fleetengine.googleapis.com/v1/{parent=providers/*}/trips:search
यह यूआरएल gRPC ट्रांसकोडिंग सिंटैक्स का इस्तेमाल करता है.
पाथ पैरामीटर
पैरामीटर |
parent |
string
ज़रूरी है. providers/{provider} फ़ॉर्मैट में होना चाहिए. सेवा देने वाली कंपनी, उस Google Cloud प्रोजेक्ट का प्रोजेक्ट आईडी (उदाहरण के लिए, sample-cloud-project ) होनी चाहिए जिसका सदस्य यह कॉल कर रहा है.
|
अनुरोध का मुख्य भाग
अनुरोध के मुख्य हिस्से में, यहां दिए गए स्ट्रक्चर का डेटा शामिल होता है:
JSON के काेड में दिखाना |
{
"header": {
object (RequestHeader )
},
"vehicleId": string,
"activeTripsOnly": boolean,
"pageSize": integer,
"pageToken": string,
"minimumStaleness": string
} |
फ़ील्ड |
header |
object (RequestHeader )
स्टैंडर्ड फ़्लीट इंजन अनुरोध का हेडर.
|
vehicleId |
string
अनुरोध में बताई गई यात्राओं से जुड़ा वाहन. अगर जानकारी नहीं दी गई है, तो वापस की गई यात्राओं में ये शामिल नहीं होंगे:
currentRouteSegment
remainingWaypoints
remainingDistanceMeters
etaToFirstWaypoint
|
activeTripsOnly |
boolean
अगर इसे 'सही है' पर सेट किया जाता है, तो रिस्पॉन्स में वे यात्राएं शामिल होती हैं जो ड्राइवर के रास्ते पर असर डालती हैं.
|
pageSize |
integer
अगर इस नीति को सेट नहीं किया जाता है, तो सर्वर यह तय करता है कि कितने नतीजे दिखाने हैं.
|
pageToken |
string
पिछले नतीजों से जारी रखने के लिए, इसे SearchTripsResponse में पहले दिखाई गई वैल्यू पर सेट करें.
|
minimumStaleness |
string (Duration format)
अगर बताया जाता है, तो उन यात्राओं की जानकारी दिखाता है जिन्हें (current - minimumStaleness) समय के बाद अपडेट नहीं किया गया है. सेकंड में कुल नौ दशमलव अंक, जो 's ' पर खत्म होते हैं. उदाहरण: "3.5s" .
|
जवाब का मुख्य भाग
trips.search रिस्पॉन्स मैसेज.
अगर एपीआई सही से जुड़ जाता है, ताे जवाब के मुख्य भाग में नीचे दिए गए स्ट्रक्चर शामिल होता है.
JSON के काेड में दिखाना |
{
"trips": [
{
object (Trip )
}
],
"nextPageToken": string
} |
फ़ील्ड |
trips[] |
object (Trip )
अनुरोध किए गए वाहन के लिए यात्राओं की सूची.
|
nextPageToken |
string
सूची के नतीजों को पेज करने के लिए, इस टोकन को SearchTripsRequest में पास करें. एपीआई हर कॉल पर यात्रा की सूची दिखाता है. कोई और नतीजा न मिलने पर, यात्रा की सूची खाली रहती है.
|
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को Creative Commons Attribution 4.0 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 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. |"]]