Skip to main content

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​

ParameterTypeDescription
pathstringPath 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_namestring(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​

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.pathstringPath to the directory containing database files.
result.data_filesarray<object>Details of files related to the requested well-known name.
result.data_files.filenamestringThe name of the file.
result.data_files.wellknown_namestringThe well-known name of the file.
result.data_files.typestringThe type of the file:
• standard: Standard Dataset.
• baseline: Baseline Dataset.
• delta: Delta Dataset.
result.data_files.content_updated_epochstring(optional) The epoch when content was last updated. n/a if cannot retrieve.
result.data_files.compatible_baseline_epochstring(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_epochstringThe epoch when the file was published.
result.data_files.sha256stringSHA-256 hash string of the file.

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