---
title: "Request disinfection process status"
method: GET
path: "/ClamScanner/check_disinfection_status"
tags: ["ClamScanner", "Antivirus Protection (ClamAV)"]
---

# Request disinfection process status

`GET /ClamScanner/check_disinfection_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`](https://go.cpanel.net/ClamScanner-start-scan) to start the virus scan.
2. Run [`ClamScanner::get_scan_status`](https://go.cpanel.net/ClamScanner-get-scan-status) in a loop until the scan is finished.
3. Run [`ClamScanner::list_infected_files`](https://go.cpanel.net/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`](https://go.cpanel.net/ClamScanner-disinfect-files) to queue the disinfection of the files.
6. Run [`ClamScanner::check_disinfection_status`](https://go.cpanel.net/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.

## Query parameters

- `last_id` integer

## Response `200`

HTTP Request was successful.

- object
  - `apiversion` integer — The version of the API.
  - `func` string — The name of the method called.
  - `module` string — The name of the module called.
  - `result` object
    - `data` object
      - `details` union[] — 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.
        - union
          - object
            - `file` string — The absolute path to the file.
            - `id` number — The task processing order.
            - `message` string — Optional message that may include more information about errors.
            - `state` 'deleted' | 'error' | 'mailbox-cleansed' | 'no-action' | 'quarantined', required — The state of the step. It will be one of the following: * `deleted` - The file was deleted. * `error` - An error occurred while processing the file. * `mailbox-cleansed` - The mailbox was clear of viruses. * `no-action` - No action was taken on the file. * `quarantined` - The file was quarantined.
            - `type` 'step', required — * `step` - Record about a single file being processes.
          - object
            - `id` number — The task processing order.
            - `message` string — Optional message that may include more information about errors and warnings.
            - `state` 'error' | 'warning', required — The state of the issue. It will be one of the following: * `error` - An error occurred while starting or finishing the disinfection. * `warning` - A non-cricitcal problem occurred while starting or finishing the disinfection.
            - `type` 'issue', required — * `issue` - Record that the disinfection is complete for all files indicated.
          - object
            - `id` number — The task processing order.
            - `message` string — Optional message that may include more information about errors.
            - `state` 'error' | 'info' | 'success' — The state of the step. It will be one of the following: * `error` - An error occurred while processing the file. * `info` - The message is information only. * `success` - The disinfection was successful.
            - `type` 'done', required — * `done` - Record that the disinfection is complete for all files indicated.
      - `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.
      - `status` 'done' | 'queued' | 'running' — * `done` - The disinfection is finished. * `none` - There is no disinfection scheduled. * `queued` - The disinfection is queued. * `running` - The disinfection is in progress.
    - `errors` string[], nullable — List of errors if the API failed.
    - `messages` string[], nullable — List of messages generated by the API.
    - `metadata` object
    - `status` 0 | 1 — * `1` - Success. * `0` - Failed. Check the `errors` field for more details.
    - `warnings` string[], nullable — List of warnings generated by the API. Warnings describe non-critical failures or other problematic conditions noted while running a API.

---

[API](https://skmtc.net/cpanel/apis/cpanel-uapi.md) · [All operations](https://skmtc.net/cpanel/apis/cpanel-uapi/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/cpanel/cpanel-uapi/revisions/632e2f8e6d04/schema)
