Flows & Groups API
Flows & Groups API
Create Flow
POST /api/flowsAuthorization: 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
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
GET /api/flows?page=0&size=25&category=Finance&enabled=trueResponse: Paginated list with data, total, page, size, pages.
Get Flow with Flowlets
GET /api/flows/65flow1Returns flow definition including the full layers array.
Update Flowlet
PUT /api/flows/65flow1/layers/65layer1{ "args": { "method": "GET", "url": "https://api.example.com/v2/invoices/{{ $prev.args.invoiceId }}" }, "timeout": 20}Manage Groups
# Create groupPOST /api/groups{"name": "Finance Automation", "index": 1}
# List groupsGET /api/groups
# Update groupPUT /api/groups/65group1{"name": "Finance & Billing Automation"}