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
| Parameter | Type | Description |
|---|---|---|
api_url | string | (optional) The API URL required by the product to retrieve the necessary data. |
token | string | (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
| 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.last_threat_time | string | Timestamp of last time a threat was found on the system, '0' if no threats have been found or times cannot be determined. |
result.no_threats | boolean | Returns 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.threats | array<object> | An array of information on the threats found on the system. |
result.threats.threat_name | string | The name of the threat found. |
result.threats.path | string | The file path of the file where the threat was detected. |
result.threats.scan_time | string | The time the threat was found in unix time (GMT). |
result.threats.remediation | string | The type of remediation (none, unknown, cleaned, deleted, quarantined, or partial). |
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