ClamScanner
Antivirus Protection (ClamAV)
Request virus scan status
This function gets the status of 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/get_scan_status
Response
HTTP Request was successful.
Example response
{
"apiversion": 3,
"func": "get_scan_status",
"module": "ClamScanner",
"result": {
"data": {
"current_file": "/home/username/afilename.txt",
"infected_files": [
"/home/username/afile/witha/virus.txt",
"/home/username/we/gotcha.exe"
],
"scan_complete": 1,
"scanned_file_count": 135,
"scanned_file_size": 6022,
"time_started": "1608593571",
"total_file_count": 135,
"total_file_size_MiB": 3640222
},
"status": 1
}
}