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.
- 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
You can install the SDK via NuGet:
dotnet add package FlowSynx.Client
- 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>();
- 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}");
}
- Execute a Workflow
Guid workflowId = Guid.Parse("YOUR-WORKFLOW-ID");
var workflowRequest = new ExecuteWorkflowRequest { WorkflowId = workflowId };
var result = await _flowSynxClient.Workflows.ExecuteAsync(workflowRequest, cancellationToken);
- .NET 9.0 or later
- Compatible with Windows, Linux, macOS