For the complete documentation index, see llms.txt. This page is also available as Markdown.

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_activeboolean Β· nullableOptional
Responses
200

Successful Response

application/json

Schema for workflow response

workflow_namestringRequired
descriptionstring Β· nullableRequired
statusstring Β· enumRequiredPossible values:
created_atstring Β· date-timeRequired
updated_atstring Β· date-timeRequired
get/v1/risk/workflows
GET /v1/risk/workflows HTTP/1.1
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
[
  {
    "workflow_name": "text",
    "description": "text",
    "status": "ACTIVE",
    "deployments": [
      {
        "cluster_name": "text",
        "deployment_status": "PENDING",
        "last_synced_at": "2026-01-01T00:00:00.000Z"
      }
    ],
    "created_at": "2026-01-01T00:00:00.000Z",
    "updated_at": "2026-01-01T00:00:00.000Z"
  }
]

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

descriptionstring Β· nullableOptional

Optional workflow description

Responses
200

Successful Response

application/json

Detailed workflow information including associated rules and deployments. Primary response model for workflow detail endpoint.

workflow_namestringRequired

Unique name of the workflow

descriptionstring Β· nullableOptional

Optional description of the workflow

statusstring Β· enumRequired

Current status of the workflow

Possible values:
created_atstring Β· date-timeRequired

Timestamp when workflow was created

updated_atstring Β· date-timeRequired

Timestamp when workflow was last updated

post/v1/risk/workflows
POST /v1/risk/workflows HTTP/1.1
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 204

{
  "workflow_name": "text",
  "description": "text",
  "initial_rules": [
    {
      "rule_name": "text",
      "operator": "AND",
      "sub_rules": [
        {
          "field": "text",
          "operator": "<",
          "value": null,
          "storage_key": "text",
          "storage_field": "text"
        }
      ]
    }
  ]
}
{
  "workflow_name": "text",
  "description": "text",
  "status": "ACTIVE",
  "rules": [
    {
      "rule_name": "text",
      "rule_definition": {},
      "stage": "REGISTERED",
      "status": "ACTIVE",
      "created_at": "2026-01-01T00:00:00.000Z",
      "updated_at": "2026-01-01T00:00:00.000Z"
    }
  ],
  "deployments": [
    {
      "cluster_name": "text",
      "deployment_status": "PENDING",
      "last_synced_at": "2026-01-01T00:00:00.000Z"
    }
  ],
  "created_at": "2026-01-01T00:00:00.000Z",
  "updated_at": "2026-01-01T00:00:00.000Z"
}

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

Detailed workflow information including associated rules and deployments. Primary response model for workflow detail endpoint.

workflow_namestringRequired

Unique name of the workflow

descriptionstring Β· nullableOptional

Optional description of the workflow

statusstring Β· enumRequired

Current status of the workflow

Possible values:
created_atstring Β· date-timeRequired

Timestamp when workflow was created

updated_atstring Β· date-timeRequired

Timestamp when workflow was last updated

get/v1/risk/workflows/{workflow_name}
GET /v1/risk/workflows/{workflow_name} HTTP/1.1
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
{
  "workflow_name": "text",
  "description": "text",
  "status": "ACTIVE",
  "rules": [
    {
      "rule_name": "text",
      "rule_definition": {},
      "stage": "REGISTERED",
      "status": "ACTIVE",
      "created_at": "2026-01-01T00:00:00.000Z",
      "updated_at": "2026-01-01T00:00:00.000Z"
    }
  ],
  "deployments": [
    {
      "cluster_name": "text",
      "deployment_status": "PENDING",
      "last_synced_at": "2026-01-01T00:00:00.000Z"
    }
  ],
  "created_at": "2026-01-01T00:00:00.000Z",
  "updated_at": "2026-01-01T00:00:00.000Z"
}

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

Response model for workflow status update

workflow_namestringRequired

Name of the workflow

descriptionstring Β· nullableOptional

Optional workflow description

statusstring Β· enumRequired

Current workflow status

Possible values:
created_atstring Β· date-timeRequired

Timestamp when workflow was created

updated_atstring Β· date-timeRequired

Timestamp when workflow was last updated

patch/v1/risk/workflows/{workflow_name}/status
PATCH /v1/risk/workflows/{workflow_name}/status HTTP/1.1
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 23

{
  "new_status": "ACTIVE"
}
{
  "workflow_name": "text",
  "description": "text",
  "status": "ACTIVE",
  "created_at": "2026-01-01T00:00:00.000Z",
  "updated_at": "2026-01-01T00:00:00.000Z"
}

List workflow rules

Get Workflow Rules

get
Authorizations
OAuth2passwordRequired
Token URL:
Path parameters
workflow_namestringRequired
Query parameters
stagestring Β· nullableOptional
statusstring Β· nullableOptional
Responses
200

Successful Response

application/json

Schema for rule response

rule_namestringRequired
rule_definitionobject Β· Rule DefinitionRequired
stagestring Β· enumRequiredPossible values:
statusstring Β· enumRequiredPossible values:
created_atstring Β· date-timeRequired
updated_atstring Β· date-timeRequired
get/v1/risk/workflows/{workflow_name}/rules
GET /v1/risk/workflows/{workflow_name}/rules HTTP/1.1
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
[
  {
    "rule_name": "text",
    "rule_definition": {},
    "stage": "REGISTERED",
    "status": "ACTIVE",
    "created_at": "2026-01-01T00:00:00.000Z",
    "updated_at": "2026-01-01T00:00:00.000Z"
  }
]

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

Schema for rule response

rule_namestringRequired
rule_definitionobject Β· Rule DefinitionRequired
stagestring Β· enumRequiredPossible values:
statusstring Β· enumRequiredPossible values:
created_atstring Β· date-timeRequired
updated_atstring Β· date-timeRequired
post/v1/risk/workflows/{workflow_name}/rules
POST /v1/risk/workflows/{workflow_name}/rules HTTP/1.1
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 136

{
  "operator": "AND",
  "sub_rules": [
    {
      "field": "text",
      "operator": "<",
      "value": null,
      "redis_key": "text",
      "redis_field": "text"
    }
  ],
  "rule_name": "text"
}
{
  "rule_name": "text",
  "rule_definition": {},
  "stage": "REGISTERED",
  "status": "ACTIVE",
  "created_at": "2026-01-01T00:00:00.000Z",
  "updated_at": "2026-01-01T00:00:00.000Z"
}

Get workflow rule details

Get Workflow Rule

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

Successful Response

application/json

Schema for rule response

rule_namestringRequired
rule_definitionobject Β· Rule DefinitionRequired
stagestring Β· enumRequiredPossible values:
statusstring Β· enumRequiredPossible values:
created_atstring Β· date-timeRequired
updated_atstring Β· date-timeRequired
get/v1/risk/workflows/{workflow_name}/rules/{rule_name}
GET /v1/risk/workflows/{workflow_name}/rules/{rule_name} HTTP/1.1
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
{
  "rule_name": "text",
  "rule_definition": {},
  "stage": "REGISTERED",
  "status": "ACTIVE",
  "created_at": "2026-01-01T00:00:00.000Z",
  "updated_at": "2026-01-01T00:00:00.000Z"
}

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

Schema for rule response

rule_namestringRequired
rule_definitionobject Β· Rule DefinitionRequired
stagestring Β· enumRequiredPossible values:
statusstring Β· enumRequiredPossible values:
created_atstring Β· date-timeRequired
updated_atstring Β· date-timeRequired
put/v1/risk/workflows/{workflow_name}/rules/{rule_name}
PUT /v1/risk/workflows/{workflow_name}/rules/{rule_name} HTTP/1.1
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 117

{
  "operator": "AND",
  "sub_rules": [
    {
      "field": "text",
      "operator": "<",
      "value": null,
      "redis_key": "text",
      "redis_field": "text"
    }
  ]
}
{
  "rule_name": "text",
  "rule_definition": {},
  "stage": "REGISTERED",
  "status": "ACTIVE",
  "created_at": "2026-01-01T00:00:00.000Z",
  "updated_at": "2026-01-01T00:00:00.000Z"
}

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

Schema for rule response

rule_namestringRequired
rule_definitionobject Β· Rule DefinitionRequired
stagestring Β· enumRequiredPossible values:
statusstring Β· enumRequiredPossible values:
created_atstring Β· date-timeRequired
updated_atstring Β· date-timeRequired
patch/v1/risk/workflows/{workflow_name}/rules/{rule_name}/status
PATCH /v1/risk/workflows/{workflow_name}/rules/{rule_name}/status HTTP/1.1
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 23

{
  "new_status": "ACTIVE"
}
{
  "rule_name": "text",
  "rule_definition": {},
  "stage": "REGISTERED",
  "status": "ACTIVE",
  "created_at": "2026-01-01T00:00:00.000Z",
  "updated_at": "2026-01-01T00:00:00.000Z"
}

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

Schema for rule response

rule_namestringRequired
rule_definitionobject Β· Rule DefinitionRequired
stagestring Β· enumRequiredPossible values:
statusstring Β· enumRequiredPossible values:
created_atstring Β· date-timeRequired
updated_atstring Β· date-timeRequired
patch/v1/risk/workflows/{workflow_name}/rules/{rule_name}/stage
PATCH /v1/risk/workflows/{workflow_name}/rules/{rule_name}/stage HTTP/1.1
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 22

{
  "stage": "REGISTERED"
}
{
  "rule_name": "text",
  "rule_definition": {},
  "stage": "REGISTERED",
  "status": "ACTIVE",
  "created_at": "2026-01-01T00:00:00.000Z",
  "updated_at": "2026-01-01T00:00:00.000Z"
}

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 Β· Transaction DataRequired

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

Response model containing results of workflow evaluation

transaction_idstringRequired
workflow_idstringRequired
evaluation_timestampstring Β· date-timeOptional
post/v1/risk/evaluate-risk
POST /v1/risk/evaluate-risk HTTP/1.1
Content-Type: application/json
Accept: */*
Content-Length: 126

{
  "workflow_id": "text",
  "transaction_id": "text",
  "transaction_data": {},
  "evaluation_time": "2026-01-01T00:00:00.000Z",
  "context": {}
}
{
  "transaction_id": "text",
  "workflow_id": "text",
  "evaluation_results": [
    {
      "rule_id": "text",
      "rule_name": "text",
      "result": "SUCCESS",
      "error_message": "text"
    }
  ],
  "evaluation_timestamp": "2026-01-01T00:00:00.000Z"
}

Last updated