List all workflows

GET/workflows

Retrieves all workflow definitions for the authenticated user

RequiresBearerauthentication

Query parameters

verbosebooleanoptionaldefault false

If true, includes full workflow implementation details in workflow_details field

Returns  

Successfully retrieved workflows

Response fields

successbooleanoptional

Whether the workflow list was retrieved successfully

messagestringoptional

Status message

workflowsobject[]optional

Array of simplified workflow responses for the authenticated user

idstring (uuid)optional

Unique identifier for the workflow

namestringoptional

Human-readable name for the workflow

workflow_instructionsstringoptional

Natural language instructions that define the workflow logic

sample_dataobjectoptional

Sample data used for workflow graph generation

configobjectoptional
fhir_provider_idsstring (uuid)[]optional

FHIR provider IDs for executing workflow steps

dynamic_generationbooleanoptional

Whether to use dynamic lang2fhir generation instead of pre-populated templates

graphobjectoptional
stepsobject[]optional

Simplified list of workflow steps without operation details

created_atstring (date-time)optional

Timestamp when the workflow was created

updated_atstring (date-time)optional

Timestamp when the workflow was last updated

workflow_detailsobject[]optional

Only included when verbose=true - contains full implementation details for all workflows

idstring (uuid)optional

Unique identifier for the workflow

namestringoptional

Human-readable name for the workflow

workflow_instructionsstringoptional

Natural language instructions that define the workflow logic

sample_dataobjectoptional

Sample data used for workflow graph generation

configobjectoptional
fhir_provider_idsstring (uuid)[]optional

FHIR provider IDs for executing workflow steps

dynamic_generationbooleanoptional

Whether to use dynamic lang2fhir generation instead of pre-populated templates

graphobjectoptional
stepsobject[]optional

Ordered list of workflow execution steps

created_atstring (date-time)optional

Timestamp when the workflow was created

updated_atstring (date-time)optional

Timestamp when the workflow was last updated

GETRequest
# Get authentication token
PHENOML_TOKEN=$(curl -X POST "https://experiment.app.pheno.ml/v2/auth/token" \
  -u "$PHENOML_CLIENT_ID:$PHENOML_CLIENT_SECRET" \
  | jq -r '.access_token')

curl -X GET "https://experiment.app.pheno.ml/workflows" \
  -H "Authorization: Bearer $PHENOML_TOKEN"
200 OKExample Response
{
  "success": true,
  "message": "Workflows retrieved successfully",
  "workflows": [
    {
      "id": "7a8b9c0d-1234-5678-abcd-ef9876543210",
      "name": "Patient Data Mapping Workflow",
      "workflow_instructions": "Given diagnosis data, find the patient and create a condition record",
      "sample_data": {
        "patient_last_name": "Rippin",
        "patient_first_name": "Clay",
        "diagnosis_code": "I10",
        "encounter_date": "2024-01-15"
      },
      "config": {
        "fhir_provider_ids": [
          "550e8400-e29b-41d4-a716-446655440000"
        ],
        "dynamic_generation": false
      },
      "graph": {
        "steps": [
          {
            "id": "step_1_id",
            "name": "Find Patient",
            "description": "Search for an existing patient by first name and last name",
            "type": "search",
            "provider_id": "550e8400-e29b-41d4-a716-446655440000"
          },
          {
            "id": "step_2_id",
            "name": "Create Condition",
            "description": "Create a FHIR Condition resource for the patient",
            "type": "create",
            "provider_id": "550e8400-e29b-41d4-a716-446655440000"
          }
        ]
      },
      "created_at": "2024-01-15T09:30:00Z",
      "updated_at": "2024-01-15T09:30:00Z"
    }
  ]
}