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:

  1. Run ClamScanner::start_scan to start the virus scan.
  2. Run ClamScanner::get_scan_status in a loop until the scan is finished.
  3. Run ClamScanner::list_infected_files to get a report of the complete list of infected files.
  4. Decide how you want to handle each infected file.
  5. Run ClamScanner::disinfect_files to queue the disinfection of the files.
  6. Run ClamScanner::check_disinfection_status in a loop until you get a done status.
SecurityBasicAuth
Request
Request Body schema: application/json
object

The user provides the actions to perform on each specific infected file found in the scan.

Responses
200

HTTP Request was successful.

Response Schema: application/json
apiversion
integer

The version of the API.

func
string

The name of the method called.

module
string

The name of the module called.

object
post/ClamScanner/disinfect_files
Request samples
application/json
{
  • "actions": {
    • "home/unsure": "ignore",
    • "home/virus1": "delete",
    • "home/virus2": "quarantine"
    }
}
Response samples
application/json
{
  • "apiversion": 3,
  • "func": "disinfect_files",
  • "module": "ClamScanner",
  • "result": {
    • "data": {
      • "log": "/home/user/.clamavconnector.disinfection.log",
      • "task_id": "00000000/5a9ec8dd4c345d"
      },
    • "errors": null,
    • "messages": null,
    • "metadata": { },
    • "status": 1,
    • "warnings": null
    }
}