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

     1  # lakefs_client.ExperimentalApi
     2  
     3  All URIs are relative to *http://localhost/api/v1*
     4  
     5  Method | HTTP request | Description
     6  ------------- | ------------- | -------------
     7  [**abort_presign_multipart_upload**](ExperimentalApi.md#abort_presign_multipart_upload) | **DELETE** /repositories/{repository}/branches/{branch}/staging/pmpu/{uploadId} | Abort a presign multipart upload
     8  [**complete_presign_multipart_upload**](ExperimentalApi.md#complete_presign_multipart_upload) | **PUT** /repositories/{repository}/branches/{branch}/staging/pmpu/{uploadId} | Complete a presign multipart upload request
     9  [**create_presign_multipart_upload**](ExperimentalApi.md#create_presign_multipart_upload) | **POST** /repositories/{repository}/branches/{branch}/staging/pmpu | Initiate a multipart upload
    10  [**create_user_external_principal**](ExperimentalApi.md#create_user_external_principal) | **POST** /auth/users/{userId}/external/principals | attach external principal to user
    11  [**delete_user_external_principal**](ExperimentalApi.md#delete_user_external_principal) | **DELETE** /auth/users/{userId}/external/principals | delete external principal from user
    12  [**external_principal_login**](ExperimentalApi.md#external_principal_login) | **POST** /auth/external/principal/login | perform a login using an external authenticator
    13  [**get_external_principal**](ExperimentalApi.md#get_external_principal) | **GET** /auth/external/principals | describe external principal by id
    14  [**hard_reset_branch**](ExperimentalApi.md#hard_reset_branch) | **PUT** /repositories/{repository}/branches/{branch}/hard_reset | hard reset branch
    15  [**list_user_external_principals**](ExperimentalApi.md#list_user_external_principals) | **GET** /auth/users/{userId}/external/principals/ls | list user external policies attached to a user
    16  [**sts_login**](ExperimentalApi.md#sts_login) | **POST** /sts/login | perform a login with STS
    17  
    18  
    19  # **abort_presign_multipart_upload**
    20  > abort_presign_multipart_upload(repository, branch, upload_id, path)
    21  
    22  Abort a presign multipart upload
    23  
    24  Aborts a presign multipart upload.
    25  
    26  ### Example
    27  
    28  * Basic Authentication (basic_auth):
    29  * Api Key Authentication (cookie_auth):
    30  * Bearer (JWT) Authentication (jwt_token):
    31  * Api Key Authentication (oidc_auth):
    32  * Api Key Authentication (saml_auth):
    33  
    34  ```python
    35  import time
    36  import lakefs_client
    37  from lakefs_client.api import experimental_api
    38  from lakefs_client.model.abort_presign_multipart_upload import AbortPresignMultipartUpload
    39  from lakefs_client.model.error import Error
    40  from pprint import pprint
    41  # Defining the host is optional and defaults to http://localhost/api/v1
    42  # See configuration.py for a list of all supported configuration parameters.
    43  configuration = lakefs_client.Configuration(
    44      host = "http://localhost/api/v1"
    45  )
    46  
    47  # The client must configure the authentication and authorization parameters
    48  # in accordance with the API server security policy.
    49  # Examples for each auth method are provided below, use the example that
    50  # satisfies your auth use case.
    51  
    52  # Configure HTTP basic authorization: basic_auth
    53  configuration = lakefs_client.Configuration(
    54      username = 'YOUR_USERNAME',
    55      password = 'YOUR_PASSWORD'
    56  )
    57  
    58  # Configure API key authorization: cookie_auth
    59  configuration.api_key['cookie_auth'] = 'YOUR_API_KEY'
    60  
    61  # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
    62  # configuration.api_key_prefix['cookie_auth'] = 'Bearer'
    63  
    64  # Configure Bearer authorization (JWT): jwt_token
    65  configuration = lakefs_client.Configuration(
    66      access_token = 'YOUR_BEARER_TOKEN'
    67  )
    68  
    69  # Configure API key authorization: oidc_auth
    70  configuration.api_key['oidc_auth'] = 'YOUR_API_KEY'
    71  
    72  # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
    73  # configuration.api_key_prefix['oidc_auth'] = 'Bearer'
    74  
    75  # Configure API key authorization: saml_auth
    76  configuration.api_key['saml_auth'] = 'YOUR_API_KEY'
    77  
    78  # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
    79  # configuration.api_key_prefix['saml_auth'] = 'Bearer'
    80  
    81  # Enter a context with an instance of the API client
    82  with lakefs_client.ApiClient(configuration) as api_client:
    83      # Create an instance of the API class
    84      api_instance = experimental_api.ExperimentalApi(api_client)
    85      repository = "repository_example" # str | 
    86      branch = "branch_example" # str | 
    87      upload_id = "uploadId_example" # str | 
    88      path = "path_example" # str | relative to the branch
    89      abort_presign_multipart_upload = AbortPresignMultipartUpload(
    90          physical_address="physical_address_example",
    91      ) # AbortPresignMultipartUpload |  (optional)
    92  
    93      # example passing only required values which don't have defaults set
    94      try:
    95          # Abort a presign multipart upload
    96          api_instance.abort_presign_multipart_upload(repository, branch, upload_id, path)
    97      except lakefs_client.ApiException as e:
    98          print("Exception when calling ExperimentalApi->abort_presign_multipart_upload: %s\n" % e)
    99  
   100      # example passing only required values which don't have defaults set
   101      # and optional values
   102      try:
   103          # Abort a presign multipart upload
   104          api_instance.abort_presign_multipart_upload(repository, branch, upload_id, path, abort_presign_multipart_upload=abort_presign_multipart_upload)
   105      except lakefs_client.ApiException as e:
   106          print("Exception when calling ExperimentalApi->abort_presign_multipart_upload: %s\n" % e)
   107  ```
   108  
   109  
   110  ### Parameters
   111  
   112  Name | Type | Description  | Notes
   113  ------------- | ------------- | ------------- | -------------
   114   **repository** | **str**|  |
   115   **branch** | **str**|  |
   116   **upload_id** | **str**|  |
   117   **path** | **str**| relative to the branch |
   118   **abort_presign_multipart_upload** | [**AbortPresignMultipartUpload**](AbortPresignMultipartUpload.md)|  | [optional]
   119  
   120  ### Return type
   121  
   122  void (empty response body)
   123  
   124  ### Authorization
   125  
   126  [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)
   127  
   128  ### HTTP request headers
   129  
   130   - **Content-Type**: application/json
   131   - **Accept**: application/json
   132  
   133  
   134  ### HTTP response details
   135  
   136  | Status code | Description | Response headers |
   137  |-------------|-------------|------------------|
   138  **204** | Presign multipart upload aborted |  -  |
   139  **400** | Bad Request |  -  |
   140  **401** | Unauthorized |  -  |
   141  **404** | Resource Not Found |  -  |
   142  **420** | too many requests |  -  |
   143  **0** | Internal Server Error |  -  |
   144  
   145  [[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)
   146  
   147  # **complete_presign_multipart_upload**
   148  > ObjectStats complete_presign_multipart_upload(repository, branch, upload_id, path)
   149  
   150  Complete a presign multipart upload request
   151  
   152  Completes a presign multipart upload by assembling the uploaded parts.
   153  
   154  ### Example
   155  
   156  * Basic Authentication (basic_auth):
   157  * Api Key Authentication (cookie_auth):
   158  * Bearer (JWT) Authentication (jwt_token):
   159  * Api Key Authentication (oidc_auth):
   160  * Api Key Authentication (saml_auth):
   161  
   162  ```python
   163  import time
   164  import lakefs_client
   165  from lakefs_client.api import experimental_api
   166  from lakefs_client.model.staging_location import StagingLocation
   167  from lakefs_client.model.complete_presign_multipart_upload import CompletePresignMultipartUpload
   168  from lakefs_client.model.error import Error
   169  from lakefs_client.model.object_stats import ObjectStats
   170  from pprint import pprint
   171  # Defining the host is optional and defaults to http://localhost/api/v1
   172  # See configuration.py for a list of all supported configuration parameters.
   173  configuration = lakefs_client.Configuration(
   174      host = "http://localhost/api/v1"
   175  )
   176  
   177  # The client must configure the authentication and authorization parameters
   178  # in accordance with the API server security policy.
   179  # Examples for each auth method are provided below, use the example that
   180  # satisfies your auth use case.
   181  
   182  # Configure HTTP basic authorization: basic_auth
   183  configuration = lakefs_client.Configuration(
   184      username = 'YOUR_USERNAME',
   185      password = 'YOUR_PASSWORD'
   186  )
   187  
   188  # Configure API key authorization: cookie_auth
   189  configuration.api_key['cookie_auth'] = 'YOUR_API_KEY'
   190  
   191  # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
   192  # configuration.api_key_prefix['cookie_auth'] = 'Bearer'
   193  
   194  # Configure Bearer authorization (JWT): jwt_token
   195  configuration = lakefs_client.Configuration(
   196      access_token = 'YOUR_BEARER_TOKEN'
   197  )
   198  
   199  # Configure API key authorization: oidc_auth
   200  configuration.api_key['oidc_auth'] = 'YOUR_API_KEY'
   201  
   202  # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
   203  # configuration.api_key_prefix['oidc_auth'] = 'Bearer'
   204  
   205  # Configure API key authorization: saml_auth
   206  configuration.api_key['saml_auth'] = 'YOUR_API_KEY'
   207  
   208  # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
   209  # configuration.api_key_prefix['saml_auth'] = 'Bearer'
   210  
   211  # Enter a context with an instance of the API client
   212  with lakefs_client.ApiClient(configuration) as api_client:
   213      # Create an instance of the API class
   214      api_instance = experimental_api.ExperimentalApi(api_client)
   215      repository = "repository_example" # str | 
   216      branch = "branch_example" # str | 
   217      upload_id = "uploadId_example" # str | 
   218      path = "path_example" # str | relative to the branch
   219      complete_presign_multipart_upload = CompletePresignMultipartUpload(
   220          physical_address="physical_address_example",
   221          parts=[
   222              UploadPart(
   223                  part_number=1,
   224                  etag="etag_example",
   225              ),
   226          ],
   227          user_metadata={
   228              "key": "key_example",
   229          },
   230          content_type="content_type_example",
   231      ) # CompletePresignMultipartUpload |  (optional)
   232  
   233      # example passing only required values which don't have defaults set
   234      try:
   235          # Complete a presign multipart upload request
   236          api_response = api_instance.complete_presign_multipart_upload(repository, branch, upload_id, path)
   237          pprint(api_response)
   238      except lakefs_client.ApiException as e:
   239          print("Exception when calling ExperimentalApi->complete_presign_multipart_upload: %s\n" % e)
   240  
   241      # example passing only required values which don't have defaults set
   242      # and optional values
   243      try:
   244          # Complete a presign multipart upload request
   245          api_response = api_instance.complete_presign_multipart_upload(repository, branch, upload_id, path, complete_presign_multipart_upload=complete_presign_multipart_upload)
   246          pprint(api_response)
   247      except lakefs_client.ApiException as e:
   248          print("Exception when calling ExperimentalApi->complete_presign_multipart_upload: %s\n" % e)
   249  ```
   250  
   251  
   252  ### Parameters
   253  
   254  Name | Type | Description  | Notes
   255  ------------- | ------------- | ------------- | -------------
   256   **repository** | **str**|  |
   257   **branch** | **str**|  |
   258   **upload_id** | **str**|  |
   259   **path** | **str**| relative to the branch |
   260   **complete_presign_multipart_upload** | [**CompletePresignMultipartUpload**](CompletePresignMultipartUpload.md)|  | [optional]
   261  
   262  ### Return type
   263  
   264  [**ObjectStats**](ObjectStats.md)
   265  
   266  ### Authorization
   267  
   268  [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)
   269  
   270  ### HTTP request headers
   271  
   272   - **Content-Type**: application/json
   273   - **Accept**: application/json
   274  
   275  
   276  ### HTTP response details
   277  
   278  | Status code | Description | Response headers |
   279  |-------------|-------------|------------------|
   280  **200** | Presign multipart upload completed |  -  |
   281  **400** | Bad Request |  -  |
   282  **401** | Unauthorized |  -  |
   283  **404** | Resource Not Found |  -  |
   284  **409** | conflict with a commit, try here |  -  |
   285  **420** | too many requests |  -  |
   286  **0** | Internal Server Error |  -  |
   287  
   288  [[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)
   289  
   290  # **create_presign_multipart_upload**
   291  > PresignMultipartUpload create_presign_multipart_upload(repository, branch, path)
   292  
   293  Initiate a multipart upload
   294  
   295  Initiates a multipart upload and returns an upload ID with presigned URLs for each part (optional). Part numbers starts with 1. Each part except the last one has minimum size depends on the underlying blockstore implementation. For example working with S3 blockstore, minimum size is 5MB (excluding the last part). 
   296  
   297  ### Example
   298  
   299  * Basic Authentication (basic_auth):
   300  * Api Key Authentication (cookie_auth):
   301  * Bearer (JWT) Authentication (jwt_token):
   302  * Api Key Authentication (oidc_auth):
   303  * Api Key Authentication (saml_auth):
   304  
   305  ```python
   306  import time
   307  import lakefs_client
   308  from lakefs_client.api import experimental_api
   309  from lakefs_client.model.presign_multipart_upload import PresignMultipartUpload
   310  from lakefs_client.model.error import Error
   311  from pprint import pprint
   312  # Defining the host is optional and defaults to http://localhost/api/v1
   313  # See configuration.py for a list of all supported configuration parameters.
   314  configuration = lakefs_client.Configuration(
   315      host = "http://localhost/api/v1"
   316  )
   317  
   318  # The client must configure the authentication and authorization parameters
   319  # in accordance with the API server security policy.
   320  # Examples for each auth method are provided below, use the example that
   321  # satisfies your auth use case.
   322  
   323  # Configure HTTP basic authorization: basic_auth
   324  configuration = lakefs_client.Configuration(
   325      username = 'YOUR_USERNAME',
   326      password = 'YOUR_PASSWORD'
   327  )
   328  
   329  # Configure API key authorization: cookie_auth
   330  configuration.api_key['cookie_auth'] = 'YOUR_API_KEY'
   331  
   332  # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
   333  # configuration.api_key_prefix['cookie_auth'] = 'Bearer'
   334  
   335  # Configure Bearer authorization (JWT): jwt_token
   336  configuration = lakefs_client.Configuration(
   337      access_token = 'YOUR_BEARER_TOKEN'
   338  )
   339  
   340  # Configure API key authorization: oidc_auth
   341  configuration.api_key['oidc_auth'] = 'YOUR_API_KEY'
   342  
   343  # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
   344  # configuration.api_key_prefix['oidc_auth'] = 'Bearer'
   345  
   346  # Configure API key authorization: saml_auth
   347  configuration.api_key['saml_auth'] = 'YOUR_API_KEY'
   348  
   349  # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
   350  # configuration.api_key_prefix['saml_auth'] = 'Bearer'
   351  
   352  # Enter a context with an instance of the API client
   353  with lakefs_client.ApiClient(configuration) as api_client:
   354      # Create an instance of the API class
   355      api_instance = experimental_api.ExperimentalApi(api_client)
   356      repository = "repository_example" # str | 
   357      branch = "branch_example" # str | 
   358      path = "path_example" # str | relative to the branch
   359      parts = 1 # int | number of presigned URL parts required to upload (optional)
   360  
   361      # example passing only required values which don't have defaults set
   362      try:
   363          # Initiate a multipart upload
   364          api_response = api_instance.create_presign_multipart_upload(repository, branch, path)
   365          pprint(api_response)
   366      except lakefs_client.ApiException as e:
   367          print("Exception when calling ExperimentalApi->create_presign_multipart_upload: %s\n" % e)
   368  
   369      # example passing only required values which don't have defaults set
   370      # and optional values
   371      try:
   372          # Initiate a multipart upload
   373          api_response = api_instance.create_presign_multipart_upload(repository, branch, path, parts=parts)
   374          pprint(api_response)
   375      except lakefs_client.ApiException as e:
   376          print("Exception when calling ExperimentalApi->create_presign_multipart_upload: %s\n" % e)
   377  ```
   378  
   379  
   380  ### Parameters
   381  
   382  Name | Type | Description  | Notes
   383  ------------- | ------------- | ------------- | -------------
   384   **repository** | **str**|  |
   385   **branch** | **str**|  |
   386   **path** | **str**| relative to the branch |
   387   **parts** | **int**| number of presigned URL parts required to upload | [optional]
   388  
   389  ### Return type
   390  
   391  [**PresignMultipartUpload**](PresignMultipartUpload.md)
   392  
   393  ### Authorization
   394  
   395  [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)
   396  
   397  ### HTTP request headers
   398  
   399   - **Content-Type**: Not defined
   400   - **Accept**: application/json
   401  
   402  
   403  ### HTTP response details
   404  
   405  | Status code | Description | Response headers |
   406  |-------------|-------------|------------------|
   407  **201** | Presign multipart upload initiated |  -  |
   408  **400** | Bad Request |  -  |
   409  **401** | Unauthorized |  -  |
   410  **404** | Resource Not Found |  -  |
   411  **420** | too many requests |  -  |
   412  **0** | Internal Server Error |  -  |
   413  
   414  [[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)
   415  
   416  # **create_user_external_principal**
   417  > create_user_external_principal(user_id, principal_id)
   418  
   419  attach external principal to user
   420  
   421  ### Example
   422  
   423  * Basic Authentication (basic_auth):
   424  * Api Key Authentication (cookie_auth):
   425  * Bearer (JWT) Authentication (jwt_token):
   426  * Api Key Authentication (oidc_auth):
   427  * Api Key Authentication (saml_auth):
   428  
   429  ```python
   430  import time
   431  import lakefs_client
   432  from lakefs_client.api import experimental_api
   433  from lakefs_client.model.error import Error
   434  from lakefs_client.model.external_principal_creation import ExternalPrincipalCreation
   435  from pprint import pprint
   436  # Defining the host is optional and defaults to http://localhost/api/v1
   437  # See configuration.py for a list of all supported configuration parameters.
   438  configuration = lakefs_client.Configuration(
   439      host = "http://localhost/api/v1"
   440  )
   441  
   442  # The client must configure the authentication and authorization parameters
   443  # in accordance with the API server security policy.
   444  # Examples for each auth method are provided below, use the example that
   445  # satisfies your auth use case.
   446  
   447  # Configure HTTP basic authorization: basic_auth
   448  configuration = lakefs_client.Configuration(
   449      username = 'YOUR_USERNAME',
   450      password = 'YOUR_PASSWORD'
   451  )
   452  
   453  # Configure API key authorization: cookie_auth
   454  configuration.api_key['cookie_auth'] = 'YOUR_API_KEY'
   455  
   456  # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
   457  # configuration.api_key_prefix['cookie_auth'] = 'Bearer'
   458  
   459  # Configure Bearer authorization (JWT): jwt_token
   460  configuration = lakefs_client.Configuration(
   461      access_token = 'YOUR_BEARER_TOKEN'
   462  )
   463  
   464  # Configure API key authorization: oidc_auth
   465  configuration.api_key['oidc_auth'] = 'YOUR_API_KEY'
   466  
   467  # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
   468  # configuration.api_key_prefix['oidc_auth'] = 'Bearer'
   469  
   470  # Configure API key authorization: saml_auth
   471  configuration.api_key['saml_auth'] = 'YOUR_API_KEY'
   472  
   473  # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
   474  # configuration.api_key_prefix['saml_auth'] = 'Bearer'
   475  
   476  # Enter a context with an instance of the API client
   477  with lakefs_client.ApiClient(configuration) as api_client:
   478      # Create an instance of the API class
   479      api_instance = experimental_api.ExperimentalApi(api_client)
   480      user_id = "userId_example" # str | 
   481      principal_id = "principalId_example" # str | 
   482      external_principal_creation = ExternalPrincipalCreation(
   483          settings=[
   484              ExternalPrincipalSettings(
   485                  key="key_example",
   486              ),
   487          ],
   488      ) # ExternalPrincipalCreation |  (optional)
   489  
   490      # example passing only required values which don't have defaults set
   491      try:
   492          # attach external principal to user
   493          api_instance.create_user_external_principal(user_id, principal_id)
   494      except lakefs_client.ApiException as e:
   495          print("Exception when calling ExperimentalApi->create_user_external_principal: %s\n" % e)
   496  
   497      # example passing only required values which don't have defaults set
   498      # and optional values
   499      try:
   500          # attach external principal to user
   501          api_instance.create_user_external_principal(user_id, principal_id, external_principal_creation=external_principal_creation)
   502      except lakefs_client.ApiException as e:
   503          print("Exception when calling ExperimentalApi->create_user_external_principal: %s\n" % e)
   504  ```
   505  
   506  
   507  ### Parameters
   508  
   509  Name | Type | Description  | Notes
   510  ------------- | ------------- | ------------- | -------------
   511   **user_id** | **str**|  |
   512   **principal_id** | **str**|  |
   513   **external_principal_creation** | [**ExternalPrincipalCreation**](ExternalPrincipalCreation.md)|  | [optional]
   514  
   515  ### Return type
   516  
   517  void (empty response body)
   518  
   519  ### Authorization
   520  
   521  [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)
   522  
   523  ### HTTP request headers
   524  
   525   - **Content-Type**: application/json
   526   - **Accept**: application/json
   527  
   528  
   529  ### HTTP response details
   530  
   531  | Status code | Description | Response headers |
   532  |-------------|-------------|------------------|
   533  **201** | external principal attached successfully |  -  |
   534  **401** | Unauthorized |  -  |
   535  **404** | Resource Not Found |  -  |
   536  **409** | Resource Conflicts With Target |  -  |
   537  **420** | too many requests |  -  |
   538  **0** | Internal Server Error |  -  |
   539  
   540  [[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)
   541  
   542  # **delete_user_external_principal**
   543  > delete_user_external_principal(user_id, principal_id)
   544  
   545  delete external principal from user
   546  
   547  ### Example
   548  
   549  * Basic Authentication (basic_auth):
   550  * Api Key Authentication (cookie_auth):
   551  * Bearer (JWT) Authentication (jwt_token):
   552  * Api Key Authentication (oidc_auth):
   553  * Api Key Authentication (saml_auth):
   554  
   555  ```python
   556  import time
   557  import lakefs_client
   558  from lakefs_client.api import experimental_api
   559  from lakefs_client.model.error import Error
   560  from pprint import pprint
   561  # Defining the host is optional and defaults to http://localhost/api/v1
   562  # See configuration.py for a list of all supported configuration parameters.
   563  configuration = lakefs_client.Configuration(
   564      host = "http://localhost/api/v1"
   565  )
   566  
   567  # The client must configure the authentication and authorization parameters
   568  # in accordance with the API server security policy.
   569  # Examples for each auth method are provided below, use the example that
   570  # satisfies your auth use case.
   571  
   572  # Configure HTTP basic authorization: basic_auth
   573  configuration = lakefs_client.Configuration(
   574      username = 'YOUR_USERNAME',
   575      password = 'YOUR_PASSWORD'
   576  )
   577  
   578  # Configure API key authorization: cookie_auth
   579  configuration.api_key['cookie_auth'] = 'YOUR_API_KEY'
   580  
   581  # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
   582  # configuration.api_key_prefix['cookie_auth'] = 'Bearer'
   583  
   584  # Configure Bearer authorization (JWT): jwt_token
   585  configuration = lakefs_client.Configuration(
   586      access_token = 'YOUR_BEARER_TOKEN'
   587  )
   588  
   589  # Configure API key authorization: oidc_auth
   590  configuration.api_key['oidc_auth'] = 'YOUR_API_KEY'
   591  
   592  # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
   593  # configuration.api_key_prefix['oidc_auth'] = 'Bearer'
   594  
   595  # Configure API key authorization: saml_auth
   596  configuration.api_key['saml_auth'] = 'YOUR_API_KEY'
   597  
   598  # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
   599  # configuration.api_key_prefix['saml_auth'] = 'Bearer'
   600  
   601  # Enter a context with an instance of the API client
   602  with lakefs_client.ApiClient(configuration) as api_client:
   603      # Create an instance of the API class
   604      api_instance = experimental_api.ExperimentalApi(api_client)
   605      user_id = "userId_example" # str | 
   606      principal_id = "principalId_example" # str | 
   607  
   608      # example passing only required values which don't have defaults set
   609      try:
   610          # delete external principal from user
   611          api_instance.delete_user_external_principal(user_id, principal_id)
   612      except lakefs_client.ApiException as e:
   613          print("Exception when calling ExperimentalApi->delete_user_external_principal: %s\n" % e)
   614  ```
   615  
   616  
   617  ### Parameters
   618  
   619  Name | Type | Description  | Notes
   620  ------------- | ------------- | ------------- | -------------
   621   **user_id** | **str**|  |
   622   **principal_id** | **str**|  |
   623  
   624  ### Return type
   625  
   626  void (empty response body)
   627  
   628  ### Authorization
   629  
   630  [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)
   631  
   632  ### HTTP request headers
   633  
   634   - **Content-Type**: Not defined
   635   - **Accept**: application/json
   636  
   637  
   638  ### HTTP response details
   639  
   640  | Status code | Description | Response headers |
   641  |-------------|-------------|------------------|
   642  **204** | external principal detached successfully |  -  |
   643  **401** | Unauthorized |  -  |
   644  **404** | Resource Not Found |  -  |
   645  **420** | too many requests |  -  |
   646  **0** | Internal Server Error |  -  |
   647  
   648  [[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)
   649  
   650  # **external_principal_login**
   651  > AuthenticationToken external_principal_login()
   652  
   653  perform a login using an external authenticator
   654  
   655  ### Example
   656  
   657  
   658  ```python
   659  import time
   660  import lakefs_client
   661  from lakefs_client.api import experimental_api
   662  from lakefs_client.model.authentication_token import AuthenticationToken
   663  from lakefs_client.model.external_login_information import ExternalLoginInformation
   664  from lakefs_client.model.error import Error
   665  from pprint import pprint
   666  # Defining the host is optional and defaults to http://localhost/api/v1
   667  # See configuration.py for a list of all supported configuration parameters.
   668  configuration = lakefs_client.Configuration(
   669      host = "http://localhost/api/v1"
   670  )
   671  
   672  
   673  # Enter a context with an instance of the API client
   674  with lakefs_client.ApiClient() as api_client:
   675      # Create an instance of the API class
   676      api_instance = experimental_api.ExperimentalApi(api_client)
   677      external_login_information = ExternalLoginInformation(
   678          token_expiration_duration=1,
   679          identity_request={},
   680      ) # ExternalLoginInformation |  (optional)
   681  
   682      # example passing only required values which don't have defaults set
   683      # and optional values
   684      try:
   685          # perform a login using an external authenticator
   686          api_response = api_instance.external_principal_login(external_login_information=external_login_information)
   687          pprint(api_response)
   688      except lakefs_client.ApiException as e:
   689          print("Exception when calling ExperimentalApi->external_principal_login: %s\n" % e)
   690  ```
   691  
   692  
   693  ### Parameters
   694  
   695  Name | Type | Description  | Notes
   696  ------------- | ------------- | ------------- | -------------
   697   **external_login_information** | [**ExternalLoginInformation**](ExternalLoginInformation.md)|  | [optional]
   698  
   699  ### Return type
   700  
   701  [**AuthenticationToken**](AuthenticationToken.md)
   702  
   703  ### Authorization
   704  
   705  No authorization required
   706  
   707  ### HTTP request headers
   708  
   709   - **Content-Type**: application/json
   710   - **Accept**: application/json
   711  
   712  
   713  ### HTTP response details
   714  
   715  | Status code | Description | Response headers |
   716  |-------------|-------------|------------------|
   717  **200** | successful external login |  -  |
   718  **400** | Bad Request |  -  |
   719  **401** | Unauthorized |  -  |
   720  **403** | Forbidden |  -  |
   721  **404** | Resource Not Found |  -  |
   722  **420** | too many requests |  -  |
   723  **0** | Internal Server Error |  -  |
   724  
   725  [[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)
   726  
   727  # **get_external_principal**
   728  > ExternalPrincipal get_external_principal(principal_id)
   729  
   730  describe external principal by id
   731  
   732  ### Example
   733  
   734  * Basic Authentication (basic_auth):
   735  * Api Key Authentication (cookie_auth):
   736  * Bearer (JWT) Authentication (jwt_token):
   737  * Api Key Authentication (oidc_auth):
   738  * Api Key Authentication (saml_auth):
   739  
   740  ```python
   741  import time
   742  import lakefs_client
   743  from lakefs_client.api import experimental_api
   744  from lakefs_client.model.external_principal import ExternalPrincipal
   745  from lakefs_client.model.error import Error
   746  from pprint import pprint
   747  # Defining the host is optional and defaults to http://localhost/api/v1
   748  # See configuration.py for a list of all supported configuration parameters.
   749  configuration = lakefs_client.Configuration(
   750      host = "http://localhost/api/v1"
   751  )
   752  
   753  # The client must configure the authentication and authorization parameters
   754  # in accordance with the API server security policy.
   755  # Examples for each auth method are provided below, use the example that
   756  # satisfies your auth use case.
   757  
   758  # Configure HTTP basic authorization: basic_auth
   759  configuration = lakefs_client.Configuration(
   760      username = 'YOUR_USERNAME',
   761      password = 'YOUR_PASSWORD'
   762  )
   763  
   764  # Configure API key authorization: cookie_auth
   765  configuration.api_key['cookie_auth'] = 'YOUR_API_KEY'
   766  
   767  # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
   768  # configuration.api_key_prefix['cookie_auth'] = 'Bearer'
   769  
   770  # Configure Bearer authorization (JWT): jwt_token
   771  configuration = lakefs_client.Configuration(
   772      access_token = 'YOUR_BEARER_TOKEN'
   773  )
   774  
   775  # Configure API key authorization: oidc_auth
   776  configuration.api_key['oidc_auth'] = 'YOUR_API_KEY'
   777  
   778  # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
   779  # configuration.api_key_prefix['oidc_auth'] = 'Bearer'
   780  
   781  # Configure API key authorization: saml_auth
   782  configuration.api_key['saml_auth'] = 'YOUR_API_KEY'
   783  
   784  # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
   785  # configuration.api_key_prefix['saml_auth'] = 'Bearer'
   786  
   787  # Enter a context with an instance of the API client
   788  with lakefs_client.ApiClient(configuration) as api_client:
   789      # Create an instance of the API class
   790      api_instance = experimental_api.ExperimentalApi(api_client)
   791      principal_id = "principalId_example" # str | 
   792  
   793      # example passing only required values which don't have defaults set
   794      try:
   795          # describe external principal by id
   796          api_response = api_instance.get_external_principal(principal_id)
   797          pprint(api_response)
   798      except lakefs_client.ApiException as e:
   799          print("Exception when calling ExperimentalApi->get_external_principal: %s\n" % e)
   800  ```
   801  
   802  
   803  ### Parameters
   804  
   805  Name | Type | Description  | Notes
   806  ------------- | ------------- | ------------- | -------------
   807   **principal_id** | **str**|  |
   808  
   809  ### Return type
   810  
   811  [**ExternalPrincipal**](ExternalPrincipal.md)
   812  
   813  ### Authorization
   814  
   815  [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)
   816  
   817  ### HTTP request headers
   818  
   819   - **Content-Type**: Not defined
   820   - **Accept**: application/json
   821  
   822  
   823  ### HTTP response details
   824  
   825  | Status code | Description | Response headers |
   826  |-------------|-------------|------------------|
   827  **200** | external principal |  -  |
   828  **401** | Unauthorized |  -  |
   829  **404** | Resource Not Found |  -  |
   830  **420** | too many requests |  -  |
   831  **0** | Internal Server Error |  -  |
   832  
   833  [[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)
   834  
   835  # **hard_reset_branch**
   836  > hard_reset_branch(repository, branch, ref)
   837  
   838  hard reset branch
   839  
   840  Relocate branch to refer to ref.  Branch must not contain uncommitted data.
   841  
   842  ### Example
   843  
   844  * Basic Authentication (basic_auth):
   845  * Api Key Authentication (cookie_auth):
   846  * Bearer (JWT) Authentication (jwt_token):
   847  * Api Key Authentication (oidc_auth):
   848  * Api Key Authentication (saml_auth):
   849  
   850  ```python
   851  import time
   852  import lakefs_client
   853  from lakefs_client.api import experimental_api
   854  from lakefs_client.model.error import Error
   855  from pprint import pprint
   856  # Defining the host is optional and defaults to http://localhost/api/v1
   857  # See configuration.py for a list of all supported configuration parameters.
   858  configuration = lakefs_client.Configuration(
   859      host = "http://localhost/api/v1"
   860  )
   861  
   862  # The client must configure the authentication and authorization parameters
   863  # in accordance with the API server security policy.
   864  # Examples for each auth method are provided below, use the example that
   865  # satisfies your auth use case.
   866  
   867  # Configure HTTP basic authorization: basic_auth
   868  configuration = lakefs_client.Configuration(
   869      username = 'YOUR_USERNAME',
   870      password = 'YOUR_PASSWORD'
   871  )
   872  
   873  # Configure API key authorization: cookie_auth
   874  configuration.api_key['cookie_auth'] = 'YOUR_API_KEY'
   875  
   876  # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
   877  # configuration.api_key_prefix['cookie_auth'] = 'Bearer'
   878  
   879  # Configure Bearer authorization (JWT): jwt_token
   880  configuration = lakefs_client.Configuration(
   881      access_token = 'YOUR_BEARER_TOKEN'
   882  )
   883  
   884  # Configure API key authorization: oidc_auth
   885  configuration.api_key['oidc_auth'] = 'YOUR_API_KEY'
   886  
   887  # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
   888  # configuration.api_key_prefix['oidc_auth'] = 'Bearer'
   889  
   890  # Configure API key authorization: saml_auth
   891  configuration.api_key['saml_auth'] = 'YOUR_API_KEY'
   892  
   893  # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
   894  # configuration.api_key_prefix['saml_auth'] = 'Bearer'
   895  
   896  # Enter a context with an instance of the API client
   897  with lakefs_client.ApiClient(configuration) as api_client:
   898      # Create an instance of the API class
   899      api_instance = experimental_api.ExperimentalApi(api_client)
   900      repository = "repository_example" # str | 
   901      branch = "branch_example" # str | 
   902      ref = "ref_example" # str | After reset, branch will point at this reference.
   903      force = False # bool |  (optional) if omitted the server will use the default value of False
   904  
   905      # example passing only required values which don't have defaults set
   906      try:
   907          # hard reset branch
   908          api_instance.hard_reset_branch(repository, branch, ref)
   909      except lakefs_client.ApiException as e:
   910          print("Exception when calling ExperimentalApi->hard_reset_branch: %s\n" % e)
   911  
   912      # example passing only required values which don't have defaults set
   913      # and optional values
   914      try:
   915          # hard reset branch
   916          api_instance.hard_reset_branch(repository, branch, ref, force=force)
   917      except lakefs_client.ApiException as e:
   918          print("Exception when calling ExperimentalApi->hard_reset_branch: %s\n" % e)
   919  ```
   920  
   921  
   922  ### Parameters
   923  
   924  Name | Type | Description  | Notes
   925  ------------- | ------------- | ------------- | -------------
   926   **repository** | **str**|  |
   927   **branch** | **str**|  |
   928   **ref** | **str**| After reset, branch will point at this reference. |
   929   **force** | **bool**|  | [optional] if omitted the server will use the default value of False
   930  
   931  ### Return type
   932  
   933  void (empty response body)
   934  
   935  ### Authorization
   936  
   937  [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)
   938  
   939  ### HTTP request headers
   940  
   941   - **Content-Type**: Not defined
   942   - **Accept**: application/json
   943  
   944  
   945  ### HTTP response details
   946  
   947  | Status code | Description | Response headers |
   948  |-------------|-------------|------------------|
   949  **204** | reset successful |  -  |
   950  **400** | Bad Request |  -  |
   951  **401** | Unauthorized |  -  |
   952  **403** | Forbidden |  -  |
   953  **404** | Resource Not Found |  -  |
   954  **420** | too many requests |  -  |
   955  **0** | Internal Server Error |  -  |
   956  
   957  [[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)
   958  
   959  # **list_user_external_principals**
   960  > ExternalPrincipalList list_user_external_principals(user_id)
   961  
   962  list user external policies attached to a user
   963  
   964  ### Example
   965  
   966  * Basic Authentication (basic_auth):
   967  * Api Key Authentication (cookie_auth):
   968  * Bearer (JWT) Authentication (jwt_token):
   969  * Api Key Authentication (oidc_auth):
   970  * Api Key Authentication (saml_auth):
   971  
   972  ```python
   973  import time
   974  import lakefs_client
   975  from lakefs_client.api import experimental_api
   976  from lakefs_client.model.error import Error
   977  from lakefs_client.model.external_principal_list import ExternalPrincipalList
   978  from pprint import pprint
   979  # Defining the host is optional and defaults to http://localhost/api/v1
   980  # See configuration.py for a list of all supported configuration parameters.
   981  configuration = lakefs_client.Configuration(
   982      host = "http://localhost/api/v1"
   983  )
   984  
   985  # The client must configure the authentication and authorization parameters
   986  # in accordance with the API server security policy.
   987  # Examples for each auth method are provided below, use the example that
   988  # satisfies your auth use case.
   989  
   990  # Configure HTTP basic authorization: basic_auth
   991  configuration = lakefs_client.Configuration(
   992      username = 'YOUR_USERNAME',
   993      password = 'YOUR_PASSWORD'
   994  )
   995  
   996  # Configure API key authorization: cookie_auth
   997  configuration.api_key['cookie_auth'] = 'YOUR_API_KEY'
   998  
   999  # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
  1000  # configuration.api_key_prefix['cookie_auth'] = 'Bearer'
  1001  
  1002  # Configure Bearer authorization (JWT): jwt_token
  1003  configuration = lakefs_client.Configuration(
  1004      access_token = 'YOUR_BEARER_TOKEN'
  1005  )
  1006  
  1007  # Configure API key authorization: oidc_auth
  1008  configuration.api_key['oidc_auth'] = 'YOUR_API_KEY'
  1009  
  1010  # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
  1011  # configuration.api_key_prefix['oidc_auth'] = 'Bearer'
  1012  
  1013  # Configure API key authorization: saml_auth
  1014  configuration.api_key['saml_auth'] = 'YOUR_API_KEY'
  1015  
  1016  # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
  1017  # configuration.api_key_prefix['saml_auth'] = 'Bearer'
  1018  
  1019  # Enter a context with an instance of the API client
  1020  with lakefs_client.ApiClient(configuration) as api_client:
  1021      # Create an instance of the API class
  1022      api_instance = experimental_api.ExperimentalApi(api_client)
  1023      user_id = "userId_example" # str | 
  1024      prefix = "prefix_example" # str | return items prefixed with this value (optional)
  1025      after = "after_example" # str | return items after this value (optional)
  1026      amount = 100 # int | how many items to return (optional) if omitted the server will use the default value of 100
  1027  
  1028      # example passing only required values which don't have defaults set
  1029      try:
  1030          # list user external policies attached to a user
  1031          api_response = api_instance.list_user_external_principals(user_id)
  1032          pprint(api_response)
  1033      except lakefs_client.ApiException as e:
  1034          print("Exception when calling ExperimentalApi->list_user_external_principals: %s\n" % e)
  1035  
  1036      # example passing only required values which don't have defaults set
  1037      # and optional values
  1038      try:
  1039          # list user external policies attached to a user
  1040          api_response = api_instance.list_user_external_principals(user_id, prefix=prefix, after=after, amount=amount)
  1041          pprint(api_response)
  1042      except lakefs_client.ApiException as e:
  1043          print("Exception when calling ExperimentalApi->list_user_external_principals: %s\n" % e)
  1044  ```
  1045  
  1046  
  1047  ### Parameters
  1048  
  1049  Name | Type | Description  | Notes
  1050  ------------- | ------------- | ------------- | -------------
  1051   **user_id** | **str**|  |
  1052   **prefix** | **str**| return items prefixed with this value | [optional]
  1053   **after** | **str**| return items after this value | [optional]
  1054   **amount** | **int**| how many items to return | [optional] if omitted the server will use the default value of 100
  1055  
  1056  ### Return type
  1057  
  1058  [**ExternalPrincipalList**](ExternalPrincipalList.md)
  1059  
  1060  ### Authorization
  1061  
  1062  [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)
  1063  
  1064  ### HTTP request headers
  1065  
  1066   - **Content-Type**: Not defined
  1067   - **Accept**: application/json
  1068  
  1069  
  1070  ### HTTP response details
  1071  
  1072  | Status code | Description | Response headers |
  1073  |-------------|-------------|------------------|
  1074  **200** | external principals list |  -  |
  1075  **401** | Unauthorized |  -  |
  1076  **404** | Resource Not Found |  -  |
  1077  **420** | too many requests |  -  |
  1078  **0** | Internal Server Error |  -  |
  1079  
  1080  [[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)
  1081  
  1082  # **sts_login**
  1083  > AuthenticationToken sts_login(sts_auth_request)
  1084  
  1085  perform a login with STS
  1086  
  1087  ### Example
  1088  
  1089  
  1090  ```python
  1091  import time
  1092  import lakefs_client
  1093  from lakefs_client.api import experimental_api
  1094  from lakefs_client.model.authentication_token import AuthenticationToken
  1095  from lakefs_client.model.error import Error
  1096  from lakefs_client.model.sts_auth_request import StsAuthRequest
  1097  from pprint import pprint
  1098  # Defining the host is optional and defaults to http://localhost/api/v1
  1099  # See configuration.py for a list of all supported configuration parameters.
  1100  configuration = lakefs_client.Configuration(
  1101      host = "http://localhost/api/v1"
  1102  )
  1103  
  1104  
  1105  # Enter a context with an instance of the API client
  1106  with lakefs_client.ApiClient() as api_client:
  1107      # Create an instance of the API class
  1108      api_instance = experimental_api.ExperimentalApi(api_client)
  1109      sts_auth_request = StsAuthRequest(
  1110          code="code_example",
  1111          state="state_example",
  1112          redirect_uri="redirect_uri_example",
  1113          ttl_seconds=1,
  1114      ) # StsAuthRequest | 
  1115  
  1116      # example passing only required values which don't have defaults set
  1117      try:
  1118          # perform a login with STS
  1119          api_response = api_instance.sts_login(sts_auth_request)
  1120          pprint(api_response)
  1121      except lakefs_client.ApiException as e:
  1122          print("Exception when calling ExperimentalApi->sts_login: %s\n" % e)
  1123  ```
  1124  
  1125  
  1126  ### Parameters
  1127  
  1128  Name | Type | Description  | Notes
  1129  ------------- | ------------- | ------------- | -------------
  1130   **sts_auth_request** | [**StsAuthRequest**](StsAuthRequest.md)|  |
  1131  
  1132  ### Return type
  1133  
  1134  [**AuthenticationToken**](AuthenticationToken.md)
  1135  
  1136  ### Authorization
  1137  
  1138  No authorization required
  1139  
  1140  ### HTTP request headers
  1141  
  1142   - **Content-Type**: application/json
  1143   - **Accept**: application/json
  1144  
  1145  
  1146  ### HTTP response details
  1147  
  1148  | Status code | Description | Response headers |
  1149  |-------------|-------------|------------------|
  1150  **200** | successful STS login |  -  |
  1151  **401** | Unauthorized |  -  |
  1152  **420** | too many requests |  -  |
  1153  **0** | Internal Server Error |  -  |
  1154  
  1155  [[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)
  1156