Skip to content

omnicave/ArgoWorkflowsClient

Repository files navigation

ArgoWorkflowsClient - the C# library for the Argo Workflows API

Argo Workflows is an open source container-native workflow engine for orchestrating parallel jobs on Kubernetes. For more information, please see https://argoproj.github.io/argo-workflows/

This C# SDK is automatically generated by the OpenAPI Generator project:

  • API version: VERSION
  • SDK version: 1.0.0
  • Build package: org.openapitools.codegen.languages.CSharpClientCodegen

Frameworks supported

Dependencies

The DLLs included in the package may not be the latest version. We recommend using NuGet to obtain the latest version of the packages:

Install-Package RestSharp
Install-Package Newtonsoft.Json
Install-Package JsonSubTypes
Install-Package System.ComponentModel.Annotations

NOTE: RestSharp versions greater than 105.1.0 have a bug which causes file uploads to fail. See RestSharp#742. NOTE: RestSharp for .Net Core creates a new socket for each api call, which can lead to a socket exhaustion problem. See RestSharp#1406.

Installation

Run the following command to generate the DLL

  • [Mac/Linux] /bin/sh build.sh
  • [Windows] build.bat

Then include the DLL (under the bin folder) in the C# project, and use the namespaces:

using ArgoWorkflowsClient.Api;
using ArgoWorkflowsClient.Client;
using ArgoWorkflowsClient.Model;

Packaging

A .nuspec is included with the project. You can follow the Nuget quickstart to create and publish packages.

This .nuspec uses placeholders from the .csproj, so build the .csproj directly:

nuget pack -Build -OutputDirectory out ArgoWorkflowsClient.csproj

Then, publish to a local feed or other host and consume the new package via Nuget as usual.

Usage

To use the API client with a HTTP proxy, setup a System.Net.WebProxy

Configuration c = new Configuration();
System.Net.WebProxy webProxy = new System.Net.WebProxy("http://myProxyUrl:80/");
webProxy.Credentials = System.Net.CredentialCache.DefaultCredentials;
c.Proxy = webProxy;

Getting Started

using System.Collections.Generic;
using System.Diagnostics;
using ArgoWorkflowsClient.Api;
using ArgoWorkflowsClient.Client;
using ArgoWorkflowsClient.Model;

namespace Example
{
    public class Example
    {
        public static void Main()
        {

            Configuration config = new Configuration();
            config.BasePath = "http://localhost:2746";
            // Configure API key authorization: BearerToken
            config.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // config.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new ArchivedWorkflowServiceApi(config);
            var uid = "uid_example";  // string | 
            var varNamespace = "varNamespace_example";  // string? |  (optional) 

            try
            {
                Object result = apiInstance.ArchivedWorkflowServiceDeleteArchivedWorkflow(uid, varNamespace);
                Debug.WriteLine(result);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling ArchivedWorkflowServiceApi.ArchivedWorkflowServiceDeleteArchivedWorkflow: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }

        }
    }
}

Documentation for API Endpoints

All URIs are relative to http://localhost:2746

Class Method HTTP request Description
ArchivedWorkflowServiceApi ArchivedWorkflowServiceDeleteArchivedWorkflow DELETE /api/v1/archived-workflows/{uid}
ArchivedWorkflowServiceApi ArchivedWorkflowServiceGetArchivedWorkflow GET /api/v1/archived-workflows/{uid}
ArchivedWorkflowServiceApi ArchivedWorkflowServiceListArchivedWorkflowLabelKeys GET /api/v1/archived-workflows-label-keys
ArchivedWorkflowServiceApi ArchivedWorkflowServiceListArchivedWorkflowLabelValues GET /api/v1/archived-workflows-label-values
ArchivedWorkflowServiceApi ArchivedWorkflowServiceListArchivedWorkflows GET /api/v1/archived-workflows
ArchivedWorkflowServiceApi ArchivedWorkflowServiceResubmitArchivedWorkflow PUT /api/v1/archived-workflows/{uid}/resubmit
ArchivedWorkflowServiceApi ArchivedWorkflowServiceRetryArchivedWorkflow PUT /api/v1/archived-workflows/{uid}/retry
ArtifactServiceApi ArtifactServiceGetArtifactFile GET /artifact-files/{namespace}/{idDiscriminator}/{id}/{nodeId}/{artifactDiscriminator}/{artifactName} Get an artifact.
ArtifactServiceApi ArtifactServiceGetInputArtifact GET /input-artifacts/{namespace}/{name}/{nodeId}/{artifactName} Get an input artifact.
ArtifactServiceApi ArtifactServiceGetInputArtifactByUID GET /input-artifacts-by-uid/{uid}/{nodeId}/{artifactName} Get an input artifact by UID.
ArtifactServiceApi ArtifactServiceGetOutputArtifact GET /artifacts/{namespace}/{name}/{nodeId}/{artifactName} Get an output artifact.
ArtifactServiceApi ArtifactServiceGetOutputArtifactByUID GET /artifacts-by-uid/{uid}/{nodeId}/{artifactName} Get an output artifact by UID.
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 InfoServiceCollectEvent POST /api/v1/tracking/event
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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages