Skip to main content

Diagnose

Will perform a suite of OESIS Framework Invoke and data collection routines for diagnostic and debugging purposes. NOTE: This call may take minutes to complete depending on the system and configuration. Module specific keys may be outputted in the json_out for the current configuration of each module.

Syntax​

Method ID​

#define WAAPI_MID_DIAGNOSE 60005

JSON Input Structure​

{
"input": {
"method": 60005,
"run_detection": boolean,
"collect_system_info": boolean,
"collect_uninstall": boolean,
"collect_security_center": boolean,
"inclusion_list": [
number,
...
],
"exclusion_list": [
number,
...
],
"output_file": string,
"output_file_format": string
}
}

Input Properties​

ParameterTypeDescription
run_detectionboolean(optional) If true, will run product detection and make product specific diagnostic calls for a predefined set of methods, which can be managed through additional input arguments. Default value is true.
collect_system_infoboolean(optional) If true, will collect information about the device and operating system. Default value is true.
collect_uninstallboolean(optional) If true, will collect the uninstall entries from the system registry. Windows only. Default value is true.
collect_security_centerboolean(optional) If true, will collect information about products reporting to Security Center. Windows only. Default value is true.
inclusion_listarray<number>(optional) An array of method ids that should be called for each detected product. This is in addition to the default list. Will be ignored if 'run_detection' is false.
exclusion_listarray<number>(optional) An array of method ids that should be removed from the set of methods called for each detected product. This will override the default list. Will be ignored if 'run_detection' is false.
output_filestring(optional) The path to an output file to write the results to. Must have appropriate permissions and the file will be overwritten if it exists. If this key is defined then the output json will ONLY contain the default keys.
output_file_formatstring(optional) If 'output_file' is true, this will control the output format of the file. Possible values are: 'json'. Default value is 'json'.

JSON Output Structure​

{
"result": {
"method": 60005,
"code": number,
"timing": number,
"timestamp": string,
"system_info": {
"device_identity": string,
"username": string,
"domain": string,
"os": {
"name": string,
"version": string,
"architecture": string,
"os_type": number,
"computer_type": string,
"os_language": string
},
"virtualization": {
"is_virtual": boolean,
"details": {
"manufacturer": string
}
}
},
"uninstall_info": [
{
"key_name": string,
"display_name": string,
"display_version": string,
"install_location": string,
"publisher": string
},
...
],
"security_center": [
{
"namespace": string,
"interface": string,
"name": string,
"guid": string
},
...
],
"detected_products": [
{
"signature": number,
"sig_name": string,
"methods": [
{
"method_name": string
},
...
]
},
...
],
"config": [
{
"configs": [
{
"timing": number,
"version": string,
"module": string,
"code": number
},
...
],
"errors": [
{
"timing": number,
"version": string,
"module": string,
"code": 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.system_infoobjectThe collected info about the device and OS. Will not exist if 'collect_system_info' is false in the input json.
result.system_info.device_identitystringThe device identifier.
result.system_info.usernamestringThe name of the logged-on user with an active session.
result.system_info.domainstringThe domain which the user account belongs to.
result.system_info.osobjectThe operating system info.
result.system_info.os.namestringThe operating system name.
result.system_info.os.versionstringThe operating system version.
result.system_info.os.architecturestringThe operating system architecture: '32-bit', '64-bit'.
result.system_info.os.os_typenumberThe operating system type: 1 - Windows, 2 - Linux, 4 - Mac.
result.system_info.os.computer_typestringLocal hardware type: 'desktop', 'laptop', 'server', 'appliance', 'unknown'.
result.system_info.os.os_languagestringThe operating system language identifier.
result.system_info.virtualizationobjectInformation about the virtualization state of the machine.
result.system_info.virtualization.is_virtualbooleanTrue if currently running machine is virtual.
result.system_info.virtualization.detailsobject(optional) Object containing detailed virtual machine information.
result.system_info.virtualization.details.manufacturerstring(optional) Virtual machine host software manufacturer.
result.uninstall_infoarray<object>(optional) The collected info about the device and OS. Will not exist if 'collect_uninstall' is false in the input json. Windows only.
result.uninstall_info.key_namestringThe uninstall hive key name.
result.uninstall_info.display_namestringThe uninstall 'DisplayName' field. May be empty.
result.uninstall_info.display_versionstringThe uninstall 'DisplayVersion' field. May be empty.
result.uninstall_info.install_locationstringThe uninstall 'InstallLocation' field. May be empty.
result.uninstall_info.publisherstringThe uninstall 'Publisher' field. May be empty.
result.security_centerarray<object>(optional) The collected info about the device and OS. Will not exist if 'collect_security_center' is false in the input json. Windows only.
result.security_center.namespacestringThe security center namespace. Possible values: 'SecurityCenter', 'SecurityCenter2'
result.security_center.interfacestringThe security center interface name. Possible values: 'AntiVirusProduct', 'AntiSpywareProduct', 'FirewallProduct'
result.security_center.namestringThe security center 'displayName' property.
result.security_center.guidstringThe security center 'instanceGuid' property.
result.detected_productsarray<object>(optional) A list of detected products with method results for all implemented methods that are in the list of included methods. Will not exist if 'run_detection' is false in the input json.
result.detected_products.signaturenumberThe unique identifier for a product signature.
result.detected_products.sig_namestringThe name for this signature of the product.
result.detected_products.methodsarray<object>An array of objects which are the results from each wa_api_invoke method made for the signature. Additional keys listed here are added to the root of the result object.
result.detected_products.methods.method_namestringThe method's friendly name.
result.configobjectWill store the current configuration for each module.
result.config.configsarray<object>List of all modules successfully loaded.
result.config.configs.timingnumberThe measured time for the method call in milliseconds.
result.config.configs.versionstringThe current version of the module.
result.config.configs.modulestringName of the module.
result.config.configs.codenumberThe result code when the module was loaded.
result.config.errorsarray<object>List of all modules unsuccessfully loaded.
result.config.errors.timingnumberThe measured time for the method call in milliseconds.
result.config.errors.versionstringThe current version of the module.
result.config.errors.modulestringName of the module.
result.config.errors.codenumberThe result code when the module was not loaded.

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