Method: projects.locations.optimizeToursUri
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Yêu cầu HTTP
POST https://routeoptimization.googleapis.com/v1/{parent=projects/*/locations/*}:OptimizeToursUri
URL sử dụng cú pháp Chuyển mã gRPC.
Tham số đường dẫn
Thông số |
parent |
string
Bắt buộc. Dự án hoặc vị trí mục tiêu để thực hiện cuộc gọi. Định dạng: * projects/{project-id} * projects/{project-id}/locations/{location-id} Nếu bạn không chỉ định vị trí, hệ thống sẽ tự động chọn một khu vực.
|
Nội dung yêu cầu
Nội dung yêu cầu chứa dữ liệu có cấu trúc sau:
Biểu diễn dưới dạng JSON |
{
"input": {
object (Uri )
},
"output": {
object (Uri )
}
} |
Trường |
input |
object (Uri )
Bắt buộc. URI của đối tượng Cloud Storage chứa OptimizeToursRequest .
|
output |
object (Uri )
Bắt buộc. URI của đối tượng Cloud Storage sẽ chứa OptimizeToursResponse .
|
Nội dung phản hồi
Nếu thành công, nội dung phản hồi sẽ chứa một phiên bản của Operation
.
Phạm vi uỷ quyền
Yêu cầu phạm vi OAuth sau:
https://www.googleapis.com/auth/cloud-platform
Quyền IAM
Yêu cầu quyền IAM sau đây trên tài nguyên parent
:
routeoptimization.operations.create
Để biết thêm thông tin, hãy xem tài liệu về IAM.
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2025-08-31 UTC.
[null,null,["Cập nhật lần gần đây nhất: 2025-08-31 UTC."],[],[],null,["# Method: projects.locations.optimizeToursUri\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- [Authorization scopes](#body.aspect)\n- [IAM Permissions](#body.aspect_1)\n\nThis is a variant of the [locations.optimizeToursLongRunning](/maps/documentation/route-optimization/reference/rest/v1/projects.locations/optimizeToursLongRunning#google.maps.routeoptimization.v1.RouteOptimization.OptimizeToursLongRunning) method designed for optimizations with large timeout values and large input/output sizes.\n\nThe client specifies the URI of the `OptimizeToursRequest` stored in Google Cloud Storage and the server writes the `OptimizeToursResponse` to a client-specified Google Cloud Storage URI.\n\nThis method should be preferred over the `locations.optimizeTours` method for optimizations that take longer than a few minutes and input/output sizes that are larger than 8MB, though it can be used for shorter and smaller optimizations as well.\n\nThe returned [long-running operation](/maps/documentation/route-optimization/reference/rest/v1/projects.locations.operations#Operation) (LRO) will have a name of the format `\u003cparent\u003e/operations/\u003coperation_id\u003e` and can be used to track progress of the computation. The [metadata](/maps/documentation/route-optimization/reference/rest/v1/projects.locations.operations#Operation.FIELDS.metadata) field type is [OptimizeToursLongRunningMetadata](/maps/documentation/route-optimization/reference/rest/v1/OptimizeToursUriMetadata). The [response](/maps/documentation/route-optimization/reference/rest/v1/projects.locations.operations#Operation.FIELDS.response) field type is [OptimizeToursUriResponse](/maps/documentation/route-optimization/reference/rest/v1/OptimizeToursUriResponse), if successful.\n\nExperimental: See \u003chttps://developers.google.com/maps/tt/route-optimization/experimental/otlr/make-request\u003e for more details.\n\n### HTTP request\n\n`POST https://routeoptimization.googleapis.com/v1/{parent=projects/*/locations/*}:OptimizeToursUri`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|----------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `parent` | `string` Required. Target project or location to make a call. Format: \\* `projects/{project-id}` \\* `projects/{project-id}/locations/{location-id}` If no location is specified, a region will be chosen automatically. |\n\n### Request body\n\nThe request body contains data with the following structure:\n\n| JSON representation |\n|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"input\": { object (/maps/documentation/route-optimization/reference/rest/v1/Uri) }, \"output\": { object (/maps/documentation/route-optimization/reference/rest/v1/Uri) } } ``` |\n\n| Fields ||\n|----------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `input` | `object (`[Uri](/maps/documentation/route-optimization/reference/rest/v1/Uri)`)` Required. The URI of the Cloud Storage object containing the `OptimizeToursRequest`. |\n| `output` | `object (`[Uri](/maps/documentation/route-optimization/reference/rest/v1/Uri)`)` Required. The URI of the Cloud Storage object that will contain the `OptimizeToursResponse`. |\n\n### Response body\n\nIf successful, the response body contains an instance of [Operation](/maps/documentation/route-optimization/reference/rest/v1/projects.locations.operations#Operation).\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/cloud-platform`\n\n### IAM Permissions\n\nRequires the following [IAM](https://cloud.google.com/iam/docs) permission on the `parent` resource:\n\n- `routeoptimization.operations.create`\n\nFor more information, see the [IAM documentation](https://cloud.google.com/iam/docs)."]]