- [HTTP request](https://docs.cloud.google.com/dataflow/docs/reference/rest/v1b3/projects.templates/launch#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/dataflow/docs/reference/rest/v1b3/projects.templates/launch#body.PATH_PARAMETERS)
- [Query parameters](https://docs.cloud.google.com/dataflow/docs/reference/rest/v1b3/projects.templates/launch#body.QUERY_PARAMETERS)
- [Request body](https://docs.cloud.google.com/dataflow/docs/reference/rest/v1b3/projects.templates/launch#body.request_body)
- [Response body](https://docs.cloud.google.com/dataflow/docs/reference/rest/v1b3/projects.templates/launch#body.response_body)
- [Authorization scopes](https://docs.cloud.google.com/dataflow/docs/reference/rest/v1b3/projects.templates/launch#body.aspect)
- [Try it!](https://docs.cloud.google.com/dataflow/docs/reference/rest/v1b3/projects.templates/launch#try-it)

Launches a template.

To launch a template, we recommend using `projects.locations.templates.launch` with a [regional endpoint](https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using `projects.templates.launch` is not recommended, because jobs launched from the template will always start in `us-central1`.

### IAM Permissions

Requires the following IAM permission(s) on the project:

- `dataflow.jobs.create`
- `resourcemanager.projects.get`

### HTTP request

Choose an endpoint:
global   
`POST https://dataflow.googleapis.com/v1b3/projects/{projectId}/templates:launch`

<br />

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

### Path parameters

| Parameters ||
|---|---|
| `projectId` | `string` Required. The ID of the Cloud Platform project that the job belongs to. |

### Query parameters

| Parameters ||
|---|---|
| `validateOnly` | `boolean` If true, the request is validated but not actually executed. Defaults to false. |
| `location` | `string` The [regional endpoint](https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) to which to direct the request. |
| The template to use to create the job. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: ||
| `gcsPath` | `string` A Cloud Storage path to the template to use to create the job. Must be valid Cloud Storage URL, beginning with `gs://`. |
| `dynamicTemplate` | ``object (`https://docs.cloud.google.com/dataflow/docs/reference/rest/v1b3/DynamicTemplateLaunchParams`)`` Parameters for launching a dynamic template. |
| End of mutually exclusive fields. ||

### Request body

The request body contains an instance of `https://docs.cloud.google.com/dataflow/docs/reference/rest/v1b3/LaunchTemplateParameters`.

### Response body

If successful, the response body contains an instance of `https://docs.cloud.google.com/dataflow/docs/reference/rest/v1b3/LaunchTemplateResponse`.

### Authorization scopes

Requires one of the following OAuth scopes:

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

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