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