- cancelEvent - Cancel a running workflow
- createTrigger - Create trigger
- createWorkflow - Create workflow
- deleteTrigger - Delete trigger
- deleteWorkflow - Delete a flow by id
- getInstance - Get a workflow instance by id
- getInstanceHistory - Get a workflow instance history by id
- getInstanceStageHistory - Get a workflow instance stage history
- getServerInfo - Get server info
- getWorkflow - Get a flow by id
- listInstances - List instances of a workflow
- listTriggers - List triggers
- listTriggersOccurrences - List triggers occurrences
- listWorkflows - List registered workflows
- readTrigger - Read trigger
- runWorkflow - Run workflow
- sendEvent - Send an event to a running workflow
- testTrigger - Test trigger
Cancel a running workflow
declare(strict_types=1);
require 'vendor/autoload.php';
use formance\stack;
use formance\stack\Models\Operations;
use formance\stack\Models\Shared;
$security = new Shared\Security(
authorization: "<YOUR_AUTHORIZATION_HERE>",
);
$sdk = stack\SDK::builder()->setSecurity($security)->build();
try {
$request = new Operations\V2CancelEventRequest(
instanceID: 'xxx',
);
$response = $sdk->orchestrationV2->cancelEvent($request);
if ($response->statusCode === 200) {
// handle response
}
} catch (Throwable $e) {
// handle exception
}
Parameter | Type | Required | Description |
---|---|---|---|
$request |
Operations\V2CancelEventRequest | ✔️ | The request object to use for the request. |
?Operations\V2CancelEventResponse
Error Object | Status Code | Content Type |
---|---|---|
Errors\V2Error | default | application/json |
formance\stack\Models\Errors.SDKException | 4xx-5xx | / |
Create trigger
declare(strict_types=1);
require 'vendor/autoload.php';
use formance\stack;
use formance\stack\Models\Shared;
$security = new Shared\Security(
authorization: "<YOUR_AUTHORIZATION_HERE>",
);
$sdk = stack\SDK::builder()->setSecurity($security)->build();
try {
$request = new Shared\V2TriggerData(
event: '<value>',
workflowID: '<value>',
);
$response = $sdk->orchestrationV2->createTrigger($request);
if ($response->v2CreateTriggerResponse !== null) {
// handle response
}
} catch (Throwable $e) {
// handle exception
}
Parameter | Type | Required | Description |
---|---|---|---|
$request |
Shared\V2TriggerData | ✔️ | The request object to use for the request. |
?Operations\V2CreateTriggerResponse
Error Object | Status Code | Content Type |
---|---|---|
Errors\V2Error | default | application/json |
formance\stack\Models\Errors.SDKException | 4xx-5xx | / |
Create a workflow
declare(strict_types=1);
require 'vendor/autoload.php';
use formance\stack;
use formance\stack\Models\Shared;
$security = new Shared\Security(
authorization: "<YOUR_AUTHORIZATION_HERE>",
);
$sdk = stack\SDK::builder()->setSecurity($security)->build();
try {
$request = new Shared\V2CreateWorkflowRequest(
stages: [
[
'key' => '<value>',
],
],
);
$response = $sdk->orchestrationV2->createWorkflow($request);
if ($response->v2CreateWorkflowResponse !== null) {
// handle response
}
} catch (Throwable $e) {
// handle exception
}
Parameter | Type | Required | Description |
---|---|---|---|
$request |
Shared\V2CreateWorkflowRequest | ✔️ | The request object to use for the request. |
?Operations\V2CreateWorkflowResponse
Error Object | Status Code | Content Type |
---|---|---|
Errors\V2Error | default | application/json |
formance\stack\Models\Errors.SDKException | 4xx-5xx | / |
Read trigger
declare(strict_types=1);
require 'vendor/autoload.php';
use formance\stack;
use formance\stack\Models\Operations;
use formance\stack\Models\Shared;
$security = new Shared\Security(
authorization: "<YOUR_AUTHORIZATION_HERE>",
);
$sdk = stack\SDK::builder()->setSecurity($security)->build();
try {
$request = new Operations\V2DeleteTriggerRequest(
triggerID: '<value>',
);
$response = $sdk->orchestrationV2->deleteTrigger($request);
if ($response->statusCode === 200) {
// handle response
}
} catch (Throwable $e) {
// handle exception
}
Parameter | Type | Required | Description |
---|---|---|---|
$request |
Operations\V2DeleteTriggerRequest | ✔️ | The request object to use for the request. |
?Operations\V2DeleteTriggerResponse
Error Object | Status Code | Content Type |
---|---|---|
Errors\V2Error | default | application/json |
formance\stack\Models\Errors.SDKException | 4xx-5xx | / |
Delete a flow by id
declare(strict_types=1);
require 'vendor/autoload.php';
use formance\stack;
use formance\stack\Models\Operations;
use formance\stack\Models\Shared;
$security = new Shared\Security(
authorization: "<YOUR_AUTHORIZATION_HERE>",
);
$sdk = stack\SDK::builder()->setSecurity($security)->build();
try {
$request = new Operations\V2DeleteWorkflowRequest(
flowId: 'xxx',
);
$response = $sdk->orchestrationV2->deleteWorkflow($request);
if ($response->statusCode === 200) {
// handle response
}
} catch (Throwable $e) {
// handle exception
}
Parameter | Type | Required | Description |
---|---|---|---|
$request |
Operations\V2DeleteWorkflowRequest | ✔️ | The request object to use for the request. |
?Operations\V2DeleteWorkflowResponse
Error Object | Status Code | Content Type |
---|---|---|
Errors\V2Error | default | application/json |
formance\stack\Models\Errors.SDKException | 4xx-5xx | / |
Get a workflow instance by id
declare(strict_types=1);
require 'vendor/autoload.php';
use formance\stack;
use formance\stack\Models\Operations;
use formance\stack\Models\Shared;
$security = new Shared\Security(
authorization: "<YOUR_AUTHORIZATION_HERE>",
);
$sdk = stack\SDK::builder()->setSecurity($security)->build();
try {
$request = new Operations\V2GetInstanceRequest(
instanceID: 'xxx',
);
$response = $sdk->orchestrationV2->getInstance($request);
if ($response->v2GetWorkflowInstanceResponse !== null) {
// handle response
}
} catch (Throwable $e) {
// handle exception
}
Parameter | Type | Required | Description |
---|---|---|---|
$request |
Operations\V2GetInstanceRequest | ✔️ | The request object to use for the request. |
?Operations\V2GetInstanceResponse
Error Object | Status Code | Content Type |
---|---|---|
Errors\V2Error | default | application/json |
formance\stack\Models\Errors.SDKException | 4xx-5xx | / |
Get a workflow instance history by id
declare(strict_types=1);
require 'vendor/autoload.php';
use formance\stack;
use formance\stack\Models\Operations;
use formance\stack\Models\Shared;
$security = new Shared\Security(
authorization: "<YOUR_AUTHORIZATION_HERE>",
);
$sdk = stack\SDK::builder()->setSecurity($security)->build();
try {
$request = new Operations\V2GetInstanceHistoryRequest(
instanceID: 'xxx',
);
$response = $sdk->orchestrationV2->getInstanceHistory($request);
if ($response->v2GetWorkflowInstanceHistoryResponse !== null) {
// handle response
}
} catch (Throwable $e) {
// handle exception
}
Parameter | Type | Required | Description |
---|---|---|---|
$request |
Operations\V2GetInstanceHistoryRequest | ✔️ | The request object to use for the request. |
?Operations\V2GetInstanceHistoryResponse
Error Object | Status Code | Content Type |
---|---|---|
Errors\V2Error | default | application/json |
formance\stack\Models\Errors.SDKException | 4xx-5xx | / |
Get a workflow instance stage history
declare(strict_types=1);
require 'vendor/autoload.php';
use formance\stack;
use formance\stack\Models\Operations;
use formance\stack\Models\Shared;
$security = new Shared\Security(
authorization: "<YOUR_AUTHORIZATION_HERE>",
);
$sdk = stack\SDK::builder()->setSecurity($security)->build();
try {
$request = new Operations\V2GetInstanceStageHistoryRequest(
instanceID: 'xxx',
number: 0,
);
$response = $sdk->orchestrationV2->getInstanceStageHistory($request);
if ($response->v2GetWorkflowInstanceHistoryStageResponse !== null) {
// handle response
}
} catch (Throwable $e) {
// handle exception
}
Parameter | Type | Required | Description |
---|---|---|---|
$request |
Operations\V2GetInstanceStageHistoryRequest | ✔️ | The request object to use for the request. |
?Operations\V2GetInstanceStageHistoryResponse
Error Object | Status Code | Content Type |
---|---|---|
Errors\V2Error | default | application/json |
formance\stack\Models\Errors.SDKException | 4xx-5xx | / |
Get server info
declare(strict_types=1);
require 'vendor/autoload.php';
use formance\stack;
use formance\stack\Models\Shared;
$security = new Shared\Security(
authorization: "<YOUR_AUTHORIZATION_HERE>",
);
$sdk = stack\SDK::builder()->setSecurity($security)->build();
try {
$response = $sdk->orchestrationV2->getServerInfo();
if ($response->v2ServerInfo !== null) {
// handle response
}
} catch (Throwable $e) {
// handle exception
}
?Operations\V2GetServerInfoResponse
Error Object | Status Code | Content Type |
---|---|---|
Errors\V2Error | default | application/json |
formance\stack\Models\Errors.SDKException | 4xx-5xx | / |
Get a flow by id
declare(strict_types=1);
require 'vendor/autoload.php';
use formance\stack;
use formance\stack\Models\Operations;
use formance\stack\Models\Shared;
$security = new Shared\Security(
authorization: "<YOUR_AUTHORIZATION_HERE>",
);
$sdk = stack\SDK::builder()->setSecurity($security)->build();
try {
$request = new Operations\V2GetWorkflowRequest(
flowId: 'xxx',
);
$response = $sdk->orchestrationV2->getWorkflow($request);
if ($response->v2GetWorkflowResponse !== null) {
// handle response
}
} catch (Throwable $e) {
// handle exception
}
Parameter | Type | Required | Description |
---|---|---|---|
$request |
Operations\V2GetWorkflowRequest | ✔️ | The request object to use for the request. |
?Operations\V2GetWorkflowResponse
Error Object | Status Code | Content Type |
---|---|---|
Errors\V2Error | default | application/json |
formance\stack\Models\Errors.SDKException | 4xx-5xx | / |
List instances of a workflow
declare(strict_types=1);
require 'vendor/autoload.php';
use formance\stack;
use formance\stack\Models\Operations;
use formance\stack\Models\Shared;
$security = new Shared\Security(
authorization: "<YOUR_AUTHORIZATION_HERE>",
);
$sdk = stack\SDK::builder()->setSecurity($security)->build();
try {
$request = new Operations\V2ListInstancesRequest(
cursor: 'aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==',
pageSize: 100,
running: true,
workflowID: 'xxx',
);
$response = $sdk->orchestrationV2->listInstances($request);
if ($response->v2ListRunsResponse !== null) {
// handle response
}
} catch (Throwable $e) {
// handle exception
}
Parameter | Type | Required | Description |
---|---|---|---|
$request |
Operations\V2ListInstancesRequest | ✔️ | The request object to use for the request. |
?Operations\V2ListInstancesResponse
Error Object | Status Code | Content Type |
---|---|---|
Errors\V2Error | default | application/json |
formance\stack\Models\Errors.SDKException | 4xx-5xx | / |
List triggers
declare(strict_types=1);
require 'vendor/autoload.php';
use formance\stack;
use formance\stack\Models\Operations;
use formance\stack\Models\Shared;
$security = new Shared\Security(
authorization: "<YOUR_AUTHORIZATION_HERE>",
);
$sdk = stack\SDK::builder()->setSecurity($security)->build();
try {
$request = new Operations\V2ListTriggersRequest(
cursor: 'aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==',
pageSize: 100,
);
$response = $sdk->orchestrationV2->listTriggers($request);
if ($response->v2ListTriggersResponse !== null) {
// handle response
}
} catch (Throwable $e) {
// handle exception
}
Parameter | Type | Required | Description |
---|---|---|---|
$request |
Operations\V2ListTriggersRequest | ✔️ | The request object to use for the request. |
?Operations\V2ListTriggersResponse
Error Object | Status Code | Content Type |
---|---|---|
Errors\V2Error | default | application/json |
formance\stack\Models\Errors.SDKException | 4xx-5xx | / |
List triggers occurrences
declare(strict_types=1);
require 'vendor/autoload.php';
use formance\stack;
use formance\stack\Models\Operations;
use formance\stack\Models\Shared;
$security = new Shared\Security(
authorization: "<YOUR_AUTHORIZATION_HERE>",
);
$sdk = stack\SDK::builder()->setSecurity($security)->build();
try {
$request = new Operations\V2ListTriggersOccurrencesRequest(
triggerID: '<value>',
cursor: 'aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==',
pageSize: 100,
);
$response = $sdk->orchestrationV2->listTriggersOccurrences($request);
if ($response->v2ListTriggersOccurrencesResponse !== null) {
// handle response
}
} catch (Throwable $e) {
// handle exception
}
Parameter | Type | Required | Description |
---|---|---|---|
$request |
Operations\V2ListTriggersOccurrencesRequest | ✔️ | The request object to use for the request. |
?Operations\V2ListTriggersOccurrencesResponse
Error Object | Status Code | Content Type |
---|---|---|
Errors\V2Error | default | application/json |
formance\stack\Models\Errors.SDKException | 4xx-5xx | / |
List registered workflows
declare(strict_types=1);
require 'vendor/autoload.php';
use formance\stack;
use formance\stack\Models\Operations;
use formance\stack\Models\Shared;
$security = new Shared\Security(
authorization: "<YOUR_AUTHORIZATION_HERE>",
);
$sdk = stack\SDK::builder()->setSecurity($security)->build();
try {
$request = new Operations\V2ListWorkflowsRequest(
cursor: 'aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==',
pageSize: 100,
);
$response = $sdk->orchestrationV2->listWorkflows($request);
if ($response->v2ListWorkflowsResponse !== null) {
// handle response
}
} catch (Throwable $e) {
// handle exception
}
Parameter | Type | Required | Description |
---|---|---|---|
$request |
Operations\V2ListWorkflowsRequest | ✔️ | The request object to use for the request. |
?Operations\V2ListWorkflowsResponse
Error Object | Status Code | Content Type |
---|---|---|
Errors\V2Error | default | application/json |
formance\stack\Models\Errors.SDKException | 4xx-5xx | / |
Read trigger
declare(strict_types=1);
require 'vendor/autoload.php';
use formance\stack;
use formance\stack\Models\Operations;
use formance\stack\Models\Shared;
$security = new Shared\Security(
authorization: "<YOUR_AUTHORIZATION_HERE>",
);
$sdk = stack\SDK::builder()->setSecurity($security)->build();
try {
$request = new Operations\V2ReadTriggerRequest(
triggerID: '<value>',
);
$response = $sdk->orchestrationV2->readTrigger($request);
if ($response->v2ReadTriggerResponse !== null) {
// handle response
}
} catch (Throwable $e) {
// handle exception
}
Parameter | Type | Required | Description |
---|---|---|---|
$request |
Operations\V2ReadTriggerRequest | ✔️ | The request object to use for the request. |
?Operations\V2ReadTriggerResponse
Error Object | Status Code | Content Type |
---|---|---|
Errors\V2Error | default | application/json |
formance\stack\Models\Errors.SDKException | 4xx-5xx | / |
Run workflow
declare(strict_types=1);
require 'vendor/autoload.php';
use formance\stack;
use formance\stack\Models\Operations;
use formance\stack\Models\Shared;
$security = new Shared\Security(
authorization: "<YOUR_AUTHORIZATION_HERE>",
);
$sdk = stack\SDK::builder()->setSecurity($security)->build();
try {
$request = new Operations\V2RunWorkflowRequest(
workflowID: 'xxx',
);
$response = $sdk->orchestrationV2->runWorkflow($request);
if ($response->v2RunWorkflowResponse !== null) {
// handle response
}
} catch (Throwable $e) {
// handle exception
}
Parameter | Type | Required | Description |
---|---|---|---|
$request |
Operations\V2RunWorkflowRequest | ✔️ | The request object to use for the request. |
?Operations\V2RunWorkflowResponse
Error Object | Status Code | Content Type |
---|---|---|
Errors\V2Error | default | application/json |
formance\stack\Models\Errors.SDKException | 4xx-5xx | / |
Send an event to a running workflow
declare(strict_types=1);
require 'vendor/autoload.php';
use formance\stack;
use formance\stack\Models\Operations;
use formance\stack\Models\Shared;
$security = new Shared\Security(
authorization: "<YOUR_AUTHORIZATION_HERE>",
);
$sdk = stack\SDK::builder()->setSecurity($security)->build();
try {
$request = new Operations\V2SendEventRequest(
instanceID: 'xxx',
);
$response = $sdk->orchestrationV2->sendEvent($request);
if ($response->statusCode === 200) {
// handle response
}
} catch (Throwable $e) {
// handle exception
}
Parameter | Type | Required | Description |
---|---|---|---|
$request |
Operations\V2SendEventRequest | ✔️ | The request object to use for the request. |
?Operations\V2SendEventResponse
Error Object | Status Code | Content Type |
---|---|---|
Errors\V2Error | default | application/json |
formance\stack\Models\Errors.SDKException | 4xx-5xx | / |
Test trigger
declare(strict_types=1);
require 'vendor/autoload.php';
use formance\stack;
use formance\stack\Models\Operations;
use formance\stack\Models\Shared;
$security = new Shared\Security(
authorization: "<YOUR_AUTHORIZATION_HERE>",
);
$sdk = stack\SDK::builder()->setSecurity($security)->build();
try {
$request = new Operations\TestTriggerRequest(
triggerID: '<value>',
);
$response = $sdk->orchestrationV2->testTrigger($request);
if ($response->v2TestTriggerResponse !== null) {
// handle response
}
} catch (Throwable $e) {
// handle exception
}
Parameter | Type | Required | Description |
---|---|---|---|
$request |
Operations\TestTriggerRequest | ✔️ | The request object to use for the request. |
?Operations\TestTriggerResponse
Error Object | Status Code | Content Type |
---|---|---|
Errors\V2Error | default | application/json |
formance\stack\Models\Errors.SDKException | 4xx-5xx | / |