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
| Parameter | Type | Description |
|---|---|---|
configuration | object | Configuration settings. |
configuration.collect_file | object | Configuration object for file collection. |
configuration.collect_file.enable | boolean | Enables this configuration. |
configuration.collect_file.paths | array<string> | Directory paths to include in the collection. |
configuration.collect_file.include.<name> | boolean | The file extension is the key name and the value is whether or not it should be excluded. |
configuration.collect_file.timestamp | boolean | Include timestamps in the collected data. |
configuration.collect_file.shortcut | boolean | Include shortcuts in the collected data. |
configuration.collect_registry | object | Configuration object for registry collection. |
configuration.collect_registry.enable | boolean | Enables this configuration. |
configuration.collect_registry.paths | array<object> | Registry key locations to include in the collection. |
configuration.collect_registry.paths.hive | string | Abbreviated identifier for hive being collected i.e. HKLM |
configuration.collect_registry.paths.key | string | Path for the key to collect. |
configuration.collect_process | object | Configuration object for process collection. |
configuration.collect_process.enable | boolean | Enables this configuration. |
configuration.collect_service | object | Configuration object for service collection. |
configuration.collect_service.enable | boolean | Enables this configuration. |
configuration.collect_wmi | object | Configuration object for wmi collection. |
configuration.collect_wmi.enable | boolean | Enables this configuration. |
configuration.cache | string | Configure 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
| 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 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