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

     1  # lakefs_client.MetadataApi
     2  
     3  All URIs are relative to *http://localhost/api/v1*
     4  
     5  Method | HTTP request | Description
     6  ------------- | ------------- | -------------
     7  [**get_meta_range**](MetadataApi.md#get_meta_range) | **GET** /repositories/{repository}/metadata/meta_range/{meta_range} | return URI to a meta-range file
     8  [**get_range**](MetadataApi.md#get_range) | **GET** /repositories/{repository}/metadata/range/{range} | return URI to a range file
     9  
    10  
    11  # **get_meta_range**
    12  > StorageURI get_meta_range(repository, meta_range)
    13  
    14  return URI to a meta-range file
    15  
    16  ### Example
    17  
    18  * Basic Authentication (basic_auth):
    19  * Api Key Authentication (cookie_auth):
    20  * Bearer (JWT) Authentication (jwt_token):
    21  * Api Key Authentication (oidc_auth):
    22  * Api Key Authentication (saml_auth):
    23  
    24  ```python
    25  import time
    26  import lakefs_client
    27  from lakefs_client.api import metadata_api
    28  from lakefs_client.model.error import Error
    29  from lakefs_client.model.storage_uri import StorageURI
    30  from pprint import pprint
    31  # Defining the host is optional and defaults to http://localhost/api/v1
    32  # See configuration.py for a list of all supported configuration parameters.
    33  configuration = lakefs_client.Configuration(
    34      host = "http://localhost/api/v1"
    35  )
    36  
    37  # The client must configure the authentication and authorization parameters
    38  # in accordance with the API server security policy.
    39  # Examples for each auth method are provided below, use the example that
    40  # satisfies your auth use case.
    41  
    42  # Configure HTTP basic authorization: basic_auth
    43  configuration = lakefs_client.Configuration(
    44      username = 'YOUR_USERNAME',
    45      password = 'YOUR_PASSWORD'
    46  )
    47  
    48  # Configure API key authorization: cookie_auth
    49  configuration.api_key['cookie_auth'] = 'YOUR_API_KEY'
    50  
    51  # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
    52  # configuration.api_key_prefix['cookie_auth'] = 'Bearer'
    53  
    54  # Configure Bearer authorization (JWT): jwt_token
    55  configuration = lakefs_client.Configuration(
    56      access_token = 'YOUR_BEARER_TOKEN'
    57  )
    58  
    59  # Configure API key authorization: oidc_auth
    60  configuration.api_key['oidc_auth'] = 'YOUR_API_KEY'
    61  
    62  # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
    63  # configuration.api_key_prefix['oidc_auth'] = 'Bearer'
    64  
    65  # Configure API key authorization: saml_auth
    66  configuration.api_key['saml_auth'] = 'YOUR_API_KEY'
    67  
    68  # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
    69  # configuration.api_key_prefix['saml_auth'] = 'Bearer'
    70  
    71  # Enter a context with an instance of the API client
    72  with lakefs_client.ApiClient(configuration) as api_client:
    73      # Create an instance of the API class
    74      api_instance = metadata_api.MetadataApi(api_client)
    75      repository = "repository_example" # str | 
    76      meta_range = "meta_range_example" # str | 
    77  
    78      # example passing only required values which don't have defaults set
    79      try:
    80          # return URI to a meta-range file
    81          api_response = api_instance.get_meta_range(repository, meta_range)
    82          pprint(api_response)
    83      except lakefs_client.ApiException as e:
    84          print("Exception when calling MetadataApi->get_meta_range: %s\n" % e)
    85  ```
    86  
    87  
    88  ### Parameters
    89  
    90  Name | Type | Description  | Notes
    91  ------------- | ------------- | ------------- | -------------
    92   **repository** | **str**|  |
    93   **meta_range** | **str**|  |
    94  
    95  ### Return type
    96  
    97  [**StorageURI**](StorageURI.md)
    98  
    99  ### Authorization
   100  
   101  [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)
   102  
   103  ### HTTP request headers
   104  
   105   - **Content-Type**: Not defined
   106   - **Accept**: application/json
   107  
   108  
   109  ### HTTP response details
   110  
   111  | Status code | Description | Response headers |
   112  |-------------|-------------|------------------|
   113  **200** | meta-range URI |  * Location - redirect to S3 <br>  |
   114  **401** | Unauthorized |  -  |
   115  **404** | Resource Not Found |  -  |
   116  **420** | too many requests |  -  |
   117  **0** | Internal Server Error |  -  |
   118  
   119  [[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)
   120  
   121  # **get_range**
   122  > StorageURI get_range(repository, range)
   123  
   124  return URI to a range file
   125  
   126  ### Example
   127  
   128  * Basic Authentication (basic_auth):
   129  * Api Key Authentication (cookie_auth):
   130  * Bearer (JWT) Authentication (jwt_token):
   131  * Api Key Authentication (oidc_auth):
   132  * Api Key Authentication (saml_auth):
   133  
   134  ```python
   135  import time
   136  import lakefs_client
   137  from lakefs_client.api import metadata_api
   138  from lakefs_client.model.error import Error
   139  from lakefs_client.model.storage_uri import StorageURI
   140  from pprint import pprint
   141  # Defining the host is optional and defaults to http://localhost/api/v1
   142  # See configuration.py for a list of all supported configuration parameters.
   143  configuration = lakefs_client.Configuration(
   144      host = "http://localhost/api/v1"
   145  )
   146  
   147  # The client must configure the authentication and authorization parameters
   148  # in accordance with the API server security policy.
   149  # Examples for each auth method are provided below, use the example that
   150  # satisfies your auth use case.
   151  
   152  # Configure HTTP basic authorization: basic_auth
   153  configuration = lakefs_client.Configuration(
   154      username = 'YOUR_USERNAME',
   155      password = 'YOUR_PASSWORD'
   156  )
   157  
   158  # Configure API key authorization: cookie_auth
   159  configuration.api_key['cookie_auth'] = 'YOUR_API_KEY'
   160  
   161  # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
   162  # configuration.api_key_prefix['cookie_auth'] = 'Bearer'
   163  
   164  # Configure Bearer authorization (JWT): jwt_token
   165  configuration = lakefs_client.Configuration(
   166      access_token = 'YOUR_BEARER_TOKEN'
   167  )
   168  
   169  # Configure API key authorization: oidc_auth
   170  configuration.api_key['oidc_auth'] = 'YOUR_API_KEY'
   171  
   172  # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
   173  # configuration.api_key_prefix['oidc_auth'] = 'Bearer'
   174  
   175  # Configure API key authorization: saml_auth
   176  configuration.api_key['saml_auth'] = 'YOUR_API_KEY'
   177  
   178  # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
   179  # configuration.api_key_prefix['saml_auth'] = 'Bearer'
   180  
   181  # Enter a context with an instance of the API client
   182  with lakefs_client.ApiClient(configuration) as api_client:
   183      # Create an instance of the API class
   184      api_instance = metadata_api.MetadataApi(api_client)
   185      repository = "repository_example" # str | 
   186      range = "range_example" # str | 
   187  
   188      # example passing only required values which don't have defaults set
   189      try:
   190          # return URI to a range file
   191          api_response = api_instance.get_range(repository, range)
   192          pprint(api_response)
   193      except lakefs_client.ApiException as e:
   194          print("Exception when calling MetadataApi->get_range: %s\n" % e)
   195  ```
   196  
   197  
   198  ### Parameters
   199  
   200  Name | Type | Description  | Notes
   201  ------------- | ------------- | ------------- | -------------
   202   **repository** | **str**|  |
   203   **range** | **str**|  |
   204  
   205  ### Return type
   206  
   207  [**StorageURI**](StorageURI.md)
   208  
   209  ### Authorization
   210  
   211  [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)
   212  
   213  ### HTTP request headers
   214  
   215   - **Content-Type**: Not defined
   216   - **Accept**: application/json
   217  
   218  
   219  ### HTTP response details
   220  
   221  | Status code | Description | Response headers |
   222  |-------------|-------------|------------------|
   223  **200** | range URI |  * Location - redirect to S3 <br>  |
   224  **401** | Unauthorized |  -  |
   225  **404** | Resource Not Found |  -  |
   226  **420** | too many requests |  -  |
   227  **0** | Internal Server Error |  -  |
   228  
   229  [[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)
   230