- [HTTP request](https://developers.google.com/colab/api/reference/rest/v1/operations/wait#body.HTTP_TEMPLATE)
- [Path parameters](https://developers.google.com/colab/api/reference/rest/v1/operations/wait#body.PATH_PARAMETERS)
- [Query parameters](https://developers.google.com/colab/api/reference/rest/v1/operations/wait#body.QUERY_PARAMETERS)
- [Request body](https://developers.google.com/colab/api/reference/rest/v1/operations/wait#body.request_body)
- [Response body](https://developers.google.com/colab/api/reference/rest/v1/operations/wait#body.response_body)
- [Authorization scopes](https://developers.google.com/colab/api/reference/rest/v1/operations/wait#body.aspect)
- [Try it!](https://developers.google.com/colab/api/reference/rest/v1/operations/wait#try-it)

Waits until the specified long-running operation 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

`GET https://colaboratory.googleapis.com/v1/{name=operations/*}:wait`

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

### Path parameters

| Parameters ||
|---|---|
| `name` | `string` The name of the operation resource to wait on. |

### Query parameters

| Parameters ||
|---|---|
| `timeout` | ``string (`https://protobuf.dev/reference/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, ending with '`s`'. Example: `"3.5s"`. |

### Request body

The request body must be empty.

### Response body

If successful, the response body contains an instance of `https://developers.google.com/colab/api/reference/rest/Shared.Types/Operation`.

### Authorization scopes

Requires one of the following OAuth scopes:

- `https://www.googleapis.com/auth/colaboratory`
- `
  https://www.googleapis.com/auth/colaboratory.readonly`

For more information, see the [OAuth 2.0 Overview](https://developers.google.com/identity/protocols/OAuth2).