Skip to main content

Scan

Will perform a scan on the file, directory, or entire system. The scan will be performed synchronously in the case of file and folder scans and asynchronously for full scans, i.e. the scan will be executed and immediately return without waiting for the product.

Syntax​

Method ID​

#define WAAPI_MID_SCAN 1006

JSON Input Structure​

{
"input": {
"method": 1006,
"signature": number,
"scan_type": string,
"path": string,
"clean": boolean
}
}

Input Properties​

ParameterTypeDescription
scan_typestring'full' for full system scans, 'default' for a default scan (if defined) or 'path' for a scan using a system path.
pathstring(optional) The full path to a file, or folder. Only used in the case where scan_type = 'path'.
cleanboolean(optional) Specifies whether an attempt should be made to clean threats detected during the scan. This is an attempt, but cleaning is not always possible. Default is false.

JSON Output Structure​

{
"result": {
"method": 1006,
"code": number,
"timing": number,
"timestamp": string,
"malware_found": boolean,
"clean": boolean,
"threats": [
{
"threat_name": string,
"path": string,
"scan_time": string,
"remediation": string
},
...
]
}
}

Output Properties​

PropertyTypeDescription
result.methodnumberThe method ID that generated this result.
result.codenumberThe result code. See Result Codes.
result.timingnumberThe measured time for the method call in milliseconds.
result.timestampstringThe timestamp in seconds of when the call was made.
result.malware_foundboolean(optional) Returns true if the scan detected any malware. NOTE: 'malware_found' will not exist in the case of a 'full' or 'default' scan, or if the clean operation could not be performed.
result.cleanboolean(optional) Indicates the state of the affected area after the scan. NOTE: 'clean' will not exist in the case of a 'full' or 'default' scan, or if the clean operation could not be performed.
result.threatsarray<object>(optional) An array of information on the threats found from this scan operation. Only used in the case where scan_type = 'path' and threats information is available.
result.threats.threat_namestringThe name of the threat found.
result.threats.pathstringThe file path of the file where the threat was detected.
result.threats.scan_timestringThe time the threat was found in unix time (GMT).
result.threats.remediationstringThe type of remediation (none, cleaned, deleted, quarantined, or partial).

Result Codes​

CodeNameDescription
0WAAPI_OKThe operation completed successfully.
note

Other codes may be returned. See the full Result Codes reference for the complete list.

Remarks​

Error Handling​

The results of this function are determined by the error code returned by the call. If successful, WAAPI_OK or a special success code will be returned. Always check both the function return value and the result.code field in the output JSON.

Examples​

Examples will be added here demonstrating the usage of this method.

See Also​


Last updated: 2026-10-01