Skip to main content

GetInstalledPatches

Will retrieve the installed patches or packages as reported by the product.

Syntax​

Method ID​

#define WAAPI_MID_GET_INSTALLED_PATCHES 1023

JSON Input Structure​

{
"input": {
"method": 1023,
"signature": number,
"query_history": boolean,
"retry_internet_services": boolean,
"token": string
}
}

Input Properties​

ParameterTypeDescription
query_historyboolean(optional) If true, will trigger a search in the update history to obtain a broader list of updates. Default is 'false'.
retry_internet_servicesboolean(optional) (Windows Update Agent only) If true, will retry with the internet services when failed with managed servers (if they are configured, such as WSUS, Configuration Server). Default value is true.
tokenstring(optional) The API token required by the product to retrieve the necessary data.

JSON Output Structure​

{
"result": {
"method": 1023,
"code": number,
"timing": number,
"timestamp": string,
"patches": [
{
"title": string,
"description": string,
"product": string,
"vendor": string,
"severity": string,
"category": string,
"security_update_id": string,
"kb_id": string,
"type": number,
"group": string,
"version": string,
"source": string
},
...
],
"patches_source": 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.patchesarray<object>An array of installed patches or packages detected for the product.
result.patches.titlestringThe title of the installed patch or package.
result.patches.descriptionstringThe description of the installed patch or package.
result.patches.productstringThe product for the patch or package name.
result.patches.vendorstring(optional) The vendor of the product for the patch or package vendor.
result.patches.severitystringThe severity of the installed patch or package update. Possible values are: low, moderate, important, critical, unknown. More info about the severity of Windows Update Agent can be found at How does MDES SDK determine the Severity of GetMissingPatches for Windows Update Agent?.
Note: In addition to the values listed above, the deprecated not_available value is exclusive to SCCM when severity data cannot be retrieved.
result.patches.categorystringThe category of the installed patch: 'security_update', 'update_rollup', 'critical_update', 'update', 'driver', 'driver_set', 'service_pack', 'definition_update', 'feature_pack', 'hotfix', 'tool', 'upgrade', 'unknown'.
result.patches.security_update_idstring(optional) The security update id for the installed patch. This is equivalent to Security Bulletin ids for Windows, Security Update ids for Apple, and various Security Alert ids for Linux.
result.patches.kb_idstring(optional) The knowledge base article id for the installed patch. May duplicate security_update_id on some platforms.
result.patches.typenumber(optional) Identify whether the patch is operating system or application. 0 : patch is operating system. 1 : patch is application.
result.patches.groupstring(optional) (Linux only) Package grouping varies by distribution type:
• Debian-based systems: Use Debian sections for classification. While official sections are documented, additional unofficial sections can be found via: dpkg-query -W -f='$\{Section\}\n' | sort | uniq
• RPM-based systems: Use RPM groups for classification.
result.patches.versionstring(optional) The version of the installed patch or package.
result.patches.sourcestring(optional) (Linux only) The name of the source package, used to build binary packages, may not be present on all Linux distributions.
result.patches_sourcestring(optional) (Windows Update Agent only) The source supplying patches: 'Windows Update', 'Microsoft Update', 'WSUS or Configuration Manager', 'Unknown', or the file path to the wsusscn2.cab in case WUA works in offline mode

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