- 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
- getWorkflow - Get a flow by id
- listInstances - List instances of a workflow
- listTriggers - List triggers
- listTriggersOccurrences - List triggers occurrences
- listWorkflows - List registered workflows
- orchestrationgetServerInfo - Get server info
- readTrigger - Read trigger
- runWorkflow - Run workflow
- sendEvent - Send an event to a running workflow
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\CancelEventRequest(
instanceID: 'xxx',
);
$response = $sdk->orchestrationV1->cancelEvent($request);
if ($response->statusCode === 200) {
// handle response
}
} catch (Throwable $e) {
// handle exception
}
Parameter | Type | Required | Description |
---|---|---|---|
$request |
Operations\CancelEventRequest | ✔️ | The request object to use for the request. |
?Operations\CancelEventResponse
Error Object | Status Code | Content Type |
---|---|---|
Errors\Error | 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\TriggerData(
event: '<value>',
workflowID: '<value>',
);
$response = $sdk->orchestrationV1->createTrigger($request);
if ($response->createTriggerResponse !== null) {
// handle response
}
} catch (Throwable $e) {
// handle exception
}
Parameter | Type | Required | Description |
---|---|---|---|
$request |
Shared\TriggerData | ✔️ | The request object to use for the request. |
?Operations\CreateTriggerResponse
Error Object | Status Code | Content Type |
---|---|---|
Errors\Error | 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\CreateWorkflowRequest(
stages: [
[
'key' => '<value>',
],
],
);
$response = $sdk->orchestrationV1->createWorkflow($request);
if ($response->createWorkflowResponse !== null) {
// handle response
}
} catch (Throwable $e) {
// handle exception
}
Parameter | Type | Required | Description |
---|---|---|---|
$request |
Shared\CreateWorkflowRequest | ✔️ | The request object to use for the request. |
?Operations\CreateWorkflowResponse
Error Object | Status Code | Content Type |
---|---|---|
Errors\Error | 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\DeleteTriggerRequest(
triggerID: '<value>',
);
$response = $sdk->orchestrationV1->deleteTrigger($request);
if ($response->statusCode === 200) {
// handle response
}
} catch (Throwable $e) {
// handle exception
}
Parameter | Type | Required | Description |
---|---|---|---|
$request |
Operations\DeleteTriggerRequest | ✔️ | The request object to use for the request. |
?Operations\DeleteTriggerResponse
Error Object | Status Code | Content Type |
---|---|---|
Errors\Error | 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\DeleteWorkflowRequest(
flowId: 'xxx',
);
$response = $sdk->orchestrationV1->deleteWorkflow($request);
if ($response->statusCode === 200) {
// handle response
}
} catch (Throwable $e) {
// handle exception
}
Parameter | Type | Required | Description |
---|---|---|---|
$request |
Operations\DeleteWorkflowRequest | ✔️ | The request object to use for the request. |
?Operations\DeleteWorkflowResponse
Error Object | Status Code | Content Type |
---|---|---|
Errors\Error | 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\GetInstanceRequest(
instanceID: 'xxx',
);
$response = $sdk->orchestrationV1->getInstance($request);
if ($response->getWorkflowInstanceResponse !== null) {
// handle response
}
} catch (Throwable $e) {
// handle exception
}
Parameter | Type | Required | Description |
---|---|---|---|
$request |
Operations\GetInstanceRequest | ✔️ | The request object to use for the request. |
?Operations\GetInstanceResponse
Error Object | Status Code | Content Type |
---|---|---|
Errors\Error | 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\GetInstanceHistoryRequest(
instanceID: 'xxx',
);
$response = $sdk->orchestrationV1->getInstanceHistory($request);
if ($response->getWorkflowInstanceHistoryResponse !== null) {
// handle response
}
} catch (Throwable $e) {
// handle exception
}
Parameter | Type | Required | Description |
---|---|---|---|
$request |
Operations\GetInstanceHistoryRequest | ✔️ | The request object to use for the request. |
?Operations\GetInstanceHistoryResponse
Error Object | Status Code | Content Type |
---|---|---|
Errors\Error | 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\GetInstanceStageHistoryRequest(
instanceID: 'xxx',
number: 0,
);
$response = $sdk->orchestrationV1->getInstanceStageHistory($request);
if ($response->getWorkflowInstanceHistoryStageResponse !== null) {
// handle response
}
} catch (Throwable $e) {
// handle exception
}
Parameter | Type | Required | Description |
---|---|---|---|
$request |
Operations\GetInstanceStageHistoryRequest | ✔️ | The request object to use for the request. |
?Operations\GetInstanceStageHistoryResponse
Error Object | Status Code | Content Type |
---|---|---|
Errors\Error | 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\GetWorkflowRequest(
flowId: 'xxx',
);
$response = $sdk->orchestrationV1->getWorkflow($request);
if ($response->getWorkflowResponse !== null) {
// handle response
}
} catch (Throwable $e) {
// handle exception
}
Parameter | Type | Required | Description |
---|---|---|---|
$request |
Operations\GetWorkflowRequest | ✔️ | The request object to use for the request. |
?Operations\GetWorkflowResponse
Error Object | Status Code | Content Type |
---|---|---|
Errors\Error | 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\ListInstancesRequest(
running: true,
workflowID: 'xxx',
);
$response = $sdk->orchestrationV1->listInstances($request);
if ($response->listRunsResponse !== null) {
// handle response
}
} catch (Throwable $e) {
// handle exception
}
Parameter | Type | Required | Description |
---|---|---|---|
$request |
Operations\ListInstancesRequest | ✔️ | The request object to use for the request. |
?Operations\ListInstancesResponse
Error Object | Status Code | Content Type |
---|---|---|
Errors\Error | 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\ListTriggersRequest();
$response = $sdk->orchestrationV1->listTriggers($request);
if ($response->listTriggersResponse !== null) {
// handle response
}
} catch (Throwable $e) {
// handle exception
}
Parameter | Type | Required | Description |
---|---|---|---|
$request |
Operations\ListTriggersRequest | ✔️ | The request object to use for the request. |
?Operations\ListTriggersResponse
Error Object | Status Code | Content Type |
---|---|---|
Errors\Error | 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\ListTriggersOccurrencesRequest(
triggerID: '<value>',
);
$response = $sdk->orchestrationV1->listTriggersOccurrences($request);
if ($response->listTriggersOccurrencesResponse !== null) {
// handle response
}
} catch (Throwable $e) {
// handle exception
}
Parameter | Type | Required | Description |
---|---|---|---|
$request |
Operations\ListTriggersOccurrencesRequest | ✔️ | The request object to use for the request. |
?Operations\ListTriggersOccurrencesResponse
Error Object | Status Code | Content Type |
---|---|---|
Errors\Error | 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\Shared;
$security = new Shared\Security(
authorization: "<YOUR_AUTHORIZATION_HERE>",
);
$sdk = stack\SDK::builder()->setSecurity($security)->build();
try {
$response = $sdk->orchestrationV1->listWorkflows();
if ($response->listWorkflowsResponse !== null) {
// handle response
}
} catch (Throwable $e) {
// handle exception
}
?Operations\ListWorkflowsResponse
Error Object | Status Code | Content Type |
---|---|---|
Errors\Error | 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->orchestrationV1->orchestrationgetServerInfo();
if ($response->serverInfo !== null) {
// handle response
}
} catch (Throwable $e) {
// handle exception
}
?Operations\OrchestrationgetServerInfoResponse
Error Object | Status Code | Content Type |
---|---|---|
Errors\Error | 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\ReadTriggerRequest(
triggerID: '<value>',
);
$response = $sdk->orchestrationV1->readTrigger($request);
if ($response->readTriggerResponse !== null) {
// handle response
}
} catch (Throwable $e) {
// handle exception
}
Parameter | Type | Required | Description |
---|---|---|---|
$request |
Operations\ReadTriggerRequest | ✔️ | The request object to use for the request. |
?Operations\ReadTriggerResponse
Error Object | Status Code | Content Type |
---|---|---|
Errors\Error | 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\RunWorkflowRequest(
workflowID: 'xxx',
);
$response = $sdk->orchestrationV1->runWorkflow($request);
if ($response->runWorkflowResponse !== null) {
// handle response
}
} catch (Throwable $e) {
// handle exception
}
Parameter | Type | Required | Description |
---|---|---|---|
$request |
Operations\RunWorkflowRequest | ✔️ | The request object to use for the request. |
?Operations\RunWorkflowResponse
Error Object | Status Code | Content Type |
---|---|---|
Errors\Error | 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\SendEventRequest(
instanceID: 'xxx',
);
$response = $sdk->orchestrationV1->sendEvent($request);
if ($response->statusCode === 200) {
// handle response
}
} catch (Throwable $e) {
// handle exception
}
Parameter | Type | Required | Description |
---|---|---|---|
$request |
Operations\SendEventRequest | ✔️ | The request object to use for the request. |
Error Object | Status Code | Content Type |
---|---|---|
Errors\Error | default | application/json |
formance\stack\Models\Errors.SDKException | 4xx-5xx | / |