Skip to main content

GetThreats

Will get the most recent threat log and status.

Syntax​

Method ID​

#define WAAPI_MID_GET_THREATS 1002

JSON Input Structure​

{
"input": {
"method": 1002,
"signature": number,
"api_url": string,
"token": string
}
}

Input Properties​

ParameterTypeDescription
api_urlstring(optional) The API URL required by the product to retrieve the necessary data.
tokenstring(optional) The API token required by the product to retrieve the necessary data.

JSON Output Structure​

{
"result": {
"method": 1002,
"code": number,
"timing": number,
"timestamp": string,
"last_threat_time": string,
"no_threats": 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.last_threat_timestringTimestamp of last time a threat was found on the system, '0' if no threats have been found or times cannot be determined.
result.no_threatsbooleanReturns true if the product indicates there are no unremediated threats on the system, if no evidence or determination of unremediated threats can be made it will return true.
result.threatsarray<object>An array of information on the threats found on the system.
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, unknown, 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