Skip to main content
List recent detections with optional query parameters for filtering.

Endpoint

GET /api/v1/detections

Query Parameters

ParameterTypeDescriptionDefault
limitnumberNumber of results50
offsetnumberPagination offset0
severitystringFilter by priority (NOTICE, WARNING, CRITICAL)-
chainstringFilter by blockchain (ethereum, polygon, etc.)-
rulestringFilter by rule name-

Example Requests

# Recent detections
curl "http://localhost:8000/api/v1/detections?limit=10"

# Critical findings only
curl "http://localhost:8000/api/v1/detections?severity=CRITICAL"

# Ethereum detections
curl "http://localhost:8000/api/v1/detections?chain=ethereum&limit=20"

Response

{
  "count": 10,
  "detections": [
    {
      "id": "finding_abc123",
      "rule_name": "flash_loan_attack",
      "detector_name": "flash_loan_attack",
      "severity": "CRITICAL",
      "priority": "CRITICAL",
      "chain": "ethereum",
      "type": "rule",
      "tx_hash": "0x9e5c7835...",
      "block_number": 18450123,
      "timestamp": "2025-11-11T21:30:00Z",
      "description": "Flash loan attack detected: 1000 ETH borrowed",
      "tags": ["defi", "flash-loan"],
      "metadata": {
        "tx_from": "0x742d...",
        "tx_to": "0x123f...",
        "tx_value": "1000000000000000000"
      }
    },
    ...
  ]
}

Response Fields

FieldTypeDescription
countnumberNumber of detections returned
detectionsarrayArray of detection objects
detections[].idstringUnique detection ID
detections[].rule_namestringName of the rule that triggered
detections[].detector_namestringDetector name (same as rule_name)
detections[].severitystringSeverity level (NOTICE, WARNING, CRITICAL)
detections[].prioritystringPriority level (same as severity)
detections[].chainstringBlockchain network
detections[].typestringDetection type (usually “rule”)
detections[].tx_hashstringTransaction hash
detections[].block_numbernumberBlock number
detections[].timestampstringDetection timestamp (ISO 8601)
detections[].descriptionstringAlert message/description
detections[].tagsarrayRule tags
detections[].metadataobjectAdditional transaction metadata
Pagination: Use limit and offset for large result sets. Maximum limit is 1000.