github.com/treeverse/lakefs@v1.24.1-0.20240520134607-95648127bfb0/clients/java-legacy/docs/RepositoriesApi.md (about) 1 # RepositoriesApi 2 3 All URIs are relative to *http://localhost/api/v1* 4 5 Method | HTTP request | Description 6 ------------- | ------------- | ------------- 7 [**createRepository**](RepositoriesApi.md#createRepository) | **POST** /repositories | create repository 8 [**deleteGCRules**](RepositoriesApi.md#deleteGCRules) | **DELETE** /repositories/{repository}/settings/gc_rules | 9 [**deleteRepository**](RepositoriesApi.md#deleteRepository) | **DELETE** /repositories/{repository} | delete repository 10 [**dumpStatus**](RepositoriesApi.md#dumpStatus) | **GET** /repositories/{repository}/dump | Status of a repository dump task 11 [**dumpSubmit**](RepositoriesApi.md#dumpSubmit) | **POST** /repositories/{repository}/dump | Backup the repository metadata (tags, commits, branches) and save the backup to the object store. 12 [**getBranchProtectionRules**](RepositoriesApi.md#getBranchProtectionRules) | **GET** /repositories/{repository}/settings/branch_protection | get branch protection rules 13 [**getGCRules**](RepositoriesApi.md#getGCRules) | **GET** /repositories/{repository}/settings/gc_rules | get repository GC rules 14 [**getRepository**](RepositoriesApi.md#getRepository) | **GET** /repositories/{repository} | get repository 15 [**getRepositoryMetadata**](RepositoriesApi.md#getRepositoryMetadata) | **GET** /repositories/{repository}/metadata | get repository metadata 16 [**listRepositories**](RepositoriesApi.md#listRepositories) | **GET** /repositories | list repositories 17 [**restoreStatus**](RepositoriesApi.md#restoreStatus) | **GET** /repositories/{repository}/restore | Status of a restore request 18 [**restoreSubmit**](RepositoriesApi.md#restoreSubmit) | **POST** /repositories/{repository}/restore | Restore repository from a dump in the object store 19 [**setBranchProtectionRules**](RepositoriesApi.md#setBranchProtectionRules) | **PUT** /repositories/{repository}/settings/branch_protection | 20 [**setGCRules**](RepositoriesApi.md#setGCRules) | **PUT** /repositories/{repository}/settings/gc_rules | 21 22 23 <a name="createRepository"></a> 24 # **createRepository** 25 > Repository createRepository(repositoryCreation, bare) 26 27 create repository 28 29 ### Example 30 ```java 31 // Import classes: 32 import io.lakefs.clients.api.ApiClient; 33 import io.lakefs.clients.api.ApiException; 34 import io.lakefs.clients.api.Configuration; 35 import io.lakefs.clients.api.auth.*; 36 import io.lakefs.clients.api.models.*; 37 import io.lakefs.clients.api.RepositoriesApi; 38 39 public class Example { 40 public static void main(String[] args) { 41 ApiClient defaultClient = Configuration.getDefaultApiClient(); 42 defaultClient.setBasePath("http://localhost/api/v1"); 43 44 // Configure HTTP basic authorization: basic_auth 45 HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); 46 basic_auth.setUsername("YOUR USERNAME"); 47 basic_auth.setPassword("YOUR PASSWORD"); 48 49 // Configure API key authorization: cookie_auth 50 ApiKeyAuth cookie_auth = (ApiKeyAuth) defaultClient.getAuthentication("cookie_auth"); 51 cookie_auth.setApiKey("YOUR API KEY"); 52 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 53 //cookie_auth.setApiKeyPrefix("Token"); 54 55 // Configure HTTP bearer authorization: jwt_token 56 HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); 57 jwt_token.setBearerToken("BEARER TOKEN"); 58 59 // Configure API key authorization: oidc_auth 60 ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); 61 oidc_auth.setApiKey("YOUR API KEY"); 62 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 63 //oidc_auth.setApiKeyPrefix("Token"); 64 65 // Configure API key authorization: saml_auth 66 ApiKeyAuth saml_auth = (ApiKeyAuth) defaultClient.getAuthentication("saml_auth"); 67 saml_auth.setApiKey("YOUR API KEY"); 68 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 69 //saml_auth.setApiKeyPrefix("Token"); 70 71 RepositoriesApi apiInstance = new RepositoriesApi(defaultClient); 72 RepositoryCreation repositoryCreation = new RepositoryCreation(); // RepositoryCreation | 73 Boolean bare = false; // Boolean | If true, create a bare repository with no initial commit and branch 74 try { 75 Repository result = apiInstance.createRepository(repositoryCreation, bare); 76 System.out.println(result); 77 } catch (ApiException e) { 78 System.err.println("Exception when calling RepositoriesApi#createRepository"); 79 System.err.println("Status code: " + e.getCode()); 80 System.err.println("Reason: " + e.getResponseBody()); 81 System.err.println("Response headers: " + e.getResponseHeaders()); 82 e.printStackTrace(); 83 } 84 } 85 } 86 ``` 87 88 ### Parameters 89 90 Name | Type | Description | Notes 91 ------------- | ------------- | ------------- | ------------- 92 **repositoryCreation** | [**RepositoryCreation**](RepositoryCreation.md)| | 93 **bare** | **Boolean**| If true, create a bare repository with no initial commit and branch | [optional] [default to false] 94 95 ### Return type 96 97 [**Repository**](Repository.md) 98 99 ### Authorization 100 101 [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) 102 103 ### HTTP request headers 104 105 - **Content-Type**: application/json 106 - **Accept**: application/json 107 108 ### HTTP response details 109 | Status code | Description | Response headers | 110 |-------------|-------------|------------------| 111 **201** | repository | - | 112 **400** | Validation Error | - | 113 **401** | Unauthorized | - | 114 **409** | Resource Conflicts With Target | - | 115 **420** | too many requests | - | 116 **0** | Internal Server Error | - | 117 118 <a name="deleteGCRules"></a> 119 # **deleteGCRules** 120 > deleteGCRules(repository) 121 122 123 124 ### Example 125 ```java 126 // Import classes: 127 import io.lakefs.clients.api.ApiClient; 128 import io.lakefs.clients.api.ApiException; 129 import io.lakefs.clients.api.Configuration; 130 import io.lakefs.clients.api.auth.*; 131 import io.lakefs.clients.api.models.*; 132 import io.lakefs.clients.api.RepositoriesApi; 133 134 public class Example { 135 public static void main(String[] args) { 136 ApiClient defaultClient = Configuration.getDefaultApiClient(); 137 defaultClient.setBasePath("http://localhost/api/v1"); 138 139 // Configure HTTP basic authorization: basic_auth 140 HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); 141 basic_auth.setUsername("YOUR USERNAME"); 142 basic_auth.setPassword("YOUR PASSWORD"); 143 144 // Configure API key authorization: cookie_auth 145 ApiKeyAuth cookie_auth = (ApiKeyAuth) defaultClient.getAuthentication("cookie_auth"); 146 cookie_auth.setApiKey("YOUR API KEY"); 147 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 148 //cookie_auth.setApiKeyPrefix("Token"); 149 150 // Configure HTTP bearer authorization: jwt_token 151 HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); 152 jwt_token.setBearerToken("BEARER TOKEN"); 153 154 // Configure API key authorization: oidc_auth 155 ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); 156 oidc_auth.setApiKey("YOUR API KEY"); 157 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 158 //oidc_auth.setApiKeyPrefix("Token"); 159 160 // Configure API key authorization: saml_auth 161 ApiKeyAuth saml_auth = (ApiKeyAuth) defaultClient.getAuthentication("saml_auth"); 162 saml_auth.setApiKey("YOUR API KEY"); 163 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 164 //saml_auth.setApiKeyPrefix("Token"); 165 166 RepositoriesApi apiInstance = new RepositoriesApi(defaultClient); 167 String repository = "repository_example"; // String | 168 try { 169 apiInstance.deleteGCRules(repository); 170 } catch (ApiException e) { 171 System.err.println("Exception when calling RepositoriesApi#deleteGCRules"); 172 System.err.println("Status code: " + e.getCode()); 173 System.err.println("Reason: " + e.getResponseBody()); 174 System.err.println("Response headers: " + e.getResponseHeaders()); 175 e.printStackTrace(); 176 } 177 } 178 } 179 ``` 180 181 ### Parameters 182 183 Name | Type | Description | Notes 184 ------------- | ------------- | ------------- | ------------- 185 **repository** | **String**| | 186 187 ### Return type 188 189 null (empty response body) 190 191 ### Authorization 192 193 [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) 194 195 ### HTTP request headers 196 197 - **Content-Type**: Not defined 198 - **Accept**: application/json 199 200 ### HTTP response details 201 | Status code | Description | Response headers | 202 |-------------|-------------|------------------| 203 **204** | deleted garbage collection rules successfully | - | 204 **401** | Unauthorized | - | 205 **403** | Forbidden | - | 206 **404** | Resource Not Found | - | 207 **420** | too many requests | - | 208 **0** | Internal Server Error | - | 209 210 <a name="deleteRepository"></a> 211 # **deleteRepository** 212 > deleteRepository(repository, force) 213 214 delete repository 215 216 ### Example 217 ```java 218 // Import classes: 219 import io.lakefs.clients.api.ApiClient; 220 import io.lakefs.clients.api.ApiException; 221 import io.lakefs.clients.api.Configuration; 222 import io.lakefs.clients.api.auth.*; 223 import io.lakefs.clients.api.models.*; 224 import io.lakefs.clients.api.RepositoriesApi; 225 226 public class Example { 227 public static void main(String[] args) { 228 ApiClient defaultClient = Configuration.getDefaultApiClient(); 229 defaultClient.setBasePath("http://localhost/api/v1"); 230 231 // Configure HTTP basic authorization: basic_auth 232 HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); 233 basic_auth.setUsername("YOUR USERNAME"); 234 basic_auth.setPassword("YOUR PASSWORD"); 235 236 // Configure API key authorization: cookie_auth 237 ApiKeyAuth cookie_auth = (ApiKeyAuth) defaultClient.getAuthentication("cookie_auth"); 238 cookie_auth.setApiKey("YOUR API KEY"); 239 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 240 //cookie_auth.setApiKeyPrefix("Token"); 241 242 // Configure HTTP bearer authorization: jwt_token 243 HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); 244 jwt_token.setBearerToken("BEARER TOKEN"); 245 246 // Configure API key authorization: oidc_auth 247 ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); 248 oidc_auth.setApiKey("YOUR API KEY"); 249 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 250 //oidc_auth.setApiKeyPrefix("Token"); 251 252 // Configure API key authorization: saml_auth 253 ApiKeyAuth saml_auth = (ApiKeyAuth) defaultClient.getAuthentication("saml_auth"); 254 saml_auth.setApiKey("YOUR API KEY"); 255 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 256 //saml_auth.setApiKeyPrefix("Token"); 257 258 RepositoriesApi apiInstance = new RepositoriesApi(defaultClient); 259 String repository = "repository_example"; // String | 260 Boolean force = false; // Boolean | Bypass read-only protection and delete the repository 261 try { 262 apiInstance.deleteRepository(repository, force); 263 } catch (ApiException e) { 264 System.err.println("Exception when calling RepositoriesApi#deleteRepository"); 265 System.err.println("Status code: " + e.getCode()); 266 System.err.println("Reason: " + e.getResponseBody()); 267 System.err.println("Response headers: " + e.getResponseHeaders()); 268 e.printStackTrace(); 269 } 270 } 271 } 272 ``` 273 274 ### Parameters 275 276 Name | Type | Description | Notes 277 ------------- | ------------- | ------------- | ------------- 278 **repository** | **String**| | 279 **force** | **Boolean**| Bypass read-only protection and delete the repository | [optional] [default to false] 280 281 ### Return type 282 283 null (empty response body) 284 285 ### Authorization 286 287 [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) 288 289 ### HTTP request headers 290 291 - **Content-Type**: Not defined 292 - **Accept**: application/json 293 294 ### HTTP response details 295 | Status code | Description | Response headers | 296 |-------------|-------------|------------------| 297 **204** | repository deleted successfully | - | 298 **401** | Unauthorized | - | 299 **404** | Resource Not Found | - | 300 **420** | too many requests | - | 301 **0** | Internal Server Error | - | 302 303 <a name="dumpStatus"></a> 304 # **dumpStatus** 305 > RepositoryDumpStatus dumpStatus(repository, taskId) 306 307 Status of a repository dump task 308 309 ### Example 310 ```java 311 // Import classes: 312 import io.lakefs.clients.api.ApiClient; 313 import io.lakefs.clients.api.ApiException; 314 import io.lakefs.clients.api.Configuration; 315 import io.lakefs.clients.api.auth.*; 316 import io.lakefs.clients.api.models.*; 317 import io.lakefs.clients.api.RepositoriesApi; 318 319 public class Example { 320 public static void main(String[] args) { 321 ApiClient defaultClient = Configuration.getDefaultApiClient(); 322 defaultClient.setBasePath("http://localhost/api/v1"); 323 324 // Configure HTTP basic authorization: basic_auth 325 HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); 326 basic_auth.setUsername("YOUR USERNAME"); 327 basic_auth.setPassword("YOUR PASSWORD"); 328 329 // Configure API key authorization: cookie_auth 330 ApiKeyAuth cookie_auth = (ApiKeyAuth) defaultClient.getAuthentication("cookie_auth"); 331 cookie_auth.setApiKey("YOUR API KEY"); 332 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 333 //cookie_auth.setApiKeyPrefix("Token"); 334 335 // Configure HTTP bearer authorization: jwt_token 336 HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); 337 jwt_token.setBearerToken("BEARER TOKEN"); 338 339 // Configure API key authorization: oidc_auth 340 ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); 341 oidc_auth.setApiKey("YOUR API KEY"); 342 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 343 //oidc_auth.setApiKeyPrefix("Token"); 344 345 // Configure API key authorization: saml_auth 346 ApiKeyAuth saml_auth = (ApiKeyAuth) defaultClient.getAuthentication("saml_auth"); 347 saml_auth.setApiKey("YOUR API KEY"); 348 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 349 //saml_auth.setApiKeyPrefix("Token"); 350 351 RepositoriesApi apiInstance = new RepositoriesApi(defaultClient); 352 String repository = "repository_example"; // String | 353 String taskId = "taskId_example"; // String | 354 try { 355 RepositoryDumpStatus result = apiInstance.dumpStatus(repository, taskId); 356 System.out.println(result); 357 } catch (ApiException e) { 358 System.err.println("Exception when calling RepositoriesApi#dumpStatus"); 359 System.err.println("Status code: " + e.getCode()); 360 System.err.println("Reason: " + e.getResponseBody()); 361 System.err.println("Response headers: " + e.getResponseHeaders()); 362 e.printStackTrace(); 363 } 364 } 365 } 366 ``` 367 368 ### Parameters 369 370 Name | Type | Description | Notes 371 ------------- | ------------- | ------------- | ------------- 372 **repository** | **String**| | 373 **taskId** | **String**| | 374 375 ### Return type 376 377 [**RepositoryDumpStatus**](RepositoryDumpStatus.md) 378 379 ### Authorization 380 381 [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) 382 383 ### HTTP request headers 384 385 - **Content-Type**: Not defined 386 - **Accept**: application/json 387 388 ### HTTP response details 389 | Status code | Description | Response headers | 390 |-------------|-------------|------------------| 391 **200** | dump task status | - | 392 **400** | Validation Error | - | 393 **401** | Unauthorized | - | 394 **404** | Resource Not Found | - | 395 **420** | too many requests | - | 396 **0** | Internal Server Error | - | 397 398 <a name="dumpSubmit"></a> 399 # **dumpSubmit** 400 > TaskInfo dumpSubmit(repository) 401 402 Backup the repository metadata (tags, commits, branches) and save the backup to the object store. 403 404 ### Example 405 ```java 406 // Import classes: 407 import io.lakefs.clients.api.ApiClient; 408 import io.lakefs.clients.api.ApiException; 409 import io.lakefs.clients.api.Configuration; 410 import io.lakefs.clients.api.auth.*; 411 import io.lakefs.clients.api.models.*; 412 import io.lakefs.clients.api.RepositoriesApi; 413 414 public class Example { 415 public static void main(String[] args) { 416 ApiClient defaultClient = Configuration.getDefaultApiClient(); 417 defaultClient.setBasePath("http://localhost/api/v1"); 418 419 // Configure HTTP basic authorization: basic_auth 420 HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); 421 basic_auth.setUsername("YOUR USERNAME"); 422 basic_auth.setPassword("YOUR PASSWORD"); 423 424 // Configure API key authorization: cookie_auth 425 ApiKeyAuth cookie_auth = (ApiKeyAuth) defaultClient.getAuthentication("cookie_auth"); 426 cookie_auth.setApiKey("YOUR API KEY"); 427 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 428 //cookie_auth.setApiKeyPrefix("Token"); 429 430 // Configure HTTP bearer authorization: jwt_token 431 HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); 432 jwt_token.setBearerToken("BEARER TOKEN"); 433 434 // Configure API key authorization: oidc_auth 435 ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); 436 oidc_auth.setApiKey("YOUR API KEY"); 437 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 438 //oidc_auth.setApiKeyPrefix("Token"); 439 440 // Configure API key authorization: saml_auth 441 ApiKeyAuth saml_auth = (ApiKeyAuth) defaultClient.getAuthentication("saml_auth"); 442 saml_auth.setApiKey("YOUR API KEY"); 443 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 444 //saml_auth.setApiKeyPrefix("Token"); 445 446 RepositoriesApi apiInstance = new RepositoriesApi(defaultClient); 447 String repository = "repository_example"; // String | 448 try { 449 TaskInfo result = apiInstance.dumpSubmit(repository); 450 System.out.println(result); 451 } catch (ApiException e) { 452 System.err.println("Exception when calling RepositoriesApi#dumpSubmit"); 453 System.err.println("Status code: " + e.getCode()); 454 System.err.println("Reason: " + e.getResponseBody()); 455 System.err.println("Response headers: " + e.getResponseHeaders()); 456 e.printStackTrace(); 457 } 458 } 459 } 460 ``` 461 462 ### Parameters 463 464 Name | Type | Description | Notes 465 ------------- | ------------- | ------------- | ------------- 466 **repository** | **String**| | 467 468 ### Return type 469 470 [**TaskInfo**](TaskInfo.md) 471 472 ### Authorization 473 474 [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) 475 476 ### HTTP request headers 477 478 - **Content-Type**: Not defined 479 - **Accept**: application/json 480 481 ### HTTP response details 482 | Status code | Description | Response headers | 483 |-------------|-------------|------------------| 484 **202** | dump task information | - | 485 **400** | Validation Error | - | 486 **401** | Unauthorized | - | 487 **404** | Resource Not Found | - | 488 **0** | Internal Server Error | - | 489 490 <a name="getBranchProtectionRules"></a> 491 # **getBranchProtectionRules** 492 > List<BranchProtectionRule> getBranchProtectionRules(repository) 493 494 get branch protection rules 495 496 ### Example 497 ```java 498 // Import classes: 499 import io.lakefs.clients.api.ApiClient; 500 import io.lakefs.clients.api.ApiException; 501 import io.lakefs.clients.api.Configuration; 502 import io.lakefs.clients.api.auth.*; 503 import io.lakefs.clients.api.models.*; 504 import io.lakefs.clients.api.RepositoriesApi; 505 506 public class Example { 507 public static void main(String[] args) { 508 ApiClient defaultClient = Configuration.getDefaultApiClient(); 509 defaultClient.setBasePath("http://localhost/api/v1"); 510 511 // Configure HTTP basic authorization: basic_auth 512 HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); 513 basic_auth.setUsername("YOUR USERNAME"); 514 basic_auth.setPassword("YOUR PASSWORD"); 515 516 // Configure API key authorization: cookie_auth 517 ApiKeyAuth cookie_auth = (ApiKeyAuth) defaultClient.getAuthentication("cookie_auth"); 518 cookie_auth.setApiKey("YOUR API KEY"); 519 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 520 //cookie_auth.setApiKeyPrefix("Token"); 521 522 // Configure HTTP bearer authorization: jwt_token 523 HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); 524 jwt_token.setBearerToken("BEARER TOKEN"); 525 526 // Configure API key authorization: oidc_auth 527 ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); 528 oidc_auth.setApiKey("YOUR API KEY"); 529 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 530 //oidc_auth.setApiKeyPrefix("Token"); 531 532 // Configure API key authorization: saml_auth 533 ApiKeyAuth saml_auth = (ApiKeyAuth) defaultClient.getAuthentication("saml_auth"); 534 saml_auth.setApiKey("YOUR API KEY"); 535 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 536 //saml_auth.setApiKeyPrefix("Token"); 537 538 RepositoriesApi apiInstance = new RepositoriesApi(defaultClient); 539 String repository = "repository_example"; // String | 540 try { 541 List<BranchProtectionRule> result = apiInstance.getBranchProtectionRules(repository); 542 System.out.println(result); 543 } catch (ApiException e) { 544 System.err.println("Exception when calling RepositoriesApi#getBranchProtectionRules"); 545 System.err.println("Status code: " + e.getCode()); 546 System.err.println("Reason: " + e.getResponseBody()); 547 System.err.println("Response headers: " + e.getResponseHeaders()); 548 e.printStackTrace(); 549 } 550 } 551 } 552 ``` 553 554 ### Parameters 555 556 Name | Type | Description | Notes 557 ------------- | ------------- | ------------- | ------------- 558 **repository** | **String**| | 559 560 ### Return type 561 562 [**List<BranchProtectionRule>**](BranchProtectionRule.md) 563 564 ### Authorization 565 566 [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) 567 568 ### HTTP request headers 569 570 - **Content-Type**: Not defined 571 - **Accept**: application/json 572 573 ### HTTP response details 574 | Status code | Description | Response headers | 575 |-------------|-------------|------------------| 576 **200** | branch protection rules | * ETag - <br> | 577 **401** | Unauthorized | - | 578 **404** | Resource Not Found | - | 579 **420** | too many requests | - | 580 **0** | Internal Server Error | - | 581 582 <a name="getGCRules"></a> 583 # **getGCRules** 584 > GarbageCollectionRules getGCRules(repository) 585 586 get repository GC rules 587 588 ### Example 589 ```java 590 // Import classes: 591 import io.lakefs.clients.api.ApiClient; 592 import io.lakefs.clients.api.ApiException; 593 import io.lakefs.clients.api.Configuration; 594 import io.lakefs.clients.api.auth.*; 595 import io.lakefs.clients.api.models.*; 596 import io.lakefs.clients.api.RepositoriesApi; 597 598 public class Example { 599 public static void main(String[] args) { 600 ApiClient defaultClient = Configuration.getDefaultApiClient(); 601 defaultClient.setBasePath("http://localhost/api/v1"); 602 603 // Configure HTTP basic authorization: basic_auth 604 HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); 605 basic_auth.setUsername("YOUR USERNAME"); 606 basic_auth.setPassword("YOUR PASSWORD"); 607 608 // Configure API key authorization: cookie_auth 609 ApiKeyAuth cookie_auth = (ApiKeyAuth) defaultClient.getAuthentication("cookie_auth"); 610 cookie_auth.setApiKey("YOUR API KEY"); 611 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 612 //cookie_auth.setApiKeyPrefix("Token"); 613 614 // Configure HTTP bearer authorization: jwt_token 615 HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); 616 jwt_token.setBearerToken("BEARER TOKEN"); 617 618 // Configure API key authorization: oidc_auth 619 ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); 620 oidc_auth.setApiKey("YOUR API KEY"); 621 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 622 //oidc_auth.setApiKeyPrefix("Token"); 623 624 // Configure API key authorization: saml_auth 625 ApiKeyAuth saml_auth = (ApiKeyAuth) defaultClient.getAuthentication("saml_auth"); 626 saml_auth.setApiKey("YOUR API KEY"); 627 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 628 //saml_auth.setApiKeyPrefix("Token"); 629 630 RepositoriesApi apiInstance = new RepositoriesApi(defaultClient); 631 String repository = "repository_example"; // String | 632 try { 633 GarbageCollectionRules result = apiInstance.getGCRules(repository); 634 System.out.println(result); 635 } catch (ApiException e) { 636 System.err.println("Exception when calling RepositoriesApi#getGCRules"); 637 System.err.println("Status code: " + e.getCode()); 638 System.err.println("Reason: " + e.getResponseBody()); 639 System.err.println("Response headers: " + e.getResponseHeaders()); 640 e.printStackTrace(); 641 } 642 } 643 } 644 ``` 645 646 ### Parameters 647 648 Name | Type | Description | Notes 649 ------------- | ------------- | ------------- | ------------- 650 **repository** | **String**| | 651 652 ### Return type 653 654 [**GarbageCollectionRules**](GarbageCollectionRules.md) 655 656 ### Authorization 657 658 [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) 659 660 ### HTTP request headers 661 662 - **Content-Type**: Not defined 663 - **Accept**: application/json 664 665 ### HTTP response details 666 | Status code | Description | Response headers | 667 |-------------|-------------|------------------| 668 **200** | repository GC rules | - | 669 **401** | Unauthorized | - | 670 **404** | Resource Not Found | - | 671 **420** | too many requests | - | 672 **0** | Internal Server Error | - | 673 674 <a name="getRepository"></a> 675 # **getRepository** 676 > Repository getRepository(repository) 677 678 get repository 679 680 ### Example 681 ```java 682 // Import classes: 683 import io.lakefs.clients.api.ApiClient; 684 import io.lakefs.clients.api.ApiException; 685 import io.lakefs.clients.api.Configuration; 686 import io.lakefs.clients.api.auth.*; 687 import io.lakefs.clients.api.models.*; 688 import io.lakefs.clients.api.RepositoriesApi; 689 690 public class Example { 691 public static void main(String[] args) { 692 ApiClient defaultClient = Configuration.getDefaultApiClient(); 693 defaultClient.setBasePath("http://localhost/api/v1"); 694 695 // Configure HTTP basic authorization: basic_auth 696 HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); 697 basic_auth.setUsername("YOUR USERNAME"); 698 basic_auth.setPassword("YOUR PASSWORD"); 699 700 // Configure API key authorization: cookie_auth 701 ApiKeyAuth cookie_auth = (ApiKeyAuth) defaultClient.getAuthentication("cookie_auth"); 702 cookie_auth.setApiKey("YOUR API KEY"); 703 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 704 //cookie_auth.setApiKeyPrefix("Token"); 705 706 // Configure HTTP bearer authorization: jwt_token 707 HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); 708 jwt_token.setBearerToken("BEARER TOKEN"); 709 710 // Configure API key authorization: oidc_auth 711 ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); 712 oidc_auth.setApiKey("YOUR API KEY"); 713 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 714 //oidc_auth.setApiKeyPrefix("Token"); 715 716 // Configure API key authorization: saml_auth 717 ApiKeyAuth saml_auth = (ApiKeyAuth) defaultClient.getAuthentication("saml_auth"); 718 saml_auth.setApiKey("YOUR API KEY"); 719 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 720 //saml_auth.setApiKeyPrefix("Token"); 721 722 RepositoriesApi apiInstance = new RepositoriesApi(defaultClient); 723 String repository = "repository_example"; // String | 724 try { 725 Repository result = apiInstance.getRepository(repository); 726 System.out.println(result); 727 } catch (ApiException e) { 728 System.err.println("Exception when calling RepositoriesApi#getRepository"); 729 System.err.println("Status code: " + e.getCode()); 730 System.err.println("Reason: " + e.getResponseBody()); 731 System.err.println("Response headers: " + e.getResponseHeaders()); 732 e.printStackTrace(); 733 } 734 } 735 } 736 ``` 737 738 ### Parameters 739 740 Name | Type | Description | Notes 741 ------------- | ------------- | ------------- | ------------- 742 **repository** | **String**| | 743 744 ### Return type 745 746 [**Repository**](Repository.md) 747 748 ### Authorization 749 750 [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) 751 752 ### HTTP request headers 753 754 - **Content-Type**: Not defined 755 - **Accept**: application/json 756 757 ### HTTP response details 758 | Status code | Description | Response headers | 759 |-------------|-------------|------------------| 760 **200** | repository | - | 761 **401** | Unauthorized | - | 762 **404** | Resource Not Found | - | 763 **420** | too many requests | - | 764 **0** | Internal Server Error | - | 765 766 <a name="getRepositoryMetadata"></a> 767 # **getRepositoryMetadata** 768 > Map<String, String> getRepositoryMetadata(repository) 769 770 get repository metadata 771 772 ### Example 773 ```java 774 // Import classes: 775 import io.lakefs.clients.api.ApiClient; 776 import io.lakefs.clients.api.ApiException; 777 import io.lakefs.clients.api.Configuration; 778 import io.lakefs.clients.api.auth.*; 779 import io.lakefs.clients.api.models.*; 780 import io.lakefs.clients.api.RepositoriesApi; 781 782 public class Example { 783 public static void main(String[] args) { 784 ApiClient defaultClient = Configuration.getDefaultApiClient(); 785 defaultClient.setBasePath("http://localhost/api/v1"); 786 787 // Configure HTTP basic authorization: basic_auth 788 HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); 789 basic_auth.setUsername("YOUR USERNAME"); 790 basic_auth.setPassword("YOUR PASSWORD"); 791 792 // Configure API key authorization: cookie_auth 793 ApiKeyAuth cookie_auth = (ApiKeyAuth) defaultClient.getAuthentication("cookie_auth"); 794 cookie_auth.setApiKey("YOUR API KEY"); 795 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 796 //cookie_auth.setApiKeyPrefix("Token"); 797 798 // Configure HTTP bearer authorization: jwt_token 799 HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); 800 jwt_token.setBearerToken("BEARER TOKEN"); 801 802 // Configure API key authorization: oidc_auth 803 ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); 804 oidc_auth.setApiKey("YOUR API KEY"); 805 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 806 //oidc_auth.setApiKeyPrefix("Token"); 807 808 // Configure API key authorization: saml_auth 809 ApiKeyAuth saml_auth = (ApiKeyAuth) defaultClient.getAuthentication("saml_auth"); 810 saml_auth.setApiKey("YOUR API KEY"); 811 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 812 //saml_auth.setApiKeyPrefix("Token"); 813 814 RepositoriesApi apiInstance = new RepositoriesApi(defaultClient); 815 String repository = "repository_example"; // String | 816 try { 817 Map<String, String> result = apiInstance.getRepositoryMetadata(repository); 818 System.out.println(result); 819 } catch (ApiException e) { 820 System.err.println("Exception when calling RepositoriesApi#getRepositoryMetadata"); 821 System.err.println("Status code: " + e.getCode()); 822 System.err.println("Reason: " + e.getResponseBody()); 823 System.err.println("Response headers: " + e.getResponseHeaders()); 824 e.printStackTrace(); 825 } 826 } 827 } 828 ``` 829 830 ### Parameters 831 832 Name | Type | Description | Notes 833 ------------- | ------------- | ------------- | ------------- 834 **repository** | **String**| | 835 836 ### Return type 837 838 **Map<String, String>** 839 840 ### Authorization 841 842 [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) 843 844 ### HTTP request headers 845 846 - **Content-Type**: Not defined 847 - **Accept**: application/json 848 849 ### HTTP response details 850 | Status code | Description | Response headers | 851 |-------------|-------------|------------------| 852 **200** | repository metadata | - | 853 **401** | Unauthorized | - | 854 **404** | Resource Not Found | - | 855 **420** | too many requests | - | 856 **0** | Internal Server Error | - | 857 858 <a name="listRepositories"></a> 859 # **listRepositories** 860 > RepositoryList listRepositories(prefix, after, amount) 861 862 list repositories 863 864 ### Example 865 ```java 866 // Import classes: 867 import io.lakefs.clients.api.ApiClient; 868 import io.lakefs.clients.api.ApiException; 869 import io.lakefs.clients.api.Configuration; 870 import io.lakefs.clients.api.auth.*; 871 import io.lakefs.clients.api.models.*; 872 import io.lakefs.clients.api.RepositoriesApi; 873 874 public class Example { 875 public static void main(String[] args) { 876 ApiClient defaultClient = Configuration.getDefaultApiClient(); 877 defaultClient.setBasePath("http://localhost/api/v1"); 878 879 // Configure HTTP basic authorization: basic_auth 880 HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); 881 basic_auth.setUsername("YOUR USERNAME"); 882 basic_auth.setPassword("YOUR PASSWORD"); 883 884 // Configure API key authorization: cookie_auth 885 ApiKeyAuth cookie_auth = (ApiKeyAuth) defaultClient.getAuthentication("cookie_auth"); 886 cookie_auth.setApiKey("YOUR API KEY"); 887 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 888 //cookie_auth.setApiKeyPrefix("Token"); 889 890 // Configure HTTP bearer authorization: jwt_token 891 HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); 892 jwt_token.setBearerToken("BEARER TOKEN"); 893 894 // Configure API key authorization: oidc_auth 895 ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); 896 oidc_auth.setApiKey("YOUR API KEY"); 897 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 898 //oidc_auth.setApiKeyPrefix("Token"); 899 900 // Configure API key authorization: saml_auth 901 ApiKeyAuth saml_auth = (ApiKeyAuth) defaultClient.getAuthentication("saml_auth"); 902 saml_auth.setApiKey("YOUR API KEY"); 903 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 904 //saml_auth.setApiKeyPrefix("Token"); 905 906 RepositoriesApi apiInstance = new RepositoriesApi(defaultClient); 907 String prefix = "prefix_example"; // String | return items prefixed with this value 908 String after = "after_example"; // String | return items after this value 909 Integer amount = 100; // Integer | how many items to return 910 try { 911 RepositoryList result = apiInstance.listRepositories(prefix, after, amount); 912 System.out.println(result); 913 } catch (ApiException e) { 914 System.err.println("Exception when calling RepositoriesApi#listRepositories"); 915 System.err.println("Status code: " + e.getCode()); 916 System.err.println("Reason: " + e.getResponseBody()); 917 System.err.println("Response headers: " + e.getResponseHeaders()); 918 e.printStackTrace(); 919 } 920 } 921 } 922 ``` 923 924 ### Parameters 925 926 Name | Type | Description | Notes 927 ------------- | ------------- | ------------- | ------------- 928 **prefix** | **String**| return items prefixed with this value | [optional] 929 **after** | **String**| return items after this value | [optional] 930 **amount** | **Integer**| how many items to return | [optional] [default to 100] 931 932 ### Return type 933 934 [**RepositoryList**](RepositoryList.md) 935 936 ### Authorization 937 938 [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) 939 940 ### HTTP request headers 941 942 - **Content-Type**: Not defined 943 - **Accept**: application/json 944 945 ### HTTP response details 946 | Status code | Description | Response headers | 947 |-------------|-------------|------------------| 948 **200** | repository list | - | 949 **401** | Unauthorized | - | 950 **420** | too many requests | - | 951 **0** | Internal Server Error | - | 952 953 <a name="restoreStatus"></a> 954 # **restoreStatus** 955 > RepositoryRestoreStatus restoreStatus(repository, taskId) 956 957 Status of a restore request 958 959 ### Example 960 ```java 961 // Import classes: 962 import io.lakefs.clients.api.ApiClient; 963 import io.lakefs.clients.api.ApiException; 964 import io.lakefs.clients.api.Configuration; 965 import io.lakefs.clients.api.auth.*; 966 import io.lakefs.clients.api.models.*; 967 import io.lakefs.clients.api.RepositoriesApi; 968 969 public class Example { 970 public static void main(String[] args) { 971 ApiClient defaultClient = Configuration.getDefaultApiClient(); 972 defaultClient.setBasePath("http://localhost/api/v1"); 973 974 // Configure HTTP basic authorization: basic_auth 975 HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); 976 basic_auth.setUsername("YOUR USERNAME"); 977 basic_auth.setPassword("YOUR PASSWORD"); 978 979 // Configure API key authorization: cookie_auth 980 ApiKeyAuth cookie_auth = (ApiKeyAuth) defaultClient.getAuthentication("cookie_auth"); 981 cookie_auth.setApiKey("YOUR API KEY"); 982 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 983 //cookie_auth.setApiKeyPrefix("Token"); 984 985 // Configure HTTP bearer authorization: jwt_token 986 HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); 987 jwt_token.setBearerToken("BEARER TOKEN"); 988 989 // Configure API key authorization: oidc_auth 990 ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); 991 oidc_auth.setApiKey("YOUR API KEY"); 992 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 993 //oidc_auth.setApiKeyPrefix("Token"); 994 995 // Configure API key authorization: saml_auth 996 ApiKeyAuth saml_auth = (ApiKeyAuth) defaultClient.getAuthentication("saml_auth"); 997 saml_auth.setApiKey("YOUR API KEY"); 998 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 999 //saml_auth.setApiKeyPrefix("Token"); 1000 1001 RepositoriesApi apiInstance = new RepositoriesApi(defaultClient); 1002 String repository = "repository_example"; // String | 1003 String taskId = "taskId_example"; // String | 1004 try { 1005 RepositoryRestoreStatus result = apiInstance.restoreStatus(repository, taskId); 1006 System.out.println(result); 1007 } catch (ApiException e) { 1008 System.err.println("Exception when calling RepositoriesApi#restoreStatus"); 1009 System.err.println("Status code: " + e.getCode()); 1010 System.err.println("Reason: " + e.getResponseBody()); 1011 System.err.println("Response headers: " + e.getResponseHeaders()); 1012 e.printStackTrace(); 1013 } 1014 } 1015 } 1016 ``` 1017 1018 ### Parameters 1019 1020 Name | Type | Description | Notes 1021 ------------- | ------------- | ------------- | ------------- 1022 **repository** | **String**| | 1023 **taskId** | **String**| | 1024 1025 ### Return type 1026 1027 [**RepositoryRestoreStatus**](RepositoryRestoreStatus.md) 1028 1029 ### Authorization 1030 1031 [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) 1032 1033 ### HTTP request headers 1034 1035 - **Content-Type**: Not defined 1036 - **Accept**: application/json 1037 1038 ### HTTP response details 1039 | Status code | Description | Response headers | 1040 |-------------|-------------|------------------| 1041 **200** | restore task status | - | 1042 **400** | Validation Error | - | 1043 **401** | Unauthorized | - | 1044 **404** | Resource Not Found | - | 1045 **420** | too many requests | - | 1046 **0** | Internal Server Error | - | 1047 1048 <a name="restoreSubmit"></a> 1049 # **restoreSubmit** 1050 > TaskInfo restoreSubmit(repository, refsRestore) 1051 1052 Restore repository from a dump in the object store 1053 1054 ### Example 1055 ```java 1056 // Import classes: 1057 import io.lakefs.clients.api.ApiClient; 1058 import io.lakefs.clients.api.ApiException; 1059 import io.lakefs.clients.api.Configuration; 1060 import io.lakefs.clients.api.auth.*; 1061 import io.lakefs.clients.api.models.*; 1062 import io.lakefs.clients.api.RepositoriesApi; 1063 1064 public class Example { 1065 public static void main(String[] args) { 1066 ApiClient defaultClient = Configuration.getDefaultApiClient(); 1067 defaultClient.setBasePath("http://localhost/api/v1"); 1068 1069 // Configure HTTP basic authorization: basic_auth 1070 HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); 1071 basic_auth.setUsername("YOUR USERNAME"); 1072 basic_auth.setPassword("YOUR PASSWORD"); 1073 1074 // Configure API key authorization: cookie_auth 1075 ApiKeyAuth cookie_auth = (ApiKeyAuth) defaultClient.getAuthentication("cookie_auth"); 1076 cookie_auth.setApiKey("YOUR API KEY"); 1077 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 1078 //cookie_auth.setApiKeyPrefix("Token"); 1079 1080 // Configure HTTP bearer authorization: jwt_token 1081 HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); 1082 jwt_token.setBearerToken("BEARER TOKEN"); 1083 1084 // Configure API key authorization: oidc_auth 1085 ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); 1086 oidc_auth.setApiKey("YOUR API KEY"); 1087 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 1088 //oidc_auth.setApiKeyPrefix("Token"); 1089 1090 // Configure API key authorization: saml_auth 1091 ApiKeyAuth saml_auth = (ApiKeyAuth) defaultClient.getAuthentication("saml_auth"); 1092 saml_auth.setApiKey("YOUR API KEY"); 1093 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 1094 //saml_auth.setApiKeyPrefix("Token"); 1095 1096 RepositoriesApi apiInstance = new RepositoriesApi(defaultClient); 1097 String repository = "repository_example"; // String | 1098 RefsRestore refsRestore = new RefsRestore(); // RefsRestore | 1099 try { 1100 TaskInfo result = apiInstance.restoreSubmit(repository, refsRestore); 1101 System.out.println(result); 1102 } catch (ApiException e) { 1103 System.err.println("Exception when calling RepositoriesApi#restoreSubmit"); 1104 System.err.println("Status code: " + e.getCode()); 1105 System.err.println("Reason: " + e.getResponseBody()); 1106 System.err.println("Response headers: " + e.getResponseHeaders()); 1107 e.printStackTrace(); 1108 } 1109 } 1110 } 1111 ``` 1112 1113 ### Parameters 1114 1115 Name | Type | Description | Notes 1116 ------------- | ------------- | ------------- | ------------- 1117 **repository** | **String**| | 1118 **refsRestore** | [**RefsRestore**](RefsRestore.md)| | 1119 1120 ### Return type 1121 1122 [**TaskInfo**](TaskInfo.md) 1123 1124 ### Authorization 1125 1126 [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) 1127 1128 ### HTTP request headers 1129 1130 - **Content-Type**: application/json 1131 - **Accept**: application/json 1132 1133 ### HTTP response details 1134 | Status code | Description | Response headers | 1135 |-------------|-------------|------------------| 1136 **202** | restore task created | - | 1137 **400** | Validation Error | - | 1138 **403** | Forbidden | - | 1139 **401** | Unauthorized | - | 1140 **404** | Resource Not Found | - | 1141 **0** | Internal Server Error | - | 1142 1143 <a name="setBranchProtectionRules"></a> 1144 # **setBranchProtectionRules** 1145 > setBranchProtectionRules(repository, branchProtectionRule, ifMatch) 1146 1147 1148 1149 ### Example 1150 ```java 1151 // Import classes: 1152 import io.lakefs.clients.api.ApiClient; 1153 import io.lakefs.clients.api.ApiException; 1154 import io.lakefs.clients.api.Configuration; 1155 import io.lakefs.clients.api.auth.*; 1156 import io.lakefs.clients.api.models.*; 1157 import io.lakefs.clients.api.RepositoriesApi; 1158 1159 public class Example { 1160 public static void main(String[] args) { 1161 ApiClient defaultClient = Configuration.getDefaultApiClient(); 1162 defaultClient.setBasePath("http://localhost/api/v1"); 1163 1164 // Configure HTTP basic authorization: basic_auth 1165 HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); 1166 basic_auth.setUsername("YOUR USERNAME"); 1167 basic_auth.setPassword("YOUR PASSWORD"); 1168 1169 // Configure API key authorization: cookie_auth 1170 ApiKeyAuth cookie_auth = (ApiKeyAuth) defaultClient.getAuthentication("cookie_auth"); 1171 cookie_auth.setApiKey("YOUR API KEY"); 1172 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 1173 //cookie_auth.setApiKeyPrefix("Token"); 1174 1175 // Configure HTTP bearer authorization: jwt_token 1176 HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); 1177 jwt_token.setBearerToken("BEARER TOKEN"); 1178 1179 // Configure API key authorization: oidc_auth 1180 ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); 1181 oidc_auth.setApiKey("YOUR API KEY"); 1182 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 1183 //oidc_auth.setApiKeyPrefix("Token"); 1184 1185 // Configure API key authorization: saml_auth 1186 ApiKeyAuth saml_auth = (ApiKeyAuth) defaultClient.getAuthentication("saml_auth"); 1187 saml_auth.setApiKey("YOUR API KEY"); 1188 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 1189 //saml_auth.setApiKeyPrefix("Token"); 1190 1191 RepositoriesApi apiInstance = new RepositoriesApi(defaultClient); 1192 String repository = "repository_example"; // String | 1193 List<BranchProtectionRule> branchProtectionRule = Arrays.asList(); // List<BranchProtectionRule> | 1194 String ifMatch = "ifMatch_example"; // String | if provided, the branch protection rules will be updated only if the current ETag match the provided value 1195 try { 1196 apiInstance.setBranchProtectionRules(repository, branchProtectionRule, ifMatch); 1197 } catch (ApiException e) { 1198 System.err.println("Exception when calling RepositoriesApi#setBranchProtectionRules"); 1199 System.err.println("Status code: " + e.getCode()); 1200 System.err.println("Reason: " + e.getResponseBody()); 1201 System.err.println("Response headers: " + e.getResponseHeaders()); 1202 e.printStackTrace(); 1203 } 1204 } 1205 } 1206 ``` 1207 1208 ### Parameters 1209 1210 Name | Type | Description | Notes 1211 ------------- | ------------- | ------------- | ------------- 1212 **repository** | **String**| | 1213 **branchProtectionRule** | [**List<BranchProtectionRule>**](BranchProtectionRule.md)| | 1214 **ifMatch** | **String**| if provided, the branch protection rules will be updated only if the current ETag match the provided value | [optional] 1215 1216 ### Return type 1217 1218 null (empty response body) 1219 1220 ### Authorization 1221 1222 [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) 1223 1224 ### HTTP request headers 1225 1226 - **Content-Type**: application/json 1227 - **Accept**: application/json 1228 1229 ### HTTP response details 1230 | Status code | Description | Response headers | 1231 |-------------|-------------|------------------| 1232 **204** | branch protection rule created successfully | - | 1233 **400** | Bad Request | - | 1234 **401** | Unauthorized | - | 1235 **403** | Forbidden | - | 1236 **404** | Resource Not Found | - | 1237 **412** | Precondition Failed | - | 1238 **420** | too many requests | - | 1239 **0** | Internal Server Error | - | 1240 1241 <a name="setGCRules"></a> 1242 # **setGCRules** 1243 > setGCRules(repository, garbageCollectionRules) 1244 1245 1246 1247 ### Example 1248 ```java 1249 // Import classes: 1250 import io.lakefs.clients.api.ApiClient; 1251 import io.lakefs.clients.api.ApiException; 1252 import io.lakefs.clients.api.Configuration; 1253 import io.lakefs.clients.api.auth.*; 1254 import io.lakefs.clients.api.models.*; 1255 import io.lakefs.clients.api.RepositoriesApi; 1256 1257 public class Example { 1258 public static void main(String[] args) { 1259 ApiClient defaultClient = Configuration.getDefaultApiClient(); 1260 defaultClient.setBasePath("http://localhost/api/v1"); 1261 1262 // Configure HTTP basic authorization: basic_auth 1263 HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); 1264 basic_auth.setUsername("YOUR USERNAME"); 1265 basic_auth.setPassword("YOUR PASSWORD"); 1266 1267 // Configure API key authorization: cookie_auth 1268 ApiKeyAuth cookie_auth = (ApiKeyAuth) defaultClient.getAuthentication("cookie_auth"); 1269 cookie_auth.setApiKey("YOUR API KEY"); 1270 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 1271 //cookie_auth.setApiKeyPrefix("Token"); 1272 1273 // Configure HTTP bearer authorization: jwt_token 1274 HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); 1275 jwt_token.setBearerToken("BEARER TOKEN"); 1276 1277 // Configure API key authorization: oidc_auth 1278 ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); 1279 oidc_auth.setApiKey("YOUR API KEY"); 1280 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 1281 //oidc_auth.setApiKeyPrefix("Token"); 1282 1283 // Configure API key authorization: saml_auth 1284 ApiKeyAuth saml_auth = (ApiKeyAuth) defaultClient.getAuthentication("saml_auth"); 1285 saml_auth.setApiKey("YOUR API KEY"); 1286 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 1287 //saml_auth.setApiKeyPrefix("Token"); 1288 1289 RepositoriesApi apiInstance = new RepositoriesApi(defaultClient); 1290 String repository = "repository_example"; // String | 1291 GarbageCollectionRules garbageCollectionRules = new GarbageCollectionRules(); // GarbageCollectionRules | 1292 try { 1293 apiInstance.setGCRules(repository, garbageCollectionRules); 1294 } catch (ApiException e) { 1295 System.err.println("Exception when calling RepositoriesApi#setGCRules"); 1296 System.err.println("Status code: " + e.getCode()); 1297 System.err.println("Reason: " + e.getResponseBody()); 1298 System.err.println("Response headers: " + e.getResponseHeaders()); 1299 e.printStackTrace(); 1300 } 1301 } 1302 } 1303 ``` 1304 1305 ### Parameters 1306 1307 Name | Type | Description | Notes 1308 ------------- | ------------- | ------------- | ------------- 1309 **repository** | **String**| | 1310 **garbageCollectionRules** | [**GarbageCollectionRules**](GarbageCollectionRules.md)| | 1311 1312 ### Return type 1313 1314 null (empty response body) 1315 1316 ### Authorization 1317 1318 [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) 1319 1320 ### HTTP request headers 1321 1322 - **Content-Type**: application/json 1323 - **Accept**: application/json 1324 1325 ### HTTP response details 1326 | Status code | Description | Response headers | 1327 |-------------|-------------|------------------| 1328 **204** | set garbage collection rules successfully | - | 1329 **401** | Unauthorized | - | 1330 **403** | Forbidden | - | 1331 **404** | Resource Not Found | - | 1332 **420** | too many requests | - | 1333 **0** | Internal Server Error | - | 1334