Virus Scanner API

ClamAV-powered malware scanning, quarantine management, and definition updates.

All endpoints are prefixed with /api/virusscanner. Admin only.


Endpoints

MethodPathDescription
GET/virusscanner/statusClamAV definitions status
POST/virusscanner/scanStart scan
GET/virusscanner/scan/:idScan progress
GET/virusscanner/scan/:id/resultsScan results
POST/virusscanner/scan/:id/abortAbort scan
POST/virusscanner/scan/:id/quarantineQuarantine findings
GET/virusscanner/quarantineList quarantined files
POST/virusscanner/quarantine/:id/restoreRestore file
DELETE/virusscanner/quarantine/:idDelete quarantined
POST/virusscanner/update-defsUpdate virus definitions
GET/virusscanner/historyScan history

Request/Response

POST /virusscanner/scan

{
  "target": "custom",
  "path": "/var/www/html"
}

Target options: home, mail, ftp, web, custom

GET /virusscanner/scan/:id

{
  "scanId": "scan_1690000000000",
  "status": "running",
  "progress": 42,
  "filesScanned": 1234,
  "infected": 0,
  "currentFile": "/var/www/html/vendor/lib.php",
  "startedAt": "2026-07-28T12:00:00Z"
}

GET /virusscanner/scan/:id/results

{
  "scanId": "scan_1690000000000",
  "status": "completed",
  "filesScanned": 4567,
  "infected": 2,
  "findings": [
    { "file": "/tmp/malware.exe", "virus": "Win.Malware.Generic", "action": "quarantined" }
  ]
}

Part of NexusPanel API Reference

← Back to Documentation