GetPatchDatabaseInfo
Retrieve information about patch database files in a specified directory.
Syntax
Method ID
#define WAAPI_MID_GET_PATCH_DATABASE_INFO 50304
JSON Input Structure
{
"input": {
"method": 50304,
"path": string,
"wellknown_name": string
}
}
Input Properties
| Parameter | Type | Description |
|---|---|---|
path | string | Path to the directory that contains OPSWAT database files on the endpoint. If this value is an empty string, the SDK will try to look up in current directory. |
wellknown_name | string | (optional) The well-known name of the file. If this field is not specified or its value is *, the SDK will try to query information of all patching database files in the directory specified by 'path'. |
JSON Output Structure
{
"result": {
"method": 50304,
"code": number,
"timing": number,
"timestamp": string,
"path": string,
"data_files": [
{
"filename": string,
"wellknown_name": string,
"type": string,
"content_updated_epoch": string,
"compatible_baseline_epoch": string,
"published_epoch": string,
"sha256": 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.path | string | Path to the directory containing database files. |
result.data_files | array<object> | Details of files related to the requested well-known name. |
result.data_files.filename | string | The name of the file. |
result.data_files.wellknown_name | string | The well-known name of the file. |
result.data_files.type | string | The type of the file: • standard: Standard Dataset.• baseline: Baseline Dataset.• delta: Delta Dataset. |
result.data_files.content_updated_epoch | string | (optional) The epoch when content was last updated. n/a if cannot retrieve. |
result.data_files.compatible_baseline_epoch | string | (optional) The epoch of the compatible Baseline Dataset. This field is only required when the 'data_files.type' attribute is delta. |
result.data_files.published_epoch | string | The epoch when the file was published. |
result.data_files.sha256 | string | SHA-256 hash string of the file. |
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