github.com/treeverse/lakefs@v1.24.1-0.20240520134607-95648127bfb0/clients/python-legacy/docs/ConfigApi.md (about) 1 # lakefs_client.ConfigApi 2 3 All URIs are relative to *http://localhost/api/v1* 4 5 Method | HTTP request | Description 6 ------------- | ------------- | ------------- 7 [**get_config**](ConfigApi.md#get_config) | **GET** /config | 8 9 10 # **get_config** 11 > Config get_config() 12 13 14 15 retrieve lakeFS configuration 16 17 ### Example 18 19 * Basic Authentication (basic_auth): 20 * Api Key Authentication (cookie_auth): 21 * Bearer (JWT) Authentication (jwt_token): 22 * Api Key Authentication (oidc_auth): 23 * Api Key Authentication (saml_auth): 24 25 ```python 26 import time 27 import lakefs_client 28 from lakefs_client.api import config_api 29 from lakefs_client.model.config import Config 30 from lakefs_client.model.error import Error 31 from pprint import pprint 32 # Defining the host is optional and defaults to http://localhost/api/v1 33 # See configuration.py for a list of all supported configuration parameters. 34 configuration = lakefs_client.Configuration( 35 host = "http://localhost/api/v1" 36 ) 37 38 # The client must configure the authentication and authorization parameters 39 # in accordance with the API server security policy. 40 # Examples for each auth method are provided below, use the example that 41 # satisfies your auth use case. 42 43 # Configure HTTP basic authorization: basic_auth 44 configuration = lakefs_client.Configuration( 45 username = 'YOUR_USERNAME', 46 password = 'YOUR_PASSWORD' 47 ) 48 49 # Configure API key authorization: cookie_auth 50 configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' 51 52 # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed 53 # configuration.api_key_prefix['cookie_auth'] = 'Bearer' 54 55 # Configure Bearer authorization (JWT): jwt_token 56 configuration = lakefs_client.Configuration( 57 access_token = 'YOUR_BEARER_TOKEN' 58 ) 59 60 # Configure API key authorization: oidc_auth 61 configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' 62 63 # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed 64 # configuration.api_key_prefix['oidc_auth'] = 'Bearer' 65 66 # Configure API key authorization: saml_auth 67 configuration.api_key['saml_auth'] = 'YOUR_API_KEY' 68 69 # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed 70 # configuration.api_key_prefix['saml_auth'] = 'Bearer' 71 72 # Enter a context with an instance of the API client 73 with lakefs_client.ApiClient(configuration) as api_client: 74 # Create an instance of the API class 75 api_instance = config_api.ConfigApi(api_client) 76 77 # example, this endpoint has no required or optional parameters 78 try: 79 api_response = api_instance.get_config() 80 pprint(api_response) 81 except lakefs_client.ApiException as e: 82 print("Exception when calling ConfigApi->get_config: %s\n" % e) 83 ``` 84 85 86 ### Parameters 87 This endpoint does not need any parameter. 88 89 ### Return type 90 91 [**Config**](Config.md) 92 93 ### Authorization 94 95 [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) 96 97 ### HTTP request headers 98 99 - **Content-Type**: Not defined 100 - **Accept**: application/json 101 102 103 ### HTTP response details 104 105 | Status code | Description | Response headers | 106 |-------------|-------------|------------------| 107 **200** | lakeFS configuration | - | 108 **401** | Unauthorized | - | 109 110 [[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) 111