Skip to main content

CollectionSetup

Configures the diagnostic module. When a setup call is made when the module is at any state where data is loaded, such as after collecting the base snapshot, or waiting for an after diff, it will clear the in-memory data and prepare for a new collection state as if no other collection or cache loads had been made.

Syntax​

Method ID​

#define WAAPI_MID_SETUP_COLLECTOR 60001

JSON Input Structure​

{
"input": {
"method": 60001,
"signature": number,
"configuration": {
"collect_file": {
"enable": boolean,
"paths": [
string,
...
],
"timestamp": boolean,
"shortcut": boolean,
"include": {
"<name>": boolean
}
},
"collect_registry": {
"enable": boolean,
"paths": [
{
"hive": string,
"key": string
},
...
]
},
"collect_process": {
"enable": boolean
},
"collect_service": {
"enable": boolean
},
"collect_wmi": {
"enable": boolean
},
"cache": string
}
}
}

Input Properties​

ParameterTypeDescription
configurationobjectConfiguration settings.
configuration.collect_fileobjectConfiguration object for file collection.
configuration.collect_file.enablebooleanEnables this configuration.
configuration.collect_file.pathsarray<string>Directory paths to include in the collection.
configuration.collect_file.include.<name>booleanThe file extension is the key name and the value is whether or not it should be excluded.
configuration.collect_file.timestampbooleanInclude timestamps in the collected data.
configuration.collect_file.shortcutbooleanInclude shortcuts in the collected data.
configuration.collect_registryobjectConfiguration object for registry collection.
configuration.collect_registry.enablebooleanEnables this configuration.
configuration.collect_registry.pathsarray<object>Registry key locations to include in the collection.
configuration.collect_registry.paths.hivestringAbbreviated identifier for hive being collected i.e. HKLM
configuration.collect_registry.paths.keystringPath for the key to collect.
configuration.collect_processobjectConfiguration object for process collection.
configuration.collect_process.enablebooleanEnables this configuration.
configuration.collect_serviceobjectConfiguration object for service collection.
configuration.collect_service.enablebooleanEnables this configuration.
configuration.collect_wmiobjectConfiguration object for wmi collection.
configuration.collect_wmi.enablebooleanEnables this configuration.
configuration.cachestringConfigure the path for cache files, defaults to the data directory path from the waapi setup call.

JSON Output Structure​

{
"result": {
"method": 60001,
"code": number,
"timing": number,
"timestamp": string
}
}

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 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