# Get

Launch stage: GA

`GET /api/2.0/repos/{id}`

Returns the repo with the given repo ID.

API scopes: workspace

## Path parameters

- `id` (int64, optional)
  ID of the Git folder (repo) object in the workspace.
  Example: `5249608814509279`

## Returns

- `id` (int64, optional)
  ID of the Git folder (repo) object in the workspace.
  Example: `5249608814509279`
- `path` (string, optional)
  Path of the Git folder (repo) in the workspace.
  Example: `/Users/user@company.com/testrepo`
- `url` (string, optional)
  URL of the linked Git repository.
  Example: `https://github.com/databricks/cli.git`
- `provider` (string, optional)
  Git provider of the linked Git repository, e.g. `gitHub`, `azureDevOpsServices`,
   `bitbucketServer` (Bitbucket Data Center), `gitLabEnterpriseEdition` (GitLab
   Self-Managed), or `awsCodeCommit`.
  Example: `gitHub`
- `branch` (string, optional)
  Branch that the local version of the repo is checked out to.
  Example: `main`
- `head_commit_id` (string, optional)
  SHA-1 hash representing the commit ID of the current HEAD of the repo.
  Example: `7e0847ede61f07adede22e2bcce6050216489171`
- `sparse_checkout` (object, optional)
  Sparse checkout settings for the Git folder (repo).
  - `patterns` (array of string, optional)
    List of sparse checkout cone patterns, see
     [cone mode handling](https://git-scm.com/docs/git-sparse-checkout#_internalscone_mode_handling)
     for details.
- `git_cli_enabled` (boolean, optional, Beta)
  Whether the Git CLI is enabled for this Git folder (repo). When true, Git commands
   can be run directly against this Git folder using the Git CLI.

## Response

### The Git folder (repo) was successfully returned.

```json
{
  "branch": "main",
  "head_commit_id": "b9b8aa59b698d1d751b08c22b6b00eb36c36b136",
  "id": "1395934163262286",
  "path": "/Users/user@company.com/marketing/project-examples",
  "provider": "gitHub",
  "url": "https://github.com/databricks/bundle-examples.git"
}
```

