github.com/treeverse/lakefs@v1.24.1-0.20240520134607-95648127bfb0/clients/python/docs/ExperimentalApi.md (about) 1 # lakefs_sdk.ExperimentalApi 2 3 All URIs are relative to */api/v1* 4 5 Method | HTTP request | Description 6 ------------- | ------------- | ------------- 7 [**abort_presign_multipart_upload**](ExperimentalApi.md#abort_presign_multipart_upload) | **DELETE** /repositories/{repository}/branches/{branch}/staging/pmpu/{uploadId} | Abort a presign multipart upload 8 [**complete_presign_multipart_upload**](ExperimentalApi.md#complete_presign_multipart_upload) | **PUT** /repositories/{repository}/branches/{branch}/staging/pmpu/{uploadId} | Complete a presign multipart upload request 9 [**create_presign_multipart_upload**](ExperimentalApi.md#create_presign_multipart_upload) | **POST** /repositories/{repository}/branches/{branch}/staging/pmpu | Initiate a multipart upload 10 [**create_user_external_principal**](ExperimentalApi.md#create_user_external_principal) | **POST** /auth/users/{userId}/external/principals | attach external principal to user 11 [**delete_user_external_principal**](ExperimentalApi.md#delete_user_external_principal) | **DELETE** /auth/users/{userId}/external/principals | delete external principal from user 12 [**external_principal_login**](ExperimentalApi.md#external_principal_login) | **POST** /auth/external/principal/login | perform a login using an external authenticator 13 [**get_external_principal**](ExperimentalApi.md#get_external_principal) | **GET** /auth/external/principals | describe external principal by id 14 [**hard_reset_branch**](ExperimentalApi.md#hard_reset_branch) | **PUT** /repositories/{repository}/branches/{branch}/hard_reset | hard reset branch 15 [**list_user_external_principals**](ExperimentalApi.md#list_user_external_principals) | **GET** /auth/users/{userId}/external/principals/ls | list user external policies attached to a user 16 [**sts_login**](ExperimentalApi.md#sts_login) | **POST** /sts/login | perform a login with STS 17 18 19 # **abort_presign_multipart_upload** 20 > abort_presign_multipart_upload(repository, branch, upload_id, path, abort_presign_multipart_upload=abort_presign_multipart_upload) 21 22 Abort a presign multipart upload 23 24 Aborts a presign multipart upload. 25 26 ### Example 27 28 * Basic Authentication (basic_auth): 29 * Api Key Authentication (cookie_auth): 30 * Api Key Authentication (oidc_auth): 31 * Api Key Authentication (saml_auth): 32 * Bearer (JWT) Authentication (jwt_token): 33 34 ```python 35 import time 36 import os 37 import lakefs_sdk 38 from lakefs_sdk.models.abort_presign_multipart_upload import AbortPresignMultipartUpload 39 from lakefs_sdk.rest import ApiException 40 from pprint import pprint 41 42 # Defining the host is optional and defaults to /api/v1 43 # See configuration.py for a list of all supported configuration parameters. 44 configuration = lakefs_sdk.Configuration( 45 host = "/api/v1" 46 ) 47 48 # The client must configure the authentication and authorization parameters 49 # in accordance with the API server security policy. 50 # Examples for each auth method are provided below, use the example that 51 # satisfies your auth use case. 52 53 # Configure HTTP basic authorization: basic_auth 54 configuration = lakefs_sdk.Configuration( 55 username = os.environ["USERNAME"], 56 password = os.environ["PASSWORD"] 57 ) 58 59 # Configure API key authorization: cookie_auth 60 configuration.api_key['cookie_auth'] = os.environ["API_KEY"] 61 62 # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed 63 # configuration.api_key_prefix['cookie_auth'] = 'Bearer' 64 65 # Configure API key authorization: oidc_auth 66 configuration.api_key['oidc_auth'] = os.environ["API_KEY"] 67 68 # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed 69 # configuration.api_key_prefix['oidc_auth'] = 'Bearer' 70 71 # Configure API key authorization: saml_auth 72 configuration.api_key['saml_auth'] = os.environ["API_KEY"] 73 74 # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed 75 # configuration.api_key_prefix['saml_auth'] = 'Bearer' 76 77 # Configure Bearer authorization (JWT): jwt_token 78 configuration = lakefs_sdk.Configuration( 79 access_token = os.environ["BEARER_TOKEN"] 80 ) 81 82 # Enter a context with an instance of the API client 83 with lakefs_sdk.ApiClient(configuration) as api_client: 84 # Create an instance of the API class 85 api_instance = lakefs_sdk.ExperimentalApi(api_client) 86 repository = 'repository_example' # str | 87 branch = 'branch_example' # str | 88 upload_id = 'upload_id_example' # str | 89 path = 'path_example' # str | relative to the branch 90 abort_presign_multipart_upload = lakefs_sdk.AbortPresignMultipartUpload() # AbortPresignMultipartUpload | (optional) 91 92 try: 93 # Abort a presign multipart upload 94 api_instance.abort_presign_multipart_upload(repository, branch, upload_id, path, abort_presign_multipart_upload=abort_presign_multipart_upload) 95 except Exception as e: 96 print("Exception when calling ExperimentalApi->abort_presign_multipart_upload: %s\n" % e) 97 ``` 98 99 100 101 ### Parameters 102 103 104 Name | Type | Description | Notes 105 ------------- | ------------- | ------------- | ------------- 106 **repository** | **str**| | 107 **branch** | **str**| | 108 **upload_id** | **str**| | 109 **path** | **str**| relative to the branch | 110 **abort_presign_multipart_upload** | [**AbortPresignMultipartUpload**](AbortPresignMultipartUpload.md)| | [optional] 111 112 ### Return type 113 114 void (empty response body) 115 116 ### Authorization 117 118 [basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth), [jwt_token](../README.md#jwt_token) 119 120 ### HTTP request headers 121 122 - **Content-Type**: application/json 123 - **Accept**: application/json 124 125 ### HTTP response details 126 127 | Status code | Description | Response headers | 128 |-------------|-------------|------------------| 129 **204** | Presign multipart upload aborted | - | 130 **400** | Bad Request | - | 131 **401** | Unauthorized | - | 132 **404** | Resource Not Found | - | 133 **420** | too many requests | - | 134 **0** | Internal Server Error | - | 135 136 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) 137 138 # **complete_presign_multipart_upload** 139 > ObjectStats complete_presign_multipart_upload(repository, branch, upload_id, path, complete_presign_multipart_upload=complete_presign_multipart_upload) 140 141 Complete a presign multipart upload request 142 143 Completes a presign multipart upload by assembling the uploaded parts. 144 145 ### Example 146 147 * Basic Authentication (basic_auth): 148 * Api Key Authentication (cookie_auth): 149 * Api Key Authentication (oidc_auth): 150 * Api Key Authentication (saml_auth): 151 * Bearer (JWT) Authentication (jwt_token): 152 153 ```python 154 import time 155 import os 156 import lakefs_sdk 157 from lakefs_sdk.models.complete_presign_multipart_upload import CompletePresignMultipartUpload 158 from lakefs_sdk.models.object_stats import ObjectStats 159 from lakefs_sdk.rest import ApiException 160 from pprint import pprint 161 162 # Defining the host is optional and defaults to /api/v1 163 # See configuration.py for a list of all supported configuration parameters. 164 configuration = lakefs_sdk.Configuration( 165 host = "/api/v1" 166 ) 167 168 # The client must configure the authentication and authorization parameters 169 # in accordance with the API server security policy. 170 # Examples for each auth method are provided below, use the example that 171 # satisfies your auth use case. 172 173 # Configure HTTP basic authorization: basic_auth 174 configuration = lakefs_sdk.Configuration( 175 username = os.environ["USERNAME"], 176 password = os.environ["PASSWORD"] 177 ) 178 179 # Configure API key authorization: cookie_auth 180 configuration.api_key['cookie_auth'] = os.environ["API_KEY"] 181 182 # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed 183 # configuration.api_key_prefix['cookie_auth'] = 'Bearer' 184 185 # Configure API key authorization: oidc_auth 186 configuration.api_key['oidc_auth'] = os.environ["API_KEY"] 187 188 # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed 189 # configuration.api_key_prefix['oidc_auth'] = 'Bearer' 190 191 # Configure API key authorization: saml_auth 192 configuration.api_key['saml_auth'] = os.environ["API_KEY"] 193 194 # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed 195 # configuration.api_key_prefix['saml_auth'] = 'Bearer' 196 197 # Configure Bearer authorization (JWT): jwt_token 198 configuration = lakefs_sdk.Configuration( 199 access_token = os.environ["BEARER_TOKEN"] 200 ) 201 202 # Enter a context with an instance of the API client 203 with lakefs_sdk.ApiClient(configuration) as api_client: 204 # Create an instance of the API class 205 api_instance = lakefs_sdk.ExperimentalApi(api_client) 206 repository = 'repository_example' # str | 207 branch = 'branch_example' # str | 208 upload_id = 'upload_id_example' # str | 209 path = 'path_example' # str | relative to the branch 210 complete_presign_multipart_upload = lakefs_sdk.CompletePresignMultipartUpload() # CompletePresignMultipartUpload | (optional) 211 212 try: 213 # Complete a presign multipart upload request 214 api_response = api_instance.complete_presign_multipart_upload(repository, branch, upload_id, path, complete_presign_multipart_upload=complete_presign_multipart_upload) 215 print("The response of ExperimentalApi->complete_presign_multipart_upload:\n") 216 pprint(api_response) 217 except Exception as e: 218 print("Exception when calling ExperimentalApi->complete_presign_multipart_upload: %s\n" % e) 219 ``` 220 221 222 223 ### Parameters 224 225 226 Name | Type | Description | Notes 227 ------------- | ------------- | ------------- | ------------- 228 **repository** | **str**| | 229 **branch** | **str**| | 230 **upload_id** | **str**| | 231 **path** | **str**| relative to the branch | 232 **complete_presign_multipart_upload** | [**CompletePresignMultipartUpload**](CompletePresignMultipartUpload.md)| | [optional] 233 234 ### Return type 235 236 [**ObjectStats**](ObjectStats.md) 237 238 ### Authorization 239 240 [basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth), [jwt_token](../README.md#jwt_token) 241 242 ### HTTP request headers 243 244 - **Content-Type**: application/json 245 - **Accept**: application/json 246 247 ### HTTP response details 248 249 | Status code | Description | Response headers | 250 |-------------|-------------|------------------| 251 **200** | Presign multipart upload completed | - | 252 **400** | Bad Request | - | 253 **401** | Unauthorized | - | 254 **404** | Resource Not Found | - | 255 **409** | conflict with a commit, try here | - | 256 **420** | too many requests | - | 257 **0** | Internal Server Error | - | 258 259 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) 260 261 # **create_presign_multipart_upload** 262 > PresignMultipartUpload create_presign_multipart_upload(repository, branch, path, parts=parts) 263 264 Initiate a multipart upload 265 266 Initiates a multipart upload and returns an upload ID with presigned URLs for each part (optional). Part numbers starts with 1. Each part except the last one has minimum size depends on the underlying blockstore implementation. For example working with S3 blockstore, minimum size is 5MB (excluding the last part). 267 268 ### Example 269 270 * Basic Authentication (basic_auth): 271 * Api Key Authentication (cookie_auth): 272 * Api Key Authentication (oidc_auth): 273 * Api Key Authentication (saml_auth): 274 * Bearer (JWT) Authentication (jwt_token): 275 276 ```python 277 import time 278 import os 279 import lakefs_sdk 280 from lakefs_sdk.models.presign_multipart_upload import PresignMultipartUpload 281 from lakefs_sdk.rest import ApiException 282 from pprint import pprint 283 284 # Defining the host is optional and defaults to /api/v1 285 # See configuration.py for a list of all supported configuration parameters. 286 configuration = lakefs_sdk.Configuration( 287 host = "/api/v1" 288 ) 289 290 # The client must configure the authentication and authorization parameters 291 # in accordance with the API server security policy. 292 # Examples for each auth method are provided below, use the example that 293 # satisfies your auth use case. 294 295 # Configure HTTP basic authorization: basic_auth 296 configuration = lakefs_sdk.Configuration( 297 username = os.environ["USERNAME"], 298 password = os.environ["PASSWORD"] 299 ) 300 301 # Configure API key authorization: cookie_auth 302 configuration.api_key['cookie_auth'] = os.environ["API_KEY"] 303 304 # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed 305 # configuration.api_key_prefix['cookie_auth'] = 'Bearer' 306 307 # Configure API key authorization: oidc_auth 308 configuration.api_key['oidc_auth'] = os.environ["API_KEY"] 309 310 # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed 311 # configuration.api_key_prefix['oidc_auth'] = 'Bearer' 312 313 # Configure API key authorization: saml_auth 314 configuration.api_key['saml_auth'] = os.environ["API_KEY"] 315 316 # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed 317 # configuration.api_key_prefix['saml_auth'] = 'Bearer' 318 319 # Configure Bearer authorization (JWT): jwt_token 320 configuration = lakefs_sdk.Configuration( 321 access_token = os.environ["BEARER_TOKEN"] 322 ) 323 324 # Enter a context with an instance of the API client 325 with lakefs_sdk.ApiClient(configuration) as api_client: 326 # Create an instance of the API class 327 api_instance = lakefs_sdk.ExperimentalApi(api_client) 328 repository = 'repository_example' # str | 329 branch = 'branch_example' # str | 330 path = 'path_example' # str | relative to the branch 331 parts = 56 # int | number of presigned URL parts required to upload (optional) 332 333 try: 334 # Initiate a multipart upload 335 api_response = api_instance.create_presign_multipart_upload(repository, branch, path, parts=parts) 336 print("The response of ExperimentalApi->create_presign_multipart_upload:\n") 337 pprint(api_response) 338 except Exception as e: 339 print("Exception when calling ExperimentalApi->create_presign_multipart_upload: %s\n" % e) 340 ``` 341 342 343 344 ### Parameters 345 346 347 Name | Type | Description | Notes 348 ------------- | ------------- | ------------- | ------------- 349 **repository** | **str**| | 350 **branch** | **str**| | 351 **path** | **str**| relative to the branch | 352 **parts** | **int**| number of presigned URL parts required to upload | [optional] 353 354 ### Return type 355 356 [**PresignMultipartUpload**](PresignMultipartUpload.md) 357 358 ### Authorization 359 360 [basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth), [jwt_token](../README.md#jwt_token) 361 362 ### HTTP request headers 363 364 - **Content-Type**: Not defined 365 - **Accept**: application/json 366 367 ### HTTP response details 368 369 | Status code | Description | Response headers | 370 |-------------|-------------|------------------| 371 **201** | Presign multipart upload initiated | - | 372 **400** | Bad Request | - | 373 **401** | Unauthorized | - | 374 **404** | Resource Not Found | - | 375 **420** | too many requests | - | 376 **0** | Internal Server Error | - | 377 378 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) 379 380 # **create_user_external_principal** 381 > create_user_external_principal(user_id, principal_id, external_principal_creation=external_principal_creation) 382 383 attach external principal to user 384 385 ### Example 386 387 * Basic Authentication (basic_auth): 388 * Api Key Authentication (cookie_auth): 389 * Api Key Authentication (oidc_auth): 390 * Api Key Authentication (saml_auth): 391 * Bearer (JWT) Authentication (jwt_token): 392 393 ```python 394 import time 395 import os 396 import lakefs_sdk 397 from lakefs_sdk.models.external_principal_creation import ExternalPrincipalCreation 398 from lakefs_sdk.rest import ApiException 399 from pprint import pprint 400 401 # Defining the host is optional and defaults to /api/v1 402 # See configuration.py for a list of all supported configuration parameters. 403 configuration = lakefs_sdk.Configuration( 404 host = "/api/v1" 405 ) 406 407 # The client must configure the authentication and authorization parameters 408 # in accordance with the API server security policy. 409 # Examples for each auth method are provided below, use the example that 410 # satisfies your auth use case. 411 412 # Configure HTTP basic authorization: basic_auth 413 configuration = lakefs_sdk.Configuration( 414 username = os.environ["USERNAME"], 415 password = os.environ["PASSWORD"] 416 ) 417 418 # Configure API key authorization: cookie_auth 419 configuration.api_key['cookie_auth'] = os.environ["API_KEY"] 420 421 # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed 422 # configuration.api_key_prefix['cookie_auth'] = 'Bearer' 423 424 # Configure API key authorization: oidc_auth 425 configuration.api_key['oidc_auth'] = os.environ["API_KEY"] 426 427 # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed 428 # configuration.api_key_prefix['oidc_auth'] = 'Bearer' 429 430 # Configure API key authorization: saml_auth 431 configuration.api_key['saml_auth'] = os.environ["API_KEY"] 432 433 # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed 434 # configuration.api_key_prefix['saml_auth'] = 'Bearer' 435 436 # Configure Bearer authorization (JWT): jwt_token 437 configuration = lakefs_sdk.Configuration( 438 access_token = os.environ["BEARER_TOKEN"] 439 ) 440 441 # Enter a context with an instance of the API client 442 with lakefs_sdk.ApiClient(configuration) as api_client: 443 # Create an instance of the API class 444 api_instance = lakefs_sdk.ExperimentalApi(api_client) 445 user_id = 'user_id_example' # str | 446 principal_id = 'principal_id_example' # str | 447 external_principal_creation = lakefs_sdk.ExternalPrincipalCreation() # ExternalPrincipalCreation | (optional) 448 449 try: 450 # attach external principal to user 451 api_instance.create_user_external_principal(user_id, principal_id, external_principal_creation=external_principal_creation) 452 except Exception as e: 453 print("Exception when calling ExperimentalApi->create_user_external_principal: %s\n" % e) 454 ``` 455 456 457 458 ### Parameters 459 460 461 Name | Type | Description | Notes 462 ------------- | ------------- | ------------- | ------------- 463 **user_id** | **str**| | 464 **principal_id** | **str**| | 465 **external_principal_creation** | [**ExternalPrincipalCreation**](ExternalPrincipalCreation.md)| | [optional] 466 467 ### Return type 468 469 void (empty response body) 470 471 ### Authorization 472 473 [basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth), [jwt_token](../README.md#jwt_token) 474 475 ### HTTP request headers 476 477 - **Content-Type**: application/json 478 - **Accept**: application/json 479 480 ### HTTP response details 481 482 | Status code | Description | Response headers | 483 |-------------|-------------|------------------| 484 **201** | external principal attached successfully | - | 485 **401** | Unauthorized | - | 486 **404** | Resource Not Found | - | 487 **409** | Resource Conflicts With Target | - | 488 **420** | too many requests | - | 489 **0** | Internal Server Error | - | 490 491 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) 492 493 # **delete_user_external_principal** 494 > delete_user_external_principal(user_id, principal_id) 495 496 delete external principal from user 497 498 ### Example 499 500 * Basic Authentication (basic_auth): 501 * Api Key Authentication (cookie_auth): 502 * Api Key Authentication (oidc_auth): 503 * Api Key Authentication (saml_auth): 504 * Bearer (JWT) Authentication (jwt_token): 505 506 ```python 507 import time 508 import os 509 import lakefs_sdk 510 from lakefs_sdk.rest import ApiException 511 from pprint import pprint 512 513 # Defining the host is optional and defaults to /api/v1 514 # See configuration.py for a list of all supported configuration parameters. 515 configuration = lakefs_sdk.Configuration( 516 host = "/api/v1" 517 ) 518 519 # The client must configure the authentication and authorization parameters 520 # in accordance with the API server security policy. 521 # Examples for each auth method are provided below, use the example that 522 # satisfies your auth use case. 523 524 # Configure HTTP basic authorization: basic_auth 525 configuration = lakefs_sdk.Configuration( 526 username = os.environ["USERNAME"], 527 password = os.environ["PASSWORD"] 528 ) 529 530 # Configure API key authorization: cookie_auth 531 configuration.api_key['cookie_auth'] = os.environ["API_KEY"] 532 533 # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed 534 # configuration.api_key_prefix['cookie_auth'] = 'Bearer' 535 536 # Configure API key authorization: oidc_auth 537 configuration.api_key['oidc_auth'] = os.environ["API_KEY"] 538 539 # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed 540 # configuration.api_key_prefix['oidc_auth'] = 'Bearer' 541 542 # Configure API key authorization: saml_auth 543 configuration.api_key['saml_auth'] = os.environ["API_KEY"] 544 545 # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed 546 # configuration.api_key_prefix['saml_auth'] = 'Bearer' 547 548 # Configure Bearer authorization (JWT): jwt_token 549 configuration = lakefs_sdk.Configuration( 550 access_token = os.environ["BEARER_TOKEN"] 551 ) 552 553 # Enter a context with an instance of the API client 554 with lakefs_sdk.ApiClient(configuration) as api_client: 555 # Create an instance of the API class 556 api_instance = lakefs_sdk.ExperimentalApi(api_client) 557 user_id = 'user_id_example' # str | 558 principal_id = 'principal_id_example' # str | 559 560 try: 561 # delete external principal from user 562 api_instance.delete_user_external_principal(user_id, principal_id) 563 except Exception as e: 564 print("Exception when calling ExperimentalApi->delete_user_external_principal: %s\n" % e) 565 ``` 566 567 568 569 ### Parameters 570 571 572 Name | Type | Description | Notes 573 ------------- | ------------- | ------------- | ------------- 574 **user_id** | **str**| | 575 **principal_id** | **str**| | 576 577 ### Return type 578 579 void (empty response body) 580 581 ### Authorization 582 583 [basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth), [jwt_token](../README.md#jwt_token) 584 585 ### HTTP request headers 586 587 - **Content-Type**: Not defined 588 - **Accept**: application/json 589 590 ### HTTP response details 591 592 | Status code | Description | Response headers | 593 |-------------|-------------|------------------| 594 **204** | external principal detached successfully | - | 595 **401** | Unauthorized | - | 596 **404** | Resource Not Found | - | 597 **420** | too many requests | - | 598 **0** | Internal Server Error | - | 599 600 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) 601 602 # **external_principal_login** 603 > AuthenticationToken external_principal_login(external_login_information=external_login_information) 604 605 perform a login using an external authenticator 606 607 ### Example 608 609 610 ```python 611 import time 612 import os 613 import lakefs_sdk 614 from lakefs_sdk.models.authentication_token import AuthenticationToken 615 from lakefs_sdk.models.external_login_information import ExternalLoginInformation 616 from lakefs_sdk.rest import ApiException 617 from pprint import pprint 618 619 # Defining the host is optional and defaults to /api/v1 620 # See configuration.py for a list of all supported configuration parameters. 621 configuration = lakefs_sdk.Configuration( 622 host = "/api/v1" 623 ) 624 625 626 # Enter a context with an instance of the API client 627 with lakefs_sdk.ApiClient(configuration) as api_client: 628 # Create an instance of the API class 629 api_instance = lakefs_sdk.ExperimentalApi(api_client) 630 external_login_information = lakefs_sdk.ExternalLoginInformation() # ExternalLoginInformation | (optional) 631 632 try: 633 # perform a login using an external authenticator 634 api_response = api_instance.external_principal_login(external_login_information=external_login_information) 635 print("The response of ExperimentalApi->external_principal_login:\n") 636 pprint(api_response) 637 except Exception as e: 638 print("Exception when calling ExperimentalApi->external_principal_login: %s\n" % e) 639 ``` 640 641 642 643 ### Parameters 644 645 646 Name | Type | Description | Notes 647 ------------- | ------------- | ------------- | ------------- 648 **external_login_information** | [**ExternalLoginInformation**](ExternalLoginInformation.md)| | [optional] 649 650 ### Return type 651 652 [**AuthenticationToken**](AuthenticationToken.md) 653 654 ### Authorization 655 656 No authorization required 657 658 ### HTTP request headers 659 660 - **Content-Type**: application/json 661 - **Accept**: application/json 662 663 ### HTTP response details 664 665 | Status code | Description | Response headers | 666 |-------------|-------------|------------------| 667 **200** | successful external login | - | 668 **400** | Bad Request | - | 669 **401** | Unauthorized | - | 670 **403** | Forbidden | - | 671 **404** | Resource Not Found | - | 672 **420** | too many requests | - | 673 **0** | Internal Server Error | - | 674 675 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) 676 677 # **get_external_principal** 678 > ExternalPrincipal get_external_principal(principal_id) 679 680 describe external principal by id 681 682 ### Example 683 684 * Basic Authentication (basic_auth): 685 * Api Key Authentication (cookie_auth): 686 * Api Key Authentication (oidc_auth): 687 * Api Key Authentication (saml_auth): 688 * Bearer (JWT) Authentication (jwt_token): 689 690 ```python 691 import time 692 import os 693 import lakefs_sdk 694 from lakefs_sdk.models.external_principal import ExternalPrincipal 695 from lakefs_sdk.rest import ApiException 696 from pprint import pprint 697 698 # Defining the host is optional and defaults to /api/v1 699 # See configuration.py for a list of all supported configuration parameters. 700 configuration = lakefs_sdk.Configuration( 701 host = "/api/v1" 702 ) 703 704 # The client must configure the authentication and authorization parameters 705 # in accordance with the API server security policy. 706 # Examples for each auth method are provided below, use the example that 707 # satisfies your auth use case. 708 709 # Configure HTTP basic authorization: basic_auth 710 configuration = lakefs_sdk.Configuration( 711 username = os.environ["USERNAME"], 712 password = os.environ["PASSWORD"] 713 ) 714 715 # Configure API key authorization: cookie_auth 716 configuration.api_key['cookie_auth'] = os.environ["API_KEY"] 717 718 # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed 719 # configuration.api_key_prefix['cookie_auth'] = 'Bearer' 720 721 # Configure API key authorization: oidc_auth 722 configuration.api_key['oidc_auth'] = os.environ["API_KEY"] 723 724 # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed 725 # configuration.api_key_prefix['oidc_auth'] = 'Bearer' 726 727 # Configure API key authorization: saml_auth 728 configuration.api_key['saml_auth'] = os.environ["API_KEY"] 729 730 # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed 731 # configuration.api_key_prefix['saml_auth'] = 'Bearer' 732 733 # Configure Bearer authorization (JWT): jwt_token 734 configuration = lakefs_sdk.Configuration( 735 access_token = os.environ["BEARER_TOKEN"] 736 ) 737 738 # Enter a context with an instance of the API client 739 with lakefs_sdk.ApiClient(configuration) as api_client: 740 # Create an instance of the API class 741 api_instance = lakefs_sdk.ExperimentalApi(api_client) 742 principal_id = 'principal_id_example' # str | 743 744 try: 745 # describe external principal by id 746 api_response = api_instance.get_external_principal(principal_id) 747 print("The response of ExperimentalApi->get_external_principal:\n") 748 pprint(api_response) 749 except Exception as e: 750 print("Exception when calling ExperimentalApi->get_external_principal: %s\n" % e) 751 ``` 752 753 754 755 ### Parameters 756 757 758 Name | Type | Description | Notes 759 ------------- | ------------- | ------------- | ------------- 760 **principal_id** | **str**| | 761 762 ### Return type 763 764 [**ExternalPrincipal**](ExternalPrincipal.md) 765 766 ### Authorization 767 768 [basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth), [jwt_token](../README.md#jwt_token) 769 770 ### HTTP request headers 771 772 - **Content-Type**: Not defined 773 - **Accept**: application/json 774 775 ### HTTP response details 776 777 | Status code | Description | Response headers | 778 |-------------|-------------|------------------| 779 **200** | external principal | - | 780 **401** | Unauthorized | - | 781 **404** | Resource Not Found | - | 782 **420** | too many requests | - | 783 **0** | Internal Server Error | - | 784 785 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) 786 787 # **hard_reset_branch** 788 > hard_reset_branch(repository, branch, ref, force=force) 789 790 hard reset branch 791 792 Relocate branch to refer to ref. Branch must not contain uncommitted data. 793 794 ### Example 795 796 * Basic Authentication (basic_auth): 797 * Api Key Authentication (cookie_auth): 798 * Api Key Authentication (oidc_auth): 799 * Api Key Authentication (saml_auth): 800 * Bearer (JWT) Authentication (jwt_token): 801 802 ```python 803 import time 804 import os 805 import lakefs_sdk 806 from lakefs_sdk.rest import ApiException 807 from pprint import pprint 808 809 # Defining the host is optional and defaults to /api/v1 810 # See configuration.py for a list of all supported configuration parameters. 811 configuration = lakefs_sdk.Configuration( 812 host = "/api/v1" 813 ) 814 815 # The client must configure the authentication and authorization parameters 816 # in accordance with the API server security policy. 817 # Examples for each auth method are provided below, use the example that 818 # satisfies your auth use case. 819 820 # Configure HTTP basic authorization: basic_auth 821 configuration = lakefs_sdk.Configuration( 822 username = os.environ["USERNAME"], 823 password = os.environ["PASSWORD"] 824 ) 825 826 # Configure API key authorization: cookie_auth 827 configuration.api_key['cookie_auth'] = os.environ["API_KEY"] 828 829 # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed 830 # configuration.api_key_prefix['cookie_auth'] = 'Bearer' 831 832 # Configure API key authorization: oidc_auth 833 configuration.api_key['oidc_auth'] = os.environ["API_KEY"] 834 835 # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed 836 # configuration.api_key_prefix['oidc_auth'] = 'Bearer' 837 838 # Configure API key authorization: saml_auth 839 configuration.api_key['saml_auth'] = os.environ["API_KEY"] 840 841 # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed 842 # configuration.api_key_prefix['saml_auth'] = 'Bearer' 843 844 # Configure Bearer authorization (JWT): jwt_token 845 configuration = lakefs_sdk.Configuration( 846 access_token = os.environ["BEARER_TOKEN"] 847 ) 848 849 # Enter a context with an instance of the API client 850 with lakefs_sdk.ApiClient(configuration) as api_client: 851 # Create an instance of the API class 852 api_instance = lakefs_sdk.ExperimentalApi(api_client) 853 repository = 'repository_example' # str | 854 branch = 'branch_example' # str | 855 ref = 'ref_example' # str | After reset, branch will point at this reference. 856 force = False # bool | (optional) (default to False) 857 858 try: 859 # hard reset branch 860 api_instance.hard_reset_branch(repository, branch, ref, force=force) 861 except Exception as e: 862 print("Exception when calling ExperimentalApi->hard_reset_branch: %s\n" % e) 863 ``` 864 865 866 867 ### Parameters 868 869 870 Name | Type | Description | Notes 871 ------------- | ------------- | ------------- | ------------- 872 **repository** | **str**| | 873 **branch** | **str**| | 874 **ref** | **str**| After reset, branch will point at this reference. | 875 **force** | **bool**| | [optional] [default to False] 876 877 ### Return type 878 879 void (empty response body) 880 881 ### Authorization 882 883 [basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth), [jwt_token](../README.md#jwt_token) 884 885 ### HTTP request headers 886 887 - **Content-Type**: Not defined 888 - **Accept**: application/json 889 890 ### HTTP response details 891 892 | Status code | Description | Response headers | 893 |-------------|-------------|------------------| 894 **204** | reset successful | - | 895 **400** | Bad Request | - | 896 **401** | Unauthorized | - | 897 **403** | Forbidden | - | 898 **404** | Resource Not Found | - | 899 **420** | too many requests | - | 900 **0** | Internal Server Error | - | 901 902 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) 903 904 # **list_user_external_principals** 905 > ExternalPrincipalList list_user_external_principals(user_id, prefix=prefix, after=after, amount=amount) 906 907 list user external policies attached to a user 908 909 ### Example 910 911 * Basic Authentication (basic_auth): 912 * Api Key Authentication (cookie_auth): 913 * Api Key Authentication (oidc_auth): 914 * Api Key Authentication (saml_auth): 915 * Bearer (JWT) Authentication (jwt_token): 916 917 ```python 918 import time 919 import os 920 import lakefs_sdk 921 from lakefs_sdk.models.external_principal_list import ExternalPrincipalList 922 from lakefs_sdk.rest import ApiException 923 from pprint import pprint 924 925 # Defining the host is optional and defaults to /api/v1 926 # See configuration.py for a list of all supported configuration parameters. 927 configuration = lakefs_sdk.Configuration( 928 host = "/api/v1" 929 ) 930 931 # The client must configure the authentication and authorization parameters 932 # in accordance with the API server security policy. 933 # Examples for each auth method are provided below, use the example that 934 # satisfies your auth use case. 935 936 # Configure HTTP basic authorization: basic_auth 937 configuration = lakefs_sdk.Configuration( 938 username = os.environ["USERNAME"], 939 password = os.environ["PASSWORD"] 940 ) 941 942 # Configure API key authorization: cookie_auth 943 configuration.api_key['cookie_auth'] = os.environ["API_KEY"] 944 945 # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed 946 # configuration.api_key_prefix['cookie_auth'] = 'Bearer' 947 948 # Configure API key authorization: oidc_auth 949 configuration.api_key['oidc_auth'] = os.environ["API_KEY"] 950 951 # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed 952 # configuration.api_key_prefix['oidc_auth'] = 'Bearer' 953 954 # Configure API key authorization: saml_auth 955 configuration.api_key['saml_auth'] = os.environ["API_KEY"] 956 957 # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed 958 # configuration.api_key_prefix['saml_auth'] = 'Bearer' 959 960 # Configure Bearer authorization (JWT): jwt_token 961 configuration = lakefs_sdk.Configuration( 962 access_token = os.environ["BEARER_TOKEN"] 963 ) 964 965 # Enter a context with an instance of the API client 966 with lakefs_sdk.ApiClient(configuration) as api_client: 967 # Create an instance of the API class 968 api_instance = lakefs_sdk.ExperimentalApi(api_client) 969 user_id = 'user_id_example' # str | 970 prefix = 'prefix_example' # str | return items prefixed with this value (optional) 971 after = 'after_example' # str | return items after this value (optional) 972 amount = 100 # int | how many items to return (optional) (default to 100) 973 974 try: 975 # list user external policies attached to a user 976 api_response = api_instance.list_user_external_principals(user_id, prefix=prefix, after=after, amount=amount) 977 print("The response of ExperimentalApi->list_user_external_principals:\n") 978 pprint(api_response) 979 except Exception as e: 980 print("Exception when calling ExperimentalApi->list_user_external_principals: %s\n" % e) 981 ``` 982 983 984 985 ### Parameters 986 987 988 Name | Type | Description | Notes 989 ------------- | ------------- | ------------- | ------------- 990 **user_id** | **str**| | 991 **prefix** | **str**| return items prefixed with this value | [optional] 992 **after** | **str**| return items after this value | [optional] 993 **amount** | **int**| how many items to return | [optional] [default to 100] 994 995 ### Return type 996 997 [**ExternalPrincipalList**](ExternalPrincipalList.md) 998 999 ### Authorization 1000 1001 [basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth), [jwt_token](../README.md#jwt_token) 1002 1003 ### HTTP request headers 1004 1005 - **Content-Type**: Not defined 1006 - **Accept**: application/json 1007 1008 ### HTTP response details 1009 1010 | Status code | Description | Response headers | 1011 |-------------|-------------|------------------| 1012 **200** | external principals list | - | 1013 **401** | Unauthorized | - | 1014 **404** | Resource Not Found | - | 1015 **420** | too many requests | - | 1016 **0** | Internal Server Error | - | 1017 1018 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) 1019 1020 # **sts_login** 1021 > AuthenticationToken sts_login(sts_auth_request) 1022 1023 perform a login with STS 1024 1025 ### Example 1026 1027 1028 ```python 1029 import time 1030 import os 1031 import lakefs_sdk 1032 from lakefs_sdk.models.authentication_token import AuthenticationToken 1033 from lakefs_sdk.models.sts_auth_request import StsAuthRequest 1034 from lakefs_sdk.rest import ApiException 1035 from pprint import pprint 1036 1037 # Defining the host is optional and defaults to /api/v1 1038 # See configuration.py for a list of all supported configuration parameters. 1039 configuration = lakefs_sdk.Configuration( 1040 host = "/api/v1" 1041 ) 1042 1043 1044 # Enter a context with an instance of the API client 1045 with lakefs_sdk.ApiClient(configuration) as api_client: 1046 # Create an instance of the API class 1047 api_instance = lakefs_sdk.ExperimentalApi(api_client) 1048 sts_auth_request = lakefs_sdk.StsAuthRequest() # StsAuthRequest | 1049 1050 try: 1051 # perform a login with STS 1052 api_response = api_instance.sts_login(sts_auth_request) 1053 print("The response of ExperimentalApi->sts_login:\n") 1054 pprint(api_response) 1055 except Exception as e: 1056 print("Exception when calling ExperimentalApi->sts_login: %s\n" % e) 1057 ``` 1058 1059 1060 1061 ### Parameters 1062 1063 1064 Name | Type | Description | Notes 1065 ------------- | ------------- | ------------- | ------------- 1066 **sts_auth_request** | [**StsAuthRequest**](StsAuthRequest.md)| | 1067 1068 ### Return type 1069 1070 [**AuthenticationToken**](AuthenticationToken.md) 1071 1072 ### Authorization 1073 1074 No authorization required 1075 1076 ### HTTP request headers 1077 1078 - **Content-Type**: application/json 1079 - **Accept**: application/json 1080 1081 ### HTTP response details 1082 1083 | Status code | Description | Response headers | 1084 |-------------|-------------|------------------| 1085 **200** | successful STS login | - | 1086 **401** | Unauthorized | - | 1087 **420** | too many requests | - | 1088 **0** | Internal Server Error | - | 1089 1090 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) 1091