Workflow

Core workflow management including creating workflows, retrieving workflow details, steps, and connection edges

Get Workflows by IDs

GET /v1/workflows

Get workflows by their UUIDs.

Query Parameters:

  • workflowIds (string, required): Comma-separated workflow UUIDs

Response (200 OK):

{
    "id": "6c06edfb-1cec-4f41-9c89-96204f1a2cb0",
    "projectId": "project-123456789",
    "version": 1,
    "organizationId": "org-123456789",
    "userId": "user-987654321",
    "steps": [
        {
            "id": "step-111",
            "description": "Patient Registration Form",
            "type": "forms",
            "workflowId": "6c06edfb-1cec-4f41-9c89-96204f1a2cb0",
            "version": 1,
            "organizationId": "org-123456789",
            "userId": "user-987654321",
            "createdAt": "2024-01-15T09:30:00.000Z",
            "updatedAt": "2024-01-15T09:30:00.000Z",
            "configurationStatistics": {
                "amountOfAssignees": 5
            }
        },
        {
            "id": "step-222",
            "description": "Medical History Review",
            "type": "forms",
            "workflowId": "6c06edfb-1cec-4f41-9c89-96204f1a2cb0",
            "version": 1,
            "organizationId": "org-123456789",
            "userId": "user-987654321",
            "createdAt": "2024-01-15T09:35:00.000Z",
            "updatedAt": "2024-01-15T09:35:00.000Z",
            "configurationStatistics": {
                "amountOfAssignees": 3
            }
        },
        {
            "id": "step-333",
            "description": "Insurance Verification",
            "type": "integration",
            "workflowId": "6c06edfb-1cec-4f41-9c89-96204f1a2cb0",
            "version": 1,
            "organizationId": "org-123456789",
            "userId": "user-987654321",
            "createdAt": "2024-01-15T09:40:00.000Z",
            "updatedAt": "2024-01-15T09:40:00.000Z",
            "configurationStatistics": {
                "amountOfAssignees": 0
            }
        }
    ],
    "edges": [
        {
            "id": "edge-123",
            "next": "step-222",
            "prev": "step-111"
        },
        {
            "id": "edge-456",
            "next": "step-333",
            "prev": "step-222"
        }
    ],
    "createdAt": "2024-01-15T09:00:00.000Z",
    "updatedAt": "2024-01-20T14:30:00.000Z"
}

Create Workflow

POST /v1/workflows

Create a new workflow.

Request Body:

Required fields:

  • name
  • description
  • projectId

Optional fields:

  • version
{
    "name": "Patient Onboarding Workflow",
    "description": "Complete patient registration and setup process",
    "projectId": "project-123456789",
    "version": 1
}

Response (201 Created):

{
    "id": "8e28gfd1-3eee-6g63-be01-b8426g4d4ed2",
    "projectId": "project-123456789",
    "version": 1,
    "organizationId": "org-123456789",
    "userId": "user-987654321",
    "steps": [],
    "edges": [],
    "createdAt": "2024-01-20T17:00:00.000Z",
    "updatedAt": "2024-01-20T17:00:00.000Z"
}

Get Workflow by ID

GET /v1/workflows/{workflowId}

Get a specific workflow by its UUID.

Path Parameters:

  • workflowId (string, required): Workflow UUID

Response (200 OK):

{
    "id": "6c06edfb-1cec-4f41-9c89-96204f1a2cb0",
    "projectId": "project-123456789",
    "version": 1,
    "organizationId": "org-123456789",
    "userId": "user-987654321",
    "steps": [
        {
            "id": "step-111",
            "description": "Patient Registration Form",
            "type": "forms",
            "workflowId": "6c06edfb-1cec-4f41-9c89-96204f1a2cb0",
            "version": 1,
            "organizationId": "org-123456789",
            "userId": "user-987654321",
            "createdAt": "2024-01-15T09:30:00.000Z",
            "updatedAt": "2024-01-15T09:30:00.000Z",
            "configurationStatistics": {
                "amountOfAssignees": 5
            }
        },
        {
            "id": "step-222",
            "description": "Medical History Review",
            "type": "forms",
            "workflowId": "6c06edfb-1cec-4f41-9c89-96204f1a2cb0",
            "version": 1,
            "organizationId": "org-123456789",
            "userId": "user-987654321",
            "createdAt": "2024-01-15T09:35:00.000Z",
            "updatedAt": "2024-01-15T09:35:00.000Z",
            "configurationStatistics": {
                "amountOfAssignees": 3
            }
        }
    ],
    "edges": [
        {
            "id": "edge-123",
            "next": "step-222",
            "prev": "step-111"
        }
    ],
    "createdAt": "2024-01-15T09:00:00.000Z",
    "updatedAt": "2024-01-20T14:30:00.000Z"
}

Delete Workflow

DELETE /v1/workflows/{workflowId}

Delete a workflow.

Path Parameters:

  • workflowId (string, required): Workflow UUID

Response (200 OK):

No response body.


Get Workflow Steps

GET /v1/workflows/{workflowId}/steps

Get all steps for a specific workflow.

Path Parameters:

  • workflowId (string, required): Workflow UUID

Response (200 OK):

[
    {
        "id": "step-111",
        "description": "Patient Registration Form",
        "type": "forms",
        "workflowId": "6c06edfb-1cec-4f41-9c89-96204f1a2cb0",
        "version": 1,
        "organizationId": "org-123456789",
        "userId": "user-987654321",
        "stepMetadata": [
            {
                "id": "metadata-111",
                "key": "displayName",
                "value": "Patient Registration",
                "createdAt": "2024-01-15T09:30:00.000Z",
                "updatedAt": "2024-01-15T09:30:00.000Z"
            }
        ],
        "createdAt": "2024-01-15T09:30:00.000Z",
        "updatedAt": "2024-01-15T09:30:00.000Z",
        "configurationStatistics": {
            "amountOfAssignees": 5
        }
    },
    {
        "id": "step-222",
        "description": "Medical History Review",
        "type": "forms",
        "workflowId": "6c06edfb-1cec-4f41-9c89-96204f1a2cb0",
        "version": 1,
        "organizationId": "org-123456789",
        "userId": "user-987654321",
        "stepMetadata": [
            {
                "id": "metadata-222",
                "key": "displayName",
                "value": "Medical History",
                "createdAt": "2024-01-15T09:35:00.000Z",
                "updatedAt": "2024-01-15T09:35:00.000Z"
            }
        ],
        "createdAt": "2024-01-15T09:35:00.000Z",
        "updatedAt": "2024-01-15T09:35:00.000Z",
        "configurationStatistics": {
            "amountOfAssignees": 3
        }
    }
]

Get Workflow Edges

GET /v1/workflows/{workflowId}/edges

Get all edges (connections between steps) for a specific workflow.

Path Parameters:

  • workflowId (string, required): Workflow UUID

Response (200 OK):

[
    {
        "id": "edge-123",
        "next": "step-222",
        "prev": "step-111"
    },
    {
        "id": "edge-456",
        "next": "step-333",
        "prev": "step-222"
    },
    {
        "id": "edge-789",
        "next": "step-444",
        "prev": "step-333"
    }
]