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
| Parameter | Type | Description |
|---|---|---|
run_detection | boolean | (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_info | boolean | (optional) If true, will collect information about the device and operating system. Default value is true. |
collect_uninstall | boolean | (optional) If true, will collect the uninstall entries from the system registry. Windows only. Default value is true. |
collect_security_center | boolean | (optional) If true, will collect information about products reporting to Security Center. Windows only. Default value is true. |
inclusion_list | array<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_list | array<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_file | string | (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_format | string | (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
| 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.system_info | object | The collected info about the device and OS. Will not exist if 'collect_system_info' is false in the input json. |
result.system_info.device_identity | string | The device identifier. |
result.system_info.username | string | The name of the logged-on user with an active session. |
result.system_info.domain | string | The domain which the user account belongs to. |
result.system_info.os | object | The operating system info. |
result.system_info.os.name | string | The operating system name. |
result.system_info.os.version | string | The operating system version. |
result.system_info.os.architecture | string | The operating system architecture: '32-bit', '64-bit'. |
result.system_info.os.os_type | number | The operating system type: 1 - Windows, 2 - Linux, 4 - Mac. |
result.system_info.os.computer_type | string | Local hardware type: 'desktop', 'laptop', 'server', 'appliance', 'unknown'. |
result.system_info.os.os_language | string | The operating system language identifier. |
result.system_info.virtualization | object | Information about the virtualization state of the machine. |
result.system_info.virtualization.is_virtual | boolean | True if currently running machine is virtual. |
result.system_info.virtualization.details | object | (optional) Object containing detailed virtual machine information. |
result.system_info.virtualization.details.manufacturer | string | (optional) Virtual machine host software manufacturer. |
result.uninstall_info | array<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_name | string | The uninstall hive key name. |
result.uninstall_info.display_name | string | The uninstall 'DisplayName' field. May be empty. |
result.uninstall_info.display_version | string | The uninstall 'DisplayVersion' field. May be empty. |
result.uninstall_info.install_location | string | The uninstall 'InstallLocation' field. May be empty. |
result.uninstall_info.publisher | string | The uninstall 'Publisher' field. May be empty. |
result.security_center | array<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.namespace | string | The security center namespace. Possible values: 'SecurityCenter', 'SecurityCenter2' |
result.security_center.interface | string | The security center interface name. Possible values: 'AntiVirusProduct', 'AntiSpywareProduct', 'FirewallProduct' |
result.security_center.name | string | The security center 'displayName' property. |
result.security_center.guid | string | The security center 'instanceGuid' property. |
result.detected_products | array<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.signature | number | The unique identifier for a product signature. |
result.detected_products.sig_name | string | The name for this signature of the product. |
result.detected_products.methods | array<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_name | string | The method's friendly name. |
result.config | object | Will store the current configuration for each module. |
result.config.configs | array<object> | List of all modules successfully loaded. |
result.config.configs.timing | number | The measured time for the method call in milliseconds. |
result.config.configs.version | string | The current version of the module. |
result.config.configs.module | string | Name of the module. |
result.config.configs.code | number | The result code when the module was loaded. |
result.config.errors | array<object> | List of all modules unsuccessfully loaded. |
result.config.errors.timing | number | The measured time for the method call in milliseconds. |
result.config.errors.version | string | The current version of the module. |
result.config.errors.module | string | Name of the module. |
result.config.errors.code | number | The result code when the module was not loaded. |
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