# List

Launch stage: GA

`GET /api/2.0/repos`

Returns repos that the calling user has Manage permissions on.
 Use `next_page_token` to iterate through additional pages.

 Deprecated: This operation does not return a complete list of the repos in the workspace, because
 repos with the Git CLI enabled are not included in its results. Instead, use the Repos and
 Workspace APIs to find repos and their associated metadata in the workspace.

API scopes: workspace

## Query parameters

- `path_prefix` (string, optional)
  Filters repos that have paths starting with the given path prefix.
   If not provided or when provided an effectively empty prefix (`/` or `/Workspace`)
   Git folders (repos) from `/Workspace/Repos` will be served.
  Example: `/Users/user@company.com/main_project`
- `next_page_token` (string, optional)
  Token used to get the next page of results. If not specified, returns the first page of
   results as well as a next page token if there are more results.
  Example: `eyJyZXBvX3RyZWVub2RlX2lkIjo1MjQ5NjA4ODE0NTA5Mjc5fQ==`

## Returns

Returns a list of RepoInfo objects.

## Response

### Git folders (repos) were successfully returned.

```json
{
  "next_page_token": "eyJyZXBvX3RyZWVub2RlX2lkIjo1MjQ5NjA4ODE0NTA5Mjc5fQ",
  "repos": [
    {
      "branch": "main",
      "path": "/Users/user@company.com/clitest",
      "provider": "gitHub",
      "sparse_checkout": {
        "patterns": [
          "parent-folder/child-folder",
          "src",
          "test"
        ]
      },
      "url": "https://github.com/databricks/cli.git"
    },
    {
      "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"
    }
  ]
}
```

