Skip to content

flowsynx/csharp-sdk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

99 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FlowSynx.Client SDK for C#

dotnet License: MIT Build Status FOSSA Status

FlowSynx.Client is a modern, extensible C# SDK designed to integrate seamlessly with the FlowSynx Workflow Automation Engine, providing a streamlined way to interact with its powerful REST API. This SDK enables developers to manage workflows, plugins, executions, configurations, and more through a simple, fluent .NET API.

🚀 Features

  • Connect securely to FlowSynx via REST
  • Manage workflows and plugin configurations
  • Trigger and monitor workflow executions
  • Upload and retrieve logs and metadata
  • Authentication support (Basic, Bearer, and custom token handlers)
  • Lightweight, dependency-free architecture
  • Built for .NET 9.0 with extensibility and clean architecture in mind

📦 Installation

You can install the SDK via NuGet:

dotnet add package FlowSynx.Client

🧩 Usage

  1. Configure the Client

Make sure the blow package are added to you project:

dotnet add package Microsoft.Extensions.DependencyInjection
dotnet add package Microsoft.Extensions.Hosting

Then use the FlowSynx Client like following:

IAuthenticationStrategy authStrategy = new BasicAuthenticationStrategy("admin", "admin");

using IHost host = Host.CreateDefaultBuilder(args)
    .ConfigureServices((_, services) =>
    {
        services.AddHttpClient();
        services.AddSingleton<IFlowSynxServiceFactory, FlowSynxServiceFactory>();
        services.AddSingleton(authStrategy);
        services.AddSingleton<IFlowSynxClient, FlowSynxClient>();
    })
    .Build();

var client = host.Services.GetRequiredService<IFlowSynxClient>();
  1. List Available Workflows
var result = await _flowSynxClient.Workflows.ListAsync(cancellationToken);
var workflows = result.Payload;
foreach (var workflow in workflows)
{
    Console.WriteLine($"{workflow.Id}: {workflow.Name}");
}
  1. Execute a Workflow
Guid workflowId = Guid.Parse("YOUR-WORKFLOW-ID");
var workflowRequest = new ExecuteWorkflowRequest { WorkflowId = workflowId };
var result = await _flowSynxClient.Workflows.ExecuteAsync(workflowRequest, cancellationToken);

✅ Requirements

  • .NET 9.0 or later
  • Compatible with Windows, Linux, macOS

About

C# SDK for FlowSynx

Topics

Resources

License

Stars

Watchers

Forks

Languages