ClamScanner
Antivirus Protection (ClamAV)
Start disinfecting files with viruses
This function applies the disinfection option selected by the user for each infected file.
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.
post/ClamScanner/disinfect_files
Request body
Example request
{
"actions": {
"home/unsure": "ignore",
"home/virus1": "delete",
"home/virus2": "quarantine"
}
}Response
HTTP Request was successful.
Example response
{
"apiversion": 3,
"func": "disinfect_files",
"module": "ClamScanner",
"result": {
"data": {
"log": "/home/user/.clamavconnector.disinfection.log",
"task_id": "00000000/5a9ec8dd4c345d"
},
"status": 1
}
}