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

     1  # lakefs_sdk.BranchesApi
     2  
     3  All URIs are relative to */api/v1*
     4  
     5  Method | HTTP request | Description
     6  ------------- | ------------- | -------------
     7  [**cherry_pick**](BranchesApi.md#cherry_pick) | **POST** /repositories/{repository}/branches/{branch}/cherry-pick | Replay the changes from the given commit on the branch
     8  [**create_branch**](BranchesApi.md#create_branch) | **POST** /repositories/{repository}/branches | create branch
     9  [**delete_branch**](BranchesApi.md#delete_branch) | **DELETE** /repositories/{repository}/branches/{branch} | delete branch
    10  [**diff_branch**](BranchesApi.md#diff_branch) | **GET** /repositories/{repository}/branches/{branch}/diff | diff branch
    11  [**get_branch**](BranchesApi.md#get_branch) | **GET** /repositories/{repository}/branches/{branch} | get branch
    12  [**list_branches**](BranchesApi.md#list_branches) | **GET** /repositories/{repository}/branches | list branches
    13  [**reset_branch**](BranchesApi.md#reset_branch) | **PUT** /repositories/{repository}/branches/{branch} | reset branch
    14  [**revert_branch**](BranchesApi.md#revert_branch) | **POST** /repositories/{repository}/branches/{branch}/revert | revert
    15  
    16  
    17  # **cherry_pick**
    18  > Commit cherry_pick(repository, branch, cherry_pick_creation)
    19  
    20  Replay the changes from the given commit on the branch
    21  
    22  ### Example
    23  
    24  * Basic Authentication (basic_auth):
    25  * Api Key Authentication (cookie_auth):
    26  * Api Key Authentication (oidc_auth):
    27  * Api Key Authentication (saml_auth):
    28  * Bearer (JWT) Authentication (jwt_token):
    29  
    30  ```python
    31  import time
    32  import os
    33  import lakefs_sdk
    34  from lakefs_sdk.models.cherry_pick_creation import CherryPickCreation
    35  from lakefs_sdk.models.commit import Commit
    36  from lakefs_sdk.rest import ApiException
    37  from pprint import pprint
    38  
    39  # Defining the host is optional and defaults to /api/v1
    40  # See configuration.py for a list of all supported configuration parameters.
    41  configuration = lakefs_sdk.Configuration(
    42      host = "/api/v1"
    43  )
    44  
    45  # The client must configure the authentication and authorization parameters
    46  # in accordance with the API server security policy.
    47  # Examples for each auth method are provided below, use the example that
    48  # satisfies your auth use case.
    49  
    50  # Configure HTTP basic authorization: basic_auth
    51  configuration = lakefs_sdk.Configuration(
    52      username = os.environ["USERNAME"],
    53      password = os.environ["PASSWORD"]
    54  )
    55  
    56  # Configure API key authorization: cookie_auth
    57  configuration.api_key['cookie_auth'] = os.environ["API_KEY"]
    58  
    59  # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
    60  # configuration.api_key_prefix['cookie_auth'] = 'Bearer'
    61  
    62  # Configure API key authorization: oidc_auth
    63  configuration.api_key['oidc_auth'] = os.environ["API_KEY"]
    64  
    65  # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
    66  # configuration.api_key_prefix['oidc_auth'] = 'Bearer'
    67  
    68  # Configure API key authorization: saml_auth
    69  configuration.api_key['saml_auth'] = os.environ["API_KEY"]
    70  
    71  # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
    72  # configuration.api_key_prefix['saml_auth'] = 'Bearer'
    73  
    74  # Configure Bearer authorization (JWT): jwt_token
    75  configuration = lakefs_sdk.Configuration(
    76      access_token = os.environ["BEARER_TOKEN"]
    77  )
    78  
    79  # Enter a context with an instance of the API client
    80  with lakefs_sdk.ApiClient(configuration) as api_client:
    81      # Create an instance of the API class
    82      api_instance = lakefs_sdk.BranchesApi(api_client)
    83      repository = 'repository_example' # str | 
    84      branch = 'branch_example' # str | 
    85      cherry_pick_creation = lakefs_sdk.CherryPickCreation() # CherryPickCreation | 
    86  
    87      try:
    88          # Replay the changes from the given commit on the branch
    89          api_response = api_instance.cherry_pick(repository, branch, cherry_pick_creation)
    90          print("The response of BranchesApi->cherry_pick:\n")
    91          pprint(api_response)
    92      except Exception as e:
    93          print("Exception when calling BranchesApi->cherry_pick: %s\n" % e)
    94  ```
    95  
    96  
    97  
    98  ### Parameters
    99  
   100  
   101  Name | Type | Description  | Notes
   102  ------------- | ------------- | ------------- | -------------
   103   **repository** | **str**|  | 
   104   **branch** | **str**|  | 
   105   **cherry_pick_creation** | [**CherryPickCreation**](CherryPickCreation.md)|  | 
   106  
   107  ### Return type
   108  
   109  [**Commit**](Commit.md)
   110  
   111  ### Authorization
   112  
   113  [basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth), [jwt_token](../README.md#jwt_token)
   114  
   115  ### HTTP request headers
   116  
   117   - **Content-Type**: application/json
   118   - **Accept**: application/json
   119  
   120  ### HTTP response details
   121  
   122  | Status code | Description | Response headers |
   123  |-------------|-------------|------------------|
   124  **201** | the cherry-pick commit |  -  |
   125  **400** | Validation Error |  -  |
   126  **401** | Unauthorized |  -  |
   127  **403** | Forbidden |  -  |
   128  **404** | Resource Not Found |  -  |
   129  **409** | Conflict Found |  -  |
   130  **420** | too many requests |  -  |
   131  **0** | Internal Server Error |  -  |
   132  
   133  [[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)
   134  
   135  # **create_branch**
   136  > str create_branch(repository, branch_creation)
   137  
   138  create branch
   139  
   140  ### Example
   141  
   142  * Basic Authentication (basic_auth):
   143  * Api Key Authentication (cookie_auth):
   144  * Api Key Authentication (oidc_auth):
   145  * Api Key Authentication (saml_auth):
   146  * Bearer (JWT) Authentication (jwt_token):
   147  
   148  ```python
   149  import time
   150  import os
   151  import lakefs_sdk
   152  from lakefs_sdk.models.branch_creation import BranchCreation
   153  from lakefs_sdk.rest import ApiException
   154  from pprint import pprint
   155  
   156  # Defining the host is optional and defaults to /api/v1
   157  # See configuration.py for a list of all supported configuration parameters.
   158  configuration = lakefs_sdk.Configuration(
   159      host = "/api/v1"
   160  )
   161  
   162  # The client must configure the authentication and authorization parameters
   163  # in accordance with the API server security policy.
   164  # Examples for each auth method are provided below, use the example that
   165  # satisfies your auth use case.
   166  
   167  # Configure HTTP basic authorization: basic_auth
   168  configuration = lakefs_sdk.Configuration(
   169      username = os.environ["USERNAME"],
   170      password = os.environ["PASSWORD"]
   171  )
   172  
   173  # Configure API key authorization: cookie_auth
   174  configuration.api_key['cookie_auth'] = os.environ["API_KEY"]
   175  
   176  # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
   177  # configuration.api_key_prefix['cookie_auth'] = 'Bearer'
   178  
   179  # Configure API key authorization: oidc_auth
   180  configuration.api_key['oidc_auth'] = os.environ["API_KEY"]
   181  
   182  # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
   183  # configuration.api_key_prefix['oidc_auth'] = 'Bearer'
   184  
   185  # Configure API key authorization: saml_auth
   186  configuration.api_key['saml_auth'] = os.environ["API_KEY"]
   187  
   188  # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
   189  # configuration.api_key_prefix['saml_auth'] = 'Bearer'
   190  
   191  # Configure Bearer authorization (JWT): jwt_token
   192  configuration = lakefs_sdk.Configuration(
   193      access_token = os.environ["BEARER_TOKEN"]
   194  )
   195  
   196  # Enter a context with an instance of the API client
   197  with lakefs_sdk.ApiClient(configuration) as api_client:
   198      # Create an instance of the API class
   199      api_instance = lakefs_sdk.BranchesApi(api_client)
   200      repository = 'repository_example' # str | 
   201      branch_creation = lakefs_sdk.BranchCreation() # BranchCreation | 
   202  
   203      try:
   204          # create branch
   205          api_response = api_instance.create_branch(repository, branch_creation)
   206          print("The response of BranchesApi->create_branch:\n")
   207          pprint(api_response)
   208      except Exception as e:
   209          print("Exception when calling BranchesApi->create_branch: %s\n" % e)
   210  ```
   211  
   212  
   213  
   214  ### Parameters
   215  
   216  
   217  Name | Type | Description  | Notes
   218  ------------- | ------------- | ------------- | -------------
   219   **repository** | **str**|  | 
   220   **branch_creation** | [**BranchCreation**](BranchCreation.md)|  | 
   221  
   222  ### Return type
   223  
   224  **str**
   225  
   226  ### Authorization
   227  
   228  [basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth), [jwt_token](../README.md#jwt_token)
   229  
   230  ### HTTP request headers
   231  
   232   - **Content-Type**: application/json
   233   - **Accept**: text/html, application/json
   234  
   235  ### HTTP response details
   236  
   237  | Status code | Description | Response headers |
   238  |-------------|-------------|------------------|
   239  **201** | reference |  -  |
   240  **400** | Validation Error |  -  |
   241  **401** | Unauthorized |  -  |
   242  **403** | Forbidden |  -  |
   243  **404** | Resource Not Found |  -  |
   244  **409** | Resource Conflicts With Target |  -  |
   245  **420** | too many requests |  -  |
   246  **0** | Internal Server Error |  -  |
   247  
   248  [[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)
   249  
   250  # **delete_branch**
   251  > delete_branch(repository, branch, force=force)
   252  
   253  delete branch
   254  
   255  ### Example
   256  
   257  * Basic Authentication (basic_auth):
   258  * Api Key Authentication (cookie_auth):
   259  * Api Key Authentication (oidc_auth):
   260  * Api Key Authentication (saml_auth):
   261  * Bearer (JWT) Authentication (jwt_token):
   262  
   263  ```python
   264  import time
   265  import os
   266  import lakefs_sdk
   267  from lakefs_sdk.rest import ApiException
   268  from pprint import pprint
   269  
   270  # Defining the host is optional and defaults to /api/v1
   271  # See configuration.py for a list of all supported configuration parameters.
   272  configuration = lakefs_sdk.Configuration(
   273      host = "/api/v1"
   274  )
   275  
   276  # The client must configure the authentication and authorization parameters
   277  # in accordance with the API server security policy.
   278  # Examples for each auth method are provided below, use the example that
   279  # satisfies your auth use case.
   280  
   281  # Configure HTTP basic authorization: basic_auth
   282  configuration = lakefs_sdk.Configuration(
   283      username = os.environ["USERNAME"],
   284      password = os.environ["PASSWORD"]
   285  )
   286  
   287  # Configure API key authorization: cookie_auth
   288  configuration.api_key['cookie_auth'] = os.environ["API_KEY"]
   289  
   290  # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
   291  # configuration.api_key_prefix['cookie_auth'] = 'Bearer'
   292  
   293  # Configure API key authorization: oidc_auth
   294  configuration.api_key['oidc_auth'] = os.environ["API_KEY"]
   295  
   296  # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
   297  # configuration.api_key_prefix['oidc_auth'] = 'Bearer'
   298  
   299  # Configure API key authorization: saml_auth
   300  configuration.api_key['saml_auth'] = os.environ["API_KEY"]
   301  
   302  # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
   303  # configuration.api_key_prefix['saml_auth'] = 'Bearer'
   304  
   305  # Configure Bearer authorization (JWT): jwt_token
   306  configuration = lakefs_sdk.Configuration(
   307      access_token = os.environ["BEARER_TOKEN"]
   308  )
   309  
   310  # Enter a context with an instance of the API client
   311  with lakefs_sdk.ApiClient(configuration) as api_client:
   312      # Create an instance of the API class
   313      api_instance = lakefs_sdk.BranchesApi(api_client)
   314      repository = 'repository_example' # str | 
   315      branch = 'branch_example' # str | 
   316      force = False # bool |  (optional) (default to False)
   317  
   318      try:
   319          # delete branch
   320          api_instance.delete_branch(repository, branch, force=force)
   321      except Exception as e:
   322          print("Exception when calling BranchesApi->delete_branch: %s\n" % e)
   323  ```
   324  
   325  
   326  
   327  ### Parameters
   328  
   329  
   330  Name | Type | Description  | Notes
   331  ------------- | ------------- | ------------- | -------------
   332   **repository** | **str**|  | 
   333   **branch** | **str**|  | 
   334   **force** | **bool**|  | [optional] [default to False]
   335  
   336  ### Return type
   337  
   338  void (empty response body)
   339  
   340  ### Authorization
   341  
   342  [basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth), [jwt_token](../README.md#jwt_token)
   343  
   344  ### HTTP request headers
   345  
   346   - **Content-Type**: Not defined
   347   - **Accept**: application/json
   348  
   349  ### HTTP response details
   350  
   351  | Status code | Description | Response headers |
   352  |-------------|-------------|------------------|
   353  **204** | branch deleted successfully |  -  |
   354  **401** | Unauthorized |  -  |
   355  **403** | Forbidden |  -  |
   356  **404** | Resource Not Found |  -  |
   357  **420** | too many requests |  -  |
   358  **0** | Internal Server Error |  -  |
   359  
   360  [[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)
   361  
   362  # **diff_branch**
   363  > DiffList diff_branch(repository, branch, after=after, amount=amount, prefix=prefix, delimiter=delimiter)
   364  
   365  diff branch
   366  
   367  ### Example
   368  
   369  * Basic Authentication (basic_auth):
   370  * Api Key Authentication (cookie_auth):
   371  * Api Key Authentication (oidc_auth):
   372  * Api Key Authentication (saml_auth):
   373  * Bearer (JWT) Authentication (jwt_token):
   374  
   375  ```python
   376  import time
   377  import os
   378  import lakefs_sdk
   379  from lakefs_sdk.models.diff_list import DiffList
   380  from lakefs_sdk.rest import ApiException
   381  from pprint import pprint
   382  
   383  # Defining the host is optional and defaults to /api/v1
   384  # See configuration.py for a list of all supported configuration parameters.
   385  configuration = lakefs_sdk.Configuration(
   386      host = "/api/v1"
   387  )
   388  
   389  # The client must configure the authentication and authorization parameters
   390  # in accordance with the API server security policy.
   391  # Examples for each auth method are provided below, use the example that
   392  # satisfies your auth use case.
   393  
   394  # Configure HTTP basic authorization: basic_auth
   395  configuration = lakefs_sdk.Configuration(
   396      username = os.environ["USERNAME"],
   397      password = os.environ["PASSWORD"]
   398  )
   399  
   400  # Configure API key authorization: cookie_auth
   401  configuration.api_key['cookie_auth'] = os.environ["API_KEY"]
   402  
   403  # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
   404  # configuration.api_key_prefix['cookie_auth'] = 'Bearer'
   405  
   406  # Configure API key authorization: oidc_auth
   407  configuration.api_key['oidc_auth'] = os.environ["API_KEY"]
   408  
   409  # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
   410  # configuration.api_key_prefix['oidc_auth'] = 'Bearer'
   411  
   412  # Configure API key authorization: saml_auth
   413  configuration.api_key['saml_auth'] = os.environ["API_KEY"]
   414  
   415  # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
   416  # configuration.api_key_prefix['saml_auth'] = 'Bearer'
   417  
   418  # Configure Bearer authorization (JWT): jwt_token
   419  configuration = lakefs_sdk.Configuration(
   420      access_token = os.environ["BEARER_TOKEN"]
   421  )
   422  
   423  # Enter a context with an instance of the API client
   424  with lakefs_sdk.ApiClient(configuration) as api_client:
   425      # Create an instance of the API class
   426      api_instance = lakefs_sdk.BranchesApi(api_client)
   427      repository = 'repository_example' # str | 
   428      branch = 'branch_example' # str | 
   429      after = 'after_example' # str | return items after this value (optional)
   430      amount = 100 # int | how many items to return (optional) (default to 100)
   431      prefix = 'prefix_example' # str | return items prefixed with this value (optional)
   432      delimiter = 'delimiter_example' # str | delimiter used to group common prefixes by (optional)
   433  
   434      try:
   435          # diff branch
   436          api_response = api_instance.diff_branch(repository, branch, after=after, amount=amount, prefix=prefix, delimiter=delimiter)
   437          print("The response of BranchesApi->diff_branch:\n")
   438          pprint(api_response)
   439      except Exception as e:
   440          print("Exception when calling BranchesApi->diff_branch: %s\n" % e)
   441  ```
   442  
   443  
   444  
   445  ### Parameters
   446  
   447  
   448  Name | Type | Description  | Notes
   449  ------------- | ------------- | ------------- | -------------
   450   **repository** | **str**|  | 
   451   **branch** | **str**|  | 
   452   **after** | **str**| return items after this value | [optional] 
   453   **amount** | **int**| how many items to return | [optional] [default to 100]
   454   **prefix** | **str**| return items prefixed with this value | [optional] 
   455   **delimiter** | **str**| delimiter used to group common prefixes by | [optional] 
   456  
   457  ### Return type
   458  
   459  [**DiffList**](DiffList.md)
   460  
   461  ### Authorization
   462  
   463  [basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth), [jwt_token](../README.md#jwt_token)
   464  
   465  ### HTTP request headers
   466  
   467   - **Content-Type**: Not defined
   468   - **Accept**: application/json
   469  
   470  ### HTTP response details
   471  
   472  | Status code | Description | Response headers |
   473  |-------------|-------------|------------------|
   474  **200** | diff of branch uncommitted changes |  -  |
   475  **401** | Unauthorized |  -  |
   476  **404** | Resource Not Found |  -  |
   477  **420** | too many requests |  -  |
   478  **0** | Internal Server Error |  -  |
   479  
   480  [[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)
   481  
   482  # **get_branch**
   483  > Ref get_branch(repository, branch)
   484  
   485  get branch
   486  
   487  ### Example
   488  
   489  * Basic Authentication (basic_auth):
   490  * Api Key Authentication (cookie_auth):
   491  * Api Key Authentication (oidc_auth):
   492  * Api Key Authentication (saml_auth):
   493  * Bearer (JWT) Authentication (jwt_token):
   494  
   495  ```python
   496  import time
   497  import os
   498  import lakefs_sdk
   499  from lakefs_sdk.models.ref import Ref
   500  from lakefs_sdk.rest import ApiException
   501  from pprint import pprint
   502  
   503  # Defining the host is optional and defaults to /api/v1
   504  # See configuration.py for a list of all supported configuration parameters.
   505  configuration = lakefs_sdk.Configuration(
   506      host = "/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_sdk.Configuration(
   516      username = os.environ["USERNAME"],
   517      password = os.environ["PASSWORD"]
   518  )
   519  
   520  # Configure API key authorization: cookie_auth
   521  configuration.api_key['cookie_auth'] = os.environ["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 API key authorization: oidc_auth
   527  configuration.api_key['oidc_auth'] = os.environ["API_KEY"]
   528  
   529  # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
   530  # configuration.api_key_prefix['oidc_auth'] = 'Bearer'
   531  
   532  # Configure API key authorization: saml_auth
   533  configuration.api_key['saml_auth'] = os.environ["API_KEY"]
   534  
   535  # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
   536  # configuration.api_key_prefix['saml_auth'] = 'Bearer'
   537  
   538  # Configure Bearer authorization (JWT): jwt_token
   539  configuration = lakefs_sdk.Configuration(
   540      access_token = os.environ["BEARER_TOKEN"]
   541  )
   542  
   543  # Enter a context with an instance of the API client
   544  with lakefs_sdk.ApiClient(configuration) as api_client:
   545      # Create an instance of the API class
   546      api_instance = lakefs_sdk.BranchesApi(api_client)
   547      repository = 'repository_example' # str | 
   548      branch = 'branch_example' # str | 
   549  
   550      try:
   551          # get branch
   552          api_response = api_instance.get_branch(repository, branch)
   553          print("The response of BranchesApi->get_branch:\n")
   554          pprint(api_response)
   555      except Exception as e:
   556          print("Exception when calling BranchesApi->get_branch: %s\n" % e)
   557  ```
   558  
   559  
   560  
   561  ### Parameters
   562  
   563  
   564  Name | Type | Description  | Notes
   565  ------------- | ------------- | ------------- | -------------
   566   **repository** | **str**|  | 
   567   **branch** | **str**|  | 
   568  
   569  ### Return type
   570  
   571  [**Ref**](Ref.md)
   572  
   573  ### Authorization
   574  
   575  [basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth), [jwt_token](../README.md#jwt_token)
   576  
   577  ### HTTP request headers
   578  
   579   - **Content-Type**: Not defined
   580   - **Accept**: application/json
   581  
   582  ### HTTP response details
   583  
   584  | Status code | Description | Response headers |
   585  |-------------|-------------|------------------|
   586  **200** | branch |  -  |
   587  **401** | Unauthorized |  -  |
   588  **404** | Resource Not Found |  -  |
   589  **420** | too many requests |  -  |
   590  **0** | Internal Server Error |  -  |
   591  
   592  [[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)
   593  
   594  # **list_branches**
   595  > RefList list_branches(repository, prefix=prefix, after=after, amount=amount)
   596  
   597  list branches
   598  
   599  ### Example
   600  
   601  * Basic Authentication (basic_auth):
   602  * Api Key Authentication (cookie_auth):
   603  * Api Key Authentication (oidc_auth):
   604  * Api Key Authentication (saml_auth):
   605  * Bearer (JWT) Authentication (jwt_token):
   606  
   607  ```python
   608  import time
   609  import os
   610  import lakefs_sdk
   611  from lakefs_sdk.models.ref_list import RefList
   612  from lakefs_sdk.rest import ApiException
   613  from pprint import pprint
   614  
   615  # Defining the host is optional and defaults to /api/v1
   616  # See configuration.py for a list of all supported configuration parameters.
   617  configuration = lakefs_sdk.Configuration(
   618      host = "/api/v1"
   619  )
   620  
   621  # The client must configure the authentication and authorization parameters
   622  # in accordance with the API server security policy.
   623  # Examples for each auth method are provided below, use the example that
   624  # satisfies your auth use case.
   625  
   626  # Configure HTTP basic authorization: basic_auth
   627  configuration = lakefs_sdk.Configuration(
   628      username = os.environ["USERNAME"],
   629      password = os.environ["PASSWORD"]
   630  )
   631  
   632  # Configure API key authorization: cookie_auth
   633  configuration.api_key['cookie_auth'] = os.environ["API_KEY"]
   634  
   635  # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
   636  # configuration.api_key_prefix['cookie_auth'] = 'Bearer'
   637  
   638  # Configure API key authorization: oidc_auth
   639  configuration.api_key['oidc_auth'] = os.environ["API_KEY"]
   640  
   641  # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
   642  # configuration.api_key_prefix['oidc_auth'] = 'Bearer'
   643  
   644  # Configure API key authorization: saml_auth
   645  configuration.api_key['saml_auth'] = os.environ["API_KEY"]
   646  
   647  # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
   648  # configuration.api_key_prefix['saml_auth'] = 'Bearer'
   649  
   650  # Configure Bearer authorization (JWT): jwt_token
   651  configuration = lakefs_sdk.Configuration(
   652      access_token = os.environ["BEARER_TOKEN"]
   653  )
   654  
   655  # Enter a context with an instance of the API client
   656  with lakefs_sdk.ApiClient(configuration) as api_client:
   657      # Create an instance of the API class
   658      api_instance = lakefs_sdk.BranchesApi(api_client)
   659      repository = 'repository_example' # str | 
   660      prefix = 'prefix_example' # str | return items prefixed with this value (optional)
   661      after = 'after_example' # str | return items after this value (optional)
   662      amount = 100 # int | how many items to return (optional) (default to 100)
   663  
   664      try:
   665          # list branches
   666          api_response = api_instance.list_branches(repository, prefix=prefix, after=after, amount=amount)
   667          print("The response of BranchesApi->list_branches:\n")
   668          pprint(api_response)
   669      except Exception as e:
   670          print("Exception when calling BranchesApi->list_branches: %s\n" % e)
   671  ```
   672  
   673  
   674  
   675  ### Parameters
   676  
   677  
   678  Name | Type | Description  | Notes
   679  ------------- | ------------- | ------------- | -------------
   680   **repository** | **str**|  | 
   681   **prefix** | **str**| return items prefixed with this value | [optional] 
   682   **after** | **str**| return items after this value | [optional] 
   683   **amount** | **int**| how many items to return | [optional] [default to 100]
   684  
   685  ### Return type
   686  
   687  [**RefList**](RefList.md)
   688  
   689  ### Authorization
   690  
   691  [basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth), [jwt_token](../README.md#jwt_token)
   692  
   693  ### HTTP request headers
   694  
   695   - **Content-Type**: Not defined
   696   - **Accept**: application/json
   697  
   698  ### HTTP response details
   699  
   700  | Status code | Description | Response headers |
   701  |-------------|-------------|------------------|
   702  **200** | branch list |  -  |
   703  **401** | Unauthorized |  -  |
   704  **404** | Resource Not Found |  -  |
   705  **420** | too many requests |  -  |
   706  **0** | Internal Server Error |  -  |
   707  
   708  [[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)
   709  
   710  # **reset_branch**
   711  > reset_branch(repository, branch, reset_creation)
   712  
   713  reset branch
   714  
   715  ### Example
   716  
   717  * Basic Authentication (basic_auth):
   718  * Api Key Authentication (cookie_auth):
   719  * Api Key Authentication (oidc_auth):
   720  * Api Key Authentication (saml_auth):
   721  * Bearer (JWT) Authentication (jwt_token):
   722  
   723  ```python
   724  import time
   725  import os
   726  import lakefs_sdk
   727  from lakefs_sdk.models.reset_creation import ResetCreation
   728  from lakefs_sdk.rest import ApiException
   729  from pprint import pprint
   730  
   731  # Defining the host is optional and defaults to /api/v1
   732  # See configuration.py for a list of all supported configuration parameters.
   733  configuration = lakefs_sdk.Configuration(
   734      host = "/api/v1"
   735  )
   736  
   737  # The client must configure the authentication and authorization parameters
   738  # in accordance with the API server security policy.
   739  # Examples for each auth method are provided below, use the example that
   740  # satisfies your auth use case.
   741  
   742  # Configure HTTP basic authorization: basic_auth
   743  configuration = lakefs_sdk.Configuration(
   744      username = os.environ["USERNAME"],
   745      password = os.environ["PASSWORD"]
   746  )
   747  
   748  # Configure API key authorization: cookie_auth
   749  configuration.api_key['cookie_auth'] = os.environ["API_KEY"]
   750  
   751  # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
   752  # configuration.api_key_prefix['cookie_auth'] = 'Bearer'
   753  
   754  # Configure API key authorization: oidc_auth
   755  configuration.api_key['oidc_auth'] = os.environ["API_KEY"]
   756  
   757  # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
   758  # configuration.api_key_prefix['oidc_auth'] = 'Bearer'
   759  
   760  # Configure API key authorization: saml_auth
   761  configuration.api_key['saml_auth'] = os.environ["API_KEY"]
   762  
   763  # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
   764  # configuration.api_key_prefix['saml_auth'] = 'Bearer'
   765  
   766  # Configure Bearer authorization (JWT): jwt_token
   767  configuration = lakefs_sdk.Configuration(
   768      access_token = os.environ["BEARER_TOKEN"]
   769  )
   770  
   771  # Enter a context with an instance of the API client
   772  with lakefs_sdk.ApiClient(configuration) as api_client:
   773      # Create an instance of the API class
   774      api_instance = lakefs_sdk.BranchesApi(api_client)
   775      repository = 'repository_example' # str | 
   776      branch = 'branch_example' # str | 
   777      reset_creation = lakefs_sdk.ResetCreation() # ResetCreation | 
   778  
   779      try:
   780          # reset branch
   781          api_instance.reset_branch(repository, branch, reset_creation)
   782      except Exception as e:
   783          print("Exception when calling BranchesApi->reset_branch: %s\n" % e)
   784  ```
   785  
   786  
   787  
   788  ### Parameters
   789  
   790  
   791  Name | Type | Description  | Notes
   792  ------------- | ------------- | ------------- | -------------
   793   **repository** | **str**|  | 
   794   **branch** | **str**|  | 
   795   **reset_creation** | [**ResetCreation**](ResetCreation.md)|  | 
   796  
   797  ### Return type
   798  
   799  void (empty response body)
   800  
   801  ### Authorization
   802  
   803  [basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth), [jwt_token](../README.md#jwt_token)
   804  
   805  ### HTTP request headers
   806  
   807   - **Content-Type**: application/json
   808   - **Accept**: application/json
   809  
   810  ### HTTP response details
   811  
   812  | Status code | Description | Response headers |
   813  |-------------|-------------|------------------|
   814  **204** | reset successful |  -  |
   815  **400** | Bad Request |  -  |
   816  **401** | Unauthorized |  -  |
   817  **403** | Forbidden |  -  |
   818  **404** | Resource Not Found |  -  |
   819  **420** | too many requests |  -  |
   820  **0** | Internal Server Error |  -  |
   821  
   822  [[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)
   823  
   824  # **revert_branch**
   825  > revert_branch(repository, branch, revert_creation)
   826  
   827  revert
   828  
   829  ### Example
   830  
   831  * Basic Authentication (basic_auth):
   832  * Api Key Authentication (cookie_auth):
   833  * Api Key Authentication (oidc_auth):
   834  * Api Key Authentication (saml_auth):
   835  * Bearer (JWT) Authentication (jwt_token):
   836  
   837  ```python
   838  import time
   839  import os
   840  import lakefs_sdk
   841  from lakefs_sdk.models.revert_creation import RevertCreation
   842  from lakefs_sdk.rest import ApiException
   843  from pprint import pprint
   844  
   845  # Defining the host is optional and defaults to /api/v1
   846  # See configuration.py for a list of all supported configuration parameters.
   847  configuration = lakefs_sdk.Configuration(
   848      host = "/api/v1"
   849  )
   850  
   851  # The client must configure the authentication and authorization parameters
   852  # in accordance with the API server security policy.
   853  # Examples for each auth method are provided below, use the example that
   854  # satisfies your auth use case.
   855  
   856  # Configure HTTP basic authorization: basic_auth
   857  configuration = lakefs_sdk.Configuration(
   858      username = os.environ["USERNAME"],
   859      password = os.environ["PASSWORD"]
   860  )
   861  
   862  # Configure API key authorization: cookie_auth
   863  configuration.api_key['cookie_auth'] = os.environ["API_KEY"]
   864  
   865  # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
   866  # configuration.api_key_prefix['cookie_auth'] = 'Bearer'
   867  
   868  # Configure API key authorization: oidc_auth
   869  configuration.api_key['oidc_auth'] = os.environ["API_KEY"]
   870  
   871  # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
   872  # configuration.api_key_prefix['oidc_auth'] = 'Bearer'
   873  
   874  # Configure API key authorization: saml_auth
   875  configuration.api_key['saml_auth'] = os.environ["API_KEY"]
   876  
   877  # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
   878  # configuration.api_key_prefix['saml_auth'] = 'Bearer'
   879  
   880  # Configure Bearer authorization (JWT): jwt_token
   881  configuration = lakefs_sdk.Configuration(
   882      access_token = os.environ["BEARER_TOKEN"]
   883  )
   884  
   885  # Enter a context with an instance of the API client
   886  with lakefs_sdk.ApiClient(configuration) as api_client:
   887      # Create an instance of the API class
   888      api_instance = lakefs_sdk.BranchesApi(api_client)
   889      repository = 'repository_example' # str | 
   890      branch = 'branch_example' # str | 
   891      revert_creation = lakefs_sdk.RevertCreation() # RevertCreation | 
   892  
   893      try:
   894          # revert
   895          api_instance.revert_branch(repository, branch, revert_creation)
   896      except Exception as e:
   897          print("Exception when calling BranchesApi->revert_branch: %s\n" % e)
   898  ```
   899  
   900  
   901  
   902  ### Parameters
   903  
   904  
   905  Name | Type | Description  | Notes
   906  ------------- | ------------- | ------------- | -------------
   907   **repository** | **str**|  | 
   908   **branch** | **str**|  | 
   909   **revert_creation** | [**RevertCreation**](RevertCreation.md)|  | 
   910  
   911  ### Return type
   912  
   913  void (empty response body)
   914  
   915  ### Authorization
   916  
   917  [basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth), [jwt_token](../README.md#jwt_token)
   918  
   919  ### HTTP request headers
   920  
   921   - **Content-Type**: application/json
   922   - **Accept**: application/json
   923  
   924  ### HTTP response details
   925  
   926  | Status code | Description | Response headers |
   927  |-------------|-------------|------------------|
   928  **204** | revert successful |  -  |
   929  **400** | Validation Error |  -  |
   930  **401** | Unauthorized |  -  |
   931  **403** | Forbidden |  -  |
   932  **404** | Resource Not Found |  -  |
   933  **409** | Conflict Found |  -  |
   934  **420** | too many requests |  -  |
   935  **0** | Internal Server Error |  -  |
   936  
   937  [[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)
   938