# Method: projects.locations.spaces.applications.deploy

- [HTTP request](https://docs.cloud.google.com/application-design-center/docs/reference/rest/v1/projects.locations.spaces.applications/deploy#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/application-design-center/docs/reference/rest/v1/projects.locations.spaces.applications/deploy#body.PATH_PARAMETERS)
- [Request body](https://docs.cloud.google.com/application-design-center/docs/reference/rest/v1/projects.locations.spaces.applications/deploy#body.request_body)
  - [JSON representation](https://docs.cloud.google.com/application-design-center/docs/reference/rest/v1/projects.locations.spaces.applications/deploy#body.request_body.SCHEMA_REPRESENTATION)
- [Response body](https://docs.cloud.google.com/application-design-center/docs/reference/rest/v1/projects.locations.spaces.applications/deploy#body.response_body)
- [Authorization scopes](https://docs.cloud.google.com/application-design-center/docs/reference/rest/v1/projects.locations.spaces.applications/deploy#body.aspect)
- [IAM Permissions](https://docs.cloud.google.com/application-design-center/docs/reference/rest/v1/projects.locations.spaces.applications/deploy#body.aspect_1)
- [Try it!](https://docs.cloud.google.com/application-design-center/docs/reference/rest/v1/projects.locations.spaces.applications/deploy#try-it)

Deploys an application.

### HTTP request

`POST https://designcenter.googleapis.com/v1/{name=projects/*/locations/*/spaces/*/applications/*}:deploy`

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

### Path parameters

| Parameters ||
|---|---|
| `name` | `string` Required. The application name. Format: `projects/$project/locations/$location/spaces/$space/applications/$application` |

### Request body

The request body contains data with the following structure:

| JSON representation |
|---|
| ``` { "replace": boolean, "workerPool": string, "serviceAccount": string } ``` |

| Fields ||
|---|---|
| `replace` | `boolean` Optional. Flag to update the existing deployment. If not set or false, deploy will fail if application `state` is in the `DEPLOYED` state. |
| `workerPool` | `string` Optional. The user-specified Worker Pool resource in which the Cloud Build job will execute. Format: projects/{project}/locations/{location}/workerPools/{workerPoolId} If this flag is omitted, the worker pool already defined on the application will be used. If no worker pool is defined on the application, the default Cloud Build worker pool is used. The worker pool must exist in the same region as the application. |
| `serviceAccount` | `string` Optional. The email address of the service account to use for this deployment. - If provided, this service account will be used to execute the deployment process, taking precedence over any serviceAccount specified on the Application resource. - The caller must have the 'iam.serviceAccounts.actAs' permission on this service account. - If this field is omitted, the system will use the 'serviceAccount' defined within the Application resource. - We recommend that you provide a service account here or on the Application resource. If you don't provide a service account, the deployment will fail. Format: projects/{PROJECT}/serviceAccounts/{EMAIL_ADDRESS} |

### Response body

If successful, the response body contains an instance of `https://docs.cloud.google.com/application-design-center/docs/reference/rest/Shared.Types/Operation`.

### Authorization scopes

Requires the following OAuth scope:

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

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

### IAM Permissions

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

- `designcenter.applications.update`

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