TriggerInfectionScanSpecificPath
Will scan given file and folder path(s) recursively. If scanning directories, it is important to end directory paths with a slash in order to indicate that the path points to a directory, rather than a file.
Syntax
Method ID
#define WAAPI_MID_TRIGGER_INFECTION_SCAN_SPECIFIC_PATH 80003
JSON Input Structure
{
"input": {
"method": 80003,
"target_path": [
string,
...
],
"force_rescan": boolean,
"no_file_upload": boolean,
"no_sample_sharing": boolean,
"no_hash_lookup": boolean
}
}
Input Properties
| Parameter | Type | Description |
|---|---|---|
target_path | array<string> | Array of absolute paths to files and folders which need to be scanned. Directory paths must be terminated with a slash in order to indicate that the path refers to a directory. |
force_rescan | boolean | (optional) If true, will do a force rescan even we have cached result. |
no_file_upload | boolean | (optional) If true, the scanned file will only be scanned using the hash lookup, and will not be uploaded to Metadefender or target Metadefender server for scanning. Default value is 'false' |
no_sample_sharing | boolean | (optional) If no_file_upload is set to true, then this value is ignored. Otherwise, if this value is set to true - the file will be saved on Metadefender Server, with intention of sharing samples with antimalware vendors for research. Default value is 'false' |
no_hash_lookup | boolean | (optional) If true, file will not be scanned at all and will not be uploaded to Metadefender or target Metadefender server for scanning. If true, 'no_file_upload' is not used anymore. Default value is 'false' |
JSON Output Structure
{
"result": {
"method": 80003,
"code": number,
"timing": number,
"timestamp": string,
"infection_scan_id": string
}
}
Output Properties
| Property | Type | Description |
|---|---|---|
result.method | number | The method ID that generated this result. |
result.code | number | The result code. See Result Codes. |
result.timing | number | The measured time for the method call in milliseconds. |
result.timestamp | string | The timestamp in seconds of when the call was made. |
result.infection_scan_id | string | A session id key representing the created scanning session |
Result Codes
| Code | Name | Description |
|---|---|---|
| 0 | WAAPI_OK | The 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