# Method: projects.locations.environments.checkUpgrade

- [HTTP request](https://docs.cloud.google.com/composer/docs/reference/rest/v1/projects.locations.environments/checkUpgrade#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/composer/docs/reference/rest/v1/projects.locations.environments/checkUpgrade#body.PATH_PARAMETERS)
- [Request body](https://docs.cloud.google.com/composer/docs/reference/rest/v1/projects.locations.environments/checkUpgrade#body.request_body)
  - [JSON representation](https://docs.cloud.google.com/composer/docs/reference/rest/v1/projects.locations.environments/checkUpgrade#body.request_body.SCHEMA_REPRESENTATION)
- [Response body](https://docs.cloud.google.com/composer/docs/reference/rest/v1/projects.locations.environments/checkUpgrade#body.response_body)
- [Authorization scopes](https://docs.cloud.google.com/composer/docs/reference/rest/v1/projects.locations.environments/checkUpgrade#body.aspect)
- [Try it!](https://docs.cloud.google.com/composer/docs/reference/rest/v1/projects.locations.environments/checkUpgrade#try-it)

Check if an upgrade operation on the environment will succeed.

In case of problems detailed info can be found in the returned Operation.

### HTTP request

`POST https://composer.googleapis.com/v1/{environment=projects/*/locations/*/environments/*}:checkUpgrade`

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

### Path parameters

| Parameters ||
|---|---|
| `environment` | `string` Required. The resource name of the environment to check upgrade for, in the form: "projects/{projectId}/locations/{locationId}/environments/{environmentId}" Authorization requires the following [IAM](https://cloud.google.com/iam/docs/) permission on the specified resource `environment`: - `composer.environments.update` |

### Request body

The request body contains data with the following structure:

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

| Fields ||
|---|---|
| `imageVersion` | `string` Optional. The version of the software running in the environment. This encapsulates both the version of Cloud Composer functionality and the version of Apache Airflow. It must match the regular expression `composer-([0-9]+(\.[0-9]+\.[0-9]+(-preview\.[0-9]+)?)?|latest)-airflow-([0-9]+(\.[0-9]+(\.[0-9]+)?)?)`. When used as input, the server also checks if the provided version is supported and denies the request for an unsupported version. The Cloud Composer portion of the image version is a full [semantic version](https://semver.org), or an alias in the form of major version number or `latest`. When an alias is provided, the server replaces it with the current Cloud Composer version that satisfies the alias. The Apache Airflow portion of the image version is a full semantic version that points to one of the supported Apache Airflow versions, or an alias in the form of only major or major.minor versions specified. When an alias is provided, the server replaces it with the latest Apache Airflow version that satisfies the alias and is supported in the given Cloud Composer version. In all cases, the resolved image version is stored in the same field. See also [version list](https://docs.cloud.google.com/composer/docs/concepts/versioning/composer-versions) and [versioning overview](https://docs.cloud.google.com/composer/docs/concepts/versioning/composer-versioning-overview). |

### Response body

If successful, the response body contains an instance of `https://docs.cloud.google.com/composer/docs/reference/rest/Shared.Types/ListOperationsResponse#Operation`.

### Authorization scopes

Requires one of the following OAuth scopes:

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

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