github.com/treeverse/lakefs@v1.24.1-0.20240520134607-95648127bfb0/clients/java-legacy/docs/AuthApi.md (about) 1 # AuthApi 2 3 All URIs are relative to *http://localhost/api/v1* 4 5 Method | HTTP request | Description 6 ------------- | ------------- | ------------- 7 [**addGroupMembership**](AuthApi.md#addGroupMembership) | **PUT** /auth/groups/{groupId}/members/{userId} | add group membership 8 [**attachPolicyToGroup**](AuthApi.md#attachPolicyToGroup) | **PUT** /auth/groups/{groupId}/policies/{policyId} | attach policy to group 9 [**attachPolicyToUser**](AuthApi.md#attachPolicyToUser) | **PUT** /auth/users/{userId}/policies/{policyId} | attach policy to user 10 [**createCredentials**](AuthApi.md#createCredentials) | **POST** /auth/users/{userId}/credentials | create credentials 11 [**createGroup**](AuthApi.md#createGroup) | **POST** /auth/groups | create group 12 [**createPolicy**](AuthApi.md#createPolicy) | **POST** /auth/policies | create policy 13 [**createUser**](AuthApi.md#createUser) | **POST** /auth/users | create user 14 [**createUserExternalPrincipal**](AuthApi.md#createUserExternalPrincipal) | **POST** /auth/users/{userId}/external/principals | attach external principal to user 15 [**deleteCredentials**](AuthApi.md#deleteCredentials) | **DELETE** /auth/users/{userId}/credentials/{accessKeyId} | delete credentials 16 [**deleteGroup**](AuthApi.md#deleteGroup) | **DELETE** /auth/groups/{groupId} | delete group 17 [**deleteGroupMembership**](AuthApi.md#deleteGroupMembership) | **DELETE** /auth/groups/{groupId}/members/{userId} | delete group membership 18 [**deletePolicy**](AuthApi.md#deletePolicy) | **DELETE** /auth/policies/{policyId} | delete policy 19 [**deleteUser**](AuthApi.md#deleteUser) | **DELETE** /auth/users/{userId} | delete user 20 [**deleteUserExternalPrincipal**](AuthApi.md#deleteUserExternalPrincipal) | **DELETE** /auth/users/{userId}/external/principals | delete external principal from user 21 [**detachPolicyFromGroup**](AuthApi.md#detachPolicyFromGroup) | **DELETE** /auth/groups/{groupId}/policies/{policyId} | detach policy from group 22 [**detachPolicyFromUser**](AuthApi.md#detachPolicyFromUser) | **DELETE** /auth/users/{userId}/policies/{policyId} | detach policy from user 23 [**externalPrincipalLogin**](AuthApi.md#externalPrincipalLogin) | **POST** /auth/external/principal/login | perform a login using an external authenticator 24 [**getCredentials**](AuthApi.md#getCredentials) | **GET** /auth/users/{userId}/credentials/{accessKeyId} | get credentials 25 [**getCurrentUser**](AuthApi.md#getCurrentUser) | **GET** /user | get current user 26 [**getExternalPrincipal**](AuthApi.md#getExternalPrincipal) | **GET** /auth/external/principals | describe external principal by id 27 [**getGroup**](AuthApi.md#getGroup) | **GET** /auth/groups/{groupId} | get group 28 [**getGroupACL**](AuthApi.md#getGroupACL) | **GET** /auth/groups/{groupId}/acl | get ACL of group 29 [**getPolicy**](AuthApi.md#getPolicy) | **GET** /auth/policies/{policyId} | get policy 30 [**getUser**](AuthApi.md#getUser) | **GET** /auth/users/{userId} | get user 31 [**listGroupMembers**](AuthApi.md#listGroupMembers) | **GET** /auth/groups/{groupId}/members | list group members 32 [**listGroupPolicies**](AuthApi.md#listGroupPolicies) | **GET** /auth/groups/{groupId}/policies | list group policies 33 [**listGroups**](AuthApi.md#listGroups) | **GET** /auth/groups | list groups 34 [**listPolicies**](AuthApi.md#listPolicies) | **GET** /auth/policies | list policies 35 [**listUserCredentials**](AuthApi.md#listUserCredentials) | **GET** /auth/users/{userId}/credentials | list user credentials 36 [**listUserExternalPrincipals**](AuthApi.md#listUserExternalPrincipals) | **GET** /auth/users/{userId}/external/principals/ls | list user external policies attached to a user 37 [**listUserGroups**](AuthApi.md#listUserGroups) | **GET** /auth/users/{userId}/groups | list user groups 38 [**listUserPolicies**](AuthApi.md#listUserPolicies) | **GET** /auth/users/{userId}/policies | list user policies 39 [**listUsers**](AuthApi.md#listUsers) | **GET** /auth/users | list users 40 [**login**](AuthApi.md#login) | **POST** /auth/login | perform a login 41 [**setGroupACL**](AuthApi.md#setGroupACL) | **POST** /auth/groups/{groupId}/acl | set ACL of group 42 [**updatePolicy**](AuthApi.md#updatePolicy) | **PUT** /auth/policies/{policyId} | update policy 43 44 45 <a name="addGroupMembership"></a> 46 # **addGroupMembership** 47 > addGroupMembership(groupId, userId) 48 49 add group membership 50 51 ### Example 52 ```java 53 // Import classes: 54 import io.lakefs.clients.api.ApiClient; 55 import io.lakefs.clients.api.ApiException; 56 import io.lakefs.clients.api.Configuration; 57 import io.lakefs.clients.api.auth.*; 58 import io.lakefs.clients.api.models.*; 59 import io.lakefs.clients.api.AuthApi; 60 61 public class Example { 62 public static void main(String[] args) { 63 ApiClient defaultClient = Configuration.getDefaultApiClient(); 64 defaultClient.setBasePath("http://localhost/api/v1"); 65 66 // Configure HTTP basic authorization: basic_auth 67 HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); 68 basic_auth.setUsername("YOUR USERNAME"); 69 basic_auth.setPassword("YOUR PASSWORD"); 70 71 // Configure API key authorization: cookie_auth 72 ApiKeyAuth cookie_auth = (ApiKeyAuth) defaultClient.getAuthentication("cookie_auth"); 73 cookie_auth.setApiKey("YOUR API KEY"); 74 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 75 //cookie_auth.setApiKeyPrefix("Token"); 76 77 // Configure HTTP bearer authorization: jwt_token 78 HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); 79 jwt_token.setBearerToken("BEARER TOKEN"); 80 81 // Configure API key authorization: oidc_auth 82 ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); 83 oidc_auth.setApiKey("YOUR API KEY"); 84 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 85 //oidc_auth.setApiKeyPrefix("Token"); 86 87 // Configure API key authorization: saml_auth 88 ApiKeyAuth saml_auth = (ApiKeyAuth) defaultClient.getAuthentication("saml_auth"); 89 saml_auth.setApiKey("YOUR API KEY"); 90 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 91 //saml_auth.setApiKeyPrefix("Token"); 92 93 AuthApi apiInstance = new AuthApi(defaultClient); 94 String groupId = "groupId_example"; // String | 95 String userId = "userId_example"; // String | 96 try { 97 apiInstance.addGroupMembership(groupId, userId); 98 } catch (ApiException e) { 99 System.err.println("Exception when calling AuthApi#addGroupMembership"); 100 System.err.println("Status code: " + e.getCode()); 101 System.err.println("Reason: " + e.getResponseBody()); 102 System.err.println("Response headers: " + e.getResponseHeaders()); 103 e.printStackTrace(); 104 } 105 } 106 } 107 ``` 108 109 ### Parameters 110 111 Name | Type | Description | Notes 112 ------------- | ------------- | ------------- | ------------- 113 **groupId** | **String**| | 114 **userId** | **String**| | 115 116 ### Return type 117 118 null (empty response body) 119 120 ### Authorization 121 122 [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) 123 124 ### HTTP request headers 125 126 - **Content-Type**: Not defined 127 - **Accept**: application/json 128 129 ### HTTP response details 130 | Status code | Description | Response headers | 131 |-------------|-------------|------------------| 132 **201** | membership added successfully | - | 133 **401** | Unauthorized | - | 134 **404** | Resource Not Found | - | 135 **420** | too many requests | - | 136 **0** | Internal Server Error | - | 137 138 <a name="attachPolicyToGroup"></a> 139 # **attachPolicyToGroup** 140 > attachPolicyToGroup(groupId, policyId) 141 142 attach policy to group 143 144 ### Example 145 ```java 146 // Import classes: 147 import io.lakefs.clients.api.ApiClient; 148 import io.lakefs.clients.api.ApiException; 149 import io.lakefs.clients.api.Configuration; 150 import io.lakefs.clients.api.auth.*; 151 import io.lakefs.clients.api.models.*; 152 import io.lakefs.clients.api.AuthApi; 153 154 public class Example { 155 public static void main(String[] args) { 156 ApiClient defaultClient = Configuration.getDefaultApiClient(); 157 defaultClient.setBasePath("http://localhost/api/v1"); 158 159 // Configure HTTP basic authorization: basic_auth 160 HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); 161 basic_auth.setUsername("YOUR USERNAME"); 162 basic_auth.setPassword("YOUR PASSWORD"); 163 164 // Configure API key authorization: cookie_auth 165 ApiKeyAuth cookie_auth = (ApiKeyAuth) defaultClient.getAuthentication("cookie_auth"); 166 cookie_auth.setApiKey("YOUR API KEY"); 167 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 168 //cookie_auth.setApiKeyPrefix("Token"); 169 170 // Configure HTTP bearer authorization: jwt_token 171 HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); 172 jwt_token.setBearerToken("BEARER TOKEN"); 173 174 // Configure API key authorization: oidc_auth 175 ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); 176 oidc_auth.setApiKey("YOUR API KEY"); 177 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 178 //oidc_auth.setApiKeyPrefix("Token"); 179 180 // Configure API key authorization: saml_auth 181 ApiKeyAuth saml_auth = (ApiKeyAuth) defaultClient.getAuthentication("saml_auth"); 182 saml_auth.setApiKey("YOUR API KEY"); 183 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 184 //saml_auth.setApiKeyPrefix("Token"); 185 186 AuthApi apiInstance = new AuthApi(defaultClient); 187 String groupId = "groupId_example"; // String | 188 String policyId = "policyId_example"; // String | 189 try { 190 apiInstance.attachPolicyToGroup(groupId, policyId); 191 } catch (ApiException e) { 192 System.err.println("Exception when calling AuthApi#attachPolicyToGroup"); 193 System.err.println("Status code: " + e.getCode()); 194 System.err.println("Reason: " + e.getResponseBody()); 195 System.err.println("Response headers: " + e.getResponseHeaders()); 196 e.printStackTrace(); 197 } 198 } 199 } 200 ``` 201 202 ### Parameters 203 204 Name | Type | Description | Notes 205 ------------- | ------------- | ------------- | ------------- 206 **groupId** | **String**| | 207 **policyId** | **String**| | 208 209 ### Return type 210 211 null (empty response body) 212 213 ### Authorization 214 215 [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) 216 217 ### HTTP request headers 218 219 - **Content-Type**: Not defined 220 - **Accept**: application/json 221 222 ### HTTP response details 223 | Status code | Description | Response headers | 224 |-------------|-------------|------------------| 225 **201** | policy attached successfully | - | 226 **401** | Unauthorized | - | 227 **404** | Resource Not Found | - | 228 **420** | too many requests | - | 229 **0** | Internal Server Error | - | 230 231 <a name="attachPolicyToUser"></a> 232 # **attachPolicyToUser** 233 > attachPolicyToUser(userId, policyId) 234 235 attach policy to user 236 237 ### Example 238 ```java 239 // Import classes: 240 import io.lakefs.clients.api.ApiClient; 241 import io.lakefs.clients.api.ApiException; 242 import io.lakefs.clients.api.Configuration; 243 import io.lakefs.clients.api.auth.*; 244 import io.lakefs.clients.api.models.*; 245 import io.lakefs.clients.api.AuthApi; 246 247 public class Example { 248 public static void main(String[] args) { 249 ApiClient defaultClient = Configuration.getDefaultApiClient(); 250 defaultClient.setBasePath("http://localhost/api/v1"); 251 252 // Configure HTTP basic authorization: basic_auth 253 HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); 254 basic_auth.setUsername("YOUR USERNAME"); 255 basic_auth.setPassword("YOUR PASSWORD"); 256 257 // Configure API key authorization: cookie_auth 258 ApiKeyAuth cookie_auth = (ApiKeyAuth) defaultClient.getAuthentication("cookie_auth"); 259 cookie_auth.setApiKey("YOUR API KEY"); 260 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 261 //cookie_auth.setApiKeyPrefix("Token"); 262 263 // Configure HTTP bearer authorization: jwt_token 264 HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); 265 jwt_token.setBearerToken("BEARER TOKEN"); 266 267 // Configure API key authorization: oidc_auth 268 ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); 269 oidc_auth.setApiKey("YOUR API KEY"); 270 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 271 //oidc_auth.setApiKeyPrefix("Token"); 272 273 // Configure API key authorization: saml_auth 274 ApiKeyAuth saml_auth = (ApiKeyAuth) defaultClient.getAuthentication("saml_auth"); 275 saml_auth.setApiKey("YOUR API KEY"); 276 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 277 //saml_auth.setApiKeyPrefix("Token"); 278 279 AuthApi apiInstance = new AuthApi(defaultClient); 280 String userId = "userId_example"; // String | 281 String policyId = "policyId_example"; // String | 282 try { 283 apiInstance.attachPolicyToUser(userId, policyId); 284 } catch (ApiException e) { 285 System.err.println("Exception when calling AuthApi#attachPolicyToUser"); 286 System.err.println("Status code: " + e.getCode()); 287 System.err.println("Reason: " + e.getResponseBody()); 288 System.err.println("Response headers: " + e.getResponseHeaders()); 289 e.printStackTrace(); 290 } 291 } 292 } 293 ``` 294 295 ### Parameters 296 297 Name | Type | Description | Notes 298 ------------- | ------------- | ------------- | ------------- 299 **userId** | **String**| | 300 **policyId** | **String**| | 301 302 ### Return type 303 304 null (empty response body) 305 306 ### Authorization 307 308 [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) 309 310 ### HTTP request headers 311 312 - **Content-Type**: Not defined 313 - **Accept**: application/json 314 315 ### HTTP response details 316 | Status code | Description | Response headers | 317 |-------------|-------------|------------------| 318 **201** | policy attached successfully | - | 319 **401** | Unauthorized | - | 320 **404** | Resource Not Found | - | 321 **420** | too many requests | - | 322 **0** | Internal Server Error | - | 323 324 <a name="createCredentials"></a> 325 # **createCredentials** 326 > CredentialsWithSecret createCredentials(userId) 327 328 create credentials 329 330 ### Example 331 ```java 332 // Import classes: 333 import io.lakefs.clients.api.ApiClient; 334 import io.lakefs.clients.api.ApiException; 335 import io.lakefs.clients.api.Configuration; 336 import io.lakefs.clients.api.auth.*; 337 import io.lakefs.clients.api.models.*; 338 import io.lakefs.clients.api.AuthApi; 339 340 public class Example { 341 public static void main(String[] args) { 342 ApiClient defaultClient = Configuration.getDefaultApiClient(); 343 defaultClient.setBasePath("http://localhost/api/v1"); 344 345 // Configure HTTP basic authorization: basic_auth 346 HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); 347 basic_auth.setUsername("YOUR USERNAME"); 348 basic_auth.setPassword("YOUR PASSWORD"); 349 350 // Configure API key authorization: cookie_auth 351 ApiKeyAuth cookie_auth = (ApiKeyAuth) defaultClient.getAuthentication("cookie_auth"); 352 cookie_auth.setApiKey("YOUR API KEY"); 353 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 354 //cookie_auth.setApiKeyPrefix("Token"); 355 356 // Configure HTTP bearer authorization: jwt_token 357 HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); 358 jwt_token.setBearerToken("BEARER TOKEN"); 359 360 // Configure API key authorization: oidc_auth 361 ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); 362 oidc_auth.setApiKey("YOUR API KEY"); 363 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 364 //oidc_auth.setApiKeyPrefix("Token"); 365 366 // Configure API key authorization: saml_auth 367 ApiKeyAuth saml_auth = (ApiKeyAuth) defaultClient.getAuthentication("saml_auth"); 368 saml_auth.setApiKey("YOUR API KEY"); 369 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 370 //saml_auth.setApiKeyPrefix("Token"); 371 372 AuthApi apiInstance = new AuthApi(defaultClient); 373 String userId = "userId_example"; // String | 374 try { 375 CredentialsWithSecret result = apiInstance.createCredentials(userId); 376 System.out.println(result); 377 } catch (ApiException e) { 378 System.err.println("Exception when calling AuthApi#createCredentials"); 379 System.err.println("Status code: " + e.getCode()); 380 System.err.println("Reason: " + e.getResponseBody()); 381 System.err.println("Response headers: " + e.getResponseHeaders()); 382 e.printStackTrace(); 383 } 384 } 385 } 386 ``` 387 388 ### Parameters 389 390 Name | Type | Description | Notes 391 ------------- | ------------- | ------------- | ------------- 392 **userId** | **String**| | 393 394 ### Return type 395 396 [**CredentialsWithSecret**](CredentialsWithSecret.md) 397 398 ### Authorization 399 400 [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) 401 402 ### HTTP request headers 403 404 - **Content-Type**: Not defined 405 - **Accept**: application/json 406 407 ### HTTP response details 408 | Status code | Description | Response headers | 409 |-------------|-------------|------------------| 410 **201** | credentials | - | 411 **401** | Unauthorized | - | 412 **404** | Resource Not Found | - | 413 **420** | too many requests | - | 414 **0** | Internal Server Error | - | 415 416 <a name="createGroup"></a> 417 # **createGroup** 418 > Group createGroup(groupCreation) 419 420 create group 421 422 ### Example 423 ```java 424 // Import classes: 425 import io.lakefs.clients.api.ApiClient; 426 import io.lakefs.clients.api.ApiException; 427 import io.lakefs.clients.api.Configuration; 428 import io.lakefs.clients.api.auth.*; 429 import io.lakefs.clients.api.models.*; 430 import io.lakefs.clients.api.AuthApi; 431 432 public class Example { 433 public static void main(String[] args) { 434 ApiClient defaultClient = Configuration.getDefaultApiClient(); 435 defaultClient.setBasePath("http://localhost/api/v1"); 436 437 // Configure HTTP basic authorization: basic_auth 438 HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); 439 basic_auth.setUsername("YOUR USERNAME"); 440 basic_auth.setPassword("YOUR PASSWORD"); 441 442 // Configure API key authorization: cookie_auth 443 ApiKeyAuth cookie_auth = (ApiKeyAuth) defaultClient.getAuthentication("cookie_auth"); 444 cookie_auth.setApiKey("YOUR API KEY"); 445 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 446 //cookie_auth.setApiKeyPrefix("Token"); 447 448 // Configure HTTP bearer authorization: jwt_token 449 HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); 450 jwt_token.setBearerToken("BEARER TOKEN"); 451 452 // Configure API key authorization: oidc_auth 453 ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); 454 oidc_auth.setApiKey("YOUR API KEY"); 455 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 456 //oidc_auth.setApiKeyPrefix("Token"); 457 458 // Configure API key authorization: saml_auth 459 ApiKeyAuth saml_auth = (ApiKeyAuth) defaultClient.getAuthentication("saml_auth"); 460 saml_auth.setApiKey("YOUR API KEY"); 461 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 462 //saml_auth.setApiKeyPrefix("Token"); 463 464 AuthApi apiInstance = new AuthApi(defaultClient); 465 GroupCreation groupCreation = new GroupCreation(); // GroupCreation | 466 try { 467 Group result = apiInstance.createGroup(groupCreation); 468 System.out.println(result); 469 } catch (ApiException e) { 470 System.err.println("Exception when calling AuthApi#createGroup"); 471 System.err.println("Status code: " + e.getCode()); 472 System.err.println("Reason: " + e.getResponseBody()); 473 System.err.println("Response headers: " + e.getResponseHeaders()); 474 e.printStackTrace(); 475 } 476 } 477 } 478 ``` 479 480 ### Parameters 481 482 Name | Type | Description | Notes 483 ------------- | ------------- | ------------- | ------------- 484 **groupCreation** | [**GroupCreation**](GroupCreation.md)| | [optional] 485 486 ### Return type 487 488 [**Group**](Group.md) 489 490 ### Authorization 491 492 [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) 493 494 ### HTTP request headers 495 496 - **Content-Type**: application/json 497 - **Accept**: application/json 498 499 ### HTTP response details 500 | Status code | Description | Response headers | 501 |-------------|-------------|------------------| 502 **201** | group | - | 503 **401** | Unauthorized | - | 504 **404** | Resource Not Found | - | 505 **420** | too many requests | - | 506 **0** | Internal Server Error | - | 507 508 <a name="createPolicy"></a> 509 # **createPolicy** 510 > Policy createPolicy(policy) 511 512 create policy 513 514 ### Example 515 ```java 516 // Import classes: 517 import io.lakefs.clients.api.ApiClient; 518 import io.lakefs.clients.api.ApiException; 519 import io.lakefs.clients.api.Configuration; 520 import io.lakefs.clients.api.auth.*; 521 import io.lakefs.clients.api.models.*; 522 import io.lakefs.clients.api.AuthApi; 523 524 public class Example { 525 public static void main(String[] args) { 526 ApiClient defaultClient = Configuration.getDefaultApiClient(); 527 defaultClient.setBasePath("http://localhost/api/v1"); 528 529 // Configure HTTP basic authorization: basic_auth 530 HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); 531 basic_auth.setUsername("YOUR USERNAME"); 532 basic_auth.setPassword("YOUR PASSWORD"); 533 534 // Configure API key authorization: cookie_auth 535 ApiKeyAuth cookie_auth = (ApiKeyAuth) defaultClient.getAuthentication("cookie_auth"); 536 cookie_auth.setApiKey("YOUR API KEY"); 537 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 538 //cookie_auth.setApiKeyPrefix("Token"); 539 540 // Configure HTTP bearer authorization: jwt_token 541 HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); 542 jwt_token.setBearerToken("BEARER TOKEN"); 543 544 // Configure API key authorization: oidc_auth 545 ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); 546 oidc_auth.setApiKey("YOUR API KEY"); 547 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 548 //oidc_auth.setApiKeyPrefix("Token"); 549 550 // Configure API key authorization: saml_auth 551 ApiKeyAuth saml_auth = (ApiKeyAuth) defaultClient.getAuthentication("saml_auth"); 552 saml_auth.setApiKey("YOUR API KEY"); 553 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 554 //saml_auth.setApiKeyPrefix("Token"); 555 556 AuthApi apiInstance = new AuthApi(defaultClient); 557 Policy policy = new Policy(); // Policy | 558 try { 559 Policy result = apiInstance.createPolicy(policy); 560 System.out.println(result); 561 } catch (ApiException e) { 562 System.err.println("Exception when calling AuthApi#createPolicy"); 563 System.err.println("Status code: " + e.getCode()); 564 System.err.println("Reason: " + e.getResponseBody()); 565 System.err.println("Response headers: " + e.getResponseHeaders()); 566 e.printStackTrace(); 567 } 568 } 569 } 570 ``` 571 572 ### Parameters 573 574 Name | Type | Description | Notes 575 ------------- | ------------- | ------------- | ------------- 576 **policy** | [**Policy**](Policy.md)| | 577 578 ### Return type 579 580 [**Policy**](Policy.md) 581 582 ### Authorization 583 584 [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) 585 586 ### HTTP request headers 587 588 - **Content-Type**: application/json 589 - **Accept**: application/json 590 591 ### HTTP response details 592 | Status code | Description | Response headers | 593 |-------------|-------------|------------------| 594 **201** | policy | - | 595 **400** | Validation Error | - | 596 **401** | Unauthorized | - | 597 **409** | Resource Conflicts With Target | - | 598 **420** | too many requests | - | 599 **0** | Internal Server Error | - | 600 601 <a name="createUser"></a> 602 # **createUser** 603 > User createUser(userCreation) 604 605 create user 606 607 ### Example 608 ```java 609 // Import classes: 610 import io.lakefs.clients.api.ApiClient; 611 import io.lakefs.clients.api.ApiException; 612 import io.lakefs.clients.api.Configuration; 613 import io.lakefs.clients.api.auth.*; 614 import io.lakefs.clients.api.models.*; 615 import io.lakefs.clients.api.AuthApi; 616 617 public class Example { 618 public static void main(String[] args) { 619 ApiClient defaultClient = Configuration.getDefaultApiClient(); 620 defaultClient.setBasePath("http://localhost/api/v1"); 621 622 // Configure HTTP basic authorization: basic_auth 623 HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); 624 basic_auth.setUsername("YOUR USERNAME"); 625 basic_auth.setPassword("YOUR PASSWORD"); 626 627 // Configure API key authorization: cookie_auth 628 ApiKeyAuth cookie_auth = (ApiKeyAuth) defaultClient.getAuthentication("cookie_auth"); 629 cookie_auth.setApiKey("YOUR API KEY"); 630 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 631 //cookie_auth.setApiKeyPrefix("Token"); 632 633 // Configure HTTP bearer authorization: jwt_token 634 HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); 635 jwt_token.setBearerToken("BEARER TOKEN"); 636 637 // Configure API key authorization: oidc_auth 638 ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); 639 oidc_auth.setApiKey("YOUR API KEY"); 640 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 641 //oidc_auth.setApiKeyPrefix("Token"); 642 643 // Configure API key authorization: saml_auth 644 ApiKeyAuth saml_auth = (ApiKeyAuth) defaultClient.getAuthentication("saml_auth"); 645 saml_auth.setApiKey("YOUR API KEY"); 646 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 647 //saml_auth.setApiKeyPrefix("Token"); 648 649 AuthApi apiInstance = new AuthApi(defaultClient); 650 UserCreation userCreation = new UserCreation(); // UserCreation | 651 try { 652 User result = apiInstance.createUser(userCreation); 653 System.out.println(result); 654 } catch (ApiException e) { 655 System.err.println("Exception when calling AuthApi#createUser"); 656 System.err.println("Status code: " + e.getCode()); 657 System.err.println("Reason: " + e.getResponseBody()); 658 System.err.println("Response headers: " + e.getResponseHeaders()); 659 e.printStackTrace(); 660 } 661 } 662 } 663 ``` 664 665 ### Parameters 666 667 Name | Type | Description | Notes 668 ------------- | ------------- | ------------- | ------------- 669 **userCreation** | [**UserCreation**](UserCreation.md)| | [optional] 670 671 ### Return type 672 673 [**User**](User.md) 674 675 ### Authorization 676 677 [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) 678 679 ### HTTP request headers 680 681 - **Content-Type**: application/json 682 - **Accept**: application/json 683 684 ### HTTP response details 685 | Status code | Description | Response headers | 686 |-------------|-------------|------------------| 687 **201** | user | - | 688 **400** | validation error | - | 689 **401** | Unauthorized | - | 690 **409** | Resource Conflicts With Target | - | 691 **420** | too many requests | - | 692 **0** | Internal Server Error | - | 693 694 <a name="createUserExternalPrincipal"></a> 695 # **createUserExternalPrincipal** 696 > createUserExternalPrincipal(userId, principalId, externalPrincipalCreation) 697 698 attach external principal to user 699 700 ### Example 701 ```java 702 // Import classes: 703 import io.lakefs.clients.api.ApiClient; 704 import io.lakefs.clients.api.ApiException; 705 import io.lakefs.clients.api.Configuration; 706 import io.lakefs.clients.api.auth.*; 707 import io.lakefs.clients.api.models.*; 708 import io.lakefs.clients.api.AuthApi; 709 710 public class Example { 711 public static void main(String[] args) { 712 ApiClient defaultClient = Configuration.getDefaultApiClient(); 713 defaultClient.setBasePath("http://localhost/api/v1"); 714 715 // Configure HTTP basic authorization: basic_auth 716 HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); 717 basic_auth.setUsername("YOUR USERNAME"); 718 basic_auth.setPassword("YOUR PASSWORD"); 719 720 // Configure API key authorization: cookie_auth 721 ApiKeyAuth cookie_auth = (ApiKeyAuth) defaultClient.getAuthentication("cookie_auth"); 722 cookie_auth.setApiKey("YOUR API KEY"); 723 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 724 //cookie_auth.setApiKeyPrefix("Token"); 725 726 // Configure HTTP bearer authorization: jwt_token 727 HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); 728 jwt_token.setBearerToken("BEARER TOKEN"); 729 730 // Configure API key authorization: oidc_auth 731 ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); 732 oidc_auth.setApiKey("YOUR API KEY"); 733 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 734 //oidc_auth.setApiKeyPrefix("Token"); 735 736 // Configure API key authorization: saml_auth 737 ApiKeyAuth saml_auth = (ApiKeyAuth) defaultClient.getAuthentication("saml_auth"); 738 saml_auth.setApiKey("YOUR API KEY"); 739 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 740 //saml_auth.setApiKeyPrefix("Token"); 741 742 AuthApi apiInstance = new AuthApi(defaultClient); 743 String userId = "userId_example"; // String | 744 String principalId = "principalId_example"; // String | 745 ExternalPrincipalCreation externalPrincipalCreation = new ExternalPrincipalCreation(); // ExternalPrincipalCreation | 746 try { 747 apiInstance.createUserExternalPrincipal(userId, principalId, externalPrincipalCreation); 748 } catch (ApiException e) { 749 System.err.println("Exception when calling AuthApi#createUserExternalPrincipal"); 750 System.err.println("Status code: " + e.getCode()); 751 System.err.println("Reason: " + e.getResponseBody()); 752 System.err.println("Response headers: " + e.getResponseHeaders()); 753 e.printStackTrace(); 754 } 755 } 756 } 757 ``` 758 759 ### Parameters 760 761 Name | Type | Description | Notes 762 ------------- | ------------- | ------------- | ------------- 763 **userId** | **String**| | 764 **principalId** | **String**| | 765 **externalPrincipalCreation** | [**ExternalPrincipalCreation**](ExternalPrincipalCreation.md)| | [optional] 766 767 ### Return type 768 769 null (empty response body) 770 771 ### Authorization 772 773 [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) 774 775 ### HTTP request headers 776 777 - **Content-Type**: application/json 778 - **Accept**: application/json 779 780 ### HTTP response details 781 | Status code | Description | Response headers | 782 |-------------|-------------|------------------| 783 **201** | external principal attached successfully | - | 784 **401** | Unauthorized | - | 785 **404** | Resource Not Found | - | 786 **409** | Resource Conflicts With Target | - | 787 **420** | too many requests | - | 788 **0** | Internal Server Error | - | 789 790 <a name="deleteCredentials"></a> 791 # **deleteCredentials** 792 > deleteCredentials(userId, accessKeyId) 793 794 delete credentials 795 796 ### Example 797 ```java 798 // Import classes: 799 import io.lakefs.clients.api.ApiClient; 800 import io.lakefs.clients.api.ApiException; 801 import io.lakefs.clients.api.Configuration; 802 import io.lakefs.clients.api.auth.*; 803 import io.lakefs.clients.api.models.*; 804 import io.lakefs.clients.api.AuthApi; 805 806 public class Example { 807 public static void main(String[] args) { 808 ApiClient defaultClient = Configuration.getDefaultApiClient(); 809 defaultClient.setBasePath("http://localhost/api/v1"); 810 811 // Configure HTTP basic authorization: basic_auth 812 HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); 813 basic_auth.setUsername("YOUR USERNAME"); 814 basic_auth.setPassword("YOUR PASSWORD"); 815 816 // Configure API key authorization: cookie_auth 817 ApiKeyAuth cookie_auth = (ApiKeyAuth) defaultClient.getAuthentication("cookie_auth"); 818 cookie_auth.setApiKey("YOUR API KEY"); 819 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 820 //cookie_auth.setApiKeyPrefix("Token"); 821 822 // Configure HTTP bearer authorization: jwt_token 823 HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); 824 jwt_token.setBearerToken("BEARER TOKEN"); 825 826 // Configure API key authorization: oidc_auth 827 ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); 828 oidc_auth.setApiKey("YOUR API KEY"); 829 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 830 //oidc_auth.setApiKeyPrefix("Token"); 831 832 // Configure API key authorization: saml_auth 833 ApiKeyAuth saml_auth = (ApiKeyAuth) defaultClient.getAuthentication("saml_auth"); 834 saml_auth.setApiKey("YOUR API KEY"); 835 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 836 //saml_auth.setApiKeyPrefix("Token"); 837 838 AuthApi apiInstance = new AuthApi(defaultClient); 839 String userId = "userId_example"; // String | 840 String accessKeyId = "accessKeyId_example"; // String | 841 try { 842 apiInstance.deleteCredentials(userId, accessKeyId); 843 } catch (ApiException e) { 844 System.err.println("Exception when calling AuthApi#deleteCredentials"); 845 System.err.println("Status code: " + e.getCode()); 846 System.err.println("Reason: " + e.getResponseBody()); 847 System.err.println("Response headers: " + e.getResponseHeaders()); 848 e.printStackTrace(); 849 } 850 } 851 } 852 ``` 853 854 ### Parameters 855 856 Name | Type | Description | Notes 857 ------------- | ------------- | ------------- | ------------- 858 **userId** | **String**| | 859 **accessKeyId** | **String**| | 860 861 ### Return type 862 863 null (empty response body) 864 865 ### Authorization 866 867 [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) 868 869 ### HTTP request headers 870 871 - **Content-Type**: Not defined 872 - **Accept**: application/json 873 874 ### HTTP response details 875 | Status code | Description | Response headers | 876 |-------------|-------------|------------------| 877 **204** | credentials deleted successfully | - | 878 **401** | Unauthorized | - | 879 **404** | Resource Not Found | - | 880 **420** | too many requests | - | 881 **0** | Internal Server Error | - | 882 883 <a name="deleteGroup"></a> 884 # **deleteGroup** 885 > deleteGroup(groupId) 886 887 delete group 888 889 ### Example 890 ```java 891 // Import classes: 892 import io.lakefs.clients.api.ApiClient; 893 import io.lakefs.clients.api.ApiException; 894 import io.lakefs.clients.api.Configuration; 895 import io.lakefs.clients.api.auth.*; 896 import io.lakefs.clients.api.models.*; 897 import io.lakefs.clients.api.AuthApi; 898 899 public class Example { 900 public static void main(String[] args) { 901 ApiClient defaultClient = Configuration.getDefaultApiClient(); 902 defaultClient.setBasePath("http://localhost/api/v1"); 903 904 // Configure HTTP basic authorization: basic_auth 905 HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); 906 basic_auth.setUsername("YOUR USERNAME"); 907 basic_auth.setPassword("YOUR PASSWORD"); 908 909 // Configure API key authorization: cookie_auth 910 ApiKeyAuth cookie_auth = (ApiKeyAuth) defaultClient.getAuthentication("cookie_auth"); 911 cookie_auth.setApiKey("YOUR API KEY"); 912 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 913 //cookie_auth.setApiKeyPrefix("Token"); 914 915 // Configure HTTP bearer authorization: jwt_token 916 HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); 917 jwt_token.setBearerToken("BEARER TOKEN"); 918 919 // Configure API key authorization: oidc_auth 920 ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); 921 oidc_auth.setApiKey("YOUR API KEY"); 922 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 923 //oidc_auth.setApiKeyPrefix("Token"); 924 925 // Configure API key authorization: saml_auth 926 ApiKeyAuth saml_auth = (ApiKeyAuth) defaultClient.getAuthentication("saml_auth"); 927 saml_auth.setApiKey("YOUR API KEY"); 928 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 929 //saml_auth.setApiKeyPrefix("Token"); 930 931 AuthApi apiInstance = new AuthApi(defaultClient); 932 String groupId = "groupId_example"; // String | 933 try { 934 apiInstance.deleteGroup(groupId); 935 } catch (ApiException e) { 936 System.err.println("Exception when calling AuthApi#deleteGroup"); 937 System.err.println("Status code: " + e.getCode()); 938 System.err.println("Reason: " + e.getResponseBody()); 939 System.err.println("Response headers: " + e.getResponseHeaders()); 940 e.printStackTrace(); 941 } 942 } 943 } 944 ``` 945 946 ### Parameters 947 948 Name | Type | Description | Notes 949 ------------- | ------------- | ------------- | ------------- 950 **groupId** | **String**| | 951 952 ### Return type 953 954 null (empty response body) 955 956 ### Authorization 957 958 [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) 959 960 ### HTTP request headers 961 962 - **Content-Type**: Not defined 963 - **Accept**: application/json 964 965 ### HTTP response details 966 | Status code | Description | Response headers | 967 |-------------|-------------|------------------| 968 **204** | group deleted successfully | - | 969 **401** | Unauthorized | - | 970 **404** | Resource Not Found | - | 971 **420** | too many requests | - | 972 **0** | Internal Server Error | - | 973 974 <a name="deleteGroupMembership"></a> 975 # **deleteGroupMembership** 976 > deleteGroupMembership(groupId, userId) 977 978 delete group membership 979 980 ### Example 981 ```java 982 // Import classes: 983 import io.lakefs.clients.api.ApiClient; 984 import io.lakefs.clients.api.ApiException; 985 import io.lakefs.clients.api.Configuration; 986 import io.lakefs.clients.api.auth.*; 987 import io.lakefs.clients.api.models.*; 988 import io.lakefs.clients.api.AuthApi; 989 990 public class Example { 991 public static void main(String[] args) { 992 ApiClient defaultClient = Configuration.getDefaultApiClient(); 993 defaultClient.setBasePath("http://localhost/api/v1"); 994 995 // Configure HTTP basic authorization: basic_auth 996 HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); 997 basic_auth.setUsername("YOUR USERNAME"); 998 basic_auth.setPassword("YOUR PASSWORD"); 999 1000 // Configure API key authorization: cookie_auth 1001 ApiKeyAuth cookie_auth = (ApiKeyAuth) defaultClient.getAuthentication("cookie_auth"); 1002 cookie_auth.setApiKey("YOUR API KEY"); 1003 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 1004 //cookie_auth.setApiKeyPrefix("Token"); 1005 1006 // Configure HTTP bearer authorization: jwt_token 1007 HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); 1008 jwt_token.setBearerToken("BEARER TOKEN"); 1009 1010 // Configure API key authorization: oidc_auth 1011 ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); 1012 oidc_auth.setApiKey("YOUR API KEY"); 1013 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 1014 //oidc_auth.setApiKeyPrefix("Token"); 1015 1016 // Configure API key authorization: saml_auth 1017 ApiKeyAuth saml_auth = (ApiKeyAuth) defaultClient.getAuthentication("saml_auth"); 1018 saml_auth.setApiKey("YOUR API KEY"); 1019 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 1020 //saml_auth.setApiKeyPrefix("Token"); 1021 1022 AuthApi apiInstance = new AuthApi(defaultClient); 1023 String groupId = "groupId_example"; // String | 1024 String userId = "userId_example"; // String | 1025 try { 1026 apiInstance.deleteGroupMembership(groupId, userId); 1027 } catch (ApiException e) { 1028 System.err.println("Exception when calling AuthApi#deleteGroupMembership"); 1029 System.err.println("Status code: " + e.getCode()); 1030 System.err.println("Reason: " + e.getResponseBody()); 1031 System.err.println("Response headers: " + e.getResponseHeaders()); 1032 e.printStackTrace(); 1033 } 1034 } 1035 } 1036 ``` 1037 1038 ### Parameters 1039 1040 Name | Type | Description | Notes 1041 ------------- | ------------- | ------------- | ------------- 1042 **groupId** | **String**| | 1043 **userId** | **String**| | 1044 1045 ### Return type 1046 1047 null (empty response body) 1048 1049 ### Authorization 1050 1051 [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) 1052 1053 ### HTTP request headers 1054 1055 - **Content-Type**: Not defined 1056 - **Accept**: application/json 1057 1058 ### HTTP response details 1059 | Status code | Description | Response headers | 1060 |-------------|-------------|------------------| 1061 **204** | membership deleted successfully | - | 1062 **401** | Unauthorized | - | 1063 **404** | Resource Not Found | - | 1064 **420** | too many requests | - | 1065 **0** | Internal Server Error | - | 1066 1067 <a name="deletePolicy"></a> 1068 # **deletePolicy** 1069 > deletePolicy(policyId) 1070 1071 delete policy 1072 1073 ### Example 1074 ```java 1075 // Import classes: 1076 import io.lakefs.clients.api.ApiClient; 1077 import io.lakefs.clients.api.ApiException; 1078 import io.lakefs.clients.api.Configuration; 1079 import io.lakefs.clients.api.auth.*; 1080 import io.lakefs.clients.api.models.*; 1081 import io.lakefs.clients.api.AuthApi; 1082 1083 public class Example { 1084 public static void main(String[] args) { 1085 ApiClient defaultClient = Configuration.getDefaultApiClient(); 1086 defaultClient.setBasePath("http://localhost/api/v1"); 1087 1088 // Configure HTTP basic authorization: basic_auth 1089 HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); 1090 basic_auth.setUsername("YOUR USERNAME"); 1091 basic_auth.setPassword("YOUR PASSWORD"); 1092 1093 // Configure API key authorization: cookie_auth 1094 ApiKeyAuth cookie_auth = (ApiKeyAuth) defaultClient.getAuthentication("cookie_auth"); 1095 cookie_auth.setApiKey("YOUR API KEY"); 1096 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 1097 //cookie_auth.setApiKeyPrefix("Token"); 1098 1099 // Configure HTTP bearer authorization: jwt_token 1100 HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); 1101 jwt_token.setBearerToken("BEARER TOKEN"); 1102 1103 // Configure API key authorization: oidc_auth 1104 ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); 1105 oidc_auth.setApiKey("YOUR API KEY"); 1106 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 1107 //oidc_auth.setApiKeyPrefix("Token"); 1108 1109 // Configure API key authorization: saml_auth 1110 ApiKeyAuth saml_auth = (ApiKeyAuth) defaultClient.getAuthentication("saml_auth"); 1111 saml_auth.setApiKey("YOUR API KEY"); 1112 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 1113 //saml_auth.setApiKeyPrefix("Token"); 1114 1115 AuthApi apiInstance = new AuthApi(defaultClient); 1116 String policyId = "policyId_example"; // String | 1117 try { 1118 apiInstance.deletePolicy(policyId); 1119 } catch (ApiException e) { 1120 System.err.println("Exception when calling AuthApi#deletePolicy"); 1121 System.err.println("Status code: " + e.getCode()); 1122 System.err.println("Reason: " + e.getResponseBody()); 1123 System.err.println("Response headers: " + e.getResponseHeaders()); 1124 e.printStackTrace(); 1125 } 1126 } 1127 } 1128 ``` 1129 1130 ### Parameters 1131 1132 Name | Type | Description | Notes 1133 ------------- | ------------- | ------------- | ------------- 1134 **policyId** | **String**| | 1135 1136 ### Return type 1137 1138 null (empty response body) 1139 1140 ### Authorization 1141 1142 [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) 1143 1144 ### HTTP request headers 1145 1146 - **Content-Type**: Not defined 1147 - **Accept**: application/json 1148 1149 ### HTTP response details 1150 | Status code | Description | Response headers | 1151 |-------------|-------------|------------------| 1152 **204** | policy deleted successfully | - | 1153 **401** | Unauthorized | - | 1154 **404** | Resource Not Found | - | 1155 **420** | too many requests | - | 1156 **0** | Internal Server Error | - | 1157 1158 <a name="deleteUser"></a> 1159 # **deleteUser** 1160 > deleteUser(userId) 1161 1162 delete user 1163 1164 ### Example 1165 ```java 1166 // Import classes: 1167 import io.lakefs.clients.api.ApiClient; 1168 import io.lakefs.clients.api.ApiException; 1169 import io.lakefs.clients.api.Configuration; 1170 import io.lakefs.clients.api.auth.*; 1171 import io.lakefs.clients.api.models.*; 1172 import io.lakefs.clients.api.AuthApi; 1173 1174 public class Example { 1175 public static void main(String[] args) { 1176 ApiClient defaultClient = Configuration.getDefaultApiClient(); 1177 defaultClient.setBasePath("http://localhost/api/v1"); 1178 1179 // Configure HTTP basic authorization: basic_auth 1180 HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); 1181 basic_auth.setUsername("YOUR USERNAME"); 1182 basic_auth.setPassword("YOUR PASSWORD"); 1183 1184 // Configure API key authorization: cookie_auth 1185 ApiKeyAuth cookie_auth = (ApiKeyAuth) defaultClient.getAuthentication("cookie_auth"); 1186 cookie_auth.setApiKey("YOUR API KEY"); 1187 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 1188 //cookie_auth.setApiKeyPrefix("Token"); 1189 1190 // Configure HTTP bearer authorization: jwt_token 1191 HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); 1192 jwt_token.setBearerToken("BEARER TOKEN"); 1193 1194 // Configure API key authorization: oidc_auth 1195 ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); 1196 oidc_auth.setApiKey("YOUR API KEY"); 1197 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 1198 //oidc_auth.setApiKeyPrefix("Token"); 1199 1200 // Configure API key authorization: saml_auth 1201 ApiKeyAuth saml_auth = (ApiKeyAuth) defaultClient.getAuthentication("saml_auth"); 1202 saml_auth.setApiKey("YOUR API KEY"); 1203 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 1204 //saml_auth.setApiKeyPrefix("Token"); 1205 1206 AuthApi apiInstance = new AuthApi(defaultClient); 1207 String userId = "userId_example"; // String | 1208 try { 1209 apiInstance.deleteUser(userId); 1210 } catch (ApiException e) { 1211 System.err.println("Exception when calling AuthApi#deleteUser"); 1212 System.err.println("Status code: " + e.getCode()); 1213 System.err.println("Reason: " + e.getResponseBody()); 1214 System.err.println("Response headers: " + e.getResponseHeaders()); 1215 e.printStackTrace(); 1216 } 1217 } 1218 } 1219 ``` 1220 1221 ### Parameters 1222 1223 Name | Type | Description | Notes 1224 ------------- | ------------- | ------------- | ------------- 1225 **userId** | **String**| | 1226 1227 ### Return type 1228 1229 null (empty response body) 1230 1231 ### Authorization 1232 1233 [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) 1234 1235 ### HTTP request headers 1236 1237 - **Content-Type**: Not defined 1238 - **Accept**: application/json 1239 1240 ### HTTP response details 1241 | Status code | Description | Response headers | 1242 |-------------|-------------|------------------| 1243 **204** | user deleted successfully | - | 1244 **401** | Unauthorized | - | 1245 **404** | Resource Not Found | - | 1246 **420** | too many requests | - | 1247 **0** | Internal Server Error | - | 1248 1249 <a name="deleteUserExternalPrincipal"></a> 1250 # **deleteUserExternalPrincipal** 1251 > deleteUserExternalPrincipal(userId, principalId) 1252 1253 delete external principal from user 1254 1255 ### Example 1256 ```java 1257 // Import classes: 1258 import io.lakefs.clients.api.ApiClient; 1259 import io.lakefs.clients.api.ApiException; 1260 import io.lakefs.clients.api.Configuration; 1261 import io.lakefs.clients.api.auth.*; 1262 import io.lakefs.clients.api.models.*; 1263 import io.lakefs.clients.api.AuthApi; 1264 1265 public class Example { 1266 public static void main(String[] args) { 1267 ApiClient defaultClient = Configuration.getDefaultApiClient(); 1268 defaultClient.setBasePath("http://localhost/api/v1"); 1269 1270 // Configure HTTP basic authorization: basic_auth 1271 HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); 1272 basic_auth.setUsername("YOUR USERNAME"); 1273 basic_auth.setPassword("YOUR PASSWORD"); 1274 1275 // Configure API key authorization: cookie_auth 1276 ApiKeyAuth cookie_auth = (ApiKeyAuth) defaultClient.getAuthentication("cookie_auth"); 1277 cookie_auth.setApiKey("YOUR API KEY"); 1278 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 1279 //cookie_auth.setApiKeyPrefix("Token"); 1280 1281 // Configure HTTP bearer authorization: jwt_token 1282 HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); 1283 jwt_token.setBearerToken("BEARER TOKEN"); 1284 1285 // Configure API key authorization: oidc_auth 1286 ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); 1287 oidc_auth.setApiKey("YOUR API KEY"); 1288 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 1289 //oidc_auth.setApiKeyPrefix("Token"); 1290 1291 // Configure API key authorization: saml_auth 1292 ApiKeyAuth saml_auth = (ApiKeyAuth) defaultClient.getAuthentication("saml_auth"); 1293 saml_auth.setApiKey("YOUR API KEY"); 1294 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 1295 //saml_auth.setApiKeyPrefix("Token"); 1296 1297 AuthApi apiInstance = new AuthApi(defaultClient); 1298 String userId = "userId_example"; // String | 1299 String principalId = "principalId_example"; // String | 1300 try { 1301 apiInstance.deleteUserExternalPrincipal(userId, principalId); 1302 } catch (ApiException e) { 1303 System.err.println("Exception when calling AuthApi#deleteUserExternalPrincipal"); 1304 System.err.println("Status code: " + e.getCode()); 1305 System.err.println("Reason: " + e.getResponseBody()); 1306 System.err.println("Response headers: " + e.getResponseHeaders()); 1307 e.printStackTrace(); 1308 } 1309 } 1310 } 1311 ``` 1312 1313 ### Parameters 1314 1315 Name | Type | Description | Notes 1316 ------------- | ------------- | ------------- | ------------- 1317 **userId** | **String**| | 1318 **principalId** | **String**| | 1319 1320 ### Return type 1321 1322 null (empty response body) 1323 1324 ### Authorization 1325 1326 [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) 1327 1328 ### HTTP request headers 1329 1330 - **Content-Type**: Not defined 1331 - **Accept**: application/json 1332 1333 ### HTTP response details 1334 | Status code | Description | Response headers | 1335 |-------------|-------------|------------------| 1336 **204** | external principal detached successfully | - | 1337 **401** | Unauthorized | - | 1338 **404** | Resource Not Found | - | 1339 **420** | too many requests | - | 1340 **0** | Internal Server Error | - | 1341 1342 <a name="detachPolicyFromGroup"></a> 1343 # **detachPolicyFromGroup** 1344 > detachPolicyFromGroup(groupId, policyId) 1345 1346 detach policy from group 1347 1348 ### Example 1349 ```java 1350 // Import classes: 1351 import io.lakefs.clients.api.ApiClient; 1352 import io.lakefs.clients.api.ApiException; 1353 import io.lakefs.clients.api.Configuration; 1354 import io.lakefs.clients.api.auth.*; 1355 import io.lakefs.clients.api.models.*; 1356 import io.lakefs.clients.api.AuthApi; 1357 1358 public class Example { 1359 public static void main(String[] args) { 1360 ApiClient defaultClient = Configuration.getDefaultApiClient(); 1361 defaultClient.setBasePath("http://localhost/api/v1"); 1362 1363 // Configure HTTP basic authorization: basic_auth 1364 HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); 1365 basic_auth.setUsername("YOUR USERNAME"); 1366 basic_auth.setPassword("YOUR PASSWORD"); 1367 1368 // Configure API key authorization: cookie_auth 1369 ApiKeyAuth cookie_auth = (ApiKeyAuth) defaultClient.getAuthentication("cookie_auth"); 1370 cookie_auth.setApiKey("YOUR API KEY"); 1371 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 1372 //cookie_auth.setApiKeyPrefix("Token"); 1373 1374 // Configure HTTP bearer authorization: jwt_token 1375 HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); 1376 jwt_token.setBearerToken("BEARER TOKEN"); 1377 1378 // Configure API key authorization: oidc_auth 1379 ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); 1380 oidc_auth.setApiKey("YOUR API KEY"); 1381 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 1382 //oidc_auth.setApiKeyPrefix("Token"); 1383 1384 // Configure API key authorization: saml_auth 1385 ApiKeyAuth saml_auth = (ApiKeyAuth) defaultClient.getAuthentication("saml_auth"); 1386 saml_auth.setApiKey("YOUR API KEY"); 1387 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 1388 //saml_auth.setApiKeyPrefix("Token"); 1389 1390 AuthApi apiInstance = new AuthApi(defaultClient); 1391 String groupId = "groupId_example"; // String | 1392 String policyId = "policyId_example"; // String | 1393 try { 1394 apiInstance.detachPolicyFromGroup(groupId, policyId); 1395 } catch (ApiException e) { 1396 System.err.println("Exception when calling AuthApi#detachPolicyFromGroup"); 1397 System.err.println("Status code: " + e.getCode()); 1398 System.err.println("Reason: " + e.getResponseBody()); 1399 System.err.println("Response headers: " + e.getResponseHeaders()); 1400 e.printStackTrace(); 1401 } 1402 } 1403 } 1404 ``` 1405 1406 ### Parameters 1407 1408 Name | Type | Description | Notes 1409 ------------- | ------------- | ------------- | ------------- 1410 **groupId** | **String**| | 1411 **policyId** | **String**| | 1412 1413 ### Return type 1414 1415 null (empty response body) 1416 1417 ### Authorization 1418 1419 [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) 1420 1421 ### HTTP request headers 1422 1423 - **Content-Type**: Not defined 1424 - **Accept**: application/json 1425 1426 ### HTTP response details 1427 | Status code | Description | Response headers | 1428 |-------------|-------------|------------------| 1429 **204** | policy detached successfully | - | 1430 **401** | Unauthorized | - | 1431 **404** | Resource Not Found | - | 1432 **420** | too many requests | - | 1433 **0** | Internal Server Error | - | 1434 1435 <a name="detachPolicyFromUser"></a> 1436 # **detachPolicyFromUser** 1437 > detachPolicyFromUser(userId, policyId) 1438 1439 detach policy from user 1440 1441 ### Example 1442 ```java 1443 // Import classes: 1444 import io.lakefs.clients.api.ApiClient; 1445 import io.lakefs.clients.api.ApiException; 1446 import io.lakefs.clients.api.Configuration; 1447 import io.lakefs.clients.api.auth.*; 1448 import io.lakefs.clients.api.models.*; 1449 import io.lakefs.clients.api.AuthApi; 1450 1451 public class Example { 1452 public static void main(String[] args) { 1453 ApiClient defaultClient = Configuration.getDefaultApiClient(); 1454 defaultClient.setBasePath("http://localhost/api/v1"); 1455 1456 // Configure HTTP basic authorization: basic_auth 1457 HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); 1458 basic_auth.setUsername("YOUR USERNAME"); 1459 basic_auth.setPassword("YOUR PASSWORD"); 1460 1461 // Configure API key authorization: cookie_auth 1462 ApiKeyAuth cookie_auth = (ApiKeyAuth) defaultClient.getAuthentication("cookie_auth"); 1463 cookie_auth.setApiKey("YOUR API KEY"); 1464 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 1465 //cookie_auth.setApiKeyPrefix("Token"); 1466 1467 // Configure HTTP bearer authorization: jwt_token 1468 HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); 1469 jwt_token.setBearerToken("BEARER TOKEN"); 1470 1471 // Configure API key authorization: oidc_auth 1472 ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); 1473 oidc_auth.setApiKey("YOUR API KEY"); 1474 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 1475 //oidc_auth.setApiKeyPrefix("Token"); 1476 1477 // Configure API key authorization: saml_auth 1478 ApiKeyAuth saml_auth = (ApiKeyAuth) defaultClient.getAuthentication("saml_auth"); 1479 saml_auth.setApiKey("YOUR API KEY"); 1480 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 1481 //saml_auth.setApiKeyPrefix("Token"); 1482 1483 AuthApi apiInstance = new AuthApi(defaultClient); 1484 String userId = "userId_example"; // String | 1485 String policyId = "policyId_example"; // String | 1486 try { 1487 apiInstance.detachPolicyFromUser(userId, policyId); 1488 } catch (ApiException e) { 1489 System.err.println("Exception when calling AuthApi#detachPolicyFromUser"); 1490 System.err.println("Status code: " + e.getCode()); 1491 System.err.println("Reason: " + e.getResponseBody()); 1492 System.err.println("Response headers: " + e.getResponseHeaders()); 1493 e.printStackTrace(); 1494 } 1495 } 1496 } 1497 ``` 1498 1499 ### Parameters 1500 1501 Name | Type | Description | Notes 1502 ------------- | ------------- | ------------- | ------------- 1503 **userId** | **String**| | 1504 **policyId** | **String**| | 1505 1506 ### Return type 1507 1508 null (empty response body) 1509 1510 ### Authorization 1511 1512 [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) 1513 1514 ### HTTP request headers 1515 1516 - **Content-Type**: Not defined 1517 - **Accept**: application/json 1518 1519 ### HTTP response details 1520 | Status code | Description | Response headers | 1521 |-------------|-------------|------------------| 1522 **204** | policy detached successfully | - | 1523 **401** | Unauthorized | - | 1524 **404** | Resource Not Found | - | 1525 **420** | too many requests | - | 1526 **0** | Internal Server Error | - | 1527 1528 <a name="externalPrincipalLogin"></a> 1529 # **externalPrincipalLogin** 1530 > AuthenticationToken externalPrincipalLogin(externalLoginInformation) 1531 1532 perform a login using an external authenticator 1533 1534 ### Example 1535 ```java 1536 // Import classes: 1537 import io.lakefs.clients.api.ApiClient; 1538 import io.lakefs.clients.api.ApiException; 1539 import io.lakefs.clients.api.Configuration; 1540 import io.lakefs.clients.api.models.*; 1541 import io.lakefs.clients.api.AuthApi; 1542 1543 public class Example { 1544 public static void main(String[] args) { 1545 ApiClient defaultClient = Configuration.getDefaultApiClient(); 1546 defaultClient.setBasePath("http://localhost/api/v1"); 1547 1548 AuthApi apiInstance = new AuthApi(defaultClient); 1549 ExternalLoginInformation externalLoginInformation = new ExternalLoginInformation(); // ExternalLoginInformation | 1550 try { 1551 AuthenticationToken result = apiInstance.externalPrincipalLogin(externalLoginInformation); 1552 System.out.println(result); 1553 } catch (ApiException e) { 1554 System.err.println("Exception when calling AuthApi#externalPrincipalLogin"); 1555 System.err.println("Status code: " + e.getCode()); 1556 System.err.println("Reason: " + e.getResponseBody()); 1557 System.err.println("Response headers: " + e.getResponseHeaders()); 1558 e.printStackTrace(); 1559 } 1560 } 1561 } 1562 ``` 1563 1564 ### Parameters 1565 1566 Name | Type | Description | Notes 1567 ------------- | ------------- | ------------- | ------------- 1568 **externalLoginInformation** | [**ExternalLoginInformation**](ExternalLoginInformation.md)| | [optional] 1569 1570 ### Return type 1571 1572 [**AuthenticationToken**](AuthenticationToken.md) 1573 1574 ### Authorization 1575 1576 No authorization required 1577 1578 ### HTTP request headers 1579 1580 - **Content-Type**: application/json 1581 - **Accept**: application/json 1582 1583 ### HTTP response details 1584 | Status code | Description | Response headers | 1585 |-------------|-------------|------------------| 1586 **200** | successful external login | - | 1587 **400** | Bad Request | - | 1588 **401** | Unauthorized | - | 1589 **403** | Forbidden | - | 1590 **404** | Resource Not Found | - | 1591 **420** | too many requests | - | 1592 **0** | Internal Server Error | - | 1593 1594 <a name="getCredentials"></a> 1595 # **getCredentials** 1596 > Credentials getCredentials(userId, accessKeyId) 1597 1598 get credentials 1599 1600 ### Example 1601 ```java 1602 // Import classes: 1603 import io.lakefs.clients.api.ApiClient; 1604 import io.lakefs.clients.api.ApiException; 1605 import io.lakefs.clients.api.Configuration; 1606 import io.lakefs.clients.api.auth.*; 1607 import io.lakefs.clients.api.models.*; 1608 import io.lakefs.clients.api.AuthApi; 1609 1610 public class Example { 1611 public static void main(String[] args) { 1612 ApiClient defaultClient = Configuration.getDefaultApiClient(); 1613 defaultClient.setBasePath("http://localhost/api/v1"); 1614 1615 // Configure HTTP basic authorization: basic_auth 1616 HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); 1617 basic_auth.setUsername("YOUR USERNAME"); 1618 basic_auth.setPassword("YOUR PASSWORD"); 1619 1620 // Configure API key authorization: cookie_auth 1621 ApiKeyAuth cookie_auth = (ApiKeyAuth) defaultClient.getAuthentication("cookie_auth"); 1622 cookie_auth.setApiKey("YOUR API KEY"); 1623 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 1624 //cookie_auth.setApiKeyPrefix("Token"); 1625 1626 // Configure HTTP bearer authorization: jwt_token 1627 HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); 1628 jwt_token.setBearerToken("BEARER TOKEN"); 1629 1630 // Configure API key authorization: oidc_auth 1631 ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); 1632 oidc_auth.setApiKey("YOUR API KEY"); 1633 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 1634 //oidc_auth.setApiKeyPrefix("Token"); 1635 1636 // Configure API key authorization: saml_auth 1637 ApiKeyAuth saml_auth = (ApiKeyAuth) defaultClient.getAuthentication("saml_auth"); 1638 saml_auth.setApiKey("YOUR API KEY"); 1639 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 1640 //saml_auth.setApiKeyPrefix("Token"); 1641 1642 AuthApi apiInstance = new AuthApi(defaultClient); 1643 String userId = "userId_example"; // String | 1644 String accessKeyId = "accessKeyId_example"; // String | 1645 try { 1646 Credentials result = apiInstance.getCredentials(userId, accessKeyId); 1647 System.out.println(result); 1648 } catch (ApiException e) { 1649 System.err.println("Exception when calling AuthApi#getCredentials"); 1650 System.err.println("Status code: " + e.getCode()); 1651 System.err.println("Reason: " + e.getResponseBody()); 1652 System.err.println("Response headers: " + e.getResponseHeaders()); 1653 e.printStackTrace(); 1654 } 1655 } 1656 } 1657 ``` 1658 1659 ### Parameters 1660 1661 Name | Type | Description | Notes 1662 ------------- | ------------- | ------------- | ------------- 1663 **userId** | **String**| | 1664 **accessKeyId** | **String**| | 1665 1666 ### Return type 1667 1668 [**Credentials**](Credentials.md) 1669 1670 ### Authorization 1671 1672 [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) 1673 1674 ### HTTP request headers 1675 1676 - **Content-Type**: Not defined 1677 - **Accept**: application/json 1678 1679 ### HTTP response details 1680 | Status code | Description | Response headers | 1681 |-------------|-------------|------------------| 1682 **200** | credentials | - | 1683 **401** | Unauthorized | - | 1684 **404** | Resource Not Found | - | 1685 **420** | too many requests | - | 1686 **0** | Internal Server Error | - | 1687 1688 <a name="getCurrentUser"></a> 1689 # **getCurrentUser** 1690 > CurrentUser getCurrentUser() 1691 1692 get current user 1693 1694 ### Example 1695 ```java 1696 // Import classes: 1697 import io.lakefs.clients.api.ApiClient; 1698 import io.lakefs.clients.api.ApiException; 1699 import io.lakefs.clients.api.Configuration; 1700 import io.lakefs.clients.api.auth.*; 1701 import io.lakefs.clients.api.models.*; 1702 import io.lakefs.clients.api.AuthApi; 1703 1704 public class Example { 1705 public static void main(String[] args) { 1706 ApiClient defaultClient = Configuration.getDefaultApiClient(); 1707 defaultClient.setBasePath("http://localhost/api/v1"); 1708 1709 // Configure HTTP basic authorization: basic_auth 1710 HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); 1711 basic_auth.setUsername("YOUR USERNAME"); 1712 basic_auth.setPassword("YOUR PASSWORD"); 1713 1714 // Configure API key authorization: cookie_auth 1715 ApiKeyAuth cookie_auth = (ApiKeyAuth) defaultClient.getAuthentication("cookie_auth"); 1716 cookie_auth.setApiKey("YOUR API KEY"); 1717 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 1718 //cookie_auth.setApiKeyPrefix("Token"); 1719 1720 // Configure HTTP bearer authorization: jwt_token 1721 HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); 1722 jwt_token.setBearerToken("BEARER TOKEN"); 1723 1724 // Configure API key authorization: oidc_auth 1725 ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); 1726 oidc_auth.setApiKey("YOUR API KEY"); 1727 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 1728 //oidc_auth.setApiKeyPrefix("Token"); 1729 1730 // Configure API key authorization: saml_auth 1731 ApiKeyAuth saml_auth = (ApiKeyAuth) defaultClient.getAuthentication("saml_auth"); 1732 saml_auth.setApiKey("YOUR API KEY"); 1733 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 1734 //saml_auth.setApiKeyPrefix("Token"); 1735 1736 AuthApi apiInstance = new AuthApi(defaultClient); 1737 try { 1738 CurrentUser result = apiInstance.getCurrentUser(); 1739 System.out.println(result); 1740 } catch (ApiException e) { 1741 System.err.println("Exception when calling AuthApi#getCurrentUser"); 1742 System.err.println("Status code: " + e.getCode()); 1743 System.err.println("Reason: " + e.getResponseBody()); 1744 System.err.println("Response headers: " + e.getResponseHeaders()); 1745 e.printStackTrace(); 1746 } 1747 } 1748 } 1749 ``` 1750 1751 ### Parameters 1752 This endpoint does not need any parameter. 1753 1754 ### Return type 1755 1756 [**CurrentUser**](CurrentUser.md) 1757 1758 ### Authorization 1759 1760 [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) 1761 1762 ### HTTP request headers 1763 1764 - **Content-Type**: Not defined 1765 - **Accept**: application/json 1766 1767 ### HTTP response details 1768 | Status code | Description | Response headers | 1769 |-------------|-------------|------------------| 1770 **200** | user | - | 1771 1772 <a name="getExternalPrincipal"></a> 1773 # **getExternalPrincipal** 1774 > ExternalPrincipal getExternalPrincipal(principalId) 1775 1776 describe external principal by id 1777 1778 ### Example 1779 ```java 1780 // Import classes: 1781 import io.lakefs.clients.api.ApiClient; 1782 import io.lakefs.clients.api.ApiException; 1783 import io.lakefs.clients.api.Configuration; 1784 import io.lakefs.clients.api.auth.*; 1785 import io.lakefs.clients.api.models.*; 1786 import io.lakefs.clients.api.AuthApi; 1787 1788 public class Example { 1789 public static void main(String[] args) { 1790 ApiClient defaultClient = Configuration.getDefaultApiClient(); 1791 defaultClient.setBasePath("http://localhost/api/v1"); 1792 1793 // Configure HTTP basic authorization: basic_auth 1794 HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); 1795 basic_auth.setUsername("YOUR USERNAME"); 1796 basic_auth.setPassword("YOUR PASSWORD"); 1797 1798 // Configure API key authorization: cookie_auth 1799 ApiKeyAuth cookie_auth = (ApiKeyAuth) defaultClient.getAuthentication("cookie_auth"); 1800 cookie_auth.setApiKey("YOUR API KEY"); 1801 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 1802 //cookie_auth.setApiKeyPrefix("Token"); 1803 1804 // Configure HTTP bearer authorization: jwt_token 1805 HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); 1806 jwt_token.setBearerToken("BEARER TOKEN"); 1807 1808 // Configure API key authorization: oidc_auth 1809 ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); 1810 oidc_auth.setApiKey("YOUR API KEY"); 1811 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 1812 //oidc_auth.setApiKeyPrefix("Token"); 1813 1814 // Configure API key authorization: saml_auth 1815 ApiKeyAuth saml_auth = (ApiKeyAuth) defaultClient.getAuthentication("saml_auth"); 1816 saml_auth.setApiKey("YOUR API KEY"); 1817 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 1818 //saml_auth.setApiKeyPrefix("Token"); 1819 1820 AuthApi apiInstance = new AuthApi(defaultClient); 1821 String principalId = "principalId_example"; // String | 1822 try { 1823 ExternalPrincipal result = apiInstance.getExternalPrincipal(principalId); 1824 System.out.println(result); 1825 } catch (ApiException e) { 1826 System.err.println("Exception when calling AuthApi#getExternalPrincipal"); 1827 System.err.println("Status code: " + e.getCode()); 1828 System.err.println("Reason: " + e.getResponseBody()); 1829 System.err.println("Response headers: " + e.getResponseHeaders()); 1830 e.printStackTrace(); 1831 } 1832 } 1833 } 1834 ``` 1835 1836 ### Parameters 1837 1838 Name | Type | Description | Notes 1839 ------------- | ------------- | ------------- | ------------- 1840 **principalId** | **String**| | 1841 1842 ### Return type 1843 1844 [**ExternalPrincipal**](ExternalPrincipal.md) 1845 1846 ### Authorization 1847 1848 [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) 1849 1850 ### HTTP request headers 1851 1852 - **Content-Type**: Not defined 1853 - **Accept**: application/json 1854 1855 ### HTTP response details 1856 | Status code | Description | Response headers | 1857 |-------------|-------------|------------------| 1858 **200** | external principal | - | 1859 **401** | Unauthorized | - | 1860 **404** | Resource Not Found | - | 1861 **420** | too many requests | - | 1862 **0** | Internal Server Error | - | 1863 1864 <a name="getGroup"></a> 1865 # **getGroup** 1866 > Group getGroup(groupId) 1867 1868 get group 1869 1870 ### Example 1871 ```java 1872 // Import classes: 1873 import io.lakefs.clients.api.ApiClient; 1874 import io.lakefs.clients.api.ApiException; 1875 import io.lakefs.clients.api.Configuration; 1876 import io.lakefs.clients.api.auth.*; 1877 import io.lakefs.clients.api.models.*; 1878 import io.lakefs.clients.api.AuthApi; 1879 1880 public class Example { 1881 public static void main(String[] args) { 1882 ApiClient defaultClient = Configuration.getDefaultApiClient(); 1883 defaultClient.setBasePath("http://localhost/api/v1"); 1884 1885 // Configure HTTP basic authorization: basic_auth 1886 HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); 1887 basic_auth.setUsername("YOUR USERNAME"); 1888 basic_auth.setPassword("YOUR PASSWORD"); 1889 1890 // Configure API key authorization: cookie_auth 1891 ApiKeyAuth cookie_auth = (ApiKeyAuth) defaultClient.getAuthentication("cookie_auth"); 1892 cookie_auth.setApiKey("YOUR API KEY"); 1893 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 1894 //cookie_auth.setApiKeyPrefix("Token"); 1895 1896 // Configure HTTP bearer authorization: jwt_token 1897 HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); 1898 jwt_token.setBearerToken("BEARER TOKEN"); 1899 1900 // Configure API key authorization: oidc_auth 1901 ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); 1902 oidc_auth.setApiKey("YOUR API KEY"); 1903 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 1904 //oidc_auth.setApiKeyPrefix("Token"); 1905 1906 // Configure API key authorization: saml_auth 1907 ApiKeyAuth saml_auth = (ApiKeyAuth) defaultClient.getAuthentication("saml_auth"); 1908 saml_auth.setApiKey("YOUR API KEY"); 1909 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 1910 //saml_auth.setApiKeyPrefix("Token"); 1911 1912 AuthApi apiInstance = new AuthApi(defaultClient); 1913 String groupId = "groupId_example"; // String | 1914 try { 1915 Group result = apiInstance.getGroup(groupId); 1916 System.out.println(result); 1917 } catch (ApiException e) { 1918 System.err.println("Exception when calling AuthApi#getGroup"); 1919 System.err.println("Status code: " + e.getCode()); 1920 System.err.println("Reason: " + e.getResponseBody()); 1921 System.err.println("Response headers: " + e.getResponseHeaders()); 1922 e.printStackTrace(); 1923 } 1924 } 1925 } 1926 ``` 1927 1928 ### Parameters 1929 1930 Name | Type | Description | Notes 1931 ------------- | ------------- | ------------- | ------------- 1932 **groupId** | **String**| | 1933 1934 ### Return type 1935 1936 [**Group**](Group.md) 1937 1938 ### Authorization 1939 1940 [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) 1941 1942 ### HTTP request headers 1943 1944 - **Content-Type**: Not defined 1945 - **Accept**: application/json 1946 1947 ### HTTP response details 1948 | Status code | Description | Response headers | 1949 |-------------|-------------|------------------| 1950 **200** | group | - | 1951 **401** | Unauthorized | - | 1952 **404** | Resource Not Found | - | 1953 **420** | too many requests | - | 1954 **0** | Internal Server Error | - | 1955 1956 <a name="getGroupACL"></a> 1957 # **getGroupACL** 1958 > ACL getGroupACL(groupId) 1959 1960 get ACL of group 1961 1962 ### Example 1963 ```java 1964 // Import classes: 1965 import io.lakefs.clients.api.ApiClient; 1966 import io.lakefs.clients.api.ApiException; 1967 import io.lakefs.clients.api.Configuration; 1968 import io.lakefs.clients.api.auth.*; 1969 import io.lakefs.clients.api.models.*; 1970 import io.lakefs.clients.api.AuthApi; 1971 1972 public class Example { 1973 public static void main(String[] args) { 1974 ApiClient defaultClient = Configuration.getDefaultApiClient(); 1975 defaultClient.setBasePath("http://localhost/api/v1"); 1976 1977 // Configure HTTP basic authorization: basic_auth 1978 HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); 1979 basic_auth.setUsername("YOUR USERNAME"); 1980 basic_auth.setPassword("YOUR PASSWORD"); 1981 1982 // Configure API key authorization: cookie_auth 1983 ApiKeyAuth cookie_auth = (ApiKeyAuth) defaultClient.getAuthentication("cookie_auth"); 1984 cookie_auth.setApiKey("YOUR API KEY"); 1985 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 1986 //cookie_auth.setApiKeyPrefix("Token"); 1987 1988 // Configure HTTP bearer authorization: jwt_token 1989 HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); 1990 jwt_token.setBearerToken("BEARER TOKEN"); 1991 1992 // Configure API key authorization: oidc_auth 1993 ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); 1994 oidc_auth.setApiKey("YOUR API KEY"); 1995 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 1996 //oidc_auth.setApiKeyPrefix("Token"); 1997 1998 // Configure API key authorization: saml_auth 1999 ApiKeyAuth saml_auth = (ApiKeyAuth) defaultClient.getAuthentication("saml_auth"); 2000 saml_auth.setApiKey("YOUR API KEY"); 2001 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 2002 //saml_auth.setApiKeyPrefix("Token"); 2003 2004 AuthApi apiInstance = new AuthApi(defaultClient); 2005 String groupId = "groupId_example"; // String | 2006 try { 2007 ACL result = apiInstance.getGroupACL(groupId); 2008 System.out.println(result); 2009 } catch (ApiException e) { 2010 System.err.println("Exception when calling AuthApi#getGroupACL"); 2011 System.err.println("Status code: " + e.getCode()); 2012 System.err.println("Reason: " + e.getResponseBody()); 2013 System.err.println("Response headers: " + e.getResponseHeaders()); 2014 e.printStackTrace(); 2015 } 2016 } 2017 } 2018 ``` 2019 2020 ### Parameters 2021 2022 Name | Type | Description | Notes 2023 ------------- | ------------- | ------------- | ------------- 2024 **groupId** | **String**| | 2025 2026 ### Return type 2027 2028 [**ACL**](ACL.md) 2029 2030 ### Authorization 2031 2032 [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) 2033 2034 ### HTTP request headers 2035 2036 - **Content-Type**: Not defined 2037 - **Accept**: application/json 2038 2039 ### HTTP response details 2040 | Status code | Description | Response headers | 2041 |-------------|-------------|------------------| 2042 **200** | ACL of group | - | 2043 **401** | Unauthorized | - | 2044 **404** | Group not found, or group found but has no ACL | - | 2045 **420** | too many requests | - | 2046 **0** | Internal Server Error | - | 2047 2048 <a name="getPolicy"></a> 2049 # **getPolicy** 2050 > Policy getPolicy(policyId) 2051 2052 get policy 2053 2054 ### Example 2055 ```java 2056 // Import classes: 2057 import io.lakefs.clients.api.ApiClient; 2058 import io.lakefs.clients.api.ApiException; 2059 import io.lakefs.clients.api.Configuration; 2060 import io.lakefs.clients.api.auth.*; 2061 import io.lakefs.clients.api.models.*; 2062 import io.lakefs.clients.api.AuthApi; 2063 2064 public class Example { 2065 public static void main(String[] args) { 2066 ApiClient defaultClient = Configuration.getDefaultApiClient(); 2067 defaultClient.setBasePath("http://localhost/api/v1"); 2068 2069 // Configure HTTP basic authorization: basic_auth 2070 HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); 2071 basic_auth.setUsername("YOUR USERNAME"); 2072 basic_auth.setPassword("YOUR PASSWORD"); 2073 2074 // Configure API key authorization: cookie_auth 2075 ApiKeyAuth cookie_auth = (ApiKeyAuth) defaultClient.getAuthentication("cookie_auth"); 2076 cookie_auth.setApiKey("YOUR API KEY"); 2077 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 2078 //cookie_auth.setApiKeyPrefix("Token"); 2079 2080 // Configure HTTP bearer authorization: jwt_token 2081 HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); 2082 jwt_token.setBearerToken("BEARER TOKEN"); 2083 2084 // Configure API key authorization: oidc_auth 2085 ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); 2086 oidc_auth.setApiKey("YOUR API KEY"); 2087 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 2088 //oidc_auth.setApiKeyPrefix("Token"); 2089 2090 // Configure API key authorization: saml_auth 2091 ApiKeyAuth saml_auth = (ApiKeyAuth) defaultClient.getAuthentication("saml_auth"); 2092 saml_auth.setApiKey("YOUR API KEY"); 2093 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 2094 //saml_auth.setApiKeyPrefix("Token"); 2095 2096 AuthApi apiInstance = new AuthApi(defaultClient); 2097 String policyId = "policyId_example"; // String | 2098 try { 2099 Policy result = apiInstance.getPolicy(policyId); 2100 System.out.println(result); 2101 } catch (ApiException e) { 2102 System.err.println("Exception when calling AuthApi#getPolicy"); 2103 System.err.println("Status code: " + e.getCode()); 2104 System.err.println("Reason: " + e.getResponseBody()); 2105 System.err.println("Response headers: " + e.getResponseHeaders()); 2106 e.printStackTrace(); 2107 } 2108 } 2109 } 2110 ``` 2111 2112 ### Parameters 2113 2114 Name | Type | Description | Notes 2115 ------------- | ------------- | ------------- | ------------- 2116 **policyId** | **String**| | 2117 2118 ### Return type 2119 2120 [**Policy**](Policy.md) 2121 2122 ### Authorization 2123 2124 [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) 2125 2126 ### HTTP request headers 2127 2128 - **Content-Type**: Not defined 2129 - **Accept**: application/json 2130 2131 ### HTTP response details 2132 | Status code | Description | Response headers | 2133 |-------------|-------------|------------------| 2134 **200** | policy | - | 2135 **401** | Unauthorized | - | 2136 **404** | Resource Not Found | - | 2137 **420** | too many requests | - | 2138 **0** | Internal Server Error | - | 2139 2140 <a name="getUser"></a> 2141 # **getUser** 2142 > User getUser(userId) 2143 2144 get user 2145 2146 ### Example 2147 ```java 2148 // Import classes: 2149 import io.lakefs.clients.api.ApiClient; 2150 import io.lakefs.clients.api.ApiException; 2151 import io.lakefs.clients.api.Configuration; 2152 import io.lakefs.clients.api.auth.*; 2153 import io.lakefs.clients.api.models.*; 2154 import io.lakefs.clients.api.AuthApi; 2155 2156 public class Example { 2157 public static void main(String[] args) { 2158 ApiClient defaultClient = Configuration.getDefaultApiClient(); 2159 defaultClient.setBasePath("http://localhost/api/v1"); 2160 2161 // Configure HTTP basic authorization: basic_auth 2162 HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); 2163 basic_auth.setUsername("YOUR USERNAME"); 2164 basic_auth.setPassword("YOUR PASSWORD"); 2165 2166 // Configure API key authorization: cookie_auth 2167 ApiKeyAuth cookie_auth = (ApiKeyAuth) defaultClient.getAuthentication("cookie_auth"); 2168 cookie_auth.setApiKey("YOUR API KEY"); 2169 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 2170 //cookie_auth.setApiKeyPrefix("Token"); 2171 2172 // Configure HTTP bearer authorization: jwt_token 2173 HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); 2174 jwt_token.setBearerToken("BEARER TOKEN"); 2175 2176 // Configure API key authorization: oidc_auth 2177 ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); 2178 oidc_auth.setApiKey("YOUR API KEY"); 2179 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 2180 //oidc_auth.setApiKeyPrefix("Token"); 2181 2182 // Configure API key authorization: saml_auth 2183 ApiKeyAuth saml_auth = (ApiKeyAuth) defaultClient.getAuthentication("saml_auth"); 2184 saml_auth.setApiKey("YOUR API KEY"); 2185 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 2186 //saml_auth.setApiKeyPrefix("Token"); 2187 2188 AuthApi apiInstance = new AuthApi(defaultClient); 2189 String userId = "userId_example"; // String | 2190 try { 2191 User result = apiInstance.getUser(userId); 2192 System.out.println(result); 2193 } catch (ApiException e) { 2194 System.err.println("Exception when calling AuthApi#getUser"); 2195 System.err.println("Status code: " + e.getCode()); 2196 System.err.println("Reason: " + e.getResponseBody()); 2197 System.err.println("Response headers: " + e.getResponseHeaders()); 2198 e.printStackTrace(); 2199 } 2200 } 2201 } 2202 ``` 2203 2204 ### Parameters 2205 2206 Name | Type | Description | Notes 2207 ------------- | ------------- | ------------- | ------------- 2208 **userId** | **String**| | 2209 2210 ### Return type 2211 2212 [**User**](User.md) 2213 2214 ### Authorization 2215 2216 [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) 2217 2218 ### HTTP request headers 2219 2220 - **Content-Type**: Not defined 2221 - **Accept**: application/json 2222 2223 ### HTTP response details 2224 | Status code | Description | Response headers | 2225 |-------------|-------------|------------------| 2226 **200** | user | - | 2227 **401** | Unauthorized | - | 2228 **404** | Resource Not Found | - | 2229 **420** | too many requests | - | 2230 **0** | Internal Server Error | - | 2231 2232 <a name="listGroupMembers"></a> 2233 # **listGroupMembers** 2234 > UserList listGroupMembers(groupId, prefix, after, amount) 2235 2236 list group members 2237 2238 ### Example 2239 ```java 2240 // Import classes: 2241 import io.lakefs.clients.api.ApiClient; 2242 import io.lakefs.clients.api.ApiException; 2243 import io.lakefs.clients.api.Configuration; 2244 import io.lakefs.clients.api.auth.*; 2245 import io.lakefs.clients.api.models.*; 2246 import io.lakefs.clients.api.AuthApi; 2247 2248 public class Example { 2249 public static void main(String[] args) { 2250 ApiClient defaultClient = Configuration.getDefaultApiClient(); 2251 defaultClient.setBasePath("http://localhost/api/v1"); 2252 2253 // Configure HTTP basic authorization: basic_auth 2254 HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); 2255 basic_auth.setUsername("YOUR USERNAME"); 2256 basic_auth.setPassword("YOUR PASSWORD"); 2257 2258 // Configure API key authorization: cookie_auth 2259 ApiKeyAuth cookie_auth = (ApiKeyAuth) defaultClient.getAuthentication("cookie_auth"); 2260 cookie_auth.setApiKey("YOUR API KEY"); 2261 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 2262 //cookie_auth.setApiKeyPrefix("Token"); 2263 2264 // Configure HTTP bearer authorization: jwt_token 2265 HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); 2266 jwt_token.setBearerToken("BEARER TOKEN"); 2267 2268 // Configure API key authorization: oidc_auth 2269 ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); 2270 oidc_auth.setApiKey("YOUR API KEY"); 2271 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 2272 //oidc_auth.setApiKeyPrefix("Token"); 2273 2274 // Configure API key authorization: saml_auth 2275 ApiKeyAuth saml_auth = (ApiKeyAuth) defaultClient.getAuthentication("saml_auth"); 2276 saml_auth.setApiKey("YOUR API KEY"); 2277 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 2278 //saml_auth.setApiKeyPrefix("Token"); 2279 2280 AuthApi apiInstance = new AuthApi(defaultClient); 2281 String groupId = "groupId_example"; // String | 2282 String prefix = "prefix_example"; // String | return items prefixed with this value 2283 String after = "after_example"; // String | return items after this value 2284 Integer amount = 100; // Integer | how many items to return 2285 try { 2286 UserList result = apiInstance.listGroupMembers(groupId, prefix, after, amount); 2287 System.out.println(result); 2288 } catch (ApiException e) { 2289 System.err.println("Exception when calling AuthApi#listGroupMembers"); 2290 System.err.println("Status code: " + e.getCode()); 2291 System.err.println("Reason: " + e.getResponseBody()); 2292 System.err.println("Response headers: " + e.getResponseHeaders()); 2293 e.printStackTrace(); 2294 } 2295 } 2296 } 2297 ``` 2298 2299 ### Parameters 2300 2301 Name | Type | Description | Notes 2302 ------------- | ------------- | ------------- | ------------- 2303 **groupId** | **String**| | 2304 **prefix** | **String**| return items prefixed with this value | [optional] 2305 **after** | **String**| return items after this value | [optional] 2306 **amount** | **Integer**| how many items to return | [optional] [default to 100] 2307 2308 ### Return type 2309 2310 [**UserList**](UserList.md) 2311 2312 ### Authorization 2313 2314 [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) 2315 2316 ### HTTP request headers 2317 2318 - **Content-Type**: Not defined 2319 - **Accept**: application/json 2320 2321 ### HTTP response details 2322 | Status code | Description | Response headers | 2323 |-------------|-------------|------------------| 2324 **200** | group member list | - | 2325 **401** | Unauthorized | - | 2326 **420** | too many requests | - | 2327 **0** | Internal Server Error | - | 2328 2329 <a name="listGroupPolicies"></a> 2330 # **listGroupPolicies** 2331 > PolicyList listGroupPolicies(groupId, prefix, after, amount) 2332 2333 list group policies 2334 2335 ### Example 2336 ```java 2337 // Import classes: 2338 import io.lakefs.clients.api.ApiClient; 2339 import io.lakefs.clients.api.ApiException; 2340 import io.lakefs.clients.api.Configuration; 2341 import io.lakefs.clients.api.auth.*; 2342 import io.lakefs.clients.api.models.*; 2343 import io.lakefs.clients.api.AuthApi; 2344 2345 public class Example { 2346 public static void main(String[] args) { 2347 ApiClient defaultClient = Configuration.getDefaultApiClient(); 2348 defaultClient.setBasePath("http://localhost/api/v1"); 2349 2350 // Configure HTTP basic authorization: basic_auth 2351 HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); 2352 basic_auth.setUsername("YOUR USERNAME"); 2353 basic_auth.setPassword("YOUR PASSWORD"); 2354 2355 // Configure API key authorization: cookie_auth 2356 ApiKeyAuth cookie_auth = (ApiKeyAuth) defaultClient.getAuthentication("cookie_auth"); 2357 cookie_auth.setApiKey("YOUR API KEY"); 2358 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 2359 //cookie_auth.setApiKeyPrefix("Token"); 2360 2361 // Configure HTTP bearer authorization: jwt_token 2362 HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); 2363 jwt_token.setBearerToken("BEARER TOKEN"); 2364 2365 // Configure API key authorization: oidc_auth 2366 ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); 2367 oidc_auth.setApiKey("YOUR API KEY"); 2368 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 2369 //oidc_auth.setApiKeyPrefix("Token"); 2370 2371 // Configure API key authorization: saml_auth 2372 ApiKeyAuth saml_auth = (ApiKeyAuth) defaultClient.getAuthentication("saml_auth"); 2373 saml_auth.setApiKey("YOUR API KEY"); 2374 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 2375 //saml_auth.setApiKeyPrefix("Token"); 2376 2377 AuthApi apiInstance = new AuthApi(defaultClient); 2378 String groupId = "groupId_example"; // String | 2379 String prefix = "prefix_example"; // String | return items prefixed with this value 2380 String after = "after_example"; // String | return items after this value 2381 Integer amount = 100; // Integer | how many items to return 2382 try { 2383 PolicyList result = apiInstance.listGroupPolicies(groupId, prefix, after, amount); 2384 System.out.println(result); 2385 } catch (ApiException e) { 2386 System.err.println("Exception when calling AuthApi#listGroupPolicies"); 2387 System.err.println("Status code: " + e.getCode()); 2388 System.err.println("Reason: " + e.getResponseBody()); 2389 System.err.println("Response headers: " + e.getResponseHeaders()); 2390 e.printStackTrace(); 2391 } 2392 } 2393 } 2394 ``` 2395 2396 ### Parameters 2397 2398 Name | Type | Description | Notes 2399 ------------- | ------------- | ------------- | ------------- 2400 **groupId** | **String**| | 2401 **prefix** | **String**| return items prefixed with this value | [optional] 2402 **after** | **String**| return items after this value | [optional] 2403 **amount** | **Integer**| how many items to return | [optional] [default to 100] 2404 2405 ### Return type 2406 2407 [**PolicyList**](PolicyList.md) 2408 2409 ### Authorization 2410 2411 [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) 2412 2413 ### HTTP request headers 2414 2415 - **Content-Type**: Not defined 2416 - **Accept**: application/json 2417 2418 ### HTTP response details 2419 | Status code | Description | Response headers | 2420 |-------------|-------------|------------------| 2421 **200** | policy list | - | 2422 **401** | Unauthorized | - | 2423 **404** | Resource Not Found | - | 2424 **420** | too many requests | - | 2425 **0** | Internal Server Error | - | 2426 2427 <a name="listGroups"></a> 2428 # **listGroups** 2429 > GroupList listGroups(prefix, after, amount) 2430 2431 list groups 2432 2433 ### Example 2434 ```java 2435 // Import classes: 2436 import io.lakefs.clients.api.ApiClient; 2437 import io.lakefs.clients.api.ApiException; 2438 import io.lakefs.clients.api.Configuration; 2439 import io.lakefs.clients.api.auth.*; 2440 import io.lakefs.clients.api.models.*; 2441 import io.lakefs.clients.api.AuthApi; 2442 2443 public class Example { 2444 public static void main(String[] args) { 2445 ApiClient defaultClient = Configuration.getDefaultApiClient(); 2446 defaultClient.setBasePath("http://localhost/api/v1"); 2447 2448 // Configure HTTP basic authorization: basic_auth 2449 HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); 2450 basic_auth.setUsername("YOUR USERNAME"); 2451 basic_auth.setPassword("YOUR PASSWORD"); 2452 2453 // Configure API key authorization: cookie_auth 2454 ApiKeyAuth cookie_auth = (ApiKeyAuth) defaultClient.getAuthentication("cookie_auth"); 2455 cookie_auth.setApiKey("YOUR API KEY"); 2456 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 2457 //cookie_auth.setApiKeyPrefix("Token"); 2458 2459 // Configure HTTP bearer authorization: jwt_token 2460 HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); 2461 jwt_token.setBearerToken("BEARER TOKEN"); 2462 2463 // Configure API key authorization: oidc_auth 2464 ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); 2465 oidc_auth.setApiKey("YOUR API KEY"); 2466 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 2467 //oidc_auth.setApiKeyPrefix("Token"); 2468 2469 // Configure API key authorization: saml_auth 2470 ApiKeyAuth saml_auth = (ApiKeyAuth) defaultClient.getAuthentication("saml_auth"); 2471 saml_auth.setApiKey("YOUR API KEY"); 2472 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 2473 //saml_auth.setApiKeyPrefix("Token"); 2474 2475 AuthApi apiInstance = new AuthApi(defaultClient); 2476 String prefix = "prefix_example"; // String | return items prefixed with this value 2477 String after = "after_example"; // String | return items after this value 2478 Integer amount = 100; // Integer | how many items to return 2479 try { 2480 GroupList result = apiInstance.listGroups(prefix, after, amount); 2481 System.out.println(result); 2482 } catch (ApiException e) { 2483 System.err.println("Exception when calling AuthApi#listGroups"); 2484 System.err.println("Status code: " + e.getCode()); 2485 System.err.println("Reason: " + e.getResponseBody()); 2486 System.err.println("Response headers: " + e.getResponseHeaders()); 2487 e.printStackTrace(); 2488 } 2489 } 2490 } 2491 ``` 2492 2493 ### Parameters 2494 2495 Name | Type | Description | Notes 2496 ------------- | ------------- | ------------- | ------------- 2497 **prefix** | **String**| return items prefixed with this value | [optional] 2498 **after** | **String**| return items after this value | [optional] 2499 **amount** | **Integer**| how many items to return | [optional] [default to 100] 2500 2501 ### Return type 2502 2503 [**GroupList**](GroupList.md) 2504 2505 ### Authorization 2506 2507 [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) 2508 2509 ### HTTP request headers 2510 2511 - **Content-Type**: Not defined 2512 - **Accept**: application/json 2513 2514 ### HTTP response details 2515 | Status code | Description | Response headers | 2516 |-------------|-------------|------------------| 2517 **200** | group list | - | 2518 **401** | Unauthorized | - | 2519 **420** | too many requests | - | 2520 **0** | Internal Server Error | - | 2521 2522 <a name="listPolicies"></a> 2523 # **listPolicies** 2524 > PolicyList listPolicies(prefix, after, amount) 2525 2526 list policies 2527 2528 ### Example 2529 ```java 2530 // Import classes: 2531 import io.lakefs.clients.api.ApiClient; 2532 import io.lakefs.clients.api.ApiException; 2533 import io.lakefs.clients.api.Configuration; 2534 import io.lakefs.clients.api.auth.*; 2535 import io.lakefs.clients.api.models.*; 2536 import io.lakefs.clients.api.AuthApi; 2537 2538 public class Example { 2539 public static void main(String[] args) { 2540 ApiClient defaultClient = Configuration.getDefaultApiClient(); 2541 defaultClient.setBasePath("http://localhost/api/v1"); 2542 2543 // Configure HTTP basic authorization: basic_auth 2544 HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); 2545 basic_auth.setUsername("YOUR USERNAME"); 2546 basic_auth.setPassword("YOUR PASSWORD"); 2547 2548 // Configure API key authorization: cookie_auth 2549 ApiKeyAuth cookie_auth = (ApiKeyAuth) defaultClient.getAuthentication("cookie_auth"); 2550 cookie_auth.setApiKey("YOUR API KEY"); 2551 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 2552 //cookie_auth.setApiKeyPrefix("Token"); 2553 2554 // Configure HTTP bearer authorization: jwt_token 2555 HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); 2556 jwt_token.setBearerToken("BEARER TOKEN"); 2557 2558 // Configure API key authorization: oidc_auth 2559 ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); 2560 oidc_auth.setApiKey("YOUR API KEY"); 2561 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 2562 //oidc_auth.setApiKeyPrefix("Token"); 2563 2564 // Configure API key authorization: saml_auth 2565 ApiKeyAuth saml_auth = (ApiKeyAuth) defaultClient.getAuthentication("saml_auth"); 2566 saml_auth.setApiKey("YOUR API KEY"); 2567 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 2568 //saml_auth.setApiKeyPrefix("Token"); 2569 2570 AuthApi apiInstance = new AuthApi(defaultClient); 2571 String prefix = "prefix_example"; // String | return items prefixed with this value 2572 String after = "after_example"; // String | return items after this value 2573 Integer amount = 100; // Integer | how many items to return 2574 try { 2575 PolicyList result = apiInstance.listPolicies(prefix, after, amount); 2576 System.out.println(result); 2577 } catch (ApiException e) { 2578 System.err.println("Exception when calling AuthApi#listPolicies"); 2579 System.err.println("Status code: " + e.getCode()); 2580 System.err.println("Reason: " + e.getResponseBody()); 2581 System.err.println("Response headers: " + e.getResponseHeaders()); 2582 e.printStackTrace(); 2583 } 2584 } 2585 } 2586 ``` 2587 2588 ### Parameters 2589 2590 Name | Type | Description | Notes 2591 ------------- | ------------- | ------------- | ------------- 2592 **prefix** | **String**| return items prefixed with this value | [optional] 2593 **after** | **String**| return items after this value | [optional] 2594 **amount** | **Integer**| how many items to return | [optional] [default to 100] 2595 2596 ### Return type 2597 2598 [**PolicyList**](PolicyList.md) 2599 2600 ### Authorization 2601 2602 [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) 2603 2604 ### HTTP request headers 2605 2606 - **Content-Type**: Not defined 2607 - **Accept**: application/json 2608 2609 ### HTTP response details 2610 | Status code | Description | Response headers | 2611 |-------------|-------------|------------------| 2612 **200** | policy list | - | 2613 **401** | Unauthorized | - | 2614 **420** | too many requests | - | 2615 **0** | Internal Server Error | - | 2616 2617 <a name="listUserCredentials"></a> 2618 # **listUserCredentials** 2619 > CredentialsList listUserCredentials(userId, prefix, after, amount) 2620 2621 list user credentials 2622 2623 ### Example 2624 ```java 2625 // Import classes: 2626 import io.lakefs.clients.api.ApiClient; 2627 import io.lakefs.clients.api.ApiException; 2628 import io.lakefs.clients.api.Configuration; 2629 import io.lakefs.clients.api.auth.*; 2630 import io.lakefs.clients.api.models.*; 2631 import io.lakefs.clients.api.AuthApi; 2632 2633 public class Example { 2634 public static void main(String[] args) { 2635 ApiClient defaultClient = Configuration.getDefaultApiClient(); 2636 defaultClient.setBasePath("http://localhost/api/v1"); 2637 2638 // Configure HTTP basic authorization: basic_auth 2639 HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); 2640 basic_auth.setUsername("YOUR USERNAME"); 2641 basic_auth.setPassword("YOUR PASSWORD"); 2642 2643 // Configure API key authorization: cookie_auth 2644 ApiKeyAuth cookie_auth = (ApiKeyAuth) defaultClient.getAuthentication("cookie_auth"); 2645 cookie_auth.setApiKey("YOUR API KEY"); 2646 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 2647 //cookie_auth.setApiKeyPrefix("Token"); 2648 2649 // Configure HTTP bearer authorization: jwt_token 2650 HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); 2651 jwt_token.setBearerToken("BEARER TOKEN"); 2652 2653 // Configure API key authorization: oidc_auth 2654 ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); 2655 oidc_auth.setApiKey("YOUR API KEY"); 2656 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 2657 //oidc_auth.setApiKeyPrefix("Token"); 2658 2659 // Configure API key authorization: saml_auth 2660 ApiKeyAuth saml_auth = (ApiKeyAuth) defaultClient.getAuthentication("saml_auth"); 2661 saml_auth.setApiKey("YOUR API KEY"); 2662 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 2663 //saml_auth.setApiKeyPrefix("Token"); 2664 2665 AuthApi apiInstance = new AuthApi(defaultClient); 2666 String userId = "userId_example"; // String | 2667 String prefix = "prefix_example"; // String | return items prefixed with this value 2668 String after = "after_example"; // String | return items after this value 2669 Integer amount = 100; // Integer | how many items to return 2670 try { 2671 CredentialsList result = apiInstance.listUserCredentials(userId, prefix, after, amount); 2672 System.out.println(result); 2673 } catch (ApiException e) { 2674 System.err.println("Exception when calling AuthApi#listUserCredentials"); 2675 System.err.println("Status code: " + e.getCode()); 2676 System.err.println("Reason: " + e.getResponseBody()); 2677 System.err.println("Response headers: " + e.getResponseHeaders()); 2678 e.printStackTrace(); 2679 } 2680 } 2681 } 2682 ``` 2683 2684 ### Parameters 2685 2686 Name | Type | Description | Notes 2687 ------------- | ------------- | ------------- | ------------- 2688 **userId** | **String**| | 2689 **prefix** | **String**| return items prefixed with this value | [optional] 2690 **after** | **String**| return items after this value | [optional] 2691 **amount** | **Integer**| how many items to return | [optional] [default to 100] 2692 2693 ### Return type 2694 2695 [**CredentialsList**](CredentialsList.md) 2696 2697 ### Authorization 2698 2699 [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) 2700 2701 ### HTTP request headers 2702 2703 - **Content-Type**: Not defined 2704 - **Accept**: application/json 2705 2706 ### HTTP response details 2707 | Status code | Description | Response headers | 2708 |-------------|-------------|------------------| 2709 **200** | credential list | - | 2710 **401** | Unauthorized | - | 2711 **404** | Resource Not Found | - | 2712 **420** | too many requests | - | 2713 **0** | Internal Server Error | - | 2714 2715 <a name="listUserExternalPrincipals"></a> 2716 # **listUserExternalPrincipals** 2717 > ExternalPrincipalList listUserExternalPrincipals(userId, prefix, after, amount) 2718 2719 list user external policies attached to a user 2720 2721 ### Example 2722 ```java 2723 // Import classes: 2724 import io.lakefs.clients.api.ApiClient; 2725 import io.lakefs.clients.api.ApiException; 2726 import io.lakefs.clients.api.Configuration; 2727 import io.lakefs.clients.api.auth.*; 2728 import io.lakefs.clients.api.models.*; 2729 import io.lakefs.clients.api.AuthApi; 2730 2731 public class Example { 2732 public static void main(String[] args) { 2733 ApiClient defaultClient = Configuration.getDefaultApiClient(); 2734 defaultClient.setBasePath("http://localhost/api/v1"); 2735 2736 // Configure HTTP basic authorization: basic_auth 2737 HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); 2738 basic_auth.setUsername("YOUR USERNAME"); 2739 basic_auth.setPassword("YOUR PASSWORD"); 2740 2741 // Configure API key authorization: cookie_auth 2742 ApiKeyAuth cookie_auth = (ApiKeyAuth) defaultClient.getAuthentication("cookie_auth"); 2743 cookie_auth.setApiKey("YOUR API KEY"); 2744 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 2745 //cookie_auth.setApiKeyPrefix("Token"); 2746 2747 // Configure HTTP bearer authorization: jwt_token 2748 HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); 2749 jwt_token.setBearerToken("BEARER TOKEN"); 2750 2751 // Configure API key authorization: oidc_auth 2752 ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); 2753 oidc_auth.setApiKey("YOUR API KEY"); 2754 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 2755 //oidc_auth.setApiKeyPrefix("Token"); 2756 2757 // Configure API key authorization: saml_auth 2758 ApiKeyAuth saml_auth = (ApiKeyAuth) defaultClient.getAuthentication("saml_auth"); 2759 saml_auth.setApiKey("YOUR API KEY"); 2760 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 2761 //saml_auth.setApiKeyPrefix("Token"); 2762 2763 AuthApi apiInstance = new AuthApi(defaultClient); 2764 String userId = "userId_example"; // String | 2765 String prefix = "prefix_example"; // String | return items prefixed with this value 2766 String after = "after_example"; // String | return items after this value 2767 Integer amount = 100; // Integer | how many items to return 2768 try { 2769 ExternalPrincipalList result = apiInstance.listUserExternalPrincipals(userId, prefix, after, amount); 2770 System.out.println(result); 2771 } catch (ApiException e) { 2772 System.err.println("Exception when calling AuthApi#listUserExternalPrincipals"); 2773 System.err.println("Status code: " + e.getCode()); 2774 System.err.println("Reason: " + e.getResponseBody()); 2775 System.err.println("Response headers: " + e.getResponseHeaders()); 2776 e.printStackTrace(); 2777 } 2778 } 2779 } 2780 ``` 2781 2782 ### Parameters 2783 2784 Name | Type | Description | Notes 2785 ------------- | ------------- | ------------- | ------------- 2786 **userId** | **String**| | 2787 **prefix** | **String**| return items prefixed with this value | [optional] 2788 **after** | **String**| return items after this value | [optional] 2789 **amount** | **Integer**| how many items to return | [optional] [default to 100] 2790 2791 ### Return type 2792 2793 [**ExternalPrincipalList**](ExternalPrincipalList.md) 2794 2795 ### Authorization 2796 2797 [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) 2798 2799 ### HTTP request headers 2800 2801 - **Content-Type**: Not defined 2802 - **Accept**: application/json 2803 2804 ### HTTP response details 2805 | Status code | Description | Response headers | 2806 |-------------|-------------|------------------| 2807 **200** | external principals list | - | 2808 **401** | Unauthorized | - | 2809 **404** | Resource Not Found | - | 2810 **420** | too many requests | - | 2811 **0** | Internal Server Error | - | 2812 2813 <a name="listUserGroups"></a> 2814 # **listUserGroups** 2815 > GroupList listUserGroups(userId, prefix, after, amount) 2816 2817 list user groups 2818 2819 ### Example 2820 ```java 2821 // Import classes: 2822 import io.lakefs.clients.api.ApiClient; 2823 import io.lakefs.clients.api.ApiException; 2824 import io.lakefs.clients.api.Configuration; 2825 import io.lakefs.clients.api.auth.*; 2826 import io.lakefs.clients.api.models.*; 2827 import io.lakefs.clients.api.AuthApi; 2828 2829 public class Example { 2830 public static void main(String[] args) { 2831 ApiClient defaultClient = Configuration.getDefaultApiClient(); 2832 defaultClient.setBasePath("http://localhost/api/v1"); 2833 2834 // Configure HTTP basic authorization: basic_auth 2835 HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); 2836 basic_auth.setUsername("YOUR USERNAME"); 2837 basic_auth.setPassword("YOUR PASSWORD"); 2838 2839 // Configure API key authorization: cookie_auth 2840 ApiKeyAuth cookie_auth = (ApiKeyAuth) defaultClient.getAuthentication("cookie_auth"); 2841 cookie_auth.setApiKey("YOUR API KEY"); 2842 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 2843 //cookie_auth.setApiKeyPrefix("Token"); 2844 2845 // Configure HTTP bearer authorization: jwt_token 2846 HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); 2847 jwt_token.setBearerToken("BEARER TOKEN"); 2848 2849 // Configure API key authorization: oidc_auth 2850 ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); 2851 oidc_auth.setApiKey("YOUR API KEY"); 2852 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 2853 //oidc_auth.setApiKeyPrefix("Token"); 2854 2855 // Configure API key authorization: saml_auth 2856 ApiKeyAuth saml_auth = (ApiKeyAuth) defaultClient.getAuthentication("saml_auth"); 2857 saml_auth.setApiKey("YOUR API KEY"); 2858 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 2859 //saml_auth.setApiKeyPrefix("Token"); 2860 2861 AuthApi apiInstance = new AuthApi(defaultClient); 2862 String userId = "userId_example"; // String | 2863 String prefix = "prefix_example"; // String | return items prefixed with this value 2864 String after = "after_example"; // String | return items after this value 2865 Integer amount = 100; // Integer | how many items to return 2866 try { 2867 GroupList result = apiInstance.listUserGroups(userId, prefix, after, amount); 2868 System.out.println(result); 2869 } catch (ApiException e) { 2870 System.err.println("Exception when calling AuthApi#listUserGroups"); 2871 System.err.println("Status code: " + e.getCode()); 2872 System.err.println("Reason: " + e.getResponseBody()); 2873 System.err.println("Response headers: " + e.getResponseHeaders()); 2874 e.printStackTrace(); 2875 } 2876 } 2877 } 2878 ``` 2879 2880 ### Parameters 2881 2882 Name | Type | Description | Notes 2883 ------------- | ------------- | ------------- | ------------- 2884 **userId** | **String**| | 2885 **prefix** | **String**| return items prefixed with this value | [optional] 2886 **after** | **String**| return items after this value | [optional] 2887 **amount** | **Integer**| how many items to return | [optional] [default to 100] 2888 2889 ### Return type 2890 2891 [**GroupList**](GroupList.md) 2892 2893 ### Authorization 2894 2895 [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) 2896 2897 ### HTTP request headers 2898 2899 - **Content-Type**: Not defined 2900 - **Accept**: application/json 2901 2902 ### HTTP response details 2903 | Status code | Description | Response headers | 2904 |-------------|-------------|------------------| 2905 **200** | group list | - | 2906 **401** | Unauthorized | - | 2907 **404** | Resource Not Found | - | 2908 **420** | too many requests | - | 2909 **0** | Internal Server Error | - | 2910 2911 <a name="listUserPolicies"></a> 2912 # **listUserPolicies** 2913 > PolicyList listUserPolicies(userId, prefix, after, amount, effective) 2914 2915 list user policies 2916 2917 ### Example 2918 ```java 2919 // Import classes: 2920 import io.lakefs.clients.api.ApiClient; 2921 import io.lakefs.clients.api.ApiException; 2922 import io.lakefs.clients.api.Configuration; 2923 import io.lakefs.clients.api.auth.*; 2924 import io.lakefs.clients.api.models.*; 2925 import io.lakefs.clients.api.AuthApi; 2926 2927 public class Example { 2928 public static void main(String[] args) { 2929 ApiClient defaultClient = Configuration.getDefaultApiClient(); 2930 defaultClient.setBasePath("http://localhost/api/v1"); 2931 2932 // Configure HTTP basic authorization: basic_auth 2933 HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); 2934 basic_auth.setUsername("YOUR USERNAME"); 2935 basic_auth.setPassword("YOUR PASSWORD"); 2936 2937 // Configure API key authorization: cookie_auth 2938 ApiKeyAuth cookie_auth = (ApiKeyAuth) defaultClient.getAuthentication("cookie_auth"); 2939 cookie_auth.setApiKey("YOUR API KEY"); 2940 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 2941 //cookie_auth.setApiKeyPrefix("Token"); 2942 2943 // Configure HTTP bearer authorization: jwt_token 2944 HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); 2945 jwt_token.setBearerToken("BEARER TOKEN"); 2946 2947 // Configure API key authorization: oidc_auth 2948 ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); 2949 oidc_auth.setApiKey("YOUR API KEY"); 2950 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 2951 //oidc_auth.setApiKeyPrefix("Token"); 2952 2953 // Configure API key authorization: saml_auth 2954 ApiKeyAuth saml_auth = (ApiKeyAuth) defaultClient.getAuthentication("saml_auth"); 2955 saml_auth.setApiKey("YOUR API KEY"); 2956 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 2957 //saml_auth.setApiKeyPrefix("Token"); 2958 2959 AuthApi apiInstance = new AuthApi(defaultClient); 2960 String userId = "userId_example"; // String | 2961 String prefix = "prefix_example"; // String | return items prefixed with this value 2962 String after = "after_example"; // String | return items after this value 2963 Integer amount = 100; // Integer | how many items to return 2964 Boolean effective = false; // Boolean | will return all distinct policies attached to the user or any of its groups 2965 try { 2966 PolicyList result = apiInstance.listUserPolicies(userId, prefix, after, amount, effective); 2967 System.out.println(result); 2968 } catch (ApiException e) { 2969 System.err.println("Exception when calling AuthApi#listUserPolicies"); 2970 System.err.println("Status code: " + e.getCode()); 2971 System.err.println("Reason: " + e.getResponseBody()); 2972 System.err.println("Response headers: " + e.getResponseHeaders()); 2973 e.printStackTrace(); 2974 } 2975 } 2976 } 2977 ``` 2978 2979 ### Parameters 2980 2981 Name | Type | Description | Notes 2982 ------------- | ------------- | ------------- | ------------- 2983 **userId** | **String**| | 2984 **prefix** | **String**| return items prefixed with this value | [optional] 2985 **after** | **String**| return items after this value | [optional] 2986 **amount** | **Integer**| how many items to return | [optional] [default to 100] 2987 **effective** | **Boolean**| will return all distinct policies attached to the user or any of its groups | [optional] [default to false] 2988 2989 ### Return type 2990 2991 [**PolicyList**](PolicyList.md) 2992 2993 ### Authorization 2994 2995 [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) 2996 2997 ### HTTP request headers 2998 2999 - **Content-Type**: Not defined 3000 - **Accept**: application/json 3001 3002 ### HTTP response details 3003 | Status code | Description | Response headers | 3004 |-------------|-------------|------------------| 3005 **200** | policy list | - | 3006 **401** | Unauthorized | - | 3007 **404** | Resource Not Found | - | 3008 **420** | too many requests | - | 3009 **0** | Internal Server Error | - | 3010 3011 <a name="listUsers"></a> 3012 # **listUsers** 3013 > UserList listUsers(prefix, after, amount) 3014 3015 list users 3016 3017 ### Example 3018 ```java 3019 // Import classes: 3020 import io.lakefs.clients.api.ApiClient; 3021 import io.lakefs.clients.api.ApiException; 3022 import io.lakefs.clients.api.Configuration; 3023 import io.lakefs.clients.api.auth.*; 3024 import io.lakefs.clients.api.models.*; 3025 import io.lakefs.clients.api.AuthApi; 3026 3027 public class Example { 3028 public static void main(String[] args) { 3029 ApiClient defaultClient = Configuration.getDefaultApiClient(); 3030 defaultClient.setBasePath("http://localhost/api/v1"); 3031 3032 // Configure HTTP basic authorization: basic_auth 3033 HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); 3034 basic_auth.setUsername("YOUR USERNAME"); 3035 basic_auth.setPassword("YOUR PASSWORD"); 3036 3037 // Configure API key authorization: cookie_auth 3038 ApiKeyAuth cookie_auth = (ApiKeyAuth) defaultClient.getAuthentication("cookie_auth"); 3039 cookie_auth.setApiKey("YOUR API KEY"); 3040 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 3041 //cookie_auth.setApiKeyPrefix("Token"); 3042 3043 // Configure HTTP bearer authorization: jwt_token 3044 HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); 3045 jwt_token.setBearerToken("BEARER TOKEN"); 3046 3047 // Configure API key authorization: oidc_auth 3048 ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); 3049 oidc_auth.setApiKey("YOUR API KEY"); 3050 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 3051 //oidc_auth.setApiKeyPrefix("Token"); 3052 3053 // Configure API key authorization: saml_auth 3054 ApiKeyAuth saml_auth = (ApiKeyAuth) defaultClient.getAuthentication("saml_auth"); 3055 saml_auth.setApiKey("YOUR API KEY"); 3056 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 3057 //saml_auth.setApiKeyPrefix("Token"); 3058 3059 AuthApi apiInstance = new AuthApi(defaultClient); 3060 String prefix = "prefix_example"; // String | return items prefixed with this value 3061 String after = "after_example"; // String | return items after this value 3062 Integer amount = 100; // Integer | how many items to return 3063 try { 3064 UserList result = apiInstance.listUsers(prefix, after, amount); 3065 System.out.println(result); 3066 } catch (ApiException e) { 3067 System.err.println("Exception when calling AuthApi#listUsers"); 3068 System.err.println("Status code: " + e.getCode()); 3069 System.err.println("Reason: " + e.getResponseBody()); 3070 System.err.println("Response headers: " + e.getResponseHeaders()); 3071 e.printStackTrace(); 3072 } 3073 } 3074 } 3075 ``` 3076 3077 ### Parameters 3078 3079 Name | Type | Description | Notes 3080 ------------- | ------------- | ------------- | ------------- 3081 **prefix** | **String**| return items prefixed with this value | [optional] 3082 **after** | **String**| return items after this value | [optional] 3083 **amount** | **Integer**| how many items to return | [optional] [default to 100] 3084 3085 ### Return type 3086 3087 [**UserList**](UserList.md) 3088 3089 ### Authorization 3090 3091 [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) 3092 3093 ### HTTP request headers 3094 3095 - **Content-Type**: Not defined 3096 - **Accept**: application/json 3097 3098 ### HTTP response details 3099 | Status code | Description | Response headers | 3100 |-------------|-------------|------------------| 3101 **200** | user list | - | 3102 **401** | Unauthorized | - | 3103 **420** | too many requests | - | 3104 **0** | Internal Server Error | - | 3105 3106 <a name="login"></a> 3107 # **login** 3108 > AuthenticationToken login(loginInformation) 3109 3110 perform a login 3111 3112 ### Example 3113 ```java 3114 // Import classes: 3115 import io.lakefs.clients.api.ApiClient; 3116 import io.lakefs.clients.api.ApiException; 3117 import io.lakefs.clients.api.Configuration; 3118 import io.lakefs.clients.api.models.*; 3119 import io.lakefs.clients.api.AuthApi; 3120 3121 public class Example { 3122 public static void main(String[] args) { 3123 ApiClient defaultClient = Configuration.getDefaultApiClient(); 3124 defaultClient.setBasePath("http://localhost/api/v1"); 3125 3126 AuthApi apiInstance = new AuthApi(defaultClient); 3127 LoginInformation loginInformation = new LoginInformation(); // LoginInformation | 3128 try { 3129 AuthenticationToken result = apiInstance.login(loginInformation); 3130 System.out.println(result); 3131 } catch (ApiException e) { 3132 System.err.println("Exception when calling AuthApi#login"); 3133 System.err.println("Status code: " + e.getCode()); 3134 System.err.println("Reason: " + e.getResponseBody()); 3135 System.err.println("Response headers: " + e.getResponseHeaders()); 3136 e.printStackTrace(); 3137 } 3138 } 3139 } 3140 ``` 3141 3142 ### Parameters 3143 3144 Name | Type | Description | Notes 3145 ------------- | ------------- | ------------- | ------------- 3146 **loginInformation** | [**LoginInformation**](LoginInformation.md)| | [optional] 3147 3148 ### Return type 3149 3150 [**AuthenticationToken**](AuthenticationToken.md) 3151 3152 ### Authorization 3153 3154 No authorization required 3155 3156 ### HTTP request headers 3157 3158 - **Content-Type**: application/json 3159 - **Accept**: application/json 3160 3161 ### HTTP response details 3162 | Status code | Description | Response headers | 3163 |-------------|-------------|------------------| 3164 **200** | successful login | * Set-Cookie - <br> | 3165 **401** | Unauthorized | - | 3166 **420** | too many requests | - | 3167 **0** | Internal Server Error | - | 3168 3169 <a name="setGroupACL"></a> 3170 # **setGroupACL** 3171 > setGroupACL(groupId, ACL) 3172 3173 set ACL of group 3174 3175 ### Example 3176 ```java 3177 // Import classes: 3178 import io.lakefs.clients.api.ApiClient; 3179 import io.lakefs.clients.api.ApiException; 3180 import io.lakefs.clients.api.Configuration; 3181 import io.lakefs.clients.api.auth.*; 3182 import io.lakefs.clients.api.models.*; 3183 import io.lakefs.clients.api.AuthApi; 3184 3185 public class Example { 3186 public static void main(String[] args) { 3187 ApiClient defaultClient = Configuration.getDefaultApiClient(); 3188 defaultClient.setBasePath("http://localhost/api/v1"); 3189 3190 // Configure HTTP basic authorization: basic_auth 3191 HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); 3192 basic_auth.setUsername("YOUR USERNAME"); 3193 basic_auth.setPassword("YOUR PASSWORD"); 3194 3195 // Configure API key authorization: cookie_auth 3196 ApiKeyAuth cookie_auth = (ApiKeyAuth) defaultClient.getAuthentication("cookie_auth"); 3197 cookie_auth.setApiKey("YOUR API KEY"); 3198 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 3199 //cookie_auth.setApiKeyPrefix("Token"); 3200 3201 // Configure HTTP bearer authorization: jwt_token 3202 HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); 3203 jwt_token.setBearerToken("BEARER TOKEN"); 3204 3205 // Configure API key authorization: oidc_auth 3206 ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); 3207 oidc_auth.setApiKey("YOUR API KEY"); 3208 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 3209 //oidc_auth.setApiKeyPrefix("Token"); 3210 3211 // Configure API key authorization: saml_auth 3212 ApiKeyAuth saml_auth = (ApiKeyAuth) defaultClient.getAuthentication("saml_auth"); 3213 saml_auth.setApiKey("YOUR API KEY"); 3214 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 3215 //saml_auth.setApiKeyPrefix("Token"); 3216 3217 AuthApi apiInstance = new AuthApi(defaultClient); 3218 String groupId = "groupId_example"; // String | 3219 ACL ACL = new ACL(); // ACL | 3220 try { 3221 apiInstance.setGroupACL(groupId, ACL); 3222 } catch (ApiException e) { 3223 System.err.println("Exception when calling AuthApi#setGroupACL"); 3224 System.err.println("Status code: " + e.getCode()); 3225 System.err.println("Reason: " + e.getResponseBody()); 3226 System.err.println("Response headers: " + e.getResponseHeaders()); 3227 e.printStackTrace(); 3228 } 3229 } 3230 } 3231 ``` 3232 3233 ### Parameters 3234 3235 Name | Type | Description | Notes 3236 ------------- | ------------- | ------------- | ------------- 3237 **groupId** | **String**| | 3238 **ACL** | [**ACL**](ACL.md)| | 3239 3240 ### Return type 3241 3242 null (empty response body) 3243 3244 ### Authorization 3245 3246 [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) 3247 3248 ### HTTP request headers 3249 3250 - **Content-Type**: application/json 3251 - **Accept**: application/json 3252 3253 ### HTTP response details 3254 | Status code | Description | Response headers | 3255 |-------------|-------------|------------------| 3256 **201** | ACL successfully changed | - | 3257 **401** | Unauthorized | - | 3258 **404** | Resource Not Found | - | 3259 **420** | too many requests | - | 3260 **0** | Internal Server Error | - | 3261 3262 <a name="updatePolicy"></a> 3263 # **updatePolicy** 3264 > Policy updatePolicy(policyId, policy) 3265 3266 update policy 3267 3268 ### Example 3269 ```java 3270 // Import classes: 3271 import io.lakefs.clients.api.ApiClient; 3272 import io.lakefs.clients.api.ApiException; 3273 import io.lakefs.clients.api.Configuration; 3274 import io.lakefs.clients.api.auth.*; 3275 import io.lakefs.clients.api.models.*; 3276 import io.lakefs.clients.api.AuthApi; 3277 3278 public class Example { 3279 public static void main(String[] args) { 3280 ApiClient defaultClient = Configuration.getDefaultApiClient(); 3281 defaultClient.setBasePath("http://localhost/api/v1"); 3282 3283 // Configure HTTP basic authorization: basic_auth 3284 HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); 3285 basic_auth.setUsername("YOUR USERNAME"); 3286 basic_auth.setPassword("YOUR PASSWORD"); 3287 3288 // Configure API key authorization: cookie_auth 3289 ApiKeyAuth cookie_auth = (ApiKeyAuth) defaultClient.getAuthentication("cookie_auth"); 3290 cookie_auth.setApiKey("YOUR API KEY"); 3291 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 3292 //cookie_auth.setApiKeyPrefix("Token"); 3293 3294 // Configure HTTP bearer authorization: jwt_token 3295 HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); 3296 jwt_token.setBearerToken("BEARER TOKEN"); 3297 3298 // Configure API key authorization: oidc_auth 3299 ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); 3300 oidc_auth.setApiKey("YOUR API KEY"); 3301 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 3302 //oidc_auth.setApiKeyPrefix("Token"); 3303 3304 // Configure API key authorization: saml_auth 3305 ApiKeyAuth saml_auth = (ApiKeyAuth) defaultClient.getAuthentication("saml_auth"); 3306 saml_auth.setApiKey("YOUR API KEY"); 3307 // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 3308 //saml_auth.setApiKeyPrefix("Token"); 3309 3310 AuthApi apiInstance = new AuthApi(defaultClient); 3311 String policyId = "policyId_example"; // String | 3312 Policy policy = new Policy(); // Policy | 3313 try { 3314 Policy result = apiInstance.updatePolicy(policyId, policy); 3315 System.out.println(result); 3316 } catch (ApiException e) { 3317 System.err.println("Exception when calling AuthApi#updatePolicy"); 3318 System.err.println("Status code: " + e.getCode()); 3319 System.err.println("Reason: " + e.getResponseBody()); 3320 System.err.println("Response headers: " + e.getResponseHeaders()); 3321 e.printStackTrace(); 3322 } 3323 } 3324 } 3325 ``` 3326 3327 ### Parameters 3328 3329 Name | Type | Description | Notes 3330 ------------- | ------------- | ------------- | ------------- 3331 **policyId** | **String**| | 3332 **policy** | [**Policy**](Policy.md)| | 3333 3334 ### Return type 3335 3336 [**Policy**](Policy.md) 3337 3338 ### Authorization 3339 3340 [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) 3341 3342 ### HTTP request headers 3343 3344 - **Content-Type**: application/json 3345 - **Accept**: application/json 3346 3347 ### HTTP response details 3348 | Status code | Description | Response headers | 3349 |-------------|-------------|------------------| 3350 **200** | policy | - | 3351 **400** | Validation Error | - | 3352 **401** | Unauthorized | - | 3353 **404** | Resource Not Found | - | 3354 **420** | too many requests | - | 3355 **0** | Internal Server Error | - | 3356