API Documentation

Table of Contents

Rule Management Service

List all workflows

Get Workflows

get

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

Authorizations
OAuth2passwordRequired
Token URL:
Query parameters
is_activeany ofOptional
booleanOptional
or
nullOptional
Responses
200

Successful Response

application/json
get
/v1/risk/workflows

Create workflow

Create Workflow

post

Create a new workflow with initial rules.

Authorizations
OAuth2passwordRequired
Token URL:
Body

Request model for creating a new workflow with initial rules

workflow_namestringRequired

Name of the workflow

descriptionany ofOptional

Optional workflow description

stringOptional
or
nullOptional
Responses
200

Successful Response

application/json
post
/v1/risk/workflows

Get workflow by name

Get Workflow By Name

get

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

Authorizations
OAuth2passwordRequired
Token URL:
Path parameters
workflow_namestringRequired
Responses
200

Successful Response

application/json
get
/v1/risk/workflows/{workflow_name}

Update workflow status

Update Workflow Status

patch

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

Authorizations
OAuth2passwordRequired
Token URL:
Path parameters
workflow_namestringRequired
Body

Request model for updating workflow status

new_statusstring ยท enumRequired

New status to set for the workflow

Possible values:
Responses
200

Successful Response

application/json
patch
/v1/risk/workflows/{workflow_name}/status

List workflow rules

Get Workflow Rules

get
Authorizations
OAuth2passwordRequired
Token URL:
Path parameters
workflow_namestringRequired
Query parameters
stageany ofOptional
stringOptional
or
nullOptional
statusany ofOptional
stringOptional
or
nullOptional
Responses
200

Successful Response

application/json
get
/v1/risk/workflows/{workflow_name}/rules

Create workflow rule

Create Workflow Rule

post

Create a new rule for a specific workflow.

Authorizations
OAuth2passwordRequired
Token URL:
Path parameters
workflow_namestringRequired
Body

Model for creating a new rule

operatorstring ยท enumRequiredPossible values:
rule_namestringRequired
Responses
200

Successful Response

application/json
post
/v1/risk/workflows/{workflow_name}/rules

Get workflow rule details

Get Workflow Rule

get
Authorizations
OAuth2passwordRequired
Token URL:
Path parameters
workflow_namestringRequired
rule_namestringRequired
Responses
200

Successful Response

application/json
get
/v1/risk/workflows/{workflow_name}/rules/{rule_name}

Update workflow rule

Update Workflow Rule

put

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

Authorizations
OAuth2passwordRequired
Token URL:
Path parameters
workflow_namestringRequired
rule_namestringRequired
Body

Model for updating an existing rule

operatorstring ยท enumRequiredPossible values:
Responses
200

Successful Response

application/json
put
/v1/risk/workflows/{workflow_name}/rules/{rule_name}

Update rule status

Update Rule Status

patch

Update rule status and sync to Redis if deployed.

Authorizations
OAuth2passwordRequired
Token URL:
Path parameters
workflow_namestringRequired
rule_namestringRequired
Body

Request model for updating Rule status

new_statusstring ยท enumRequiredPossible values:
Responses
200

Successful Response

application/json
patch
/v1/risk/workflows/{workflow_name}/rules/{rule_name}/status

Update rule stage

Update Rule Stage

patch

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

Authorizations
OAuth2passwordRequired
Token URL:
Path parameters
workflow_namestringRequired
rule_namestringRequired
Body

Request model for updating Rule stage

stagestring ยท enumRequiredPossible values:
Responses
200

Successful Response

application/json
patch
/v1/risk/workflows/{workflow_name}/rules/{rule_name}/stage

Transaction Monitoring and Evaluation

Evaluate Risk

post

Evaluate risk for a transaction using specified workflow

Body

Request model for evaluating a transaction against a workflow's rules

workflow_idstringRequired

ID of the workflow to evaluate

transaction_idstringRequired

Unique identifier for the transaction

transaction_dataobject ยท TransactionDataRequired

Transaction data to be evaluated

evaluation_timestring ยท date-timeOptional

Timestamp when evaluation was requested

contextobject ยท ContextOptional

Additional context for evaluation

Responses
200

Successful Response

application/json
post
/v1/risk/evaluate-risk

Last updated

Was this helpful?