Skip to main content

DownloadMissingPatches

Will download a specified subset of missing patches previously returned by GetMissingPatches. Behavior differs by platform:
• Windows (WUA, sig 1103): Delegates to the Windows Update Agent (WUA) API. Patches are downloaded and cached by WUA; OESIS does not manage the cache.
• Linux (apt, sig 200041): Delegates to the apt CLI. Packages are cached at /var/cache/apt/archives, managed by apt and is not controlled by OESIS.

Syntax​

Method ID​

#define WAAPI_MID_DOWNLOAD_MISSING_PATCHES 1016

JSON Input Structure​

{
"input": {
"method": 1016,
"signature": number,
"threads": number,
"retry_internet_services": boolean,
"patches": [
{
"title": string,
"product": string,
"vendor": string
},
...
]
}
}

Input Properties​

ParameterTypeDescription
threadsnumber(optional) The number of threads using to download patches, equal to number of patches can be downloaded at the same time. Default value = 4.
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
patchesarray<object>An array of missing patches to be downloaded.
patches.titlestringThe title of a missing patch, this value should be got from the return of GetMissingPatches.
patches.productstringThe product a missing patch will be downloaded for, this value should be got from the return of GetMissingPatches.
patches.vendorstring(optional) The vendor of the product a missing patch will be downloaded for, this value should be got from the return of GetMissingPatches.

JSON Output Structure​

{
"result": {
"method": 1016,
"code": number,
"timing": number,
"timestamp": string,
"patches": [
{
"title": string,
"product": string,
"vendor": string,
"state": 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 missing patches that input by user.
result.patches.titlestringThe title of a patch.
result.patches.productstringThe product of this patch.
result.patches.vendorstring(optional) The vendor of the product a missing patch. Only available if user input it in json_in.
result.patches.statestringThe state of a patch after this method completed. It can be: 'not_found' - if patch was not found in result of GetMissingPatches, 'not_found_in_cache' - if patch was not found in cache, only available when install_from_cache = true, 'download_failed' - if patch failed in download phase, 'cache_failed' - if patch was downloaded but can not move it to OESIS Framework cache location, 'downloaded' - patch was downloaded and cached successful, 'canceled' - the request was canceled by CancelAsyncRequest before this patch was downloaded.
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