github.com/treeverse/lakefs@v1.24.1-0.20240520134607-95648127bfb0/clients/java-legacy/docs/MetadataApi.md (about) 1 # MetadataApi 2 3 All URIs are relative to *http://localhost/api/v1* 4 5 Method | HTTP request | Description 6 ------------- | ------------- | ------------- 7 [**getMetaRange**](MetadataApi.md#getMetaRange) | **GET** /repositories/{repository}/metadata/meta_range/{meta_range} | return URI to a meta-range file 8 [**getRange**](MetadataApi.md#getRange) | **GET** /repositories/{repository}/metadata/range/{range} | return URI to a range file 9 10 11 <a name="getMetaRange"></a> 12 # **getMetaRange** 13 > StorageURI getMetaRange(repository, metaRange) 14 15 return URI to a meta-range file 16 17 ### Example 18 ```java 19 // Import classes: 20 import io.lakefs.clients.api.ApiClient; 21 import io.lakefs.clients.api.ApiException; 22 import io.lakefs.clients.api.Configuration; 23 import io.lakefs.clients.api.auth.*; 24 import io.lakefs.clients.api.models.*; 25 import io.lakefs.clients.api.MetadataApi; 26 27 public class Example { 28 public static void main(String[] args) { 29 ApiClient defaultClient = Configuration.getDefaultApiClient(); 30 defaultClient.setBasePath("http://localhost/api/v1"); 31 32 // Configure HTTP basic authorization: basic_auth 33 HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); 34 basic_auth.setUsername("YOUR USERNAME"); 35 basic_auth.setPassword("YOUR PASSWORD"); 36 37 // Configure API key authorization: cookie_auth 38 ApiKeyAuth cookie_auth = (ApiKeyAuth) defaultClient.getAuthentication("cookie_auth"); 39 cookie_auth.setApiKey("YOUR API KEY"); 40 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 41 //cookie_auth.setApiKeyPrefix("Token"); 42 43 // Configure HTTP bearer authorization: jwt_token 44 HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); 45 jwt_token.setBearerToken("BEARER TOKEN"); 46 47 // Configure API key authorization: oidc_auth 48 ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); 49 oidc_auth.setApiKey("YOUR API KEY"); 50 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 51 //oidc_auth.setApiKeyPrefix("Token"); 52 53 // Configure API key authorization: saml_auth 54 ApiKeyAuth saml_auth = (ApiKeyAuth) defaultClient.getAuthentication("saml_auth"); 55 saml_auth.setApiKey("YOUR API KEY"); 56 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 57 //saml_auth.setApiKeyPrefix("Token"); 58 59 MetadataApi apiInstance = new MetadataApi(defaultClient); 60 String repository = "repository_example"; // String | 61 String metaRange = "metaRange_example"; // String | 62 try { 63 StorageURI result = apiInstance.getMetaRange(repository, metaRange); 64 System.out.println(result); 65 } catch (ApiException e) { 66 System.err.println("Exception when calling MetadataApi#getMetaRange"); 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 78 Name | Type | Description | Notes 79 ------------- | ------------- | ------------- | ------------- 80 **repository** | **String**| | 81 **metaRange** | **String**| | 82 83 ### Return type 84 85 [**StorageURI**](StorageURI.md) 86 87 ### Authorization 88 89 [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) 90 91 ### HTTP request headers 92 93 - **Content-Type**: Not defined 94 - **Accept**: application/json 95 96 ### HTTP response details 97 | Status code | Description | Response headers | 98 |-------------|-------------|------------------| 99 **200** | meta-range URI | * Location - redirect to S3 <br> | 100 **401** | Unauthorized | - | 101 **404** | Resource Not Found | - | 102 **420** | too many requests | - | 103 **0** | Internal Server Error | - | 104 105 <a name="getRange"></a> 106 # **getRange** 107 > StorageURI getRange(repository, range) 108 109 return URI to a range file 110 111 ### Example 112 ```java 113 // Import classes: 114 import io.lakefs.clients.api.ApiClient; 115 import io.lakefs.clients.api.ApiException; 116 import io.lakefs.clients.api.Configuration; 117 import io.lakefs.clients.api.auth.*; 118 import io.lakefs.clients.api.models.*; 119 import io.lakefs.clients.api.MetadataApi; 120 121 public class Example { 122 public static void main(String[] args) { 123 ApiClient defaultClient = Configuration.getDefaultApiClient(); 124 defaultClient.setBasePath("http://localhost/api/v1"); 125 126 // Configure HTTP basic authorization: basic_auth 127 HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); 128 basic_auth.setUsername("YOUR USERNAME"); 129 basic_auth.setPassword("YOUR PASSWORD"); 130 131 // Configure API key authorization: cookie_auth 132 ApiKeyAuth cookie_auth = (ApiKeyAuth) defaultClient.getAuthentication("cookie_auth"); 133 cookie_auth.setApiKey("YOUR API KEY"); 134 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 135 //cookie_auth.setApiKeyPrefix("Token"); 136 137 // Configure HTTP bearer authorization: jwt_token 138 HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); 139 jwt_token.setBearerToken("BEARER TOKEN"); 140 141 // Configure API key authorization: oidc_auth 142 ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); 143 oidc_auth.setApiKey("YOUR API KEY"); 144 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 145 //oidc_auth.setApiKeyPrefix("Token"); 146 147 // Configure API key authorization: saml_auth 148 ApiKeyAuth saml_auth = (ApiKeyAuth) defaultClient.getAuthentication("saml_auth"); 149 saml_auth.setApiKey("YOUR API KEY"); 150 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 151 //saml_auth.setApiKeyPrefix("Token"); 152 153 MetadataApi apiInstance = new MetadataApi(defaultClient); 154 String repository = "repository_example"; // String | 155 String range = "range_example"; // String | 156 try { 157 StorageURI result = apiInstance.getRange(repository, range); 158 System.out.println(result); 159 } catch (ApiException e) { 160 System.err.println("Exception when calling MetadataApi#getRange"); 161 System.err.println("Status code: " + e.getCode()); 162 System.err.println("Reason: " + e.getResponseBody()); 163 System.err.println("Response headers: " + e.getResponseHeaders()); 164 e.printStackTrace(); 165 } 166 } 167 } 168 ``` 169 170 ### Parameters 171 172 Name | Type | Description | Notes 173 ------------- | ------------- | ------------- | ------------- 174 **repository** | **String**| | 175 **range** | **String**| | 176 177 ### Return type 178 179 [**StorageURI**](StorageURI.md) 180 181 ### Authorization 182 183 [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) 184 185 ### HTTP request headers 186 187 - **Content-Type**: Not defined 188 - **Accept**: application/json 189 190 ### HTTP response details 191 | Status code | Description | Response headers | 192 |-------------|-------------|------------------| 193 **200** | range URI | * Location - redirect to S3 <br> | 194 **401** | Unauthorized | - | 195 **404** | Resource Not Found | - | 196 **420** | too many requests | - | 197 **0** | Internal Server Error | - | 198