API Documentation
Last updated
Was this helpful?
Last updated
Was this helpful?
Get all workflows for a given tenant with optional status filtering.
Args: query_params: Query parameters including tenant_name and optional is_active flag service: Injected WorkflowService instance
Returns: List[Workflow]: List of workflows matching the criteria
Raises: HTTPException: For database errors or invalid input
Get detailed workflow information by workflow name.
Args: workflow_name: Name of the workflow to retrieve service: Injected WorkflowService instance user_data: User context data including tenant information
Returns: WorkflowDetails: Detailed workflow information including rules and deployments
Raises: HTTPException: For database errors or if workflow is not found
Create a new workflow with initial rules.
Request model for creating a new workflow with initial rules
Name of the workflow
Optional workflow description
Update workflow status.
Args: workflow_name: Name of the workflow to update service: Injected WorkflowService instance user_data: User context data including tenant information
Returns: Workflow: Updated workflow information (without rules)
Raises: HTTPException: For validation or database errors
Request model for updating workflow status
New status to set for the workflow
Create a new rule for a specific workflow.
Model for creating a new rule
Update an existing rule in a workflow.
Args: rule_request: Rule update request data workflow_name: Name of the workflow rule_name: Name of the rule to update service: Injected RuleService instance user_data: User context data including tenant information
Returns: RiskRule: Updated rule data
Raises: HTTPException: For validation errors or if rule/workflow not found
Model for updating an existing rule
Update rule status and sync to Redis if deployed.
Request model for updating Rule status
Update the stage of a specific rule.
Args: stage_update: Stage update request workflow_name: Name of the workflow rule_name: Name of the rule service: Injected RuleService instance user_data: User context data including tenant information
Returns: RiskRule: Updated rule data
Request model for updating Rule stage
Evaluate risk for a transaction using specified workflow
Request model for evaluating a transaction against a workflow's rules
ID of the workflow to evaluate
Unique identifier for the transaction
Transaction data to be evaluated
Timestamp when evaluation was requested
Additional context for evaluation