Workflows API
The Workflows API allows you to create, manage, and monitor your AI workflows on the Lumea platform.
Overview
Workflows are the core building blocks of the Lumea platform. A workflow defines a series of operations and tasks that are executed in a specific order to accomplish complex AI processes. This API enables you to programmatically manage your workflows, including creating, updating, and executing them.
Note: Each customer receives a custom deployment with a unique API endpoint. The endpoints described in this documentation should be prefixed with your organization's specific API URL provided during onboarding.
Data Models
Workflow Object
Field | Type | Description |
---|---|---|
id | string | Unique identifier for the workflow |
name | string | Name of the workflow |
description | string | Optional description of the workflow |
version | string | Version of the workflow |
base_workflow_id | string | ID of the base workflow this was derived from |
parameters | object | Optional default parameters for workflow execution |
Endpoints
List Workflows
Retrieves a list of all registered workflows.
URL: /workflows
Method: GET
Query Parameters:
Parameter | Required | Description |
---|---|---|
name | No | Filter workflows by name |
Success Response:
- Code: 200 OK
- Content:
[
{
"id": "workflow123",
"name": "Data Processing Workflow",
"description": "Processes data from multiple sources",
"version": "1.0.0",
"base_workflow_id": "base123",
"parameters": {
"batch_size": 100,
"threshold": 0.8
}
},
{
"id": "workflow456",
"name": "Report Generation",
"description": "Generates PDF reports",
"version": "2.1.0",
"base_workflow_id": "base456",
"parameters": {
"include_charts": true,
"max_pages": 20
}
}
]
Refresh Workflows
Initiates a refresh of all workflows in the system. This is an asynchronous operation that launches a worker task.
URL: /workflows/refresh
Method: POST
Success Response:
- Code: 200 OK
- Content:
{
"message": "Workflows refresh started"
}
Create Workflow
Creates a new custom workflow based on an existing base workflow.
URL: /workflows
Method: POST
Request Body:
{
"name": "Custom Data Processing",
"description": "Modified version of data processing workflow",
"version": "1.0.0",
"base_workflow_id": "base123",
"parameters": {
"batch_size": 200,
"threshold": 0.9
}
}
Field | Type | Required | Description |
---|---|---|---|
name | string | Yes | Name of the custom workflow |
description | string | No | Description of the workflow |
version | string | Yes | Version of the custom workflow |
base_workflow_id | string | Yes | ID of the base workflow to derive from |
parameters | object | No | Default parameters for workflow execution |
Success Response:
- Code: 200 OK
- Content:
{
"id": "custom123",
"name": "Custom Data Processing",
"description": "Modified version of data processing workflow",
"version": "1.0.0",
"base_workflow_id": "base123",
"parameters": {
"batch_size": 200,
"threshold": 0.9
}
}
Error Responses:
- Code: 400 Bad Request
- Content:
{"detail": "Base workflow not found"}
- Content:
Delete Workflow
Deletes a custom workflow.
URL: /workflows/{workflow_id}
Method: DELETE
URL Parameters:
Parameter | Description |
---|---|
workflow_id | The unique ID of the workflow |
Success Response:
- Code: 200 OK
- Content:
{
"message": "Workflow deleted successfully"
}
Error Responses:
- Code: 400 Bad Request
- Content:
{"detail": "Workflow not found"}
- Content:
{"detail": "Failed to delete workflow"}
- Content:
Get Workflow
Retrieves details of a specific workflow.
URL: /workflows/{workflow_id}
Method: GET
URL Parameters:
Parameter | Description |
---|---|
workflow_id | The unique ID of the workflow |
Success Response:
- Code: 200 OK
- Content:
{
"id": "workflow123",
"name": "Data Processing Workflow",
"description": "Processes data from multiple sources",
"version": "1.0.0",
"base_workflow_id": "base123",
"parameters": {
"batch_size": 100,
"threshold": 0.8
}
}
Error Response:
- Code: 400 Bad Request
- Content:
{"detail": "Error message"}
- Content:
Update Workflow
Updates properties of an existing workflow.
URL: /workflows/{workflow_id}
Method: PUT
URL Parameters:
Parameter | Description |
---|---|
workflow_id | The unique ID of the workflow |
Request Body:
{
"name": "Updated Workflow Name",
"description": "Updated workflow description",
"parameters": {
"batch_size": 150,
"threshold": 0.85
}
}
Field | Type | Required | Description |
---|---|---|---|
name | string | No | Updated name of the workflow |
description | string | No | Updated description of the workflow |
parameters | object | No | Updated default parameters for the workflow |
Success Response:
- Code: 200 OK
- Content:
{
"id": "workflow123",
"name": "Updated Workflow Name",
"description": "Updated workflow description",
"version": "1.0.0",
"base_workflow_id": "base123",
"parameters": {
"batch_size": 150,
"threshold": 0.85
}
}
Error Response:
- Code: 400 Bad Request
- Content:
{"detail": "Error message"}
- Content:
Clear Workflow Cache
Clears the cache for a specific workflow.
URL: /workflows/{workflow_id}/cache/clear
Method: POST
URL Parameters:
Parameter | Description |
---|---|
workflow_id | The unique ID of the workflow |
Success Response:
- Code: 200 OK
- Content:
{
"message": "Cache cleared successfully"
}
Error Responses:
Code: 400 Bad Request
- Content:
{"detail": "Error message"}
- Content:
Code: 404 Not Found
- Content:
{"detail": "Workflow not found"}
- Content: