github.com/treeverse/lakefs@v1.24.1-0.20240520134607-95648127bfb0/clients/java/docs/ActionsApi.md (about)

     1  # ActionsApi
     2  
     3  All URIs are relative to */api/v1*
     4  
     5  | Method | HTTP request | Description |
     6  |------------- | ------------- | -------------|
     7  | [**getRun**](ActionsApi.md#getRun) | **GET** /repositories/{repository}/actions/runs/{run_id} | get a run |
     8  | [**getRunHookOutput**](ActionsApi.md#getRunHookOutput) | **GET** /repositories/{repository}/actions/runs/{run_id}/hooks/{hook_run_id}/output | get run hook output |
     9  | [**listRepositoryRuns**](ActionsApi.md#listRepositoryRuns) | **GET** /repositories/{repository}/actions/runs | list runs |
    10  | [**listRunHooks**](ActionsApi.md#listRunHooks) | **GET** /repositories/{repository}/actions/runs/{run_id}/hooks | list run hooks |
    11  
    12  
    13  <a id="getRun"></a>
    14  # **getRun**
    15  > ActionRun getRun(repository, runId).execute();
    16  
    17  get a run
    18  
    19  ### Example
    20  ```java
    21  // Import classes:
    22  import io.lakefs.clients.sdk.ApiClient;
    23  import io.lakefs.clients.sdk.ApiException;
    24  import io.lakefs.clients.sdk.Configuration;
    25  import io.lakefs.clients.sdk.auth.*;
    26  import io.lakefs.clients.sdk.models.*;
    27  import io.lakefs.clients.sdk.ActionsApi;
    28  
    29  public class Example {
    30    public static void main(String[] args) {
    31      ApiClient defaultClient = Configuration.getDefaultApiClient();
    32      defaultClient.setBasePath("/api/v1");
    33      
    34      // Configure HTTP basic authorization: basic_auth
    35      HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth");
    36      basic_auth.setUsername("YOUR USERNAME");
    37      basic_auth.setPassword("YOUR PASSWORD");
    38  
    39      // Configure API key authorization: cookie_auth
    40      ApiKeyAuth cookie_auth = (ApiKeyAuth) defaultClient.getAuthentication("cookie_auth");
    41      cookie_auth.setApiKey("YOUR API KEY");
    42      // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    43      //cookie_auth.setApiKeyPrefix("Token");
    44  
    45      // Configure API key authorization: oidc_auth
    46      ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth");
    47      oidc_auth.setApiKey("YOUR API KEY");
    48      // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    49      //oidc_auth.setApiKeyPrefix("Token");
    50  
    51      // Configure API key authorization: saml_auth
    52      ApiKeyAuth saml_auth = (ApiKeyAuth) defaultClient.getAuthentication("saml_auth");
    53      saml_auth.setApiKey("YOUR API KEY");
    54      // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    55      //saml_auth.setApiKeyPrefix("Token");
    56  
    57      // Configure HTTP bearer authorization: jwt_token
    58      HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token");
    59      jwt_token.setBearerToken("BEARER TOKEN");
    60  
    61      ActionsApi apiInstance = new ActionsApi(defaultClient);
    62      String repository = "repository_example"; // String | 
    63      String runId = "runId_example"; // String | 
    64      try {
    65        ActionRun result = apiInstance.getRun(repository, runId)
    66              .execute();
    67        System.out.println(result);
    68      } catch (ApiException e) {
    69        System.err.println("Exception when calling ActionsApi#getRun");
    70        System.err.println("Status code: " + e.getCode());
    71        System.err.println("Reason: " + e.getResponseBody());
    72        System.err.println("Response headers: " + e.getResponseHeaders());
    73        e.printStackTrace();
    74      }
    75    }
    76  }
    77  ```
    78  
    79  ### Parameters
    80  
    81  | Name | Type | Description  | Notes |
    82  |------------- | ------------- | ------------- | -------------|
    83  | **repository** | **String**|  | |
    84  | **runId** | **String**|  | |
    85  
    86  ### Return type
    87  
    88  [**ActionRun**](ActionRun.md)
    89  
    90  ### Authorization
    91  
    92  [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)
    93  
    94  ### HTTP request headers
    95  
    96   - **Content-Type**: Not defined
    97   - **Accept**: application/json
    98  
    99  ### HTTP response details
   100  | Status code | Description | Response headers |
   101  |-------------|-------------|------------------|
   102  | **200** | action run result |  -  |
   103  | **401** | Unauthorized |  -  |
   104  | **404** | Resource Not Found |  -  |
   105  | **420** | too many requests |  -  |
   106  | **0** | Internal Server Error |  -  |
   107  
   108  <a id="getRunHookOutput"></a>
   109  # **getRunHookOutput**
   110  > File getRunHookOutput(repository, runId, hookRunId).execute();
   111  
   112  get run hook output
   113  
   114  ### Example
   115  ```java
   116  // Import classes:
   117  import io.lakefs.clients.sdk.ApiClient;
   118  import io.lakefs.clients.sdk.ApiException;
   119  import io.lakefs.clients.sdk.Configuration;
   120  import io.lakefs.clients.sdk.auth.*;
   121  import io.lakefs.clients.sdk.models.*;
   122  import io.lakefs.clients.sdk.ActionsApi;
   123  
   124  public class Example {
   125    public static void main(String[] args) {
   126      ApiClient defaultClient = Configuration.getDefaultApiClient();
   127      defaultClient.setBasePath("/api/v1");
   128      
   129      // Configure HTTP basic authorization: basic_auth
   130      HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth");
   131      basic_auth.setUsername("YOUR USERNAME");
   132      basic_auth.setPassword("YOUR PASSWORD");
   133  
   134      // Configure API key authorization: cookie_auth
   135      ApiKeyAuth cookie_auth = (ApiKeyAuth) defaultClient.getAuthentication("cookie_auth");
   136      cookie_auth.setApiKey("YOUR API KEY");
   137      // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
   138      //cookie_auth.setApiKeyPrefix("Token");
   139  
   140      // Configure API key authorization: oidc_auth
   141      ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth");
   142      oidc_auth.setApiKey("YOUR API KEY");
   143      // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
   144      //oidc_auth.setApiKeyPrefix("Token");
   145  
   146      // Configure API key authorization: saml_auth
   147      ApiKeyAuth saml_auth = (ApiKeyAuth) defaultClient.getAuthentication("saml_auth");
   148      saml_auth.setApiKey("YOUR API KEY");
   149      // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
   150      //saml_auth.setApiKeyPrefix("Token");
   151  
   152      // Configure HTTP bearer authorization: jwt_token
   153      HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token");
   154      jwt_token.setBearerToken("BEARER TOKEN");
   155  
   156      ActionsApi apiInstance = new ActionsApi(defaultClient);
   157      String repository = "repository_example"; // String | 
   158      String runId = "runId_example"; // String | 
   159      String hookRunId = "hookRunId_example"; // String | 
   160      try {
   161        File result = apiInstance.getRunHookOutput(repository, runId, hookRunId)
   162              .execute();
   163        System.out.println(result);
   164      } catch (ApiException e) {
   165        System.err.println("Exception when calling ActionsApi#getRunHookOutput");
   166        System.err.println("Status code: " + e.getCode());
   167        System.err.println("Reason: " + e.getResponseBody());
   168        System.err.println("Response headers: " + e.getResponseHeaders());
   169        e.printStackTrace();
   170      }
   171    }
   172  }
   173  ```
   174  
   175  ### Parameters
   176  
   177  | Name | Type | Description  | Notes |
   178  |------------- | ------------- | ------------- | -------------|
   179  | **repository** | **String**|  | |
   180  | **runId** | **String**|  | |
   181  | **hookRunId** | **String**|  | |
   182  
   183  ### Return type
   184  
   185  [**File**](File.md)
   186  
   187  ### Authorization
   188  
   189  [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)
   190  
   191  ### HTTP request headers
   192  
   193   - **Content-Type**: Not defined
   194   - **Accept**: application/octet-stream, application/json
   195  
   196  ### HTTP response details
   197  | Status code | Description | Response headers |
   198  |-------------|-------------|------------------|
   199  | **200** | run hook output |  -  |
   200  | **401** | Unauthorized |  -  |
   201  | **404** | Resource Not Found |  -  |
   202  | **420** | too many requests |  -  |
   203  | **0** | Internal Server Error |  -  |
   204  
   205  <a id="listRepositoryRuns"></a>
   206  # **listRepositoryRuns**
   207  > ActionRunList listRepositoryRuns(repository).after(after).amount(amount).branch(branch).commit(commit).execute();
   208  
   209  list runs
   210  
   211  ### Example
   212  ```java
   213  // Import classes:
   214  import io.lakefs.clients.sdk.ApiClient;
   215  import io.lakefs.clients.sdk.ApiException;
   216  import io.lakefs.clients.sdk.Configuration;
   217  import io.lakefs.clients.sdk.auth.*;
   218  import io.lakefs.clients.sdk.models.*;
   219  import io.lakefs.clients.sdk.ActionsApi;
   220  
   221  public class Example {
   222    public static void main(String[] args) {
   223      ApiClient defaultClient = Configuration.getDefaultApiClient();
   224      defaultClient.setBasePath("/api/v1");
   225      
   226      // Configure HTTP basic authorization: basic_auth
   227      HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth");
   228      basic_auth.setUsername("YOUR USERNAME");
   229      basic_auth.setPassword("YOUR PASSWORD");
   230  
   231      // Configure API key authorization: cookie_auth
   232      ApiKeyAuth cookie_auth = (ApiKeyAuth) defaultClient.getAuthentication("cookie_auth");
   233      cookie_auth.setApiKey("YOUR API KEY");
   234      // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
   235      //cookie_auth.setApiKeyPrefix("Token");
   236  
   237      // Configure API key authorization: oidc_auth
   238      ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth");
   239      oidc_auth.setApiKey("YOUR API KEY");
   240      // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
   241      //oidc_auth.setApiKeyPrefix("Token");
   242  
   243      // Configure API key authorization: saml_auth
   244      ApiKeyAuth saml_auth = (ApiKeyAuth) defaultClient.getAuthentication("saml_auth");
   245      saml_auth.setApiKey("YOUR API KEY");
   246      // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
   247      //saml_auth.setApiKeyPrefix("Token");
   248  
   249      // Configure HTTP bearer authorization: jwt_token
   250      HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token");
   251      jwt_token.setBearerToken("BEARER TOKEN");
   252  
   253      ActionsApi apiInstance = new ActionsApi(defaultClient);
   254      String repository = "repository_example"; // String | 
   255      String after = "after_example"; // String | return items after this value
   256      Integer amount = 100; // Integer | how many items to return
   257      String branch = "branch_example"; // String | 
   258      String commit = "commit_example"; // String | 
   259      try {
   260        ActionRunList result = apiInstance.listRepositoryRuns(repository)
   261              .after(after)
   262              .amount(amount)
   263              .branch(branch)
   264              .commit(commit)
   265              .execute();
   266        System.out.println(result);
   267      } catch (ApiException e) {
   268        System.err.println("Exception when calling ActionsApi#listRepositoryRuns");
   269        System.err.println("Status code: " + e.getCode());
   270        System.err.println("Reason: " + e.getResponseBody());
   271        System.err.println("Response headers: " + e.getResponseHeaders());
   272        e.printStackTrace();
   273      }
   274    }
   275  }
   276  ```
   277  
   278  ### Parameters
   279  
   280  | Name | Type | Description  | Notes |
   281  |------------- | ------------- | ------------- | -------------|
   282  | **repository** | **String**|  | |
   283  | **after** | **String**| return items after this value | [optional] |
   284  | **amount** | **Integer**| how many items to return | [optional] [default to 100] |
   285  | **branch** | **String**|  | [optional] |
   286  | **commit** | **String**|  | [optional] |
   287  
   288  ### Return type
   289  
   290  [**ActionRunList**](ActionRunList.md)
   291  
   292  ### Authorization
   293  
   294  [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)
   295  
   296  ### HTTP request headers
   297  
   298   - **Content-Type**: Not defined
   299   - **Accept**: application/json
   300  
   301  ### HTTP response details
   302  | Status code | Description | Response headers |
   303  |-------------|-------------|------------------|
   304  | **200** | list action runs |  -  |
   305  | **401** | Unauthorized |  -  |
   306  | **404** | Resource Not Found |  -  |
   307  | **420** | too many requests |  -  |
   308  | **0** | Internal Server Error |  -  |
   309  
   310  <a id="listRunHooks"></a>
   311  # **listRunHooks**
   312  > HookRunList listRunHooks(repository, runId).after(after).amount(amount).execute();
   313  
   314  list run hooks
   315  
   316  ### Example
   317  ```java
   318  // Import classes:
   319  import io.lakefs.clients.sdk.ApiClient;
   320  import io.lakefs.clients.sdk.ApiException;
   321  import io.lakefs.clients.sdk.Configuration;
   322  import io.lakefs.clients.sdk.auth.*;
   323  import io.lakefs.clients.sdk.models.*;
   324  import io.lakefs.clients.sdk.ActionsApi;
   325  
   326  public class Example {
   327    public static void main(String[] args) {
   328      ApiClient defaultClient = Configuration.getDefaultApiClient();
   329      defaultClient.setBasePath("/api/v1");
   330      
   331      // Configure HTTP basic authorization: basic_auth
   332      HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth");
   333      basic_auth.setUsername("YOUR USERNAME");
   334      basic_auth.setPassword("YOUR PASSWORD");
   335  
   336      // Configure API key authorization: cookie_auth
   337      ApiKeyAuth cookie_auth = (ApiKeyAuth) defaultClient.getAuthentication("cookie_auth");
   338      cookie_auth.setApiKey("YOUR API KEY");
   339      // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
   340      //cookie_auth.setApiKeyPrefix("Token");
   341  
   342      // Configure API key authorization: oidc_auth
   343      ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth");
   344      oidc_auth.setApiKey("YOUR API KEY");
   345      // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
   346      //oidc_auth.setApiKeyPrefix("Token");
   347  
   348      // Configure API key authorization: saml_auth
   349      ApiKeyAuth saml_auth = (ApiKeyAuth) defaultClient.getAuthentication("saml_auth");
   350      saml_auth.setApiKey("YOUR API KEY");
   351      // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
   352      //saml_auth.setApiKeyPrefix("Token");
   353  
   354      // Configure HTTP bearer authorization: jwt_token
   355      HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token");
   356      jwt_token.setBearerToken("BEARER TOKEN");
   357  
   358      ActionsApi apiInstance = new ActionsApi(defaultClient);
   359      String repository = "repository_example"; // String | 
   360      String runId = "runId_example"; // String | 
   361      String after = "after_example"; // String | return items after this value
   362      Integer amount = 100; // Integer | how many items to return
   363      try {
   364        HookRunList result = apiInstance.listRunHooks(repository, runId)
   365              .after(after)
   366              .amount(amount)
   367              .execute();
   368        System.out.println(result);
   369      } catch (ApiException e) {
   370        System.err.println("Exception when calling ActionsApi#listRunHooks");
   371        System.err.println("Status code: " + e.getCode());
   372        System.err.println("Reason: " + e.getResponseBody());
   373        System.err.println("Response headers: " + e.getResponseHeaders());
   374        e.printStackTrace();
   375      }
   376    }
   377  }
   378  ```
   379  
   380  ### Parameters
   381  
   382  | Name | Type | Description  | Notes |
   383  |------------- | ------------- | ------------- | -------------|
   384  | **repository** | **String**|  | |
   385  | **runId** | **String**|  | |
   386  | **after** | **String**| return items after this value | [optional] |
   387  | **amount** | **Integer**| how many items to return | [optional] [default to 100] |
   388  
   389  ### Return type
   390  
   391  [**HookRunList**](HookRunList.md)
   392  
   393  ### Authorization
   394  
   395  [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)
   396  
   397  ### HTTP request headers
   398  
   399   - **Content-Type**: Not defined
   400   - **Accept**: application/json
   401  
   402  ### HTTP response details
   403  | Status code | Description | Response headers |
   404  |-------------|-------------|------------------|
   405  | **200** | list specific run hooks |  -  |
   406  | **401** | Unauthorized |  -  |
   407  | **404** | Resource Not Found |  -  |
   408  | **420** | too many requests |  -  |
   409  | **0** | Internal Server Error |  -  |
   410