# REST Resource: projects.locations.connections.repositories

- [Resource: Repository](https://docs.cloud.google.com/build/docs/api/reference/rest/v2/projects.locations.connections.repositories#Repository)
  - [JSON representation](https://docs.cloud.google.com/build/docs/api/reference/rest/v2/projects.locations.connections.repositories#Repository.SCHEMA_REPRESENTATION)
- [Methods](https://docs.cloud.google.com/build/docs/api/reference/rest/v2/projects.locations.connections.repositories#METHODS_SUMMARY)

## Resource: Repository

A repository associated to a parent connection.

| JSON representation |
|---|
| ``` { "name": string, "remoteUri": string, "createTime": string, "updateTime": string, "annotations": { string: string, ... }, "etag": string, "webhookId": string } ``` |

| Fields ||
|---|---|
| `name` | `string` Immutable. Resource name of the repository, in the format `projects/*/locations/*/connections/*/repositories/*`. |
| `remoteUri` | `string` Required. Git Clone HTTPS URI. |
| `createTime` | ``string (`https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.Timestamp` format)`` Output only. Server assigned timestamp for when the connection was created. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: `"2014-10-02T15:01:23Z"` and `"2014-10-02T15:01:23.045123456Z"`. |
| `updateTime` | ``string (`https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.Timestamp` format)`` Output only. Server assigned timestamp for when the connection was updated. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: `"2014-10-02T15:01:23Z"` and `"2014-10-02T15:01:23.045123456Z"`. |
| `annotations` | `map (key: string, value: string)` Optional. Allows clients to store small amounts of arbitrary data. An object containing a list of `"key": value` pairs. Example: `{ "name": "wrench", "mass": "1.3kg", "count": "3" }`. |
| `etag` | `string` This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding. |
| `webhookId` | `string` Output only. External ID of the webhook created for the repository. |

| ## Methods ||
|---|---|
| ### `https://docs.cloud.google.com/build/docs/api/reference/rest/v2/projects.locations.connections.repositories/accessReadToken` | Fetches read token of a given repository. |
| ### `https://docs.cloud.google.com/build/docs/api/reference/rest/v2/projects.locations.connections.repositories/accessReadWriteToken` | Fetches read/write token of a given repository. |
| ### `https://docs.cloud.google.com/build/docs/api/reference/rest/v2/projects.locations.connections.repositories/batchCreate` | Creates multiple repositories inside a connection. |
| ### `https://docs.cloud.google.com/build/docs/api/reference/rest/v2/projects.locations.connections.repositories/create` | Creates a Repository. |
| ### `https://docs.cloud.google.com/build/docs/api/reference/rest/v2/projects.locations.connections.repositories/delete` | Deletes a single repository. |
| ### `https://docs.cloud.google.com/build/docs/api/reference/rest/v2/projects.locations.connections.repositories/fetchGitRefs` | Fetch the list of branches or tags for a given repository. |
| ### `https://docs.cloud.google.com/build/docs/api/reference/rest/v2/projects.locations.connections.repositories/get` | Gets details of a single repository. |
| ### `https://docs.cloud.google.com/build/docs/api/reference/rest/v2/projects.locations.connections.repositories/list` | Lists Repositories in a given connection. |