github.com/treeverse/lakefs@v1.24.1-0.20240520134607-95648127bfb0/clients/java/docs/ConfigApi.md (about) 1 # ConfigApi 2 3 All URIs are relative to */api/v1* 4 5 | Method | HTTP request | Description | 6 |------------- | ------------- | -------------| 7 | [**getConfig**](ConfigApi.md#getConfig) | **GET** /config | | 8 9 10 <a id="getConfig"></a> 11 # **getConfig** 12 > Config getConfig().execute(); 13 14 15 16 retrieve lakeFS configuration 17 18 ### Example 19 ```java 20 // Import classes: 21 import io.lakefs.clients.sdk.ApiClient; 22 import io.lakefs.clients.sdk.ApiException; 23 import io.lakefs.clients.sdk.Configuration; 24 import io.lakefs.clients.sdk.auth.*; 25 import io.lakefs.clients.sdk.models.*; 26 import io.lakefs.clients.sdk.ConfigApi; 27 28 public class Example { 29 public static void main(String[] args) { 30 ApiClient defaultClient = Configuration.getDefaultApiClient(); 31 defaultClient.setBasePath("/api/v1"); 32 33 // Configure HTTP basic authorization: basic_auth 34 HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); 35 basic_auth.setUsername("YOUR USERNAME"); 36 basic_auth.setPassword("YOUR PASSWORD"); 37 38 // Configure API key authorization: cookie_auth 39 ApiKeyAuth cookie_auth = (ApiKeyAuth) defaultClient.getAuthentication("cookie_auth"); 40 cookie_auth.setApiKey("YOUR API KEY"); 41 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 42 //cookie_auth.setApiKeyPrefix("Token"); 43 44 // Configure API key authorization: oidc_auth 45 ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); 46 oidc_auth.setApiKey("YOUR API KEY"); 47 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 48 //oidc_auth.setApiKeyPrefix("Token"); 49 50 // Configure API key authorization: saml_auth 51 ApiKeyAuth saml_auth = (ApiKeyAuth) defaultClient.getAuthentication("saml_auth"); 52 saml_auth.setApiKey("YOUR API KEY"); 53 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 54 //saml_auth.setApiKeyPrefix("Token"); 55 56 // Configure HTTP bearer authorization: jwt_token 57 HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); 58 jwt_token.setBearerToken("BEARER TOKEN"); 59 60 ConfigApi apiInstance = new ConfigApi(defaultClient); 61 try { 62 Config result = apiInstance.getConfig() 63 .execute(); 64 System.out.println(result); 65 } catch (ApiException e) { 66 System.err.println("Exception when calling ConfigApi#getConfig"); 67 System.err.println("Status code: " + e.getCode()); 68 System.err.println("Reason: " + e.getResponseBody()); 69 System.err.println("Response headers: " + e.getResponseHeaders()); 70 e.printStackTrace(); 71 } 72 } 73 } 74 ``` 75 76 ### Parameters 77 This endpoint does not need any parameter. 78 79 ### Return type 80 81 [**Config**](Config.md) 82 83 ### Authorization 84 85 [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) 86 87 ### HTTP request headers 88 89 - **Content-Type**: Not defined 90 - **Accept**: application/json 91 92 ### HTTP response details 93 | Status code | Description | Response headers | 94 |-------------|-------------|------------------| 95 | **200** | lakeFS configuration | - | 96 | **401** | Unauthorized | - | 97