서버 또는 브라우저 환경에서 배송 차량을 등록할 수 있습니다. 드라이버 SDK는 배송 차량 목록을 지원하지 않습니다.
배송 차량을 등록하려면 배송 차량에 대한 광범위한 액세스 권한이 필요하며 신뢰할 수 있는 사용자만 사용할 수 있습니다. 배송 차량 목록 요청을 할 때는 배송 차량 리더 또는 Fleet Engine 배송 관리자 토큰을 사용합니다.
나열된 배송 차량은 응답 크기에 미치는 영향으로 인해 다음 필드가 수정되었습니다.
CurrentRouteSegment
RemainingVehicleJourneySegments
사용
속성 필터와 뷰포트 경계로 차량을 나열할 수 있습니다. 필터나 뷰포트를 지정하지 않으면 응답에 모든 배송 차량이 포함됩니다.
속성 필터를 사용하여 나열
attributes 속성을 사용하여 필터별로 배송 차량을 나열할 수 있습니다. 예를 들어 키가 my_key이고 값이 my_value인 속성을 쿼리하려면 attributes.my_key = my_value를 사용합니다. 여러 속성을 쿼리하려면 attributes.key1 = value1 AND
attributes.key2 = value2와 같이 논리 AND 및 OR 연산자를 사용하여 쿼리를 조인합니다. 필터 쿼리 구문에 대한 자세한 내용은 AIP-160을 참고하세요. 필터를 표시 영역 경계와 결합하면 필터가 표시 영역 경계에 대한 AND 연산자로 작동합니다. 자세한 내용은 차량 속성 필터 쿼리를 참고하세요.
뷰포트 경계가 있는 목록
viewport 요청 매개변수를 사용하여 나열된 배송 차량을 위치별로 필터링할 수 있습니다. viewport 요청 매개변수는 high (북동쪽) 및 low (남서쪽) 위도 및 경도 좌표 쌍의 두 경계 좌표를 사용하여 뷰포트를 정의합니다. 위도가 낮은 위도보다 지리적으로 낮은 높은 위도를 포함하는 요청은 거부됩니다.
목록 응답
배송 차량 목록은 적절한 페이지 크기를 사용하여 기본적으로 페이지로 나뉩니다. 페이지 크기를 지정하면 요청은 한도로 지정된 차량 수 이하만 반환합니다. 요청된 페이지 크기가 내부 최댓값을 초과하면 내부 최댓값이 사용됩니다. 기본 페이지 크기와 최대 페이지 크기는 모두 100대입니다.
배송 차량 목록에는 결과의 다음 페이지를 읽기 위한 토큰이 포함될 수 있습니다. 페이지 토큰은 가져올 수 있는 배송 차량 페이지가 더 있는 경우에만 응답에 표시됩니다. 작업의 다음 페이지를 가져오려면 이전 요청과 동일한 요청에서 페이지 토큰을 사용합니다.
차량 목록 예시
Java gRPC 라이브러리 또는 REST를 사용하여 특정 속성이 있는 특정 지역의 배송 차량을 나열할 수 있습니다. 성공적인 응답은 여전히 비어 있을 수 있습니다. 이 경우 지정된 속성이 있는 차량이 지정된 표시 영역에 없다는 의미입니다.
자바
staticfinalStringPROJECT_ID="my-delivery-co-gcp-project";DeliveryServiceBlockingStubdeliveryService=DeliveryServiceGrpc.newBlockingStub(channel);// Tasks requestStringparent="providers/"+PROJECT_ID;ListDeliveryVehiclesRequestlistDeliveryVehiclesRequest=ListDeliveryVehiclesRequest.newBuilder()// No need for the header.setParent(parent).setViewport(Viewport.newBuilder().setHigh(LatLng.newBuilder().setLatitude(37.45).setLongitude(-122.06).build()).setLow(LatLng.newBuilder().setLatitude(37.41).setLongitude(-122.11).build()).setFilter("attributes.my_key = my_value").build();try{ListDeliveryVehiclesResponselistDeliveryVehiclesResponse=deliveryService.listDeliveryVehicles(listDeliveryVehiclesRequest);}catch(StatusRuntimeExceptione){Statuss=e.getStatus();switch(s.getCode()){caseNOT_FOUND:break;casePERMISSION_DENIED:break;}return;}
# Request with a filter# Request sets JWT, PROJECT_ID, and VEHICLE_ID in the local environmentcurl-H"Authorization: Bearer ${JWT}"\
"https://fleetengine.googleapis.com/v1/providers/${PROJECT_ID}/deliveryVehicles?filter=attributes.my_key%20%3D%20my_value%20&viewport.high.latitude=37.45&viewport.high.longitude=-122.06&viewport.low.latitude=37.41&viewport.low.longitude=-122.11"
[null,null,["최종 업데이트: 2025-08-31(UTC)"],[[["\u003cp\u003eThis guide explains how to retrieve a list of delivery vehicles, including filtering by attributes and location.\u003c/p\u003e\n"],["\u003cp\u003eYou can list vehicles using attribute filters and viewport bounds, enabling targeted retrieval.\u003c/p\u003e\n"],["\u003cp\u003eList responses are paginated, allowing for the retrieval of large datasets in manageable chunks.\u003c/p\u003e\n"],["\u003cp\u003eExamples are provided for listing vehicles using both the Java gRPC library and REST API.\u003c/p\u003e\n"],["\u003cp\u003eAccess to delivery vehicle listing requires specific authorization using \u003cem\u003eDelivery Fleet Reader\u003c/em\u003e or \u003cem\u003eFleet Engine Delivery Admin\u003c/em\u003e tokens.\u003c/p\u003e\n"]]],[],null,["# List delivery vehicles\n\n| **Note:** **Before constructing a vehicle request** , read the requirements under [Vehicle requests](/maps/documentation/mobility/fleet-engine/essentials/vehicles#vehicle_requests) in the Introduction.\n\nThis document describes how to list delivery vehicles.\n\nEnvironments and limitations\n----------------------------\n\nYou can list delivery vehicles from a server or browser environment. The Driver\nSDK does not support listing delivery vehicles.\n\nListing delivery vehicles requests broad access to delivery vehicles and is\nintended only for trusted users. Use *Delivery Fleet Reader* or *Fleet Engine\nDelivery Admin* tokens when making list delivery vehicles requests.\n\nListed delivery vehicles have the following fields redacted due to their impact\non response size:\n\n- `CurrentRouteSegment`\n- `RemainingVehicleJourneySegments`\n\nUsage\n-----\n\nYou can list vehicles by attribute filters and viewport bounds. If you specify\nno filter or viewport, the response includes all delivery vehicles.\n\n### List with attributes filters\n\nYou can list delivery vehicles by filter using their `attributes` property. For\nexample, to query an attribute with key `my_key` and value `my_value`, use\n`attributes.my_key = my_value`. To query for multiple attributes, join queries\nusing the logical `AND` and `OR` operators as in `attributes.key1 = value1 AND\nattributes.key2 = value2`. See [AIP-160](https://google.aip.dev/160) for a full description\nof filter query syntax. If you combine filters with viewport bounds, the filter\nacts as an `AND` operator to the viewport bound. See [Vehicle attributes filter\nqueries](/maps/documentation/mobility/fleet-engine/essentials/vehicles/scheduled-tasks-vehicle-fields) for details.\n\n### List with viewport bounds\n\nYou can filter listed delivery vehicles by location using the `viewport` request\nparameter. The `viewport` request parameter defines viewports using two bounding\ncoordinates: a `high` (northeast) and `low` (southwest) latitude and longitude\ncoordinates pair. Requests are rejected if they contain a high latitude\nthat is geographically lower than a low latitude.\n\n### List responses\n\nDelivery vehicle lists are paginated by default using a reasonable page size. If\nyou specify a page size, the request returns only the number of vehicles\nspecified by the limit, or fewer. If the requested page size exceeds an internal\nmaximum value, then the internal maximum is used. The default and maximum page\nsizes are both 100 vehicles.\n\nA delivery vehicles list can include a token for reading the next page of\nresults. A page token is only present in a response when more pages of delivery\nvehicles are available for retrieval. To retrieve the next page of tasks, use\nthe page token with a request that is otherwise identical to the previous\nrequest.\n\nList vehicles examples\n----------------------\n\nYou can use the [Java gRPC library](/maps/documentation/mobility/fleet-engine/essentials/client-libraries-tasks#java) or REST to list delivery vehicles in a\nparticular region with a certain attribute. A successful response can still be\nempty. When that happens, it means that no vehicles with the specified attribute\nexist in the specified viewport. \n\n### Java\n\n\n static final String PROJECT_ID = \"my-delivery-co-gcp-project\";\n\n DeliveryServiceBlockingStub deliveryService =\n DeliveryServiceGrpc.newBlockingStub(channel);\n\n // Tasks request\n String parent = \"providers/\" + PROJECT_ID;\n ListDeliveryVehiclesRequest listDeliveryVehiclesRequest =\n ListDeliveryVehiclesRequest.newBuilder() // No need for the header\n .setParent(parent)\n .setViewport(\n Viewport.newBuilder()\n .setHigh(LatLng.newBuilder()\n .setLatitude(37.45)\n .setLongitude(-122.06)\n .build())\n .setLow(LatLng.newBuilder()\n .setLatitude(37.41)\n .setLongitude(-122.11)\n .build())\n .setFilter(\"attributes.my_key = my_value\")\n .build();\n\n try {\n ListDeliveryVehiclesResponse listDeliveryVehiclesResponse =\n deliveryService.listDeliveryVehicles(listDeliveryVehiclesRequest);\n } catch (StatusRuntimeException e) {\n Status s = e.getStatus();\n switch (s.getCode()) {\n case NOT_FOUND:\n break;\n\n case PERMISSION_DENIED:\n break;\n }\n return;\n }\n\n### REST\n\n # HTTP request\n html GET https://fleetengine.googleapis.com/v1/providers/\u003cproject_id\u003e/deliveryVehicles\n\n\n # Request with a filter\n # Request sets JWT, PROJECT_ID, and VEHICLE_ID in the local environment\n curl -H \"Authorization: Bearer ${JWT}\" \\\n \"https://fleetengine.googleapis.com/v1/providers/${PROJECT_ID}/deliveryVehicles?filter=attributes.my_key%20%3D%20my_value%20&viewport.high.latitude=37.45&viewport.high.longitude=-122.06&viewport.low.latitude=37.41&viewport.low.longitude=-122.11\"\n\nIf the lookup is successful, the response body contains data with the following\nstructure: \n\n // JSON representation\n {\n \"deliveryVehicles\": [\n {\n object (DeliveryVehicle)\n }\n ],\n \"nextPageToken\": string,\n \"totalSize\": integer\n }\n\nWhat's next\n-----------\n\n- [Delete Delivery Vehicle](/maps/documentation/mobility/fleet-engine/essentials/vehicles/scheduled-tasks-delete-vehicle)"]]