# Uninstall Specific Patches Uninstalls specified patches from all applicable systems. ## Endpoint **POST** `/api/1.4/patch/uninstallpatch` ## Request ### Request URL ```text https://{server-hostname}:8383/api/1.4/patch/uninstallpatch ``` ### Scope ```text PatchMgmt.CREATE ``` ### Header ```text Authorization: d92d4xxxxxxxxxxxxx15f52 ``` ### Request Body `application/json` JSON object: - **PatchIDs** `array` — **Mandatory** - Array of patch IDs to uninstall. Mandatory for uninstall. - **ResourceIDs** `array` — Optional - Array of target resource IDs. If omitted, uninstalls from all applicable systems. - **ConfigName** `string` — **Mandatory** - Name for the uninstall patch configuration. - **ConfigDescription** `string` — Optional - Description for the uninstall patch configuration. - **actionToPerform** `string` — **Mandatory** - Deployment action: Deploy, DeployImmediately, or Draft. - **DeploymentPolicyTemplateID** `long` — **Mandatory** - Deployment policy template ID. Fetch from [Get Deployment Policies](https://www.manageengine.com/products/desktop-central/help/api/onpremise/legacygetdeploymentpolicies.html). ## Sample Request ```curl curl --request POST \ --url https://appdomain/api/1.4/patch/uninstallpatch \ --header 'Authorization: d92d4xxxxxxxxxxxxx15f52' \ --header 'content-type: application/json' \ --data '{"PatchIDs":[27170],"ConfigName":"API uninstall patch test1","actionToPerform":"Deploy","ConfigDescription":"API test","DeploymentPolicyTemplateID":1}' ``` ## Sample Request Body ### Uninstall patches from all applicable systems ```json { "PatchIDs": [ 27170 ], "ConfigName": "API uninstall patch test1", "actionToPerform": "Deploy", "ConfigDescription": "API test", "DeploymentPolicyTemplateID": 1 } ``` ### Uninstall patches from specific target systems ```json { "PatchIDs": [ 27170 ], "ConfigName": "API uninstall patch test1", "ResourceIDs": [ 601, 602 ], "actionToPerform": "Deploy", "ConfigDescription": "API test", "DeploymentPolicyTemplateID": 1 } ``` ## Response Parameters ### HTTP Code 200 Response Body — `application/json` JSON object: - **message_type** `string` - Action identifier: uninstallpatch. - **message_response** `JSON object` - Uninstall result payload. - **message_version** `string` - API version: 1.4. - **status** `string` - Overall operation status: success. ### HTTP Code 400 Response Body — `application/json` JSON object: - **error_code** `string` - Error code: PATCH_INSTALL_FAILED_CODE for install failures, PATCH_UNINSTALL_FAILED_CODE for uninstall failures. - **error** `string` - Error type: PATCH_INSTALL_FAILED or PATCH_UNINSTALL_FAILED. - **error_description** `string` - Detailed failure reason: invalid targets, mixed platforms, patches already installed, no missing patches, insufficient permissions, or invalid configuration. ## Possible Response Codes - **200** — HTTP code - **400** — HTTP code ## Sample Response: HTTP 200 ### Uninstall deployment initiated ```json { "message_type": "uninstallpatch", "message_response": { "uninstallpatch": {} }, "message_version": "1.4", "status": "success" } ``` ## Sample Response: HTTP 400 ### No patch IDs specified for uninstall ```json { "error_description": "No Patches Specified", "error_code": "PATCH_UNINSTALL_FAILED_CODE", "error": "PATCH_UNINSTALL_FAILED" } ``` ### Patches span multiple platform types ```json { "error_description": "Specified Patches are not of the same platform/type", "error_code": "PATCH_INSTALL_FAILED_CODE", "error": "PATCH_INSTALL_FAILED" } ``` ## API Rate Limit ![](https://www.zohowebstatic.com/sites/zweb/images/people/ico-help.png) **Duration:** 1 minute | **Threshold:** 30 | **Lock period:** 5 minutes Duration - Time window for the threshold. Threshold - Number of API calls allowed within the specified duration. Lock Period - Wait time before consecutive API requests.