github.com/treeverse/lakefs@v1.24.1-0.20240520134607-95648127bfb0/clients/python-legacy/docs/RepositoriesApi.md (about)

     1  # lakefs_client.RepositoriesApi
     2  
     3  All URIs are relative to *http://localhost/api/v1*
     4  
     5  Method | HTTP request | Description
     6  ------------- | ------------- | -------------
     7  [**create_repository**](RepositoriesApi.md#create_repository) | **POST** /repositories | create repository
     8  [**delete_gc_rules**](RepositoriesApi.md#delete_gc_rules) | **DELETE** /repositories/{repository}/settings/gc_rules | 
     9  [**delete_repository**](RepositoriesApi.md#delete_repository) | **DELETE** /repositories/{repository} | delete repository
    10  [**dump_status**](RepositoriesApi.md#dump_status) | **GET** /repositories/{repository}/dump | Status of a repository dump task
    11  [**dump_submit**](RepositoriesApi.md#dump_submit) | **POST** /repositories/{repository}/dump | Backup the repository metadata (tags, commits, branches) and save the backup to the object store.
    12  [**get_branch_protection_rules**](RepositoriesApi.md#get_branch_protection_rules) | **GET** /repositories/{repository}/settings/branch_protection | get branch protection rules
    13  [**get_gc_rules**](RepositoriesApi.md#get_gc_rules) | **GET** /repositories/{repository}/settings/gc_rules | get repository GC rules
    14  [**get_repository**](RepositoriesApi.md#get_repository) | **GET** /repositories/{repository} | get repository
    15  [**get_repository_metadata**](RepositoriesApi.md#get_repository_metadata) | **GET** /repositories/{repository}/metadata | get repository metadata
    16  [**list_repositories**](RepositoriesApi.md#list_repositories) | **GET** /repositories | list repositories
    17  [**restore_status**](RepositoriesApi.md#restore_status) | **GET** /repositories/{repository}/restore | Status of a restore request
    18  [**restore_submit**](RepositoriesApi.md#restore_submit) | **POST** /repositories/{repository}/restore | Restore repository from a dump in the object store
    19  [**set_branch_protection_rules**](RepositoriesApi.md#set_branch_protection_rules) | **PUT** /repositories/{repository}/settings/branch_protection | 
    20  [**set_gc_rules**](RepositoriesApi.md#set_gc_rules) | **PUT** /repositories/{repository}/settings/gc_rules | 
    21  
    22  
    23  # **create_repository**
    24  > Repository create_repository(repository_creation)
    25  
    26  create repository
    27  
    28  ### Example
    29  
    30  * Basic Authentication (basic_auth):
    31  * Api Key Authentication (cookie_auth):
    32  * Bearer (JWT) Authentication (jwt_token):
    33  * Api Key Authentication (oidc_auth):
    34  * Api Key Authentication (saml_auth):
    35  
    36  ```python
    37  import time
    38  import lakefs_client
    39  from lakefs_client.api import repositories_api
    40  from lakefs_client.model.repository import Repository
    41  from lakefs_client.model.error import Error
    42  from lakefs_client.model.repository_creation import RepositoryCreation
    43  from pprint import pprint
    44  # Defining the host is optional and defaults to http://localhost/api/v1
    45  # See configuration.py for a list of all supported configuration parameters.
    46  configuration = lakefs_client.Configuration(
    47      host = "http://localhost/api/v1"
    48  )
    49  
    50  # The client must configure the authentication and authorization parameters
    51  # in accordance with the API server security policy.
    52  # Examples for each auth method are provided below, use the example that
    53  # satisfies your auth use case.
    54  
    55  # Configure HTTP basic authorization: basic_auth
    56  configuration = lakefs_client.Configuration(
    57      username = 'YOUR_USERNAME',
    58      password = 'YOUR_PASSWORD'
    59  )
    60  
    61  # Configure API key authorization: cookie_auth
    62  configuration.api_key['cookie_auth'] = 'YOUR_API_KEY'
    63  
    64  # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
    65  # configuration.api_key_prefix['cookie_auth'] = 'Bearer'
    66  
    67  # Configure Bearer authorization (JWT): jwt_token
    68  configuration = lakefs_client.Configuration(
    69      access_token = 'YOUR_BEARER_TOKEN'
    70  )
    71  
    72  # Configure API key authorization: oidc_auth
    73  configuration.api_key['oidc_auth'] = 'YOUR_API_KEY'
    74  
    75  # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
    76  # configuration.api_key_prefix['oidc_auth'] = 'Bearer'
    77  
    78  # Configure API key authorization: saml_auth
    79  configuration.api_key['saml_auth'] = 'YOUR_API_KEY'
    80  
    81  # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
    82  # configuration.api_key_prefix['saml_auth'] = 'Bearer'
    83  
    84  # Enter a context with an instance of the API client
    85  with lakefs_client.ApiClient(configuration) as api_client:
    86      # Create an instance of the API class
    87      api_instance = repositories_api.RepositoriesApi(api_client)
    88      repository_creation = RepositoryCreation(
    89          name="wr1c2v7s6djuy1zmeto",
    90          storage_namespace="s3://example-bucket/",
    91          default_branch="main",
    92          sample_data=True,
    93          read_only=True,
    94      ) # RepositoryCreation | 
    95      bare = False # bool | If true, create a bare repository with no initial commit and branch (optional) if omitted the server will use the default value of False
    96  
    97      # example passing only required values which don't have defaults set
    98      try:
    99          # create repository
   100          api_response = api_instance.create_repository(repository_creation)
   101          pprint(api_response)
   102      except lakefs_client.ApiException as e:
   103          print("Exception when calling RepositoriesApi->create_repository: %s\n" % e)
   104  
   105      # example passing only required values which don't have defaults set
   106      # and optional values
   107      try:
   108          # create repository
   109          api_response = api_instance.create_repository(repository_creation, bare=bare)
   110          pprint(api_response)
   111      except lakefs_client.ApiException as e:
   112          print("Exception when calling RepositoriesApi->create_repository: %s\n" % e)
   113  ```
   114  
   115  
   116  ### Parameters
   117  
   118  Name | Type | Description  | Notes
   119  ------------- | ------------- | ------------- | -------------
   120   **repository_creation** | [**RepositoryCreation**](RepositoryCreation.md)|  |
   121   **bare** | **bool**| If true, create a bare repository with no initial commit and branch | [optional] if omitted the server will use the default value of False
   122  
   123  ### Return type
   124  
   125  [**Repository**](Repository.md)
   126  
   127  ### Authorization
   128  
   129  [basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth)
   130  
   131  ### HTTP request headers
   132  
   133   - **Content-Type**: application/json
   134   - **Accept**: application/json
   135  
   136  
   137  ### HTTP response details
   138  
   139  | Status code | Description | Response headers |
   140  |-------------|-------------|------------------|
   141  **201** | repository |  -  |
   142  **400** | Validation Error |  -  |
   143  **401** | Unauthorized |  -  |
   144  **409** | Resource Conflicts With Target |  -  |
   145  **420** | too many requests |  -  |
   146  **0** | Internal Server Error |  -  |
   147  
   148  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
   149  
   150  # **delete_gc_rules**
   151  > delete_gc_rules(repository)
   152  
   153  
   154  
   155  ### Example
   156  
   157  * Basic Authentication (basic_auth):
   158  * Api Key Authentication (cookie_auth):
   159  * Bearer (JWT) Authentication (jwt_token):
   160  * Api Key Authentication (oidc_auth):
   161  * Api Key Authentication (saml_auth):
   162  
   163  ```python
   164  import time
   165  import lakefs_client
   166  from lakefs_client.api import repositories_api
   167  from lakefs_client.model.error import Error
   168  from pprint import pprint
   169  # Defining the host is optional and defaults to http://localhost/api/v1
   170  # See configuration.py for a list of all supported configuration parameters.
   171  configuration = lakefs_client.Configuration(
   172      host = "http://localhost/api/v1"
   173  )
   174  
   175  # The client must configure the authentication and authorization parameters
   176  # in accordance with the API server security policy.
   177  # Examples for each auth method are provided below, use the example that
   178  # satisfies your auth use case.
   179  
   180  # Configure HTTP basic authorization: basic_auth
   181  configuration = lakefs_client.Configuration(
   182      username = 'YOUR_USERNAME',
   183      password = 'YOUR_PASSWORD'
   184  )
   185  
   186  # Configure API key authorization: cookie_auth
   187  configuration.api_key['cookie_auth'] = 'YOUR_API_KEY'
   188  
   189  # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
   190  # configuration.api_key_prefix['cookie_auth'] = 'Bearer'
   191  
   192  # Configure Bearer authorization (JWT): jwt_token
   193  configuration = lakefs_client.Configuration(
   194      access_token = 'YOUR_BEARER_TOKEN'
   195  )
   196  
   197  # Configure API key authorization: oidc_auth
   198  configuration.api_key['oidc_auth'] = 'YOUR_API_KEY'
   199  
   200  # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
   201  # configuration.api_key_prefix['oidc_auth'] = 'Bearer'
   202  
   203  # Configure API key authorization: saml_auth
   204  configuration.api_key['saml_auth'] = 'YOUR_API_KEY'
   205  
   206  # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
   207  # configuration.api_key_prefix['saml_auth'] = 'Bearer'
   208  
   209  # Enter a context with an instance of the API client
   210  with lakefs_client.ApiClient(configuration) as api_client:
   211      # Create an instance of the API class
   212      api_instance = repositories_api.RepositoriesApi(api_client)
   213      repository = "repository_example" # str | 
   214  
   215      # example passing only required values which don't have defaults set
   216      try:
   217          api_instance.delete_gc_rules(repository)
   218      except lakefs_client.ApiException as e:
   219          print("Exception when calling RepositoriesApi->delete_gc_rules: %s\n" % e)
   220  ```
   221  
   222  
   223  ### Parameters
   224  
   225  Name | Type | Description  | Notes
   226  ------------- | ------------- | ------------- | -------------
   227   **repository** | **str**|  |
   228  
   229  ### Return type
   230  
   231  void (empty response body)
   232  
   233  ### Authorization
   234  
   235  [basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth)
   236  
   237  ### HTTP request headers
   238  
   239   - **Content-Type**: Not defined
   240   - **Accept**: application/json
   241  
   242  
   243  ### HTTP response details
   244  
   245  | Status code | Description | Response headers |
   246  |-------------|-------------|------------------|
   247  **204** | deleted garbage collection rules successfully |  -  |
   248  **401** | Unauthorized |  -  |
   249  **403** | Forbidden |  -  |
   250  **404** | Resource Not Found |  -  |
   251  **420** | too many requests |  -  |
   252  **0** | Internal Server Error |  -  |
   253  
   254  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
   255  
   256  # **delete_repository**
   257  > delete_repository(repository)
   258  
   259  delete repository
   260  
   261  ### Example
   262  
   263  * Basic Authentication (basic_auth):
   264  * Api Key Authentication (cookie_auth):
   265  * Bearer (JWT) Authentication (jwt_token):
   266  * Api Key Authentication (oidc_auth):
   267  * Api Key Authentication (saml_auth):
   268  
   269  ```python
   270  import time
   271  import lakefs_client
   272  from lakefs_client.api import repositories_api
   273  from lakefs_client.model.error import Error
   274  from pprint import pprint
   275  # Defining the host is optional and defaults to http://localhost/api/v1
   276  # See configuration.py for a list of all supported configuration parameters.
   277  configuration = lakefs_client.Configuration(
   278      host = "http://localhost/api/v1"
   279  )
   280  
   281  # The client must configure the authentication and authorization parameters
   282  # in accordance with the API server security policy.
   283  # Examples for each auth method are provided below, use the example that
   284  # satisfies your auth use case.
   285  
   286  # Configure HTTP basic authorization: basic_auth
   287  configuration = lakefs_client.Configuration(
   288      username = 'YOUR_USERNAME',
   289      password = 'YOUR_PASSWORD'
   290  )
   291  
   292  # Configure API key authorization: cookie_auth
   293  configuration.api_key['cookie_auth'] = 'YOUR_API_KEY'
   294  
   295  # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
   296  # configuration.api_key_prefix['cookie_auth'] = 'Bearer'
   297  
   298  # Configure Bearer authorization (JWT): jwt_token
   299  configuration = lakefs_client.Configuration(
   300      access_token = 'YOUR_BEARER_TOKEN'
   301  )
   302  
   303  # Configure API key authorization: oidc_auth
   304  configuration.api_key['oidc_auth'] = 'YOUR_API_KEY'
   305  
   306  # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
   307  # configuration.api_key_prefix['oidc_auth'] = 'Bearer'
   308  
   309  # Configure API key authorization: saml_auth
   310  configuration.api_key['saml_auth'] = 'YOUR_API_KEY'
   311  
   312  # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
   313  # configuration.api_key_prefix['saml_auth'] = 'Bearer'
   314  
   315  # Enter a context with an instance of the API client
   316  with lakefs_client.ApiClient(configuration) as api_client:
   317      # Create an instance of the API class
   318      api_instance = repositories_api.RepositoriesApi(api_client)
   319      repository = "repository_example" # str | 
   320      force = False # bool | Bypass read-only protection and delete the repository (optional) if omitted the server will use the default value of False
   321  
   322      # example passing only required values which don't have defaults set
   323      try:
   324          # delete repository
   325          api_instance.delete_repository(repository)
   326      except lakefs_client.ApiException as e:
   327          print("Exception when calling RepositoriesApi->delete_repository: %s\n" % e)
   328  
   329      # example passing only required values which don't have defaults set
   330      # and optional values
   331      try:
   332          # delete repository
   333          api_instance.delete_repository(repository, force=force)
   334      except lakefs_client.ApiException as e:
   335          print("Exception when calling RepositoriesApi->delete_repository: %s\n" % e)
   336  ```
   337  
   338  
   339  ### Parameters
   340  
   341  Name | Type | Description  | Notes
   342  ------------- | ------------- | ------------- | -------------
   343   **repository** | **str**|  |
   344   **force** | **bool**| Bypass read-only protection and delete the repository | [optional] if omitted the server will use the default value of False
   345  
   346  ### Return type
   347  
   348  void (empty response body)
   349  
   350  ### Authorization
   351  
   352  [basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth)
   353  
   354  ### HTTP request headers
   355  
   356   - **Content-Type**: Not defined
   357   - **Accept**: application/json
   358  
   359  
   360  ### HTTP response details
   361  
   362  | Status code | Description | Response headers |
   363  |-------------|-------------|------------------|
   364  **204** | repository deleted successfully |  -  |
   365  **401** | Unauthorized |  -  |
   366  **404** | Resource Not Found |  -  |
   367  **420** | too many requests |  -  |
   368  **0** | Internal Server Error |  -  |
   369  
   370  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
   371  
   372  # **dump_status**
   373  > RepositoryDumpStatus dump_status(repository, task_id)
   374  
   375  Status of a repository dump task
   376  
   377  ### Example
   378  
   379  * Basic Authentication (basic_auth):
   380  * Api Key Authentication (cookie_auth):
   381  * Bearer (JWT) Authentication (jwt_token):
   382  * Api Key Authentication (oidc_auth):
   383  * Api Key Authentication (saml_auth):
   384  
   385  ```python
   386  import time
   387  import lakefs_client
   388  from lakefs_client.api import repositories_api
   389  from lakefs_client.model.repository_dump_status import RepositoryDumpStatus
   390  from lakefs_client.model.error import Error
   391  from pprint import pprint
   392  # Defining the host is optional and defaults to http://localhost/api/v1
   393  # See configuration.py for a list of all supported configuration parameters.
   394  configuration = lakefs_client.Configuration(
   395      host = "http://localhost/api/v1"
   396  )
   397  
   398  # The client must configure the authentication and authorization parameters
   399  # in accordance with the API server security policy.
   400  # Examples for each auth method are provided below, use the example that
   401  # satisfies your auth use case.
   402  
   403  # Configure HTTP basic authorization: basic_auth
   404  configuration = lakefs_client.Configuration(
   405      username = 'YOUR_USERNAME',
   406      password = 'YOUR_PASSWORD'
   407  )
   408  
   409  # Configure API key authorization: cookie_auth
   410  configuration.api_key['cookie_auth'] = 'YOUR_API_KEY'
   411  
   412  # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
   413  # configuration.api_key_prefix['cookie_auth'] = 'Bearer'
   414  
   415  # Configure Bearer authorization (JWT): jwt_token
   416  configuration = lakefs_client.Configuration(
   417      access_token = 'YOUR_BEARER_TOKEN'
   418  )
   419  
   420  # Configure API key authorization: oidc_auth
   421  configuration.api_key['oidc_auth'] = 'YOUR_API_KEY'
   422  
   423  # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
   424  # configuration.api_key_prefix['oidc_auth'] = 'Bearer'
   425  
   426  # Configure API key authorization: saml_auth
   427  configuration.api_key['saml_auth'] = 'YOUR_API_KEY'
   428  
   429  # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
   430  # configuration.api_key_prefix['saml_auth'] = 'Bearer'
   431  
   432  # Enter a context with an instance of the API client
   433  with lakefs_client.ApiClient(configuration) as api_client:
   434      # Create an instance of the API class
   435      api_instance = repositories_api.RepositoriesApi(api_client)
   436      repository = "repository_example" # str | 
   437      task_id = "task_id_example" # str | 
   438  
   439      # example passing only required values which don't have defaults set
   440      try:
   441          # Status of a repository dump task
   442          api_response = api_instance.dump_status(repository, task_id)
   443          pprint(api_response)
   444      except lakefs_client.ApiException as e:
   445          print("Exception when calling RepositoriesApi->dump_status: %s\n" % e)
   446  ```
   447  
   448  
   449  ### Parameters
   450  
   451  Name | Type | Description  | Notes
   452  ------------- | ------------- | ------------- | -------------
   453   **repository** | **str**|  |
   454   **task_id** | **str**|  |
   455  
   456  ### Return type
   457  
   458  [**RepositoryDumpStatus**](RepositoryDumpStatus.md)
   459  
   460  ### Authorization
   461  
   462  [basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth)
   463  
   464  ### HTTP request headers
   465  
   466   - **Content-Type**: Not defined
   467   - **Accept**: application/json
   468  
   469  
   470  ### HTTP response details
   471  
   472  | Status code | Description | Response headers |
   473  |-------------|-------------|------------------|
   474  **200** | dump task status |  -  |
   475  **400** | Validation Error |  -  |
   476  **401** | Unauthorized |  -  |
   477  **404** | Resource Not Found |  -  |
   478  **420** | too many requests |  -  |
   479  **0** | Internal Server Error |  -  |
   480  
   481  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
   482  
   483  # **dump_submit**
   484  > TaskInfo dump_submit(repository)
   485  
   486  Backup the repository metadata (tags, commits, branches) and save the backup to the object store.
   487  
   488  ### Example
   489  
   490  * Basic Authentication (basic_auth):
   491  * Api Key Authentication (cookie_auth):
   492  * Bearer (JWT) Authentication (jwt_token):
   493  * Api Key Authentication (oidc_auth):
   494  * Api Key Authentication (saml_auth):
   495  
   496  ```python
   497  import time
   498  import lakefs_client
   499  from lakefs_client.api import repositories_api
   500  from lakefs_client.model.error import Error
   501  from lakefs_client.model.task_info import TaskInfo
   502  from pprint import pprint
   503  # Defining the host is optional and defaults to http://localhost/api/v1
   504  # See configuration.py for a list of all supported configuration parameters.
   505  configuration = lakefs_client.Configuration(
   506      host = "http://localhost/api/v1"
   507  )
   508  
   509  # The client must configure the authentication and authorization parameters
   510  # in accordance with the API server security policy.
   511  # Examples for each auth method are provided below, use the example that
   512  # satisfies your auth use case.
   513  
   514  # Configure HTTP basic authorization: basic_auth
   515  configuration = lakefs_client.Configuration(
   516      username = 'YOUR_USERNAME',
   517      password = 'YOUR_PASSWORD'
   518  )
   519  
   520  # Configure API key authorization: cookie_auth
   521  configuration.api_key['cookie_auth'] = 'YOUR_API_KEY'
   522  
   523  # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
   524  # configuration.api_key_prefix['cookie_auth'] = 'Bearer'
   525  
   526  # Configure Bearer authorization (JWT): jwt_token
   527  configuration = lakefs_client.Configuration(
   528      access_token = 'YOUR_BEARER_TOKEN'
   529  )
   530  
   531  # Configure API key authorization: oidc_auth
   532  configuration.api_key['oidc_auth'] = 'YOUR_API_KEY'
   533  
   534  # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
   535  # configuration.api_key_prefix['oidc_auth'] = 'Bearer'
   536  
   537  # Configure API key authorization: saml_auth
   538  configuration.api_key['saml_auth'] = 'YOUR_API_KEY'
   539  
   540  # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
   541  # configuration.api_key_prefix['saml_auth'] = 'Bearer'
   542  
   543  # Enter a context with an instance of the API client
   544  with lakefs_client.ApiClient(configuration) as api_client:
   545      # Create an instance of the API class
   546      api_instance = repositories_api.RepositoriesApi(api_client)
   547      repository = "repository_example" # str | 
   548  
   549      # example passing only required values which don't have defaults set
   550      try:
   551          # Backup the repository metadata (tags, commits, branches) and save the backup to the object store.
   552          api_response = api_instance.dump_submit(repository)
   553          pprint(api_response)
   554      except lakefs_client.ApiException as e:
   555          print("Exception when calling RepositoriesApi->dump_submit: %s\n" % e)
   556  ```
   557  
   558  
   559  ### Parameters
   560  
   561  Name | Type | Description  | Notes
   562  ------------- | ------------- | ------------- | -------------
   563   **repository** | **str**|  |
   564  
   565  ### Return type
   566  
   567  [**TaskInfo**](TaskInfo.md)
   568  
   569  ### Authorization
   570  
   571  [basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth)
   572  
   573  ### HTTP request headers
   574  
   575   - **Content-Type**: Not defined
   576   - **Accept**: application/json
   577  
   578  
   579  ### HTTP response details
   580  
   581  | Status code | Description | Response headers |
   582  |-------------|-------------|------------------|
   583  **202** | dump task information |  -  |
   584  **400** | Validation Error |  -  |
   585  **401** | Unauthorized |  -  |
   586  **404** | Resource Not Found |  -  |
   587  **0** | Internal Server Error |  -  |
   588  
   589  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
   590  
   591  # **get_branch_protection_rules**
   592  > [BranchProtectionRule] get_branch_protection_rules(repository)
   593  
   594  get branch protection rules
   595  
   596  ### Example
   597  
   598  * Basic Authentication (basic_auth):
   599  * Api Key Authentication (cookie_auth):
   600  * Bearer (JWT) Authentication (jwt_token):
   601  * Api Key Authentication (oidc_auth):
   602  * Api Key Authentication (saml_auth):
   603  
   604  ```python
   605  import time
   606  import lakefs_client
   607  from lakefs_client.api import repositories_api
   608  from lakefs_client.model.error import Error
   609  from lakefs_client.model.branch_protection_rule import BranchProtectionRule
   610  from pprint import pprint
   611  # Defining the host is optional and defaults to http://localhost/api/v1
   612  # See configuration.py for a list of all supported configuration parameters.
   613  configuration = lakefs_client.Configuration(
   614      host = "http://localhost/api/v1"
   615  )
   616  
   617  # The client must configure the authentication and authorization parameters
   618  # in accordance with the API server security policy.
   619  # Examples for each auth method are provided below, use the example that
   620  # satisfies your auth use case.
   621  
   622  # Configure HTTP basic authorization: basic_auth
   623  configuration = lakefs_client.Configuration(
   624      username = 'YOUR_USERNAME',
   625      password = 'YOUR_PASSWORD'
   626  )
   627  
   628  # Configure API key authorization: cookie_auth
   629  configuration.api_key['cookie_auth'] = 'YOUR_API_KEY'
   630  
   631  # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
   632  # configuration.api_key_prefix['cookie_auth'] = 'Bearer'
   633  
   634  # Configure Bearer authorization (JWT): jwt_token
   635  configuration = lakefs_client.Configuration(
   636      access_token = 'YOUR_BEARER_TOKEN'
   637  )
   638  
   639  # Configure API key authorization: oidc_auth
   640  configuration.api_key['oidc_auth'] = 'YOUR_API_KEY'
   641  
   642  # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
   643  # configuration.api_key_prefix['oidc_auth'] = 'Bearer'
   644  
   645  # Configure API key authorization: saml_auth
   646  configuration.api_key['saml_auth'] = 'YOUR_API_KEY'
   647  
   648  # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
   649  # configuration.api_key_prefix['saml_auth'] = 'Bearer'
   650  
   651  # Enter a context with an instance of the API client
   652  with lakefs_client.ApiClient(configuration) as api_client:
   653      # Create an instance of the API class
   654      api_instance = repositories_api.RepositoriesApi(api_client)
   655      repository = "repository_example" # str | 
   656  
   657      # example passing only required values which don't have defaults set
   658      try:
   659          # get branch protection rules
   660          api_response = api_instance.get_branch_protection_rules(repository)
   661          pprint(api_response)
   662      except lakefs_client.ApiException as e:
   663          print("Exception when calling RepositoriesApi->get_branch_protection_rules: %s\n" % e)
   664  ```
   665  
   666  
   667  ### Parameters
   668  
   669  Name | Type | Description  | Notes
   670  ------------- | ------------- | ------------- | -------------
   671   **repository** | **str**|  |
   672  
   673  ### Return type
   674  
   675  [**[BranchProtectionRule]**](BranchProtectionRule.md)
   676  
   677  ### Authorization
   678  
   679  [basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth)
   680  
   681  ### HTTP request headers
   682  
   683   - **Content-Type**: Not defined
   684   - **Accept**: application/json
   685  
   686  
   687  ### HTTP response details
   688  
   689  | Status code | Description | Response headers |
   690  |-------------|-------------|------------------|
   691  **200** | branch protection rules |  * ETag -  <br>  |
   692  **401** | Unauthorized |  -  |
   693  **404** | Resource Not Found |  -  |
   694  **420** | too many requests |  -  |
   695  **0** | Internal Server Error |  -  |
   696  
   697  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
   698  
   699  # **get_gc_rules**
   700  > GarbageCollectionRules get_gc_rules(repository)
   701  
   702  get repository GC rules
   703  
   704  ### Example
   705  
   706  * Basic Authentication (basic_auth):
   707  * Api Key Authentication (cookie_auth):
   708  * Bearer (JWT) Authentication (jwt_token):
   709  * Api Key Authentication (oidc_auth):
   710  * Api Key Authentication (saml_auth):
   711  
   712  ```python
   713  import time
   714  import lakefs_client
   715  from lakefs_client.api import repositories_api
   716  from lakefs_client.model.garbage_collection_rules import GarbageCollectionRules
   717  from lakefs_client.model.error import Error
   718  from pprint import pprint
   719  # Defining the host is optional and defaults to http://localhost/api/v1
   720  # See configuration.py for a list of all supported configuration parameters.
   721  configuration = lakefs_client.Configuration(
   722      host = "http://localhost/api/v1"
   723  )
   724  
   725  # The client must configure the authentication and authorization parameters
   726  # in accordance with the API server security policy.
   727  # Examples for each auth method are provided below, use the example that
   728  # satisfies your auth use case.
   729  
   730  # Configure HTTP basic authorization: basic_auth
   731  configuration = lakefs_client.Configuration(
   732      username = 'YOUR_USERNAME',
   733      password = 'YOUR_PASSWORD'
   734  )
   735  
   736  # Configure API key authorization: cookie_auth
   737  configuration.api_key['cookie_auth'] = 'YOUR_API_KEY'
   738  
   739  # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
   740  # configuration.api_key_prefix['cookie_auth'] = 'Bearer'
   741  
   742  # Configure Bearer authorization (JWT): jwt_token
   743  configuration = lakefs_client.Configuration(
   744      access_token = 'YOUR_BEARER_TOKEN'
   745  )
   746  
   747  # Configure API key authorization: oidc_auth
   748  configuration.api_key['oidc_auth'] = 'YOUR_API_KEY'
   749  
   750  # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
   751  # configuration.api_key_prefix['oidc_auth'] = 'Bearer'
   752  
   753  # Configure API key authorization: saml_auth
   754  configuration.api_key['saml_auth'] = 'YOUR_API_KEY'
   755  
   756  # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
   757  # configuration.api_key_prefix['saml_auth'] = 'Bearer'
   758  
   759  # Enter a context with an instance of the API client
   760  with lakefs_client.ApiClient(configuration) as api_client:
   761      # Create an instance of the API class
   762      api_instance = repositories_api.RepositoriesApi(api_client)
   763      repository = "repository_example" # str | 
   764  
   765      # example passing only required values which don't have defaults set
   766      try:
   767          # get repository GC rules
   768          api_response = api_instance.get_gc_rules(repository)
   769          pprint(api_response)
   770      except lakefs_client.ApiException as e:
   771          print("Exception when calling RepositoriesApi->get_gc_rules: %s\n" % e)
   772  ```
   773  
   774  
   775  ### Parameters
   776  
   777  Name | Type | Description  | Notes
   778  ------------- | ------------- | ------------- | -------------
   779   **repository** | **str**|  |
   780  
   781  ### Return type
   782  
   783  [**GarbageCollectionRules**](GarbageCollectionRules.md)
   784  
   785  ### Authorization
   786  
   787  [basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth)
   788  
   789  ### HTTP request headers
   790  
   791   - **Content-Type**: Not defined
   792   - **Accept**: application/json
   793  
   794  
   795  ### HTTP response details
   796  
   797  | Status code | Description | Response headers |
   798  |-------------|-------------|------------------|
   799  **200** | repository GC rules |  -  |
   800  **401** | Unauthorized |  -  |
   801  **404** | Resource Not Found |  -  |
   802  **420** | too many requests |  -  |
   803  **0** | Internal Server Error |  -  |
   804  
   805  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
   806  
   807  # **get_repository**
   808  > Repository get_repository(repository)
   809  
   810  get repository
   811  
   812  ### Example
   813  
   814  * Basic Authentication (basic_auth):
   815  * Api Key Authentication (cookie_auth):
   816  * Bearer (JWT) Authentication (jwt_token):
   817  * Api Key Authentication (oidc_auth):
   818  * Api Key Authentication (saml_auth):
   819  
   820  ```python
   821  import time
   822  import lakefs_client
   823  from lakefs_client.api import repositories_api
   824  from lakefs_client.model.repository import Repository
   825  from lakefs_client.model.error import Error
   826  from pprint import pprint
   827  # Defining the host is optional and defaults to http://localhost/api/v1
   828  # See configuration.py for a list of all supported configuration parameters.
   829  configuration = lakefs_client.Configuration(
   830      host = "http://localhost/api/v1"
   831  )
   832  
   833  # The client must configure the authentication and authorization parameters
   834  # in accordance with the API server security policy.
   835  # Examples for each auth method are provided below, use the example that
   836  # satisfies your auth use case.
   837  
   838  # Configure HTTP basic authorization: basic_auth
   839  configuration = lakefs_client.Configuration(
   840      username = 'YOUR_USERNAME',
   841      password = 'YOUR_PASSWORD'
   842  )
   843  
   844  # Configure API key authorization: cookie_auth
   845  configuration.api_key['cookie_auth'] = 'YOUR_API_KEY'
   846  
   847  # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
   848  # configuration.api_key_prefix['cookie_auth'] = 'Bearer'
   849  
   850  # Configure Bearer authorization (JWT): jwt_token
   851  configuration = lakefs_client.Configuration(
   852      access_token = 'YOUR_BEARER_TOKEN'
   853  )
   854  
   855  # Configure API key authorization: oidc_auth
   856  configuration.api_key['oidc_auth'] = 'YOUR_API_KEY'
   857  
   858  # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
   859  # configuration.api_key_prefix['oidc_auth'] = 'Bearer'
   860  
   861  # Configure API key authorization: saml_auth
   862  configuration.api_key['saml_auth'] = 'YOUR_API_KEY'
   863  
   864  # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
   865  # configuration.api_key_prefix['saml_auth'] = 'Bearer'
   866  
   867  # Enter a context with an instance of the API client
   868  with lakefs_client.ApiClient(configuration) as api_client:
   869      # Create an instance of the API class
   870      api_instance = repositories_api.RepositoriesApi(api_client)
   871      repository = "repository_example" # str | 
   872  
   873      # example passing only required values which don't have defaults set
   874      try:
   875          # get repository
   876          api_response = api_instance.get_repository(repository)
   877          pprint(api_response)
   878      except lakefs_client.ApiException as e:
   879          print("Exception when calling RepositoriesApi->get_repository: %s\n" % e)
   880  ```
   881  
   882  
   883  ### Parameters
   884  
   885  Name | Type | Description  | Notes
   886  ------------- | ------------- | ------------- | -------------
   887   **repository** | **str**|  |
   888  
   889  ### Return type
   890  
   891  [**Repository**](Repository.md)
   892  
   893  ### Authorization
   894  
   895  [basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth)
   896  
   897  ### HTTP request headers
   898  
   899   - **Content-Type**: Not defined
   900   - **Accept**: application/json
   901  
   902  
   903  ### HTTP response details
   904  
   905  | Status code | Description | Response headers |
   906  |-------------|-------------|------------------|
   907  **200** | repository |  -  |
   908  **401** | Unauthorized |  -  |
   909  **404** | Resource Not Found |  -  |
   910  **420** | too many requests |  -  |
   911  **0** | Internal Server Error |  -  |
   912  
   913  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
   914  
   915  # **get_repository_metadata**
   916  > RepositoryMetadata get_repository_metadata(repository)
   917  
   918  get repository metadata
   919  
   920  ### Example
   921  
   922  * Basic Authentication (basic_auth):
   923  * Api Key Authentication (cookie_auth):
   924  * Bearer (JWT) Authentication (jwt_token):
   925  * Api Key Authentication (oidc_auth):
   926  * Api Key Authentication (saml_auth):
   927  
   928  ```python
   929  import time
   930  import lakefs_client
   931  from lakefs_client.api import repositories_api
   932  from lakefs_client.model.repository_metadata import RepositoryMetadata
   933  from lakefs_client.model.error import Error
   934  from pprint import pprint
   935  # Defining the host is optional and defaults to http://localhost/api/v1
   936  # See configuration.py for a list of all supported configuration parameters.
   937  configuration = lakefs_client.Configuration(
   938      host = "http://localhost/api/v1"
   939  )
   940  
   941  # The client must configure the authentication and authorization parameters
   942  # in accordance with the API server security policy.
   943  # Examples for each auth method are provided below, use the example that
   944  # satisfies your auth use case.
   945  
   946  # Configure HTTP basic authorization: basic_auth
   947  configuration = lakefs_client.Configuration(
   948      username = 'YOUR_USERNAME',
   949      password = 'YOUR_PASSWORD'
   950  )
   951  
   952  # Configure API key authorization: cookie_auth
   953  configuration.api_key['cookie_auth'] = 'YOUR_API_KEY'
   954  
   955  # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
   956  # configuration.api_key_prefix['cookie_auth'] = 'Bearer'
   957  
   958  # Configure Bearer authorization (JWT): jwt_token
   959  configuration = lakefs_client.Configuration(
   960      access_token = 'YOUR_BEARER_TOKEN'
   961  )
   962  
   963  # Configure API key authorization: oidc_auth
   964  configuration.api_key['oidc_auth'] = 'YOUR_API_KEY'
   965  
   966  # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
   967  # configuration.api_key_prefix['oidc_auth'] = 'Bearer'
   968  
   969  # Configure API key authorization: saml_auth
   970  configuration.api_key['saml_auth'] = 'YOUR_API_KEY'
   971  
   972  # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
   973  # configuration.api_key_prefix['saml_auth'] = 'Bearer'
   974  
   975  # Enter a context with an instance of the API client
   976  with lakefs_client.ApiClient(configuration) as api_client:
   977      # Create an instance of the API class
   978      api_instance = repositories_api.RepositoriesApi(api_client)
   979      repository = "repository_example" # str | 
   980  
   981      # example passing only required values which don't have defaults set
   982      try:
   983          # get repository metadata
   984          api_response = api_instance.get_repository_metadata(repository)
   985          pprint(api_response)
   986      except lakefs_client.ApiException as e:
   987          print("Exception when calling RepositoriesApi->get_repository_metadata: %s\n" % e)
   988  ```
   989  
   990  
   991  ### Parameters
   992  
   993  Name | Type | Description  | Notes
   994  ------------- | ------------- | ------------- | -------------
   995   **repository** | **str**|  |
   996  
   997  ### Return type
   998  
   999  [**RepositoryMetadata**](RepositoryMetadata.md)
  1000  
  1001  ### Authorization
  1002  
  1003  [basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth)
  1004  
  1005  ### HTTP request headers
  1006  
  1007   - **Content-Type**: Not defined
  1008   - **Accept**: application/json
  1009  
  1010  
  1011  ### HTTP response details
  1012  
  1013  | Status code | Description | Response headers |
  1014  |-------------|-------------|------------------|
  1015  **200** | repository metadata |  -  |
  1016  **401** | Unauthorized |  -  |
  1017  **404** | Resource Not Found |  -  |
  1018  **420** | too many requests |  -  |
  1019  **0** | Internal Server Error |  -  |
  1020  
  1021  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
  1022  
  1023  # **list_repositories**
  1024  > RepositoryList list_repositories()
  1025  
  1026  list repositories
  1027  
  1028  ### Example
  1029  
  1030  * Basic Authentication (basic_auth):
  1031  * Api Key Authentication (cookie_auth):
  1032  * Bearer (JWT) Authentication (jwt_token):
  1033  * Api Key Authentication (oidc_auth):
  1034  * Api Key Authentication (saml_auth):
  1035  
  1036  ```python
  1037  import time
  1038  import lakefs_client
  1039  from lakefs_client.api import repositories_api
  1040  from lakefs_client.model.repository_list import RepositoryList
  1041  from lakefs_client.model.error import Error
  1042  from pprint import pprint
  1043  # Defining the host is optional and defaults to http://localhost/api/v1
  1044  # See configuration.py for a list of all supported configuration parameters.
  1045  configuration = lakefs_client.Configuration(
  1046      host = "http://localhost/api/v1"
  1047  )
  1048  
  1049  # The client must configure the authentication and authorization parameters
  1050  # in accordance with the API server security policy.
  1051  # Examples for each auth method are provided below, use the example that
  1052  # satisfies your auth use case.
  1053  
  1054  # Configure HTTP basic authorization: basic_auth
  1055  configuration = lakefs_client.Configuration(
  1056      username = 'YOUR_USERNAME',
  1057      password = 'YOUR_PASSWORD'
  1058  )
  1059  
  1060  # Configure API key authorization: cookie_auth
  1061  configuration.api_key['cookie_auth'] = 'YOUR_API_KEY'
  1062  
  1063  # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
  1064  # configuration.api_key_prefix['cookie_auth'] = 'Bearer'
  1065  
  1066  # Configure Bearer authorization (JWT): jwt_token
  1067  configuration = lakefs_client.Configuration(
  1068      access_token = 'YOUR_BEARER_TOKEN'
  1069  )
  1070  
  1071  # Configure API key authorization: oidc_auth
  1072  configuration.api_key['oidc_auth'] = 'YOUR_API_KEY'
  1073  
  1074  # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
  1075  # configuration.api_key_prefix['oidc_auth'] = 'Bearer'
  1076  
  1077  # Configure API key authorization: saml_auth
  1078  configuration.api_key['saml_auth'] = 'YOUR_API_KEY'
  1079  
  1080  # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
  1081  # configuration.api_key_prefix['saml_auth'] = 'Bearer'
  1082  
  1083  # Enter a context with an instance of the API client
  1084  with lakefs_client.ApiClient(configuration) as api_client:
  1085      # Create an instance of the API class
  1086      api_instance = repositories_api.RepositoriesApi(api_client)
  1087      prefix = "prefix_example" # str | return items prefixed with this value (optional)
  1088      after = "after_example" # str | return items after this value (optional)
  1089      amount = 100 # int | how many items to return (optional) if omitted the server will use the default value of 100
  1090  
  1091      # example passing only required values which don't have defaults set
  1092      # and optional values
  1093      try:
  1094          # list repositories
  1095          api_response = api_instance.list_repositories(prefix=prefix, after=after, amount=amount)
  1096          pprint(api_response)
  1097      except lakefs_client.ApiException as e:
  1098          print("Exception when calling RepositoriesApi->list_repositories: %s\n" % e)
  1099  ```
  1100  
  1101  
  1102  ### Parameters
  1103  
  1104  Name | Type | Description  | Notes
  1105  ------------- | ------------- | ------------- | -------------
  1106   **prefix** | **str**| return items prefixed with this value | [optional]
  1107   **after** | **str**| return items after this value | [optional]
  1108   **amount** | **int**| how many items to return | [optional] if omitted the server will use the default value of 100
  1109  
  1110  ### Return type
  1111  
  1112  [**RepositoryList**](RepositoryList.md)
  1113  
  1114  ### Authorization
  1115  
  1116  [basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth)
  1117  
  1118  ### HTTP request headers
  1119  
  1120   - **Content-Type**: Not defined
  1121   - **Accept**: application/json
  1122  
  1123  
  1124  ### HTTP response details
  1125  
  1126  | Status code | Description | Response headers |
  1127  |-------------|-------------|------------------|
  1128  **200** | repository list |  -  |
  1129  **401** | Unauthorized |  -  |
  1130  **420** | too many requests |  -  |
  1131  **0** | Internal Server Error |  -  |
  1132  
  1133  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
  1134  
  1135  # **restore_status**
  1136  > RepositoryRestoreStatus restore_status(repository, task_id)
  1137  
  1138  Status of a restore request
  1139  
  1140  ### Example
  1141  
  1142  * Basic Authentication (basic_auth):
  1143  * Api Key Authentication (cookie_auth):
  1144  * Bearer (JWT) Authentication (jwt_token):
  1145  * Api Key Authentication (oidc_auth):
  1146  * Api Key Authentication (saml_auth):
  1147  
  1148  ```python
  1149  import time
  1150  import lakefs_client
  1151  from lakefs_client.api import repositories_api
  1152  from lakefs_client.model.repository_restore_status import RepositoryRestoreStatus
  1153  from lakefs_client.model.error import Error
  1154  from pprint import pprint
  1155  # Defining the host is optional and defaults to http://localhost/api/v1
  1156  # See configuration.py for a list of all supported configuration parameters.
  1157  configuration = lakefs_client.Configuration(
  1158      host = "http://localhost/api/v1"
  1159  )
  1160  
  1161  # The client must configure the authentication and authorization parameters
  1162  # in accordance with the API server security policy.
  1163  # Examples for each auth method are provided below, use the example that
  1164  # satisfies your auth use case.
  1165  
  1166  # Configure HTTP basic authorization: basic_auth
  1167  configuration = lakefs_client.Configuration(
  1168      username = 'YOUR_USERNAME',
  1169      password = 'YOUR_PASSWORD'
  1170  )
  1171  
  1172  # Configure API key authorization: cookie_auth
  1173  configuration.api_key['cookie_auth'] = 'YOUR_API_KEY'
  1174  
  1175  # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
  1176  # configuration.api_key_prefix['cookie_auth'] = 'Bearer'
  1177  
  1178  # Configure Bearer authorization (JWT): jwt_token
  1179  configuration = lakefs_client.Configuration(
  1180      access_token = 'YOUR_BEARER_TOKEN'
  1181  )
  1182  
  1183  # Configure API key authorization: oidc_auth
  1184  configuration.api_key['oidc_auth'] = 'YOUR_API_KEY'
  1185  
  1186  # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
  1187  # configuration.api_key_prefix['oidc_auth'] = 'Bearer'
  1188  
  1189  # Configure API key authorization: saml_auth
  1190  configuration.api_key['saml_auth'] = 'YOUR_API_KEY'
  1191  
  1192  # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
  1193  # configuration.api_key_prefix['saml_auth'] = 'Bearer'
  1194  
  1195  # Enter a context with an instance of the API client
  1196  with lakefs_client.ApiClient(configuration) as api_client:
  1197      # Create an instance of the API class
  1198      api_instance = repositories_api.RepositoriesApi(api_client)
  1199      repository = "repository_example" # str | 
  1200      task_id = "task_id_example" # str | 
  1201  
  1202      # example passing only required values which don't have defaults set
  1203      try:
  1204          # Status of a restore request
  1205          api_response = api_instance.restore_status(repository, task_id)
  1206          pprint(api_response)
  1207      except lakefs_client.ApiException as e:
  1208          print("Exception when calling RepositoriesApi->restore_status: %s\n" % e)
  1209  ```
  1210  
  1211  
  1212  ### Parameters
  1213  
  1214  Name | Type | Description  | Notes
  1215  ------------- | ------------- | ------------- | -------------
  1216   **repository** | **str**|  |
  1217   **task_id** | **str**|  |
  1218  
  1219  ### Return type
  1220  
  1221  [**RepositoryRestoreStatus**](RepositoryRestoreStatus.md)
  1222  
  1223  ### Authorization
  1224  
  1225  [basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth)
  1226  
  1227  ### HTTP request headers
  1228  
  1229   - **Content-Type**: Not defined
  1230   - **Accept**: application/json
  1231  
  1232  
  1233  ### HTTP response details
  1234  
  1235  | Status code | Description | Response headers |
  1236  |-------------|-------------|------------------|
  1237  **200** | restore task status |  -  |
  1238  **400** | Validation Error |  -  |
  1239  **401** | Unauthorized |  -  |
  1240  **404** | Resource Not Found |  -  |
  1241  **420** | too many requests |  -  |
  1242  **0** | Internal Server Error |  -  |
  1243  
  1244  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
  1245  
  1246  # **restore_submit**
  1247  > TaskInfo restore_submit(repository, refs_restore)
  1248  
  1249  Restore repository from a dump in the object store
  1250  
  1251  ### Example
  1252  
  1253  * Basic Authentication (basic_auth):
  1254  * Api Key Authentication (cookie_auth):
  1255  * Bearer (JWT) Authentication (jwt_token):
  1256  * Api Key Authentication (oidc_auth):
  1257  * Api Key Authentication (saml_auth):
  1258  
  1259  ```python
  1260  import time
  1261  import lakefs_client
  1262  from lakefs_client.api import repositories_api
  1263  from lakefs_client.model.refs_restore import RefsRestore
  1264  from lakefs_client.model.error import Error
  1265  from lakefs_client.model.task_info import TaskInfo
  1266  from pprint import pprint
  1267  # Defining the host is optional and defaults to http://localhost/api/v1
  1268  # See configuration.py for a list of all supported configuration parameters.
  1269  configuration = lakefs_client.Configuration(
  1270      host = "http://localhost/api/v1"
  1271  )
  1272  
  1273  # The client must configure the authentication and authorization parameters
  1274  # in accordance with the API server security policy.
  1275  # Examples for each auth method are provided below, use the example that
  1276  # satisfies your auth use case.
  1277  
  1278  # Configure HTTP basic authorization: basic_auth
  1279  configuration = lakefs_client.Configuration(
  1280      username = 'YOUR_USERNAME',
  1281      password = 'YOUR_PASSWORD'
  1282  )
  1283  
  1284  # Configure API key authorization: cookie_auth
  1285  configuration.api_key['cookie_auth'] = 'YOUR_API_KEY'
  1286  
  1287  # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
  1288  # configuration.api_key_prefix['cookie_auth'] = 'Bearer'
  1289  
  1290  # Configure Bearer authorization (JWT): jwt_token
  1291  configuration = lakefs_client.Configuration(
  1292      access_token = 'YOUR_BEARER_TOKEN'
  1293  )
  1294  
  1295  # Configure API key authorization: oidc_auth
  1296  configuration.api_key['oidc_auth'] = 'YOUR_API_KEY'
  1297  
  1298  # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
  1299  # configuration.api_key_prefix['oidc_auth'] = 'Bearer'
  1300  
  1301  # Configure API key authorization: saml_auth
  1302  configuration.api_key['saml_auth'] = 'YOUR_API_KEY'
  1303  
  1304  # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
  1305  # configuration.api_key_prefix['saml_auth'] = 'Bearer'
  1306  
  1307  # Enter a context with an instance of the API client
  1308  with lakefs_client.ApiClient(configuration) as api_client:
  1309      # Create an instance of the API class
  1310      api_instance = repositories_api.RepositoriesApi(api_client)
  1311      repository = "repository_example" # str | 
  1312      refs_restore = RefsRestore(
  1313          commits_meta_range_id="commits_meta_range_id_example",
  1314          tags_meta_range_id="tags_meta_range_id_example",
  1315          branches_meta_range_id="branches_meta_range_id_example",
  1316          force=False,
  1317      ) # RefsRestore | 
  1318  
  1319      # example passing only required values which don't have defaults set
  1320      try:
  1321          # Restore repository from a dump in the object store
  1322          api_response = api_instance.restore_submit(repository, refs_restore)
  1323          pprint(api_response)
  1324      except lakefs_client.ApiException as e:
  1325          print("Exception when calling RepositoriesApi->restore_submit: %s\n" % e)
  1326  ```
  1327  
  1328  
  1329  ### Parameters
  1330  
  1331  Name | Type | Description  | Notes
  1332  ------------- | ------------- | ------------- | -------------
  1333   **repository** | **str**|  |
  1334   **refs_restore** | [**RefsRestore**](RefsRestore.md)|  |
  1335  
  1336  ### Return type
  1337  
  1338  [**TaskInfo**](TaskInfo.md)
  1339  
  1340  ### Authorization
  1341  
  1342  [basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth)
  1343  
  1344  ### HTTP request headers
  1345  
  1346   - **Content-Type**: application/json
  1347   - **Accept**: application/json
  1348  
  1349  
  1350  ### HTTP response details
  1351  
  1352  | Status code | Description | Response headers |
  1353  |-------------|-------------|------------------|
  1354  **202** | restore task created |  -  |
  1355  **400** | Validation Error |  -  |
  1356  **403** | Forbidden |  -  |
  1357  **401** | Unauthorized |  -  |
  1358  **404** | Resource Not Found |  -  |
  1359  **0** | Internal Server Error |  -  |
  1360  
  1361  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
  1362  
  1363  # **set_branch_protection_rules**
  1364  > set_branch_protection_rules(repository, branch_protection_rule)
  1365  
  1366  
  1367  
  1368  ### Example
  1369  
  1370  * Basic Authentication (basic_auth):
  1371  * Api Key Authentication (cookie_auth):
  1372  * Bearer (JWT) Authentication (jwt_token):
  1373  * Api Key Authentication (oidc_auth):
  1374  * Api Key Authentication (saml_auth):
  1375  
  1376  ```python
  1377  import time
  1378  import lakefs_client
  1379  from lakefs_client.api import repositories_api
  1380  from lakefs_client.model.error import Error
  1381  from lakefs_client.model.branch_protection_rule import BranchProtectionRule
  1382  from pprint import pprint
  1383  # Defining the host is optional and defaults to http://localhost/api/v1
  1384  # See configuration.py for a list of all supported configuration parameters.
  1385  configuration = lakefs_client.Configuration(
  1386      host = "http://localhost/api/v1"
  1387  )
  1388  
  1389  # The client must configure the authentication and authorization parameters
  1390  # in accordance with the API server security policy.
  1391  # Examples for each auth method are provided below, use the example that
  1392  # satisfies your auth use case.
  1393  
  1394  # Configure HTTP basic authorization: basic_auth
  1395  configuration = lakefs_client.Configuration(
  1396      username = 'YOUR_USERNAME',
  1397      password = 'YOUR_PASSWORD'
  1398  )
  1399  
  1400  # Configure API key authorization: cookie_auth
  1401  configuration.api_key['cookie_auth'] = 'YOUR_API_KEY'
  1402  
  1403  # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
  1404  # configuration.api_key_prefix['cookie_auth'] = 'Bearer'
  1405  
  1406  # Configure Bearer authorization (JWT): jwt_token
  1407  configuration = lakefs_client.Configuration(
  1408      access_token = 'YOUR_BEARER_TOKEN'
  1409  )
  1410  
  1411  # Configure API key authorization: oidc_auth
  1412  configuration.api_key['oidc_auth'] = 'YOUR_API_KEY'
  1413  
  1414  # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
  1415  # configuration.api_key_prefix['oidc_auth'] = 'Bearer'
  1416  
  1417  # Configure API key authorization: saml_auth
  1418  configuration.api_key['saml_auth'] = 'YOUR_API_KEY'
  1419  
  1420  # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
  1421  # configuration.api_key_prefix['saml_auth'] = 'Bearer'
  1422  
  1423  # Enter a context with an instance of the API client
  1424  with lakefs_client.ApiClient(configuration) as api_client:
  1425      # Create an instance of the API class
  1426      api_instance = repositories_api.RepositoriesApi(api_client)
  1427      repository = "repository_example" # str | 
  1428      branch_protection_rule = [
  1429          BranchProtectionRule(
  1430              pattern="stable_*",
  1431          ),
  1432      ] # [BranchProtectionRule] | 
  1433      if_match = "If-Match_example" # str | if provided, the branch protection rules will be updated only if the current ETag match the provided value (optional)
  1434  
  1435      # example passing only required values which don't have defaults set
  1436      try:
  1437          api_instance.set_branch_protection_rules(repository, branch_protection_rule)
  1438      except lakefs_client.ApiException as e:
  1439          print("Exception when calling RepositoriesApi->set_branch_protection_rules: %s\n" % e)
  1440  
  1441      # example passing only required values which don't have defaults set
  1442      # and optional values
  1443      try:
  1444          api_instance.set_branch_protection_rules(repository, branch_protection_rule, if_match=if_match)
  1445      except lakefs_client.ApiException as e:
  1446          print("Exception when calling RepositoriesApi->set_branch_protection_rules: %s\n" % e)
  1447  ```
  1448  
  1449  
  1450  ### Parameters
  1451  
  1452  Name | Type | Description  | Notes
  1453  ------------- | ------------- | ------------- | -------------
  1454   **repository** | **str**|  |
  1455   **branch_protection_rule** | [**[BranchProtectionRule]**](BranchProtectionRule.md)|  |
  1456   **if_match** | **str**| if provided, the branch protection rules will be updated only if the current ETag match the provided value | [optional]
  1457  
  1458  ### Return type
  1459  
  1460  void (empty response body)
  1461  
  1462  ### Authorization
  1463  
  1464  [basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth)
  1465  
  1466  ### HTTP request headers
  1467  
  1468   - **Content-Type**: application/json
  1469   - **Accept**: application/json
  1470  
  1471  
  1472  ### HTTP response details
  1473  
  1474  | Status code | Description | Response headers |
  1475  |-------------|-------------|------------------|
  1476  **204** | branch protection rule created successfully |  -  |
  1477  **400** | Bad Request |  -  |
  1478  **401** | Unauthorized |  -  |
  1479  **403** | Forbidden |  -  |
  1480  **404** | Resource Not Found |  -  |
  1481  **412** | Precondition Failed |  -  |
  1482  **420** | too many requests |  -  |
  1483  **0** | Internal Server Error |  -  |
  1484  
  1485  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
  1486  
  1487  # **set_gc_rules**
  1488  > set_gc_rules(repository, garbage_collection_rules)
  1489  
  1490  
  1491  
  1492  ### Example
  1493  
  1494  * Basic Authentication (basic_auth):
  1495  * Api Key Authentication (cookie_auth):
  1496  * Bearer (JWT) Authentication (jwt_token):
  1497  * Api Key Authentication (oidc_auth):
  1498  * Api Key Authentication (saml_auth):
  1499  
  1500  ```python
  1501  import time
  1502  import lakefs_client
  1503  from lakefs_client.api import repositories_api
  1504  from lakefs_client.model.garbage_collection_rules import GarbageCollectionRules
  1505  from lakefs_client.model.error import Error
  1506  from pprint import pprint
  1507  # Defining the host is optional and defaults to http://localhost/api/v1
  1508  # See configuration.py for a list of all supported configuration parameters.
  1509  configuration = lakefs_client.Configuration(
  1510      host = "http://localhost/api/v1"
  1511  )
  1512  
  1513  # The client must configure the authentication and authorization parameters
  1514  # in accordance with the API server security policy.
  1515  # Examples for each auth method are provided below, use the example that
  1516  # satisfies your auth use case.
  1517  
  1518  # Configure HTTP basic authorization: basic_auth
  1519  configuration = lakefs_client.Configuration(
  1520      username = 'YOUR_USERNAME',
  1521      password = 'YOUR_PASSWORD'
  1522  )
  1523  
  1524  # Configure API key authorization: cookie_auth
  1525  configuration.api_key['cookie_auth'] = 'YOUR_API_KEY'
  1526  
  1527  # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
  1528  # configuration.api_key_prefix['cookie_auth'] = 'Bearer'
  1529  
  1530  # Configure Bearer authorization (JWT): jwt_token
  1531  configuration = lakefs_client.Configuration(
  1532      access_token = 'YOUR_BEARER_TOKEN'
  1533  )
  1534  
  1535  # Configure API key authorization: oidc_auth
  1536  configuration.api_key['oidc_auth'] = 'YOUR_API_KEY'
  1537  
  1538  # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
  1539  # configuration.api_key_prefix['oidc_auth'] = 'Bearer'
  1540  
  1541  # Configure API key authorization: saml_auth
  1542  configuration.api_key['saml_auth'] = 'YOUR_API_KEY'
  1543  
  1544  # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
  1545  # configuration.api_key_prefix['saml_auth'] = 'Bearer'
  1546  
  1547  # Enter a context with an instance of the API client
  1548  with lakefs_client.ApiClient(configuration) as api_client:
  1549      # Create an instance of the API class
  1550      api_instance = repositories_api.RepositoriesApi(api_client)
  1551      repository = "repository_example" # str | 
  1552      garbage_collection_rules = GarbageCollectionRules(
  1553          default_retention_days=1,
  1554          branches=[
  1555              GarbageCollectionRule(
  1556                  branch_id="branch_id_example",
  1557                  retention_days=1,
  1558              ),
  1559          ],
  1560      ) # GarbageCollectionRules | 
  1561  
  1562      # example passing only required values which don't have defaults set
  1563      try:
  1564          api_instance.set_gc_rules(repository, garbage_collection_rules)
  1565      except lakefs_client.ApiException as e:
  1566          print("Exception when calling RepositoriesApi->set_gc_rules: %s\n" % e)
  1567  ```
  1568  
  1569  
  1570  ### Parameters
  1571  
  1572  Name | Type | Description  | Notes
  1573  ------------- | ------------- | ------------- | -------------
  1574   **repository** | **str**|  |
  1575   **garbage_collection_rules** | [**GarbageCollectionRules**](GarbageCollectionRules.md)|  |
  1576  
  1577  ### Return type
  1578  
  1579  void (empty response body)
  1580  
  1581  ### Authorization
  1582  
  1583  [basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth)
  1584  
  1585  ### HTTP request headers
  1586  
  1587   - **Content-Type**: application/json
  1588   - **Accept**: application/json
  1589  
  1590  
  1591  ### HTTP response details
  1592  
  1593  | Status code | Description | Response headers |
  1594  |-------------|-------------|------------------|
  1595  **204** | set garbage collection rules successfully |  -  |
  1596  **401** | Unauthorized |  -  |
  1597  **403** | Forbidden |  -  |
  1598  **404** | Resource Not Found |  -  |
  1599  **420** | too many requests |  -  |
  1600  **0** | Internal Server Error |  -  |
  1601  
  1602  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
  1603