github.com/treeverse/lakefs@v1.24.1-0.20240520134607-95648127bfb0/clients/python-legacy/docs/ActionsApi.md (about) 1 # lakefs_client.ActionsApi 2 3 All URIs are relative to *http://localhost/api/v1* 4 5 Method | HTTP request | Description 6 ------------- | ------------- | ------------- 7 [**get_run**](ActionsApi.md#get_run) | **GET** /repositories/{repository}/actions/runs/{run_id} | get a run 8 [**get_run_hook_output**](ActionsApi.md#get_run_hook_output) | **GET** /repositories/{repository}/actions/runs/{run_id}/hooks/{hook_run_id}/output | get run hook output 9 [**list_repository_runs**](ActionsApi.md#list_repository_runs) | **GET** /repositories/{repository}/actions/runs | list runs 10 [**list_run_hooks**](ActionsApi.md#list_run_hooks) | **GET** /repositories/{repository}/actions/runs/{run_id}/hooks | list run hooks 11 12 13 # **get_run** 14 > ActionRun get_run(repository, run_id) 15 16 get a run 17 18 ### Example 19 20 * Basic Authentication (basic_auth): 21 * Api Key Authentication (cookie_auth): 22 * Bearer (JWT) Authentication (jwt_token): 23 * Api Key Authentication (oidc_auth): 24 * Api Key Authentication (saml_auth): 25 26 ```python 27 import time 28 import lakefs_client 29 from lakefs_client.api import actions_api 30 from lakefs_client.model.action_run import ActionRun 31 from lakefs_client.model.error import Error 32 from pprint import pprint 33 # Defining the host is optional and defaults to http://localhost/api/v1 34 # See configuration.py for a list of all supported configuration parameters. 35 configuration = lakefs_client.Configuration( 36 host = "http://localhost/api/v1" 37 ) 38 39 # The client must configure the authentication and authorization parameters 40 # in accordance with the API server security policy. 41 # Examples for each auth method are provided below, use the example that 42 # satisfies your auth use case. 43 44 # Configure HTTP basic authorization: basic_auth 45 configuration = lakefs_client.Configuration( 46 username = 'YOUR_USERNAME', 47 password = 'YOUR_PASSWORD' 48 ) 49 50 # Configure API key authorization: cookie_auth 51 configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' 52 53 # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed 54 # configuration.api_key_prefix['cookie_auth'] = 'Bearer' 55 56 # Configure Bearer authorization (JWT): jwt_token 57 configuration = lakefs_client.Configuration( 58 access_token = 'YOUR_BEARER_TOKEN' 59 ) 60 61 # Configure API key authorization: oidc_auth 62 configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' 63 64 # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed 65 # configuration.api_key_prefix['oidc_auth'] = 'Bearer' 66 67 # Configure API key authorization: saml_auth 68 configuration.api_key['saml_auth'] = 'YOUR_API_KEY' 69 70 # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed 71 # configuration.api_key_prefix['saml_auth'] = 'Bearer' 72 73 # Enter a context with an instance of the API client 74 with lakefs_client.ApiClient(configuration) as api_client: 75 # Create an instance of the API class 76 api_instance = actions_api.ActionsApi(api_client) 77 repository = "repository_example" # str | 78 run_id = "run_id_example" # str | 79 80 # example passing only required values which don't have defaults set 81 try: 82 # get a run 83 api_response = api_instance.get_run(repository, run_id) 84 pprint(api_response) 85 except lakefs_client.ApiException as e: 86 print("Exception when calling ActionsApi->get_run: %s\n" % e) 87 ``` 88 89 90 ### Parameters 91 92 Name | Type | Description | Notes 93 ------------- | ------------- | ------------- | ------------- 94 **repository** | **str**| | 95 **run_id** | **str**| | 96 97 ### Return type 98 99 [**ActionRun**](ActionRun.md) 100 101 ### Authorization 102 103 [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) 104 105 ### HTTP request headers 106 107 - **Content-Type**: Not defined 108 - **Accept**: application/json 109 110 111 ### HTTP response details 112 113 | Status code | Description | Response headers | 114 |-------------|-------------|------------------| 115 **200** | action run result | - | 116 **401** | Unauthorized | - | 117 **404** | Resource Not Found | - | 118 **420** | too many requests | - | 119 **0** | Internal Server Error | - | 120 121 [[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) 122 123 # **get_run_hook_output** 124 > file_type get_run_hook_output(repository, run_id, hook_run_id) 125 126 get run hook output 127 128 ### Example 129 130 * Basic Authentication (basic_auth): 131 * Api Key Authentication (cookie_auth): 132 * Bearer (JWT) Authentication (jwt_token): 133 * Api Key Authentication (oidc_auth): 134 * Api Key Authentication (saml_auth): 135 136 ```python 137 import time 138 import lakefs_client 139 from lakefs_client.api import actions_api 140 from lakefs_client.model.error import Error 141 from pprint import pprint 142 # Defining the host is optional and defaults to http://localhost/api/v1 143 # See configuration.py for a list of all supported configuration parameters. 144 configuration = lakefs_client.Configuration( 145 host = "http://localhost/api/v1" 146 ) 147 148 # The client must configure the authentication and authorization parameters 149 # in accordance with the API server security policy. 150 # Examples for each auth method are provided below, use the example that 151 # satisfies your auth use case. 152 153 # Configure HTTP basic authorization: basic_auth 154 configuration = lakefs_client.Configuration( 155 username = 'YOUR_USERNAME', 156 password = 'YOUR_PASSWORD' 157 ) 158 159 # Configure API key authorization: cookie_auth 160 configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' 161 162 # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed 163 # configuration.api_key_prefix['cookie_auth'] = 'Bearer' 164 165 # Configure Bearer authorization (JWT): jwt_token 166 configuration = lakefs_client.Configuration( 167 access_token = 'YOUR_BEARER_TOKEN' 168 ) 169 170 # Configure API key authorization: oidc_auth 171 configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' 172 173 # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed 174 # configuration.api_key_prefix['oidc_auth'] = 'Bearer' 175 176 # Configure API key authorization: saml_auth 177 configuration.api_key['saml_auth'] = 'YOUR_API_KEY' 178 179 # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed 180 # configuration.api_key_prefix['saml_auth'] = 'Bearer' 181 182 # Enter a context with an instance of the API client 183 with lakefs_client.ApiClient(configuration) as api_client: 184 # Create an instance of the API class 185 api_instance = actions_api.ActionsApi(api_client) 186 repository = "repository_example" # str | 187 run_id = "run_id_example" # str | 188 hook_run_id = "hook_run_id_example" # str | 189 190 # example passing only required values which don't have defaults set 191 try: 192 # get run hook output 193 api_response = api_instance.get_run_hook_output(repository, run_id, hook_run_id) 194 pprint(api_response) 195 except lakefs_client.ApiException as e: 196 print("Exception when calling ActionsApi->get_run_hook_output: %s\n" % e) 197 ``` 198 199 200 ### Parameters 201 202 Name | Type | Description | Notes 203 ------------- | ------------- | ------------- | ------------- 204 **repository** | **str**| | 205 **run_id** | **str**| | 206 **hook_run_id** | **str**| | 207 208 ### Return type 209 210 **file_type** 211 212 ### Authorization 213 214 [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) 215 216 ### HTTP request headers 217 218 - **Content-Type**: Not defined 219 - **Accept**: application/octet-stream, application/json 220 221 222 ### HTTP response details 223 224 | Status code | Description | Response headers | 225 |-------------|-------------|------------------| 226 **200** | run hook output | - | 227 **401** | Unauthorized | - | 228 **404** | Resource Not Found | - | 229 **420** | too many requests | - | 230 **0** | Internal Server Error | - | 231 232 [[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) 233 234 # **list_repository_runs** 235 > ActionRunList list_repository_runs(repository) 236 237 list runs 238 239 ### Example 240 241 * Basic Authentication (basic_auth): 242 * Api Key Authentication (cookie_auth): 243 * Bearer (JWT) Authentication (jwt_token): 244 * Api Key Authentication (oidc_auth): 245 * Api Key Authentication (saml_auth): 246 247 ```python 248 import time 249 import lakefs_client 250 from lakefs_client.api import actions_api 251 from lakefs_client.model.action_run_list import ActionRunList 252 from lakefs_client.model.error import Error 253 from pprint import pprint 254 # Defining the host is optional and defaults to http://localhost/api/v1 255 # See configuration.py for a list of all supported configuration parameters. 256 configuration = lakefs_client.Configuration( 257 host = "http://localhost/api/v1" 258 ) 259 260 # The client must configure the authentication and authorization parameters 261 # in accordance with the API server security policy. 262 # Examples for each auth method are provided below, use the example that 263 # satisfies your auth use case. 264 265 # Configure HTTP basic authorization: basic_auth 266 configuration = lakefs_client.Configuration( 267 username = 'YOUR_USERNAME', 268 password = 'YOUR_PASSWORD' 269 ) 270 271 # Configure API key authorization: cookie_auth 272 configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' 273 274 # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed 275 # configuration.api_key_prefix['cookie_auth'] = 'Bearer' 276 277 # Configure Bearer authorization (JWT): jwt_token 278 configuration = lakefs_client.Configuration( 279 access_token = 'YOUR_BEARER_TOKEN' 280 ) 281 282 # Configure API key authorization: oidc_auth 283 configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' 284 285 # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed 286 # configuration.api_key_prefix['oidc_auth'] = 'Bearer' 287 288 # Configure API key authorization: saml_auth 289 configuration.api_key['saml_auth'] = 'YOUR_API_KEY' 290 291 # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed 292 # configuration.api_key_prefix['saml_auth'] = 'Bearer' 293 294 # Enter a context with an instance of the API client 295 with lakefs_client.ApiClient(configuration) as api_client: 296 # Create an instance of the API class 297 api_instance = actions_api.ActionsApi(api_client) 298 repository = "repository_example" # str | 299 after = "after_example" # str | return items after this value (optional) 300 amount = 100 # int | how many items to return (optional) if omitted the server will use the default value of 100 301 branch = "branch_example" # str | (optional) 302 commit = "commit_example" # str | (optional) 303 304 # example passing only required values which don't have defaults set 305 try: 306 # list runs 307 api_response = api_instance.list_repository_runs(repository) 308 pprint(api_response) 309 except lakefs_client.ApiException as e: 310 print("Exception when calling ActionsApi->list_repository_runs: %s\n" % e) 311 312 # example passing only required values which don't have defaults set 313 # and optional values 314 try: 315 # list runs 316 api_response = api_instance.list_repository_runs(repository, after=after, amount=amount, branch=branch, commit=commit) 317 pprint(api_response) 318 except lakefs_client.ApiException as e: 319 print("Exception when calling ActionsApi->list_repository_runs: %s\n" % e) 320 ``` 321 322 323 ### Parameters 324 325 Name | Type | Description | Notes 326 ------------- | ------------- | ------------- | ------------- 327 **repository** | **str**| | 328 **after** | **str**| return items after this value | [optional] 329 **amount** | **int**| how many items to return | [optional] if omitted the server will use the default value of 100 330 **branch** | **str**| | [optional] 331 **commit** | **str**| | [optional] 332 333 ### Return type 334 335 [**ActionRunList**](ActionRunList.md) 336 337 ### Authorization 338 339 [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) 340 341 ### HTTP request headers 342 343 - **Content-Type**: Not defined 344 - **Accept**: application/json 345 346 347 ### HTTP response details 348 349 | Status code | Description | Response headers | 350 |-------------|-------------|------------------| 351 **200** | list action runs | - | 352 **401** | Unauthorized | - | 353 **404** | Resource Not Found | - | 354 **420** | too many requests | - | 355 **0** | Internal Server Error | - | 356 357 [[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) 358 359 # **list_run_hooks** 360 > HookRunList list_run_hooks(repository, run_id) 361 362 list run hooks 363 364 ### Example 365 366 * Basic Authentication (basic_auth): 367 * Api Key Authentication (cookie_auth): 368 * Bearer (JWT) Authentication (jwt_token): 369 * Api Key Authentication (oidc_auth): 370 * Api Key Authentication (saml_auth): 371 372 ```python 373 import time 374 import lakefs_client 375 from lakefs_client.api import actions_api 376 from lakefs_client.model.error import Error 377 from lakefs_client.model.hook_run_list import HookRunList 378 from pprint import pprint 379 # Defining the host is optional and defaults to http://localhost/api/v1 380 # See configuration.py for a list of all supported configuration parameters. 381 configuration = lakefs_client.Configuration( 382 host = "http://localhost/api/v1" 383 ) 384 385 # The client must configure the authentication and authorization parameters 386 # in accordance with the API server security policy. 387 # Examples for each auth method are provided below, use the example that 388 # satisfies your auth use case. 389 390 # Configure HTTP basic authorization: basic_auth 391 configuration = lakefs_client.Configuration( 392 username = 'YOUR_USERNAME', 393 password = 'YOUR_PASSWORD' 394 ) 395 396 # Configure API key authorization: cookie_auth 397 configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' 398 399 # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed 400 # configuration.api_key_prefix['cookie_auth'] = 'Bearer' 401 402 # Configure Bearer authorization (JWT): jwt_token 403 configuration = lakefs_client.Configuration( 404 access_token = 'YOUR_BEARER_TOKEN' 405 ) 406 407 # Configure API key authorization: oidc_auth 408 configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' 409 410 # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed 411 # configuration.api_key_prefix['oidc_auth'] = 'Bearer' 412 413 # Configure API key authorization: saml_auth 414 configuration.api_key['saml_auth'] = 'YOUR_API_KEY' 415 416 # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed 417 # configuration.api_key_prefix['saml_auth'] = 'Bearer' 418 419 # Enter a context with an instance of the API client 420 with lakefs_client.ApiClient(configuration) as api_client: 421 # Create an instance of the API class 422 api_instance = actions_api.ActionsApi(api_client) 423 repository = "repository_example" # str | 424 run_id = "run_id_example" # str | 425 after = "after_example" # str | return items after this value (optional) 426 amount = 100 # int | how many items to return (optional) if omitted the server will use the default value of 100 427 428 # example passing only required values which don't have defaults set 429 try: 430 # list run hooks 431 api_response = api_instance.list_run_hooks(repository, run_id) 432 pprint(api_response) 433 except lakefs_client.ApiException as e: 434 print("Exception when calling ActionsApi->list_run_hooks: %s\n" % e) 435 436 # example passing only required values which don't have defaults set 437 # and optional values 438 try: 439 # list run hooks 440 api_response = api_instance.list_run_hooks(repository, run_id, after=after, amount=amount) 441 pprint(api_response) 442 except lakefs_client.ApiException as e: 443 print("Exception when calling ActionsApi->list_run_hooks: %s\n" % e) 444 ``` 445 446 447 ### Parameters 448 449 Name | Type | Description | Notes 450 ------------- | ------------- | ------------- | ------------- 451 **repository** | **str**| | 452 **run_id** | **str**| | 453 **after** | **str**| return items after this value | [optional] 454 **amount** | **int**| how many items to return | [optional] if omitted the server will use the default value of 100 455 456 ### Return type 457 458 [**HookRunList**](HookRunList.md) 459 460 ### Authorization 461 462 [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) 463 464 ### HTTP request headers 465 466 - **Content-Type**: Not defined 467 - **Accept**: application/json 468 469 470 ### HTTP response details 471 472 | Status code | Description | Response headers | 473 |-------------|-------------|------------------| 474 **200** | list specific run hooks | - | 475 **401** | Unauthorized | - | 476 **404** | Resource Not Found | - | 477 **420** | too many requests | - | 478 **0** | Internal Server Error | - | 479 480 [[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) 481