Skip to main content

FlowSynx Workflow API

The FlowSynx Workflow API provides endpoints for managing workflows. You can list, create, update, retrieve, and delete workflows via secured RESTful calls. It uses RESTful principles and supports both Basic Authentication and Bearer Token Authentication.

Authentication & Authorization

Required:

  • Authentication: Yes (Bearer or Basic Auth)
  • Authorization: Yes (Must have admin or workflow role)

1. Basic Auth

curl -u username:password http://localhost:6262/workflows

2.Bearer Token

curl -H "Authorization: Bearer <your_token>" http://localhost:6262/workflows

API Endpoints

List All Workflows

  • Method: GET
  • Endpoint: /workflows
  • Body Required: No
  • Description: Retrieves a list of all workflows with their id, name, and last modified date.

curl Example

curl -X GET http://localhost:6262/workflows \
-H "Authorization: Bearer <your_token>"

Example response

{
"data": [
{
"id": "5b329d40-b383-4226-a068-0848df3f8ed2",
"name": "Patient Data Sync",
"modifiedDate": "2025-08-10T14:32:01Z"
}
],
"messages": [],
"succeeded": true,
"generatedAtUtc": "2025-08-10T14:32:01Z"
}

Get Workflow Details

  • Method: GET
  • Endpoint: /workflows/{workflowId}
  • Body Required: No
  • Description: Retrieves the full workflow definition for the specified workflowId.
info
  • workflowId: UUID of the workflow to retrieve.

curl Example

curl -X GET http://localhost:6262/workflows/5b329d40-b383-4226-a068-0848df3f8ed2 \
-H "Authorization: Bearer <your_token>"

Example response

{
"data": {
"id": "5b329d40-b383-4226-a068-0848df3f8ed2",
"name": "Patient Data Sync",
"workflow": "{ \"name\": \"sample-flowsynx-workflow\", "\description\": "\This is a sample flowsynx workflow\", \"tasks\": [] }"
},
"messages": [],
"succeeded": true,
"generatedAtUtc": "2025-08-10T14:35:11Z"
}

Add New Workflow

  • Method: POST
  • Endpoint: /plugins/Add
  • Body Required: Yes
  • Description*: Creates a new workflow using the provided JSON definition.

Request Body

{
"definition": "{ \"name\": \"sample-flowsynx-workflow\", "\description\": "\This is a sample flowsynx workflow\", \"tasks\": [] }"
}

curl Example

curl -X POST http://localhost:6262/workflows/Add \
-H "Authorization: Bearer <your_token>" \
-H "Content-Type: application/json" \
-d '{
"definition": "{ \"name\": \"sample-flowsynx-workflow\", "\description\": "\This is a sample flowsynx workflow\", \"tasks\": [] }"
}'

Example Response

{
"data": {
"id": "586bc7b0-499b-4b01-9510-93ac643ad8bb",
"name": "sample-flowsynx-workflow"
},
"messages": [
"The workflow has been added successfully."
],
"succeeded": true,
"generatedAtUtc": "2025-08-10T14:40:27Z"
}

Update Workflow

  • Method: PUT
  • Endpoint: /workflows/{workflowId}
  • Body Required: Yes
  • Content-Type: application/json
  • Description: Updates the workflow definition for the specified workflowId.
info
  • workflowId: UUID of the workflow to update.

Request Body

{
"workflowId": "586bc7b0-499b-4b01-9510-93ac643ad8bb",
"definition": "{ \"name\": \"sample-flowsynx-workflow2\", "\description\": "\This is a sample flowsynx workflow\", \"tasks\": [] }"
}

curl Example

curl -X PUT http://localhost:6262/workflows/586bc7b0-499b-4b01-9510-93ac643ad8bb \
-H "Authorization: Bearer <your_token>" \
-H "Content-Type: application/json" \
-d '{
"workflowId": "586bc7b0-499b-4b01-9510-93ac643ad8bb",
"definition": "{ \"name\": \"sample-flowsynx-workflow2\", "\description\": "\This is a sample flowsynx workflow\", \"tasks\": [] }"
}'

Example Response

{
"data": {},
"messages": [
"The workflow has been updated successfully."
],
"succeeded": true,
"generatedAtUtc": "2025-08-10T14:45:50Z"
}

Delete Workflow

  • Method: DELETE
  • Endpoint: /workflows/{workflowId}
  • Body Required: No
  • Description: Deletes the workflow associated with the given workflowId.
info
  • workflowId: UUID of the workflow to delete.

curl Example

curl -X DELETE http://localhost:6262/workflows/586bc7b0-499b-4b01-9510-93ac643ad8bb \
-H "Authorization: Bearer <your_token>"

Example Response

{
"data": {},
"messages": [
"The workflow has been deleted successfully."
],
"succeeded": true,
"generatedAtUtc": "2025-08-10T14:50:12Z"
}

Summary Table

OperationMethodEndpointBodyAuthenticationAuthorization roles
List WorkflowsGET/workflowsNo✅ Requiredadmin, workflow
Get WorkflowGET/workflows/{workflowId}No✅ Requiredadmin, workflow
Add WorkflowPOST/workflows/AddYes✅ Requiredadmin, workflow
Update WorkflowPUT/workflows/{workflowId}Yes✅ Requiredadmin, workflow
Delete WorkflowDELETE/workflows/{workflowId}No✅ Requiredadmin, workflow
info
  • Use Bearer or Basic authentication depending on FlowSynx configuration.
  • Replace <your_token> or username:password with actual credentials.
  • The definition field must contain a valid JSON representation of the workflow DAG.
  • All workflow IDs are UUIDs.