argo-client-java icon indicating copy to clipboard operation
argo-client-java copied to clipboard

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

⚠️⚠️⚠️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

  • AWSElasticBlockStoreVolumeSource
  • ArchiveStrategy
  • Arguments
  • Artifact
  • ArtifactLocation
  • ArtifactPaths
  • ArtifactRepositoryRef
  • ArtifactRepositoryRefStatus
  • ArtifactoryArtifact
  • AzureDiskVolumeSource
  • AzureFileVolumeSource
  • Backoff
  • CSIVolumeSource
  • Cache
  • Capabilities
  • CephFSVolumeSource
  • CinderVolumeSource
  • ClusterWorkflowTemplate
  • ClusterWorkflowTemplateCreateRequest
  • ClusterWorkflowTemplateLintRequest
  • ClusterWorkflowTemplateList
  • ClusterWorkflowTemplateUpdateRequest
  • Condition
  • ConfigMapEnvSource
  • ConfigMapProjection
  • ConfigMapVolumeSource
  • ContainerNode
  • ContainerSetTemplate
  • ContinueOn
  • Counter
  • CreateCronWorkflowRequest
  • CreateOptions
  • CreateS3BucketOptions
  • CronWorkflow
  • CronWorkflowList
  • CronWorkflowResumeRequest
  • CronWorkflowSpec
  • CronWorkflowStatus
  • CronWorkflowSuspendRequest
  • DAGTask
  • DAGTemplate
  • Data
  • DataSource
  • DownwardAPIProjection
  • DownwardAPIVolumeFile
  • DownwardAPIVolumeSource
  • EmptyDirVolumeSource
  • EnvVarSource
  • EphemeralVolumeSource
  • Event
  • EventSeries
  • EventSource
  • EventsourceCreateEventSourceRequest
  • EventsourceEventSourceWatchEvent
  • EventsourceLogEntry
  • EventsourceUpdateEventSourceRequest
  • ExecAction
  • ExecutorConfig
  • FCVolumeSource
  • FlexVolumeSource
  • FlockerVolumeSource
  • GCEPersistentDiskVolumeSource
  • GCSArtifact
  • Gauge
  • GetUserInfoResponse
  • GitArtifact
  • GitRepoVolumeSource
  • GlusterfsVolumeSource
  • GoogleProtobufAny
  • GroupVersionResource
  • GrpcGatewayRuntimeError
  • GrpcGatewayRuntimeStreamError
  • HDFSArtifact
  • HTTPArtifact
  • HTTPGetAction
  • HTTPHeader
  • Handler
  • Header
  • Histogram
  • HostPathVolumeSource
  • ISCSIVolumeSource
  • InfoResponse
  • Inputs
  • IoArgoprojEventsV1alpha1AMQPEventSource
  • IoArgoprojEventsV1alpha1AWSLambdaTrigger
  • IoArgoprojEventsV1alpha1Amount
  • IoArgoprojEventsV1alpha1ArgoWorkflowTrigger
  • IoArgoprojEventsV1alpha1ArtifactLocation
  • IoArgoprojEventsV1alpha1AzureEventsHubEventSource
  • IoArgoprojEventsV1alpha1Backoff
  • IoArgoprojEventsV1alpha1BasicAuth
  • IoArgoprojEventsV1alpha1CalendarEventSource
  • IoArgoprojEventsV1alpha1CatchupConfiguration
  • IoArgoprojEventsV1alpha1Condition
  • IoArgoprojEventsV1alpha1ConfigMapPersistence
  • IoArgoprojEventsV1alpha1CustomTrigger
  • IoArgoprojEventsV1alpha1DataFilter
  • IoArgoprojEventsV1alpha1DependencyGroup
  • IoArgoprojEventsV1alpha1EmitterEventSource
  • IoArgoprojEventsV1alpha1EventContext
  • IoArgoprojEventsV1alpha1EventDependency
  • IoArgoprojEventsV1alpha1EventDependencyFilter
  • IoArgoprojEventsV1alpha1EventPersistence
  • IoArgoprojEventsV1alpha1EventSource
  • IoArgoprojEventsV1alpha1EventSourceList
  • IoArgoprojEventsV1alpha1EventSourceSpec
  • IoArgoprojEventsV1alpha1EventSourceStatus
  • IoArgoprojEventsV1alpha1FileArtifact
  • IoArgoprojEventsV1alpha1FileEventSource
  • IoArgoprojEventsV1alpha1GenericEventSource
  • IoArgoprojEventsV1alpha1GitArtifact
  • IoArgoprojEventsV1alpha1GitCreds
  • IoArgoprojEventsV1alpha1GitRemoteConfig
  • IoArgoprojEventsV1alpha1GithubEventSource
  • IoArgoprojEventsV1alpha1GitlabEventSource
  • IoArgoprojEventsV1alpha1HDFSEventSource
  • IoArgoprojEventsV1alpha1HTTPTrigger
  • IoArgoprojEventsV1alpha1K8SResourcePolicy
  • IoArgoprojEventsV1alpha1KafkaConsumerGroup
  • IoArgoprojEventsV1alpha1KafkaEventSource
  • IoArgoprojEventsV1alpha1KafkaTrigger
  • IoArgoprojEventsV1alpha1LogTrigger
  • IoArgoprojEventsV1alpha1MQTTEventSource
  • IoArgoprojEventsV1alpha1Metadata
  • IoArgoprojEventsV1alpha1NATSEventsSource
  • IoArgoprojEventsV1alpha1NATSTrigger
  • IoArgoprojEventsV1alpha1NSQEventSource
  • IoArgoprojEventsV1alpha1OpenWhiskTrigger
  • IoArgoprojEventsV1alpha1PubSubEventSource
  • IoArgoprojEventsV1alpha1PulsarEventSource
  • IoArgoprojEventsV1alpha1RedisEventSource
  • IoArgoprojEventsV1alpha1Resource
  • IoArgoprojEventsV1alpha1ResourceEventSource
  • IoArgoprojEventsV1alpha1ResourceFilter
  • IoArgoprojEventsV1alpha1S3Artifact
  • IoArgoprojEventsV1alpha1S3Bucket
  • IoArgoprojEventsV1alpha1S3Filter
  • IoArgoprojEventsV1alpha1SNSEventSource
  • IoArgoprojEventsV1alpha1SQSEventSource
  • IoArgoprojEventsV1alpha1Selector
  • IoArgoprojEventsV1alpha1Sensor
  • IoArgoprojEventsV1alpha1SensorList
  • IoArgoprojEventsV1alpha1SensorSpec
  • IoArgoprojEventsV1alpha1SensorStatus
  • IoArgoprojEventsV1alpha1Service
  • IoArgoprojEventsV1alpha1SlackEventSource
  • IoArgoprojEventsV1alpha1SlackTrigger
  • IoArgoprojEventsV1alpha1StandardK8STrigger
  • IoArgoprojEventsV1alpha1Status
  • IoArgoprojEventsV1alpha1StatusPolicy
  • IoArgoprojEventsV1alpha1StorageGridEventSource
  • IoArgoprojEventsV1alpha1StorageGridFilter
  • IoArgoprojEventsV1alpha1StripeEventSource
  • IoArgoprojEventsV1alpha1TLSConfig
  • IoArgoprojEventsV1alpha1Template
  • IoArgoprojEventsV1alpha1TimeFilter
  • IoArgoprojEventsV1alpha1Trigger
  • IoArgoprojEventsV1alpha1TriggerParameter
  • IoArgoprojEventsV1alpha1TriggerParameterSource
  • IoArgoprojEventsV1alpha1TriggerPolicy
  • IoArgoprojEventsV1alpha1TriggerSwitch
  • IoArgoprojEventsV1alpha1TriggerTemplate
  • IoArgoprojEventsV1alpha1URLArtifact
  • IoArgoprojEventsV1alpha1WatchPathConfig
  • IoArgoprojEventsV1alpha1WebhookContext
  • IoK8sApiPolicyV1beta1PodDisruptionBudgetSpec
  • KeyToPath
  • LabelSelector
  • LabelSelectorRequirement
  • LifecycleHook
  • Link
  • LintCronWorkflowRequest
  • LogEntry
  • ManagedFieldsEntry
  • MemoizationStatus
  • Memoize
  • Metadata
  • MetricLabel
  • Metrics
  • Mutex
  • MutexHolding
  • MutexStatus
  • NFSVolumeSource
  • NodeAffinity
  • NodeSelector
  • NodeSelectorRequirement
  • NodeSelectorTerm
  • NodeStatus
  • NodeSynchronizationStatus
  • OSSArtifact
  • OSSLifecycleRule
  • ObjectFieldSelector
  • Outputs
  • OwnerReference
  • ParallelSteps
  • Parameter
  • PersistentVolumeClaimCondition
  • PersistentVolumeClaimSpec
  • PersistentVolumeClaimStatus
  • PersistentVolumeClaimTemplate
  • PersistentVolumeClaimVolumeSource
  • PhotonPersistentDiskVolumeSource
  • PodAffinity
  • PodAffinityTerm
  • PodAntiAffinity
  • PodDNSConfigOption
  • PodGC
  • PortworxVolumeSource
  • PreferredSchedulingTerm
  • ProjectedVolumeSource
  • Prometheus
  • QuobyteVolumeSource
  • RBDVolumeSource
  • RawArtifact
  • ResourceFieldSelector
  • ResourceTemplate
  • RetryAffinity
  • RetryStrategy
  • S3Artifact
  • SELinuxOptions
  • ScaleIOVolumeSource
  • ScriptTemplate
  • SecretEnvSource
  • SecretProjection
  • SecretVolumeSource
  • SemaphoreHolding
  • SemaphoreRef
  • SemaphoreStatus
  • SensorCreateSensorRequest
  • SensorLogEntry
  • SensorSensorWatchEvent
  • SensorUpdateSensorRequest
  • Sequence
  • ServiceAccountTokenProjection
  • ServicePort
  • StatusCause
  • StatusDetails
  • StorageOSVolumeSource
  • StreamResultOfEvent
  • StreamResultOfEventsourceEventSourceWatchEvent
  • StreamResultOfEventsourceLogEntry
  • StreamResultOfLogEntry
  • StreamResultOfSensorLogEntry
  • StreamResultOfSensorSensorWatchEvent
  • StreamResultOfWorkflowWatchEvent
  • Submit
  • SubmitOpts
  • SuspendTemplate
  • Synchronization
  • SynchronizationStatus
  • Sysctl
  • TCPSocketAction
  • TTLStrategy
  • TarStrategy
  • Template
  • TemplateRef
  • TransformationStep
  • TypedLocalObjectReference
  • UpdateCronWorkflowRequest
  • UserContainer
  • ValueFrom
  • Version
  • VolumeClaimGC
  • VolumeProjection
  • VsphereVirtualDiskVolumeSource
  • WeightedPodAffinityTerm
  • WindowsSecurityContextOptions
  • Workflow
  • WorkflowCreateRequest
  • WorkflowEventBinding
  • WorkflowEventBindingList
  • WorkflowEventBindingSpec
  • WorkflowLintRequest
  • WorkflowList
  • WorkflowResubmitRequest
  • WorkflowResumeRequest
  • WorkflowRetryRequest
  • WorkflowSetRequest
  • WorkflowSpec
  • WorkflowStatus
  • WorkflowStep
  • WorkflowStopRequest
  • WorkflowSubmitRequest
  • WorkflowSuspendRequest
  • WorkflowTemplate
  • WorkflowTemplateCreateRequest
  • WorkflowTemplateLintRequest
  • WorkflowTemplateList
  • WorkflowTemplateRef
  • WorkflowTemplateSpec
  • WorkflowTemplateUpdateRequest
  • WorkflowTerminateRequest
  • WorkflowWatchEvent

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