Method: networks.vehicles.list
Stay organized with collections
Save and categorize content based on your preferences.
HTTP request
GET https://middlemileoptimization.googleapis.com/v1/{parent=networks/*}/vehicles
The URL uses gRPC Transcoding syntax.
Path parameters
Parameters |
parent |
string
Required. The parent, which owns this collection of vehicles. Format: "networks/{network}"
|
Query parameters
Parameters |
pageSize |
integer
Optional. The maximum number of vehicles to return. The service may return fewer than this value. If unspecified, at most 50 vehicles will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.
|
pageToken |
string
Optional. A page token, received from a previous vehicles.list call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to vehicles.list must match the call that provided the page token.
|
Request body
The request body must be empty.
Response body
The response message for vehicles.list
method.
If successful, the response body contains data with the following structure:
JSON representation |
{
"vehicles": [
{
object (Vehicle )
}
],
"nextPageToken": string
} |
Fields |
vehicles[] |
object (Vehicle )
The vehicles from the specified network.
|
nextPageToken |
string
A token, which can be sent as pageToken to retrieve the next page. If this field is omitted, there are no subsequent pages.
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-01-14 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-01-14 UTC."],[[["\u003cp\u003eLists the vehicles within a specified network using the \u003ccode\u003eGET\u003c/code\u003e method and the provided URL.\u003c/p\u003e\n"],["\u003cp\u003eAllows users to specify the maximum number of vehicles to return and navigate through paginated results using query parameters.\u003c/p\u003e\n"],["\u003cp\u003eThe request body should be empty, and successful responses include an array of vehicles and a token for accessing further pages, if available.\u003c/p\u003e\n"]]],["This outlines how to retrieve a list of vehicles via an HTTP GET request to a specified network using the provided URL format `networks/*`. The `parent` path parameter is required, and `pageSize` and `pageToken` query parameters can be used for pagination. The request body must be empty. The response includes an array of `vehicles` objects and a `nextPageToken` for further pagination if necessary. Up to 1000 vehicles can be displayed in a response.\n"],null,["Lists the Vehicles.\n\nHTTP request\n\n`GET https://middlemileoptimization.googleapis.com/v1/{parent=networks/*}/vehicles`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\nPath parameters\n\n| Parameters ||\n|----------|-----------------------------------------------------------------------------------------------------|\n| `parent` | `string` Required. The parent, which owns this collection of vehicles. Format: \"networks/{network}\" |\n\nQuery parameters\n\n| Parameters ||\n|---------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `page``Size` | `integer` Optional. The maximum number of vehicles to return. The service may return fewer than this value. If unspecified, at most 50 vehicles will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. |\n| `page``Token` | `string` Optional. A page token, received from a previous `vehicles.list` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `vehicles.list` must match the call that provided the page token. |\n\nRequest body\n\nThe request body must be empty.\n\nResponse body The response message for `vehicles.list` method.\n\nIf successful, the response body contains data with the following structure:\n\n| JSON representation |\n|----------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"vehicles\": [ { object (/optimization/middlemileoptimization/reference/rest/v1/networks.vehicles#Vehicle) } ], \"nextPageToken\": string } ``` |\n\n| Fields ||\n|---------------------|---------------------------------------------------------------------------------------------------------------------------------------------------|\n| `vehicles[]` | `object (`[Vehicle](/optimization/middlemileoptimization/reference/rest/v1/networks.vehicles#Vehicle)`)` The vehicles from the specified network. |\n| `next``Page``Token` | `string` A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted, there are no subsequent pages. |"]]