Skip to content

Flows & Groups API

Flows & Groups API

Create Flow

Terminal window
POST /api/flows
Authorization: Bearer <token>
Content-Type: application/json
{
"name": "Invoice Processing",
"enabled": true,
"category": "Finance",
"groupId": "65group1"
}

Response:

{
"id": "65flow1",
"name": "Invoice Processing",
"enabled": true,
"category": "Finance",
"groupId": "65group1",
"permanentId": "invoice-processing",
"version": 1,
"createdAt": "2024-01-15T10:00:00Z",
"updatedAt": "2024-01-15T10:00:00Z"
}

Add a Flowlet

Terminal window
POST /api/flows/65flow1/layers
{
"name": "Fetch Invoice",
"ref": "fetchInvoice",
"appId": "curl",
"index": 0,
"args": {
"method": "GET",
"url": "https://api.example.com/invoices/{{ $prev.args.invoiceId }}",
"headers": {"Authorization": "Bearer {{ $kv.get 'apiToken' }}"}
},
"timeout": 15,
"retry": {"count": 2, "delayMs": 500, "backoffMultiplier": 2}
}

Response:

{
"id": "65layer1",
"flowId": "65flow1",
"name": "Fetch Invoice",
"ref": "fetchInvoice",
"appId": "curl",
"index": 0,
"args": {...},
"timeout": 15,
"retry": {...}
}

List Flows

Terminal window
GET /api/flows?page=0&size=25&category=Finance&enabled=true

Response: Paginated list with data, total, page, size, pages.

Get Flow with Flowlets

Terminal window
GET /api/flows/65flow1

Returns flow definition including the full layers array.

Update Flowlet

Terminal window
PUT /api/flows/65flow1/layers/65layer1
{
"args": {
"method": "GET",
"url": "https://api.example.com/v2/invoices/{{ $prev.args.invoiceId }}"
},
"timeout": 20
}

Manage Groups

Terminal window
# Create group
POST /api/groups
{"name": "Finance Automation", "index": 1}
# List groups
GET /api/groups
# Update group
PUT /api/groups/65group1
{"name": "Finance & Billing Automation"}