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

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