Skip to content

Latest commit

 

History

History
692 lines (470 loc) · 25.6 KB

File metadata and controls

692 lines (470 loc) · 25.6 KB

FormanceOrchestrationV1

(Orchestration.V1)

Overview

Available Operations

OrchestrationgetServerInfo

Get server info

Example Usage

using formance;
using formance.Models.Components;

var sdk = new Formance(security: new Security() {
    ClientID = "<YOUR_CLIENT_ID_HERE>",
    ClientSecret = "<YOUR_CLIENT_SECRET_HERE>",
});

var res = await sdk.Orchestration.V1.OrchestrationgetServerInfoAsync();

// handle response

Response

OrchestrationgetServerInfoResponse

Errors

Error Type Status Code Content Type
formance.Models.Errors.Error default application/json
formance.Models.Errors.SDKException 4XX, 5XX */*

ListTriggers

List triggers

Example Usage

using formance;
using formance.Models.Requests;
using formance.Models.Components;

var sdk = new Formance(security: new Security() {
    ClientID = "<YOUR_CLIENT_ID_HERE>",
    ClientSecret = "<YOUR_CLIENT_SECRET_HERE>",
});

var res = await sdk.Orchestration.V1.ListTriggersAsync(name: "<value>");

// handle response

Parameters

Parameter Type Required Description
Name string search by name

Response

Models.Requests.ListTriggersResponse

Errors

Error Type Status Code Content Type
formance.Models.Errors.Error default application/json
formance.Models.Errors.SDKException 4XX, 5XX */*

CreateTrigger

Create trigger

Example Usage

using formance;
using formance.Models.Components;
using System.Collections.Generic;

var sdk = new Formance(security: new Security() {
    ClientID = "<YOUR_CLIENT_ID_HERE>",
    ClientSecret = "<YOUR_CLIENT_SECRET_HERE>",
});

TriggerData req = new TriggerData() {
    Event = "<value>",
    WorkflowID = "<id>",
};

var res = await sdk.Orchestration.V1.CreateTriggerAsync(req);

// handle response

Parameters

Parameter Type Required Description
request TriggerData ✔️ The request object to use for the request.

Response

Models.Requests.CreateTriggerResponse

Errors

Error Type Status Code Content Type
formance.Models.Errors.Error default application/json
formance.Models.Errors.SDKException 4XX, 5XX */*

ReadTrigger

Read trigger

Example Usage

using formance;
using formance.Models.Requests;
using formance.Models.Components;

var sdk = new Formance(security: new Security() {
    ClientID = "<YOUR_CLIENT_ID_HERE>",
    ClientSecret = "<YOUR_CLIENT_SECRET_HERE>",
});

var res = await sdk.Orchestration.V1.ReadTriggerAsync(triggerID: "<id>");

// handle response

Parameters

Parameter Type Required Description
TriggerID string ✔️ The trigger id

Response

Models.Requests.ReadTriggerResponse

Errors

Error Type Status Code Content Type
formance.Models.Errors.Error default application/json
formance.Models.Errors.SDKException 4XX, 5XX */*

DeleteTrigger

Read trigger

Example Usage

using formance;
using formance.Models.Requests;
using formance.Models.Components;

var sdk = new Formance(security: new Security() {
    ClientID = "<YOUR_CLIENT_ID_HERE>",
    ClientSecret = "<YOUR_CLIENT_SECRET_HERE>",
});

var res = await sdk.Orchestration.V1.DeleteTriggerAsync(triggerID: "<id>");

// handle response

Parameters

Parameter Type Required Description
TriggerID string ✔️ The trigger id

Response

DeleteTriggerResponse

Errors

Error Type Status Code Content Type
formance.Models.Errors.Error default application/json
formance.Models.Errors.SDKException 4XX, 5XX */*

ListTriggersOccurrences

List triggers occurrences

Example Usage

using formance;
using formance.Models.Requests;
using formance.Models.Components;

var sdk = new Formance(security: new Security() {
    ClientID = "<YOUR_CLIENT_ID_HERE>",
    ClientSecret = "<YOUR_CLIENT_SECRET_HERE>",
});

var res = await sdk.Orchestration.V1.ListTriggersOccurrencesAsync(triggerID: "<id>");

// handle response

Parameters

Parameter Type Required Description
TriggerID string ✔️ The trigger id

Response

Models.Requests.ListTriggersOccurrencesResponse

Errors

Error Type Status Code Content Type
formance.Models.Errors.Error default application/json
formance.Models.Errors.SDKException 4XX, 5XX */*

ListWorkflows

List registered workflows

Example Usage

using formance;
using formance.Models.Components;

var sdk = new Formance(security: new Security() {
    ClientID = "<YOUR_CLIENT_ID_HERE>",
    ClientSecret = "<YOUR_CLIENT_SECRET_HERE>",
});

var res = await sdk.Orchestration.V1.ListWorkflowsAsync();

// handle response

Response

Models.Requests.ListWorkflowsResponse

Errors

Error Type Status Code Content Type
formance.Models.Errors.Error default application/json
formance.Models.Errors.SDKException 4XX, 5XX */*

CreateWorkflow

Create a workflow

Example Usage

using formance;
using formance.Models.Components;
using System.Collections.Generic;

var sdk = new Formance(security: new Security() {
    ClientID = "<YOUR_CLIENT_ID_HERE>",
    ClientSecret = "<YOUR_CLIENT_SECRET_HERE>",
});

CreateWorkflowRequest req = new CreateWorkflowRequest() {
    Stages = new List<Dictionary<string, object>>() {
        new Dictionary<string, object>() {
            { "key", "<value>" },
        },
    },
};

var res = await sdk.Orchestration.V1.CreateWorkflowAsync(req);

// handle response

Parameters

Parameter Type Required Description
request CreateWorkflowRequest ✔️ The request object to use for the request.

Response

Models.Requests.CreateWorkflowResponse

Errors

Error Type Status Code Content Type
formance.Models.Errors.Error default application/json
formance.Models.Errors.SDKException 4XX, 5XX */*

GetWorkflow

Get a flow by id

Example Usage

using formance;
using formance.Models.Requests;
using formance.Models.Components;

var sdk = new Formance(security: new Security() {
    ClientID = "<YOUR_CLIENT_ID_HERE>",
    ClientSecret = "<YOUR_CLIENT_SECRET_HERE>",
});

var res = await sdk.Orchestration.V1.GetWorkflowAsync(flowId: "xxx");

// handle response

Parameters

Parameter Type Required Description Example
FlowId string ✔️ The flow id xxx

Response

Models.Requests.GetWorkflowResponse

Errors

Error Type Status Code Content Type
formance.Models.Errors.Error default application/json
formance.Models.Errors.SDKException 4XX, 5XX */*

DeleteWorkflow

Delete a flow by id

Example Usage

using formance;
using formance.Models.Requests;
using formance.Models.Components;

var sdk = new Formance(security: new Security() {
    ClientID = "<YOUR_CLIENT_ID_HERE>",
    ClientSecret = "<YOUR_CLIENT_SECRET_HERE>",
});

var res = await sdk.Orchestration.V1.DeleteWorkflowAsync(flowId: "xxx");

// handle response

Parameters

Parameter Type Required Description Example
FlowId string ✔️ The flow id xxx

Response

DeleteWorkflowResponse

Errors

Error Type Status Code Content Type
formance.Models.Errors.Error default application/json
formance.Models.Errors.SDKException 4XX, 5XX */*

RunWorkflow

Run workflow

Example Usage

using formance;
using formance.Models.Requests;
using System.Collections.Generic;
using formance.Models.Components;

var sdk = new Formance(security: new Security() {
    ClientID = "<YOUR_CLIENT_ID_HERE>",
    ClientSecret = "<YOUR_CLIENT_SECRET_HERE>",
});

var res = await sdk.Orchestration.V1.RunWorkflowAsync(
    workflowID: "xxx",
    wait: false,
    requestBody: new Dictionary<string, string>() {
        { "key", "<value>" },
    }
);

// handle response

Parameters

Parameter Type Required Description Example
WorkflowID string ✔️ The flow id xxx
Wait bool Wait end of the workflow before return
RequestBody Dictionary<String, string> N/A

Response

Models.Requests.RunWorkflowResponse

Errors

Error Type Status Code Content Type
formance.Models.Errors.Error default application/json
formance.Models.Errors.SDKException 4XX, 5XX */*

ListInstances

List instances of a workflow

Example Usage

using formance;
using formance.Models.Requests;
using formance.Models.Components;

var sdk = new Formance(security: new Security() {
    ClientID = "<YOUR_CLIENT_ID_HERE>",
    ClientSecret = "<YOUR_CLIENT_SECRET_HERE>",
});

var res = await sdk.Orchestration.V1.ListInstancesAsync(
    workflowID: "xxx",
    running: true
);

// handle response

Parameters

Parameter Type Required Description Example
WorkflowID string A workflow id xxx
Running bool Filter running instances true

Response

ListInstancesResponse

Errors

Error Type Status Code Content Type
formance.Models.Errors.Error default application/json
formance.Models.Errors.SDKException 4XX, 5XX */*

GetInstance

Get a workflow instance by id

Example Usage

using formance;
using formance.Models.Requests;
using formance.Models.Components;

var sdk = new Formance(security: new Security() {
    ClientID = "<YOUR_CLIENT_ID_HERE>",
    ClientSecret = "<YOUR_CLIENT_SECRET_HERE>",
});

var res = await sdk.Orchestration.V1.GetInstanceAsync(instanceID: "xxx");

// handle response

Parameters

Parameter Type Required Description Example
InstanceID string ✔️ The instance id xxx

Response

GetInstanceResponse

Errors

Error Type Status Code Content Type
formance.Models.Errors.Error default application/json
formance.Models.Errors.SDKException 4XX, 5XX */*

SendEvent

Send an event to a running workflow

Example Usage

using formance;
using formance.Models.Requests;
using formance.Models.Components;

var sdk = new Formance(security: new Security() {
    ClientID = "<YOUR_CLIENT_ID_HERE>",
    ClientSecret = "<YOUR_CLIENT_SECRET_HERE>",
});

var res = await sdk.Orchestration.V1.SendEventAsync(
    instanceID: "xxx",
    requestBody: new SendEventRequestBody() {
        Name = "<value>",
    }
);

// handle response

Parameters

Parameter Type Required Description Example
InstanceID string ✔️ The instance id xxx
RequestBody SendEventRequestBody N/A

Response

SendEventResponse

Errors

Error Type Status Code Content Type
formance.Models.Errors.Error default application/json
formance.Models.Errors.SDKException 4XX, 5XX */*

CancelEvent

Cancel a running workflow

Example Usage

using formance;
using formance.Models.Requests;
using formance.Models.Components;

var sdk = new Formance(security: new Security() {
    ClientID = "<YOUR_CLIENT_ID_HERE>",
    ClientSecret = "<YOUR_CLIENT_SECRET_HERE>",
});

var res = await sdk.Orchestration.V1.CancelEventAsync(instanceID: "xxx");

// handle response

Parameters

Parameter Type Required Description Example
InstanceID string ✔️ The instance id xxx

Response

CancelEventResponse

Errors

Error Type Status Code Content Type
formance.Models.Errors.Error default application/json
formance.Models.Errors.SDKException 4XX, 5XX */*

GetInstanceHistory

Get a workflow instance history by id

Example Usage

using formance;
using formance.Models.Requests;
using formance.Models.Components;

var sdk = new Formance(security: new Security() {
    ClientID = "<YOUR_CLIENT_ID_HERE>",
    ClientSecret = "<YOUR_CLIENT_SECRET_HERE>",
});

var res = await sdk.Orchestration.V1.GetInstanceHistoryAsync(instanceID: "xxx");

// handle response

Parameters

Parameter Type Required Description Example
InstanceID string ✔️ The instance id xxx

Response

GetInstanceHistoryResponse

Errors

Error Type Status Code Content Type
formance.Models.Errors.Error default application/json
formance.Models.Errors.SDKException 4XX, 5XX */*

GetInstanceStageHistory

Get a workflow instance stage history

Example Usage

using formance;
using formance.Models.Requests;
using formance.Models.Components;

var sdk = new Formance(security: new Security() {
    ClientID = "<YOUR_CLIENT_ID_HERE>",
    ClientSecret = "<YOUR_CLIENT_SECRET_HERE>",
});

var res = await sdk.Orchestration.V1.GetInstanceStageHistoryAsync(
    instanceID: "xxx",
    number: 0
);

// handle response

Parameters

Parameter Type Required Description Example
InstanceID string ✔️ The instance id xxx
Number long ✔️ The stage number 0

Response

GetInstanceStageHistoryResponse

Errors

Error Type Status Code Content Type
formance.Models.Errors.Error default application/json
formance.Models.Errors.SDKException 4XX, 5XX */*