ClamScanner
Antivirus Protection (ClamAV)
Start virus scan
This function starts a ClamAV® scan on a directory.
Note:
You must run the APIs in this order:
- Run ClamScanner::start_scan to start the virus scan.
- Run ClamScanner::get_scan_status in a loop until the scan is finished.
- Run ClamScanner::list_infected_files to get a report of the complete list of infected files.
- Decide how you want to handle each infected file.
- Run ClamScanner::disinfect_files to queue the disinfection of the files.
- Run ClamScanner::check_disinfection_status in a loop until you get a done status.
get/ClamScanner/start_scan
Query parameters
scan_type'home' | 'mail' | 'public_html' | 'public_ftp' required
Example:home
The type of directory to scan.
- home — User's entire home directory
- mail — User's email directory
- public_html — User's web directory
- public_ftp — User's ftp directory
Response
HTTP Request was successful.
Example response
{
"apiversion": 3,
"func": "start_scan",
"module": "ClamScanner",
"result": {
"status": 1
}
}