# Method: projects.locations.connections.repositories.batchCreate

- [HTTP request](https://docs.cloud.google.com/build/docs/api/reference/rest/v2/projects.locations.connections.repositories/batchCreate#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/build/docs/api/reference/rest/v2/projects.locations.connections.repositories/batchCreate#body.PATH_PARAMETERS)
- [Request body](https://docs.cloud.google.com/build/docs/api/reference/rest/v2/projects.locations.connections.repositories/batchCreate#body.request_body)
  - [JSON representation](https://docs.cloud.google.com/build/docs/api/reference/rest/v2/projects.locations.connections.repositories/batchCreate#body.request_body.SCHEMA_REPRESENTATION)
- [Response body](https://docs.cloud.google.com/build/docs/api/reference/rest/v2/projects.locations.connections.repositories/batchCreate#body.response_body)
- [Authorization scopes](https://docs.cloud.google.com/build/docs/api/reference/rest/v2/projects.locations.connections.repositories/batchCreate#body.aspect)
- [IAM Permissions](https://docs.cloud.google.com/build/docs/api/reference/rest/v2/projects.locations.connections.repositories/batchCreate#body.aspect_1)
- [CreateRepositoryRequest](https://docs.cloud.google.com/build/docs/api/reference/rest/v2/projects.locations.connections.repositories/batchCreate#CreateRepositoryRequest)
  - [JSON representation](https://docs.cloud.google.com/build/docs/api/reference/rest/v2/projects.locations.connections.repositories/batchCreate#CreateRepositoryRequest.SCHEMA_REPRESENTATION)
- [Try it!](https://docs.cloud.google.com/build/docs/api/reference/rest/v2/projects.locations.connections.repositories/batchCreate#try-it)

Creates multiple repositories inside a connection.

### HTTP request

`POST https://cloudbuild.googleapis.com/v2/{parent=projects/*/locations/*/connections/*}/repositories:batchCreate`

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

### Path parameters

| Parameters ||
|---|---|
| `parent` | `string` Required. The connection to contain all the repositories being created. Format: projects/\*/locations/\*/connections/\* The parent field in the CreateRepositoryRequest messages must either be empty or match this field. |

### Request body

The request body contains data with the following structure:

| JSON representation |
|---|
| ``` { "requests": [ { object (`https://docs.cloud.google.com/build/docs/api/reference/rest/v2/projects.locations.connections.repositories/batchCreate#CreateRepositoryRequest`) } ] } ``` |

| Fields ||
|---|---|
| `requests[]` | ``object (`https://docs.cloud.google.com/build/docs/api/reference/rest/v2/projects.locations.connections.repositories/batchCreate#CreateRepositoryRequest`)`` Required. The request messages specifying the repositories to create. |

### Response body

If successful, the response body contains an instance of `https://docs.cloud.google.com/build/docs/api/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://cloud.google.com/docs/authentication/).

### IAM Permissions

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

- `cloudbuild.repositories.create`

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

## CreateRepositoryRequest

Message for creating a Repository.

| JSON representation |
|---|
| ``` { "parent": string, "repository": { object (`https://docs.cloud.google.com/build/docs/api/reference/rest/v2/projects.locations.connections.repositories#Repository`) }, "repositoryId": string } ``` |

| Fields ||
|---|---|
| `parent` | `string` Required. The connection to contain the repository. If the request is part of a BatchCreateRepositoriesRequest, this field should be empty or match the parent specified there. |
| `repository` | ``object (`https://docs.cloud.google.com/build/docs/api/reference/rest/v2/projects.locations.connections.repositories#Repository`)`` Required. The repository to create. |
| `repositoryId` | `string` Required. The ID to use for the repository, which will become the final component of the repository's resource name. This ID should be unique in the connection. Allows alphanumeric characters and any of -._\~%!$\&'()\*+,;=@. |