# \DefaultApi

All URIs are relative to *https\:///api/2.0*

| Method                           | HTTP request                 | Description                                 |
| -------------------------------- | ---------------------------- | ------------------------------------------- |
| [**create\_repo**](#create_repo) | **POST** /repos              | Create a repo                               |
| [**delete\_repo**](#delete_repo) | **DELETE** /repos/{repo\_id} | Deletes the repo                            |
| [**get\_repo**](#get_repo)       | **GET** /repos/{repo\_id}    | Get a repo                                  |
| [**get\_repos**](#get_repos)     | **GET** /repos               | Get repos                                   |
| [**update\_repo**](#update_repo) | **PATCH** /repos/{repo\_id}  | Updates the repo to the given branch or tag |

## create\_repo

> crate::models::GetRepoResponse create\_repo(create\_repo\_request) Create a repo

Creates a repo in the workspace and links it to the remote Git repo specified. Note that repos created programmatically must be linked to a remote Git repo, unlike repos created in the browser.

### Parameters

| Name                      | Type                                                                                                                  | Description                                        | Required    | Notes |
| ------------------------- | --------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------- | ----------- | ----- |
| **create\_repo\_request** | [**CreateRepoRequest**](https://databricks-kube-operator.gitbook.io/doc/databricks-rust-repos/docs/createreporequest) | Details required to create and clone a repo object | \[required] |       |

### Return type

[**crate::models::GetRepoResponse**](https://databricks-kube-operator.gitbook.io/doc/databricks-rust-repos/docs/getreporesponse)

### Authorization

[basicAuth](https://databricks-kube-operator.gitbook.io/doc/databricks-rust-repos/..#basicAuth), [bearerAuth](https://databricks-kube-operator.gitbook.io/doc/databricks-rust-repos/..#bearerAuth)

### HTTP request headers

* **Content-Type**: application/json
* **Accept**: application/json

[\[Back to top\]](https://databricks-kube-operator.gitbook.io/doc/databricks-rust-repos/docs/defaultapi) [\[Back to API list\]](https://databricks-kube-operator.gitbook.io/doc/databricks-rust-repos/..#documentation-for-api-endpoints) [\[Back to Model list\]](https://databricks-kube-operator.gitbook.io/doc/databricks-rust-repos/..#documentation-for-models) [\[Back to README\]](https://databricks-kube-operator.gitbook.io/doc/databricks-rust-repos)

## delete\_repo

> delete\_repo(repo\_id) Deletes the repo

Deletes the specified repo

### Parameters

| Name         | Type       | Description                                  | Required    | Notes |
| ------------ | ---------- | -------------------------------------------- | ----------- | ----- |
| **repo\_id** | **String** | The ID for the corresponding repo to access. | \[required] |       |

### Return type

(empty response body)

### Authorization

[basicAuth](https://databricks-kube-operator.gitbook.io/doc/databricks-rust-repos/..#basicAuth), [bearerAuth](https://databricks-kube-operator.gitbook.io/doc/databricks-rust-repos/..#bearerAuth)

### HTTP request headers

* **Content-Type**: Not defined
* **Accept**: application/json

[\[Back to top\]](https://databricks-kube-operator.gitbook.io/doc/databricks-rust-repos/docs/defaultapi) [\[Back to API list\]](https://databricks-kube-operator.gitbook.io/doc/databricks-rust-repos/..#documentation-for-api-endpoints) [\[Back to Model list\]](https://databricks-kube-operator.gitbook.io/doc/databricks-rust-repos/..#documentation-for-models) [\[Back to README\]](https://databricks-kube-operator.gitbook.io/doc/databricks-rust-repos)

## get\_repo

> crate::models::GetRepoResponse get\_repo(repo\_id) Get a repo

Returns the repo with the given repo ID.

### Parameters

| Name         | Type       | Description                                  | Required    | Notes |
| ------------ | ---------- | -------------------------------------------- | ----------- | ----- |
| **repo\_id** | **String** | The ID for the corresponding repo to access. | \[required] |       |

### Return type

[**crate::models::GetRepoResponse**](https://databricks-kube-operator.gitbook.io/doc/databricks-rust-repos/docs/getreporesponse)

### Authorization

[basicAuth](https://databricks-kube-operator.gitbook.io/doc/databricks-rust-repos/..#basicAuth), [bearerAuth](https://databricks-kube-operator.gitbook.io/doc/databricks-rust-repos/..#bearerAuth)

### HTTP request headers

* **Content-Type**: Not defined
* **Accept**: application/json

[\[Back to top\]](https://databricks-kube-operator.gitbook.io/doc/databricks-rust-repos/docs/defaultapi) [\[Back to API list\]](https://databricks-kube-operator.gitbook.io/doc/databricks-rust-repos/..#documentation-for-api-endpoints) [\[Back to Model list\]](https://databricks-kube-operator.gitbook.io/doc/databricks-rust-repos/..#documentation-for-models) [\[Back to README\]](https://databricks-kube-operator.gitbook.io/doc/databricks-rust-repos)

## get\_repos

> crate::models::GetReposResponse get\_repos(path\_prefix, next\_page\_token) Get repos

Returns repos that the calling user has Manage permissions on. Results are paginated with each page containing twenty repos.

### Parameters

| Name                  | Type               | Description                                                                                                                                             | Required | Notes |
| --------------------- | ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | ----- |
| **path\_prefix**      | Option<**String**> | Filters repos that have paths starting with the given path prefix.                                                                                      |          |       |
| **next\_page\_token** | Option<**String**> | 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. |          |       |

### Return type

[**crate::models::GetReposResponse**](https://databricks-kube-operator.gitbook.io/doc/databricks-rust-repos/docs/getreposresponse)

### Authorization

[basicAuth](https://databricks-kube-operator.gitbook.io/doc/databricks-rust-repos/..#basicAuth), [bearerAuth](https://databricks-kube-operator.gitbook.io/doc/databricks-rust-repos/..#bearerAuth)

### HTTP request headers

* **Content-Type**: Not defined
* **Accept**: application/json

[\[Back to top\]](https://databricks-kube-operator.gitbook.io/doc/databricks-rust-repos/docs/defaultapi) [\[Back to API list\]](https://databricks-kube-operator.gitbook.io/doc/databricks-rust-repos/..#documentation-for-api-endpoints) [\[Back to Model list\]](https://databricks-kube-operator.gitbook.io/doc/databricks-rust-repos/..#documentation-for-models) [\[Back to README\]](https://databricks-kube-operator.gitbook.io/doc/databricks-rust-repos)

## update\_repo

> crate::models::GetRepoResponse update\_repo(repo\_id, update\_repo\_request) Updates the repo to the given branch or tag

Updates the repo to a different branch or tag, or updates the repo to the latest commit on the same branch.

### Parameters

| Name                      | Type                                                                                                                  | Description                                  | Required    | Notes |
| ------------------------- | --------------------------------------------------------------------------------------------------------------------- | -------------------------------------------- | ----------- | ----- |
| **repo\_id**              | **String**                                                                                                            | The ID for the corresponding repo to access. | \[required] |       |
| **update\_repo\_request** | [**UpdateRepoRequest**](https://databricks-kube-operator.gitbook.io/doc/databricks-rust-repos/docs/updatereporequest) | Details required to update the repo          | \[required] |       |

### Return type

[**crate::models::GetRepoResponse**](https://databricks-kube-operator.gitbook.io/doc/databricks-rust-repos/docs/getreporesponse)

### Authorization

[basicAuth](https://databricks-kube-operator.gitbook.io/doc/databricks-rust-repos/..#basicAuth), [bearerAuth](https://databricks-kube-operator.gitbook.io/doc/databricks-rust-repos/..#bearerAuth)

### HTTP request headers

* **Content-Type**: application/json
* **Accept**: application/json

[\[Back to top\]](https://databricks-kube-operator.gitbook.io/doc/databricks-rust-repos/docs/defaultapi) [\[Back to API list\]](https://databricks-kube-operator.gitbook.io/doc/databricks-rust-repos/..#documentation-for-api-endpoints) [\[Back to Model list\]](https://databricks-kube-operator.gitbook.io/doc/databricks-rust-repos/..#documentation-for-models) [\[Back to README\]](https://databricks-kube-operator.gitbook.io/doc/databricks-rust-repos)
