Start virus scan

This function starts 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.
SecurityBasicAuth
Request
query Parameters
scan_type
required
any

The type of directory to scan.

  • home — User's entire home directory
  • mail — User's email directory
  • public_html — User's web directory
  • public_ftp — User's ftp directory
Enum: "home" "mail" "public_html" "public_ftp"
Example: scan_type=home
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
get/ClamScanner/start_scan
Request samples
uapi --output=jsonpretty \
  --user=username \
  ClamScanner \
  start_scan \
  scan_type='home'
Response samples
application/json
{
  • "apiversion": 3,
  • "func": "start_scan",
  • "module": "ClamScanner",
  • "result": {
    • "data": null,
    • "errors": null,
    • "messages": null,
    • "metadata": { },
    • "status": 1,
    • "warnings": null
    }
}