# REST Resource: projects.locations.collections.dataStores.branches

- [Resource: Branch](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects.locations.collections.dataStores.branches#Branch)
  - [JSON representation](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects.locations.collections.dataStores.branches#Branch.SCHEMA_REPRESENTATION)
  - [BranchStats](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects.locations.collections.dataStores.branches#Branch.BranchStats)
    - [JSON representation](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects.locations.collections.dataStores.branches#Branch.BranchStats.SCHEMA_REPRESENTATION)
- [Methods](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects.locations.collections.dataStores.branches#METHODS_SUMMARY)

## Resource: Branch

A data branch that stores `https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects.locations.collections.dataStores.branches.documents#Document`s.

| JSON representation |
|---|
| ``` { "name": string, "displayName": string, "isDefault": boolean, "lastDocumentImportTime": string, "branchStats": { object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects.locations.collections.dataStores.branches#Branch.BranchStats`) } } ``` |

| Fields ||
|---|---|
| `name` | `string` Immutable. Full resource name of the branch, such as `projects/*/locations/global/dataStores/dataStore/branches/branchId`. |
| `displayName` | `string` Output only. Human readable name of the branch to display in the UI. |
| `isDefault` | `boolean` Output only. Indicates whether this branch is set as the default branch of its parent data store. |
| `lastDocumentImportTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Output only. timestamp of last import through `https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects.locations.dataStores.branches.documents/import#google.cloud.discoveryengine.v1alpha.DocumentService.ImportDocuments`. Empty value means no import has been made to this branch. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: `"2014-10-02T15:01:23Z"`, `"2014-10-02T15:01:23.045123456Z"` or `"2014-10-02T15:01:23+05:30"`. |
| `branchStats` | ``object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects.locations.collections.dataStores.branches#Branch.BranchStats`)`` Output only. Statistics describing a branch. This field is not populated in `https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/BranchView#ENUM_VALUES.BRANCH_VIEW_BASIC` view. |

### BranchStats

Statistics describing a branch.

| JSON representation |
|---|
| ``` { "documentCounts": { string: string, ... } } ``` |

| Fields ||
|---|---|
| `documentCounts` | `map (key: string, value: string (https://developers.google.com/discovery/v1/type-format format))` The number of documents in a given branch. The key is a group representing a set of documents, and the value is the number of document in that group. Note: keys in this map may change over time. Supported keys: \['all'\]. |

| ## Methods ||
|---|---|
| ### `https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects.locations.collections.dataStores.branches/batchGetDocumentsMetadata` | Gets index freshness metadata for `https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects.locations.collections.dataStores.branches.documents#Document`s. |
| ### `https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects.locations.collections.dataStores.branches/get` | Retrieves a `https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects.locations.collections.dataStores.branches#Branch`. |
| ### `https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects.locations.collections.dataStores.branches/list` | Lists all `https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects.locations.collections.dataStores.branches#Branch`s under the specified parent `https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects.locations.collections.dataStores#DataStore`. |