Skip to content
This repository has been archived by the owner on Oct 26, 2021. It is now read-only.

argoproj-labs/argo-client-java

Repository files navigation

⚠️⚠️⚠️This repository is no longer maintained, please find your Java SDKs https://github.com/argoproj/argo-workflows/blob/master/docs/client-libraries.md ⚠️⚠️⚠️

argo-client-java

Argo Server API

  • API version: VERSION

You can get examples of requests and responses by using the CLI with --gloglevel=9, e.g. argo list --gloglevel=9

Automatically generated by the OpenAPI Generator

Requirements

Building the API client library requires:

  1. Java 1.7+
  2. Maven/Gradle

Installation

To install the API client library to your local Maven repository, simply execute:

mvn clean install

To deploy it to a remote Maven repository instead, configure the settings of the repository and execute:

mvn clean deploy

Refer to the OSSRH Guide for more information.

Maven users

Add this dependency to your project's POM:

<dependency>
  <groupId>io.argoproj.workflow</groupId>
  <artifactId>argo-client-java</artifactId>
  <version>v3.1.0</version>
  <scope>compile</scope>
</dependency>

Gradle users

Add this dependency to your project's build file:

compile "io.argoproj.workflow:argo-client-java:v3.1.0"

Others

At first generate the JAR by executing:

mvn clean package

Then manually install the following JARs:

  • target/argo-client-java-v3.1.0.jar
  • target/lib/*.jar

Getting Started

Please follow the installation instruction and execute the following Java code:

// Import classes:
import io.argoproj.workflow.ApiClient;
import io.argoproj.workflow.ApiException;
import io.argoproj.workflow.Configuration;
import io.argoproj.workflow.models.*;
import io.argoproj.workflow.apis.ArchivedWorkflowServiceApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("http://localhost");

    ArchivedWorkflowServiceApi apiInstance = new ArchivedWorkflowServiceApi(defaultClient);
    String uid = "uid_example"; // String | 
    try {
      Object result = apiInstance.archivedWorkflowServiceDeleteArchivedWorkflow(uid);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling ArchivedWorkflowServiceApi#archivedWorkflowServiceDeleteArchivedWorkflow");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Documentation for API Endpoints

All URIs are relative to http://localhost

Class Method HTTP request Description
ArchivedWorkflowServiceApi archivedWorkflowServiceDeleteArchivedWorkflow DELETE /api/v1/archived-workflows/{uid}
ArchivedWorkflowServiceApi archivedWorkflowServiceGetArchivedWorkflow GET /api/v1/archived-workflows/{uid}
ArchivedWorkflowServiceApi archivedWorkflowServiceListArchivedWorkflows GET /api/v1/archived-workflows
ClusterWorkflowTemplateServiceApi clusterWorkflowTemplateServiceCreateClusterWorkflowTemplate POST /api/v1/cluster-workflow-templates
ClusterWorkflowTemplateServiceApi clusterWorkflowTemplateServiceDeleteClusterWorkflowTemplate DELETE /api/v1/cluster-workflow-templates/{name}
ClusterWorkflowTemplateServiceApi clusterWorkflowTemplateServiceGetClusterWorkflowTemplate GET /api/v1/cluster-workflow-templates/{name}
ClusterWorkflowTemplateServiceApi clusterWorkflowTemplateServiceLintClusterWorkflowTemplate POST /api/v1/cluster-workflow-templates/lint
ClusterWorkflowTemplateServiceApi clusterWorkflowTemplateServiceListClusterWorkflowTemplates GET /api/v1/cluster-workflow-templates
ClusterWorkflowTemplateServiceApi clusterWorkflowTemplateServiceUpdateClusterWorkflowTemplate PUT /api/v1/cluster-workflow-templates/{name}
CronWorkflowServiceApi cronWorkflowServiceCreateCronWorkflow POST /api/v1/cron-workflows/{namespace}
CronWorkflowServiceApi cronWorkflowServiceDeleteCronWorkflow DELETE /api/v1/cron-workflows/{namespace}/{name}
CronWorkflowServiceApi cronWorkflowServiceGetCronWorkflow GET /api/v1/cron-workflows/{namespace}/{name}
CronWorkflowServiceApi cronWorkflowServiceLintCronWorkflow POST /api/v1/cron-workflows/{namespace}/lint
CronWorkflowServiceApi cronWorkflowServiceListCronWorkflows GET /api/v1/cron-workflows/{namespace}
CronWorkflowServiceApi cronWorkflowServiceResumeCronWorkflow PUT /api/v1/cron-workflows/{namespace}/{name}/resume
CronWorkflowServiceApi cronWorkflowServiceSuspendCronWorkflow PUT /api/v1/cron-workflows/{namespace}/{name}/suspend
CronWorkflowServiceApi cronWorkflowServiceUpdateCronWorkflow PUT /api/v1/cron-workflows/{namespace}/{name}
EventServiceApi eventServiceListWorkflowEventBindings GET /api/v1/workflow-event-bindings/{namespace}
EventServiceApi eventServiceReceiveEvent POST /api/v1/events/{namespace}/{discriminator}
EventSourceServiceApi eventSourceServiceCreateEventSource POST /api/v1/event-sources/{namespace}
EventSourceServiceApi eventSourceServiceDeleteEventSource DELETE /api/v1/event-sources/{namespace}/{name}
EventSourceServiceApi eventSourceServiceEventSourcesLogs GET /api/v1/stream/event-sources/{namespace}/logs
EventSourceServiceApi eventSourceServiceGetEventSource GET /api/v1/event-sources/{namespace}/{name}
EventSourceServiceApi eventSourceServiceListEventSources GET /api/v1/event-sources/{namespace}
EventSourceServiceApi eventSourceServiceUpdateEventSource PUT /api/v1/event-sources/{namespace}/{name}
EventSourceServiceApi eventSourceServiceWatchEventSources GET /api/v1/stream/event-sources/{namespace}
InfoServiceApi infoServiceGetInfo GET /api/v1/info
InfoServiceApi infoServiceGetUserInfo GET /api/v1/userinfo
InfoServiceApi infoServiceGetVersion GET /api/v1/version
SensorServiceApi sensorServiceCreateSensor POST /api/v1/sensors/{namespace}
SensorServiceApi sensorServiceDeleteSensor DELETE /api/v1/sensors/{namespace}/{name}
SensorServiceApi sensorServiceGetSensor GET /api/v1/sensors/{namespace}/{name}
SensorServiceApi sensorServiceListSensors GET /api/v1/sensors/{namespace}
SensorServiceApi sensorServiceSensorsLogs GET /api/v1/stream/sensors/{namespace}/logs
SensorServiceApi sensorServiceUpdateSensor PUT /api/v1/sensors/{namespace}/{name}
SensorServiceApi sensorServiceWatchSensors GET /api/v1/stream/sensors/{namespace}
WorkflowServiceApi workflowServiceCreateWorkflow POST /api/v1/workflows/{namespace}
WorkflowServiceApi workflowServiceDeleteWorkflow DELETE /api/v1/workflows/{namespace}/{name}
WorkflowServiceApi workflowServiceGetWorkflow GET /api/v1/workflows/{namespace}/{name}
WorkflowServiceApi workflowServiceLintWorkflow POST /api/v1/workflows/{namespace}/lint
WorkflowServiceApi workflowServiceListWorkflows GET /api/v1/workflows/{namespace}
WorkflowServiceApi workflowServicePodLogs GET /api/v1/workflows/{namespace}/{name}/{podName}/log DEPRECATED: Cannot work via HTTP if podName is an empty string. Use WorkflowLogs.
WorkflowServiceApi workflowServiceResubmitWorkflow PUT /api/v1/workflows/{namespace}/{name}/resubmit
WorkflowServiceApi workflowServiceResumeWorkflow PUT /api/v1/workflows/{namespace}/{name}/resume
WorkflowServiceApi workflowServiceRetryWorkflow PUT /api/v1/workflows/{namespace}/{name}/retry
WorkflowServiceApi workflowServiceSetWorkflow PUT /api/v1/workflows/{namespace}/{name}/set
WorkflowServiceApi workflowServiceStopWorkflow PUT /api/v1/workflows/{namespace}/{name}/stop
WorkflowServiceApi workflowServiceSubmitWorkflow POST /api/v1/workflows/{namespace}/submit
WorkflowServiceApi workflowServiceSuspendWorkflow PUT /api/v1/workflows/{namespace}/{name}/suspend
WorkflowServiceApi workflowServiceTerminateWorkflow PUT /api/v1/workflows/{namespace}/{name}/terminate
WorkflowServiceApi workflowServiceWatchEvents GET /api/v1/stream/events/{namespace}
WorkflowServiceApi workflowServiceWatchWorkflows GET /api/v1/workflow-events/{namespace}
WorkflowServiceApi workflowServiceWorkflowLogs GET /api/v1/workflows/{namespace}/{name}/log
WorkflowTemplateServiceApi workflowTemplateServiceCreateWorkflowTemplate POST /api/v1/workflow-templates/{namespace}
WorkflowTemplateServiceApi workflowTemplateServiceDeleteWorkflowTemplate DELETE /api/v1/workflow-templates/{namespace}/{name}
WorkflowTemplateServiceApi workflowTemplateServiceGetWorkflowTemplate GET /api/v1/workflow-templates/{namespace}/{name}
WorkflowTemplateServiceApi workflowTemplateServiceLintWorkflowTemplate POST /api/v1/workflow-templates/{namespace}/lint
WorkflowTemplateServiceApi workflowTemplateServiceListWorkflowTemplates GET /api/v1/workflow-templates/{namespace}
WorkflowTemplateServiceApi workflowTemplateServiceUpdateWorkflowTemplate PUT /api/v1/workflow-templates/{namespace}/{name}

Documentation for Models

Documentation for Authorization

Authentication schemes defined for the API:

BearerToken

  • Type: API key
  • API key parameter name: authorization
  • Location: HTTP header

HTTPBasic

  • Type: HTTP basic authentication

Recommendation

It's recommended to create an instance of ApiClient per thread in a multithreaded environment to avoid any potential issues.

Author