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

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: GET /ClamScanner/get_scan_status
Version: 11.136.0.25
Security: BasicAuth

## Response 200 fields (application/json):

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

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

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

  - `result` (object)

  - `result.data` (object)

  - `result.data.current_file` (string)
    The current file being scanned.
    Example: "/home/username/afilename.txt"

  - `result.data.infected_files` (array)
    List of files scanned and found to be infected.
    Example: ["/home/username/afile/witha/virus.txt","/home/username/we/gotcha.exe"]

  - `result.data.scan_complete` (integer)
    Whether the last scan has completed.
* 1 - scan has completed.
* 0 - scan has not completed.
    Enum: 0, 1

  - `result.data.scanned_file_count` (integer)
    The number of files already scanned.
    Example: 135

  - `result.data.scanned_file_size` (integer)
    The number of bytes of data scanned.
    Example: 6022

  - `result.data.time_started` (string)
    The epoch timestamp of the beginning of the last scan.
    Example: "1608593571"

  - `result.data.total_file_count` (integer)
    The total number of files found to scan.
    Example: 135

  - `result.data.total_file_size_MiB` (integer)
    The total number of megabytes of data found to scan.
    Example: 3640222

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


