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.

SecurityBasicAuth
Request
query Parameters
last_id
integer >= 1

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: last_id=10
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/check_disinfection_status
Request samples
uapi --output=jsonpretty \
  --user=username \
  ClamScanner \
  check_disinfection_status
Response samples
application/json
{
  • "apiversion": 3,
  • "func": "check_disinfection_status",
  • "module": "ClamScanner",
  • "result": {
    • "data": {
      • "details": [
        • {
          • "file": "/home/user/virus",
          • "id": 2,
          • "message": "string",
          • "state": "deleted",
          • "type": "step"
          }
        ],
      • "log": "/home/user/.clamavconnector.disinfection.log",
      • "status": "done"
      },
    • "errors": null,
    • "messages": null,
    • "metadata": { },
    • "status": 1,
    • "warnings": null
    }
}