# Method: projects.locations.operations.wait

- [HTTP request](https://docs.cloud.google.com/translate/automl/docs/reference/rest/v1beta1/projects.locations.operations/wait#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/translate/automl/docs/reference/rest/v1beta1/projects.locations.operations/wait#body.PATH_PARAMETERS)
- [Request body](https://docs.cloud.google.com/translate/automl/docs/reference/rest/v1beta1/projects.locations.operations/wait#body.request_body)
  - [JSON representation](https://docs.cloud.google.com/translate/automl/docs/reference/rest/v1beta1/projects.locations.operations/wait#body.request_body.SCHEMA_REPRESENTATION)
- [Response body](https://docs.cloud.google.com/translate/automl/docs/reference/rest/v1beta1/projects.locations.operations/wait#body.response_body)
- [Authorization Scopes](https://docs.cloud.google.com/translate/automl/docs/reference/rest/v1beta1/projects.locations.operations/wait#body.aspect)

Waits for the specified long-running operation until it is done or reaches at most a specified timeout, returning the latest state. If the operation is already done, the latest state is immediately returned. If the timeout specified is greater than the default HTTP/RPC timeout, the HTTP/RPC timeout is used. If the server does not support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Note that this method is on a best-effort basis. It may return the latest state before the specified timeout (including immediately), meaning even an immediate response is no guarantee that the operation is done.

### HTTP request

`POST https://automl.googleapis.com/v1beta1/{name}:wait`

### Path parameters

| Parameters ||
|---|---|
| `name` | `string` The name of the operation resource to wait on. Authorization requires the following [Google IAM](https://cloud.google.com/iam) permission on the specified resource `name`: - `automl.operations.get` <br /> |

### Request body

The request body contains data with the following structure:

| JSON representation ||
|---|---|
| ``` { "timeout": string } ``` |

| Fields ||
|---|---|
| `timeout` | ``string (`https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.Duration` format)`` The maximum duration to wait before timing out. If left blank, the wait will be at most the time permitted by the underlying HTTP/RPC protocol. If RPC context deadline is also specified, the shorter one will be used. A duration in seconds with up to nine fractional digits, terminated by '`s`'. Example: `"3.5s"`. <br /> |

### Response body

If successful, the response body contains an instance of `https://docs.cloud.google.com/translate/automl/docs/reference/rest/v1beta1/projects.locations.operations#Operation`.

### Authorization Scopes

Requires the following OAuth scope:

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

For more information, see the [Authentication Overview](https://cloud.google.com/docs/authentication/).