- [HTTP request](https://developers.google.com/maps/documentation/route-optimization/reference/rest/v1/projects/optimizeToursUri#body.HTTP_TEMPLATE)
- [Path parameters](https://developers.google.com/maps/documentation/route-optimization/reference/rest/v1/projects/optimizeToursUri#body.PATH_PARAMETERS)
- [Request body](https://developers.google.com/maps/documentation/route-optimization/reference/rest/v1/projects/optimizeToursUri#body.request_body)
  - [JSON representation](https://developers.google.com/maps/documentation/route-optimization/reference/rest/v1/projects/optimizeToursUri#body.request_body.SCHEMA_REPRESENTATION)
- [Response body](https://developers.google.com/maps/documentation/route-optimization/reference/rest/v1/projects/optimizeToursUri#body.response_body)
- [Authorization scopes](https://developers.google.com/maps/documentation/route-optimization/reference/rest/v1/projects/optimizeToursUri#body.aspect)
- [IAM Permissions](https://developers.google.com/maps/documentation/route-optimization/reference/rest/v1/projects/optimizeToursUri#body.aspect_1)

This is a variant of the `https://developers.google.com/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.

The 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.

This method should be preferred over the `projects.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.

The returned `https://developers.google.com/maps/documentation/route-optimization/reference/rest/v1/projects.locations.operations#Operation` (LRO) will have a name of the format `<parent>/operations/<operation_id>` and can be used to track progress of the computation. The `https://developers.google.com/maps/documentation/route-optimization/reference/rest/v1/projects.locations.operations#Operation.FIELDS.metadata` field type is `https://developers.google.com/maps/documentation/route-optimization/reference/rest/v1/OptimizeToursUriMetadata`. The `https://developers.google.com/maps/documentation/route-optimization/reference/rest/v1/projects.locations.operations#Operation.FIELDS.response` field type is `https://developers.google.com/maps/documentation/route-optimization/reference/rest/v1/OptimizeToursUriResponse`, if successful.

### HTTP request

`POST https://routeoptimization.googleapis.com/v1/{parent=projects/*}:OptimizeToursUri`

The URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.

### Path parameters

| Parameters ||
|---|---|
| `parent` | `string` Required. Target project or location to make a call. Format: - `projects/{project-id}` - `projects/{project-id}/locations/-` Regional `{location-id}` values are not supported. |

### Request body

The request body contains data with the following structure:

| JSON representation |
|---|
| ``` { "input": { object (`https://developers.google.com/maps/documentation/route-optimization/reference/rest/v1/Uri`) }, "output": { object (`https://developers.google.com/maps/documentation/route-optimization/reference/rest/v1/Uri`) } } ``` |

| Fields ||
|---|---|
| `input` | ``object (`https://developers.google.com/maps/documentation/route-optimization/reference/rest/v1/Uri`)`` Required. The URI of the Cloud Storage object containing the `OptimizeToursRequest`. |
| `output` | ``object (`https://developers.google.com/maps/documentation/route-optimization/reference/rest/v1/Uri`)`` Required. The URI of the Cloud Storage object that will contain the `OptimizeToursResponse`. |

### Response body

If successful, the response body contains an instance of `https://developers.google.com/maps/documentation/route-optimization/reference/rest/v1/projects.locations.operations#Operation`.

### Authorization scopes

Requires the following OAuth scope:

- `https://www.googleapis.com/auth/cloud-platform`

### IAM Permissions

Requires the following [IAM](https://cloud.google.com/iam/docs) permission on the `parent` resource:

- `routeoptimization.operations.create`

For more information, see the [IAM documentation](https://cloud.google.com/iam/docs).