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