# Request disinfection process status

This function checks the status of the previously queued disinfection
of infected files.

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.

If you want to display the progress, you can render the ClamScanner::check_disinfection_status returned 'result{data}{details}' array where the type is step.

Each step record indicates the action taken on a specific file in the set being processed.

Endpoint: GET /ClamScanner/check_disinfection_status
Version: 11.136.0.25
Security: BasicAuth

## Query parameters:

  - `last_id` (integer)
    The unique id of the message you last received from this same log.

The API will return only the records after the specified last_id.

If this parameter is not provided, the entire log is returned.

Note:

For improved performance, we recommend applications include the last record ID (last_id)
from a previous call to this API, so only messages since the previous API call are returned.
    Example: 10

## Response 200 fields (application/json):

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

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

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

  - `result` (object)

  - `result.data` (object)

  - `result.data.details` (array)
    The list of events recorded in the log. If you pass the last_id parameter, only records in the log after that id are returned.

  - `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 includes "type":"done", the file disinfection is complete.
    Example: "/home/user/.clamavconnector.disinfection.log"

  - `result.data.status` (string)
    * done - The disinfection is finished.
* none - There is no disinfection scheduled.
* queued - The disinfection is queued.
* running - The disinfection is in progress.
    Enum: "done", "queued", "running"

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


