API Documentation
Last updated
Was this helpful?
Last updated
Was this helpful?
Evaluate risk for a transaction using specified workflow
/v1/risk/evaluate-risk
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
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
/v1/risk/workflows
Create a new workflow with initial rules.
/v1/risk/workflows
Name of the workflow
Optional workflow description
Request model for creating a new rule
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
/v1/risk/workflows/{workflow_name}
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
/v1/risk/workflows/{workflow_name}/status
New status to set for the workflow
ACTIVE
, INACTIVE
, DEPRECATED
Create a new rule for a specific workflow.
/v1/risk/workflows/{workflow_name}/rules
AND
, OR
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
/v1/risk/workflows/{workflow_name}/rules/{rule_name}
AND
, OR
Update rule status and sync to Redis if deployed.
/v1/risk/workflows/{workflow_name}/rules/{rule_name}/status
ACTIVE
, INACTIVE
, DEPRECATED
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
/v1/risk/workflows/{workflow_name}/rules/{rule_name}/stage
REGISTERED
, BACKTESTING
, STAGING
, PRODEXPERIMENT
, LIVE