Skip to main content

Documentation Index

Fetch the complete documentation index at: https://tonic-ai.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Auditor API

Complete API for audit report generation, CDM event exploration, policy decision tracking, and audit log management. Base Path: /api/auditor
Code Reference: app/api/auditor_routes.py

Dashboard

Get Auditor Dashboard

Get auditor dashboard statistics and overview. Query Parameters:
  • start_date: Start date (ISO format)
  • end_date: End date (ISO format)
Response: Dashboard statistics including:
  • Total audit logs
  • Policy decisions summary
  • CDM events count
  • Activity trends

Report Generation

Generate Audit Report

Generate an audit report with customizable sections and templates. Request Body:
{
  "report_type": "overview",
  "date_range": {
    "start": "2026-01-15T00:00:00Z",
    "end": "2026-12-31T23:59:59Z"
  },
  "entity_selection": {
    "type": "deal",
    "ids": [1, 2, 3]
  },
  "template": "comprehensive",
  "include_sections": {
    "audit_logs": true,
    "policy_decisions": true,
    "cdm_events": true,
    "statistics": true
  }
}
Response: Generated report in requested format

Export Report

Export a generated report in various formats. Query Parameters:
  • format: Export format (pdf, csv, json, xlsx)
Response: File download

CDM Event Exploration

Get CDM Events

Browse and filter CDM events. Query Parameters:
  • event_type: Filter by event type
  • transaction_id: Filter by transaction ID
  • start_date: Start date filter
  • end_date: End date filter
  • page: Page number
  • limit: Items per page
Response: Paginated list of CDM events

Get CDM Event Details

Get detailed information about a specific CDM event. Response: Complete CDM event data

Policy Decisions

Get Policy Decisions

Browse and filter policy decisions. Query Parameters:
  • decision: Filter by decision (ALLOW, BLOCK, FLAG)
  • rule_applied: Filter by rule name
  • transaction_type: Filter by transaction type
  • start_date: Start date filter
  • end_date: End date filter
  • page: Page number
  • limit: Items per page
Response: Paginated list of policy decisions

Get Policy Decision Details

Get detailed information about a specific policy decision. Response: Complete policy decision data including evaluation trace

Audit Logs

Get Audit Logs

Browse and filter audit logs. Query Parameters:
  • action: Filter by action type
  • target_type: Filter by target type
  • user_id: Filter by user ID
  • start_date: Start date filter
  • end_date: End date filter
  • page: Page number
  • limit: Items per page
Response: Paginated list of audit logs

Entity-Specific Audits

Get Deal Audit Trail

Get complete audit trail for a specific deal. Response: All audit logs, policy decisions, and CDM events for the deal

Get Loan Audit Trail

Get complete audit trail for a specific loan. Response: All audit logs, policy decisions, and CDM events for the loan

Get Filing Audit Trail

Get complete audit trail for a specific regulatory filing. Response: All audit logs, policy decisions, and CDM events for the filing

Statistics

Get Audit Statistics

Get comprehensive audit statistics. Query Parameters:
  • start_date: Start date
  • end_date: End date
  • group_by: Group by (day, week, month)
Response: Statistical summary including:
  • Activity trends
  • Policy decision distribution
  • CDM event counts
  • User activity

Permissions

All auditor endpoints require AUDIT_VIEW permission. Export endpoints require AUDIT_EXPORT permission. Code Reference: app/core/permissions.py

Additional Resources


Last Updated: 2026-01-14
Code Reference: app/api/auditor_routes.py