# Method: projects.locations.batches.create

- [HTTP request](https://docs.cloud.google.com/managed-spark/docs/reference/rest/v1/projects.locations.batches/create#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/managed-spark/docs/reference/rest/v1/projects.locations.batches/create#body.PATH_PARAMETERS)
- [Query parameters](https://docs.cloud.google.com/managed-spark/docs/reference/rest/v1/projects.locations.batches/create#body.QUERY_PARAMETERS)
- [Request body](https://docs.cloud.google.com/managed-spark/docs/reference/rest/v1/projects.locations.batches/create#body.request_body)
- [Response body](https://docs.cloud.google.com/managed-spark/docs/reference/rest/v1/projects.locations.batches/create#body.response_body)
- [Authorization scopes](https://docs.cloud.google.com/managed-spark/docs/reference/rest/v1/projects.locations.batches/create#body.aspect)
- [Try it!](https://docs.cloud.google.com/managed-spark/docs/reference/rest/v1/projects.locations.batches/create#try-it)

Creates a batch workload that executes asynchronously.

### HTTP request

`POST https://dataproc.googleapis.com/v1/{parent=projects/*/locations/*}/batches`

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

### Path parameters

| Parameters ||
|---|---|
| `parent` | `string` Required. The parent resource where this batch will be created. Authorization requires the following [IAM](https://cloud.google.com/iam/docs/) permission on the specified resource `parent`: - `dataproc.batches.create` |

### Query parameters

| Parameters ||
|---|---|
| `batchId` | `string` Optional. The ID to use for the batch, which will become the final component of the batch's resource name. This value must be 4-63 characters. Valid characters are `/[a-z][0-9]-/`. |
| `requestId` | `string` Optional. A unique ID used to identify the request. If the service receives two `CreateBatchRequests` with the same `requestId`, the second request is ignored and the operation that corresponds to the first Batch created and stored in the backend is returned. Recommendation: Set this value to a [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier). The value must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The maximum length is 40 characters. |

### Request body

The request body contains an instance of `https://docs.cloud.google.com/managed-spark/docs/reference/rest/v1/projects.locations.batches#Batch`.

### Response body

If successful, the response body contains a newly created instance of `https://docs.cloud.google.com/managed-spark/docs/reference/rest/v1/projects.locations.operations#Operation`.

### Authorization scopes

Requires one of the following OAuth scopes:

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

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