# 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.

Endpoint: POST /ClamScanner/disinfect_files
Version: 11.136.0.25
Security: BasicAuth

## Request fields (application/json):

  - `actions` (object)
    The user provides the actions to perform on each specific infected file found in the scan.
    Example: {"home/unsure":"ignore","home/virus1":"delete","home/virus2":"quarantine"}

## Response 200 fields (application/json):

  - `apiversion` (integer)
    The version of the API.
    Example: 3

  - `func` (string)
    The name of the method called.
    Example: "disinfect_files"

  - `module` (string)
    The name of the module called.
    Example: "ClamScanner"

  - `result` (object)

  - `result.data` (object)

  - `result.data.log` (string)
    Path to the disinfection log file. The log file will contain a list of JSON objects one per line.

If the last line is:

{ "status": "done" }

the requested files with viruses have be handled as requested.  Use the /ClamScanner/check_disinfection_status
API to check the status of a running or finished disinfection.
    Example: "/home/user/.clamavconnector.disinfection.log"

  - `result.data.task_id` (string)
    The Task Queue system's task ID number.
    Example: "00000000/5a9ec8dd4c345d"

  - `result.errors` (array,null)
    List of errors if the API failed.

  - `result.messages` (array,null)
    List of messages generated by the API.

  - `result.metadata` (object)

  - `result.status` (integer)
    * 1 - Success.
* 0 - Failed. Check the errors field for more details.
    Enum: 0, 1

  - `result.warnings` (array,null)
    List of warnings generated by the API. Warnings describe non-critical failures or other problematic conditions noted while running a API.


