Skip to main content

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​

ParameterTypeDescription
timeframenumber(optional) The timeframe in days used to determine if the update is recent, the default setting is 3.
skip_connection_checkboolean(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​

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.is_recentbooleanTrue if the source date, or last update are recent.
result.has_internet_connectivityboolean(optional) (EDR products only) Will return the internet connectivity of this product. Will be disappeared when flag skip_connection_check is enabled.
result.definitionsarray<object>The array of information about the definitions.
result.definitions.namestringName of component to which definitions belong. This key is not a general value, can be different for different products.
result.definitions.typestringType of component to which definitions belong: could be 'antimalware', 'antivirus' or 'antispyware'.
result.definitions.versionstringThe version of the definitions if they are versioned.
result.definitions.engine_versionstring(optional) The engine version if available and seperate from definition version.
result.definitions.last_updatestringReturns the unix time for the time the definition was last obtained (GMT).
result.definitions.source_timestringReturns the unix time for the time the product reports the definitions were made available (GMT).
result.definitions.countnumber(optional) Returns the number of supported malware signatures.

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