GetDefinitionState
Will get information about the AntiMalware definitions. Will retreive the time the defs were last updated, and (where available) the time the definitions were made available from the source. For convenience provides a boolean value to determine if the definitions are recent.
If Windows SecurityCenter is enabled and the product reports to SecurityCenter then this method is implemented even if the product does not explicitly state that it is implemented.
Syntax
Method ID
#define WAAPI_MID_GET_DEF_STATE 1001
JSON Input Structure
{
"input": {
"method": 1001,
"signature": number,
"timeframe": number,
"skip_connection_check": boolean
}
}
Input Properties
| Parameter | Type | Description |
|---|---|---|
timeframe | number | (optional) The timeframe in days used to determine if the update is recent, the default setting is 3. |
skip_connection_check | boolean | (optional) If true, it will not check the internet connection on the endpoint. Default value is false. |
JSON Output Structure
{
"result": {
"method": 1001,
"code": number,
"timing": number,
"timestamp": string,
"is_recent": boolean,
"has_internet_connectivity": boolean,
"definitions": [
{
"name": string,
"type": string,
"version": string,
"engine_version": string,
"last_update": string,
"source_time": string,
"count": number
},
...
]
}
}
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.is_recent | boolean | True if the source date, or last update are recent. |
result.has_internet_connectivity | boolean | (optional) (EDR products only) Will return the internet connectivity of this product. Will be disappeared when flag skip_connection_check is enabled. |
result.definitions | array<object> | The array of information about the definitions. |
result.definitions.name | string | Name of component to which definitions belong. This key is not a general value, can be different for different products. |
result.definitions.type | string | Type of component to which definitions belong: could be 'antimalware', 'antivirus' or 'antispyware'. |
result.definitions.version | string | The version of the definitions if they are versioned. |
result.definitions.engine_version | string | (optional) The engine version if available and seperate from definition version. |
result.definitions.last_update | string | Returns the unix time for the time the definition was last obtained (GMT). |
result.definitions.source_time | string | Returns the unix time for the time the product reports the definitions were made available (GMT). |
result.definitions.count | number | (optional) Returns the number of supported malware signatures. |
Result Codes
| Code | Name | Description |
|---|---|---|
| 0 | WAAPI_OK | The operation completed successfully. |
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