# Uninstall Patch Uninstalls specified patches from all applicable systems. ## Endpoint `POST /api/1.4/patch/uninstallpatch` ## Request URL `https://`[{serverurl}](https://www.manageengine.com/products/desktop-central/help/api/cloud/oauth-authentication-endpoint-domain.html)`/api/1.4/patch/uninstallpatch` ## Scope `DesktopCentralCloud.PatchMgmt.CREATE` ## Header `Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52` ## Request Parameters ### Request Headers - **Content-Type** `string` — **Mandatory** — `application/json` - **Accept** `string` — **Mandatory** — `application/json` ### Query Parameters - **customerid** `long` — Optional Applicable only for MSP editions. A unique identifier of the customer on whom the action needs to be performed. Get the customer ID from the [Customer Details](https://www.manageengine.com/products/desktop-central/help/api/cloud/getallcustomers.html) API. ### Request Body `application/json` JSON Object: - **PatchIDs** `array` — Optional List of missing patch IDs to act on, e.g., `PatchIDs:[103980,103981]`. Get the patch IDs from the [Get All Patches](https://www.manageengine.com/products/desktop-central/help/api/cloud/patch-report-legacy-get-all-patches.html) API. - **ConfigName** `string` — Optional Provide a name for the Install Patch configuration, e.g., `ConfigName:API install patch test1`. - **ConfigDescription** `string` — Optional Provide a description for the Install Patch configuration, e.g., `ConfigDescription:API test`. - **actionToPerform** `string` — Optional This will initiate deployment of the defined Install Patches Configuration to the specified targets in accordance with the provided criteria, e.g., `actionToPerform:Deploy/ DeployImmediately/ Draft`. - `Deploy`: The deployment will initiate upon the agent's contact with the server. - `DeployImmediately`: Deployed instantly without waiting for agent contact. - `Draft`: Save the configuration as a draft. - **DeploymentPolicyTemplateID** `long` — Optional ID of the deployment policy to apply. This parameter is mandatory. Get the `template_id` from the [Get Deployment Policies](https://www.manageengine.com/products/desktop-central/help/api/cloud/deployment-policy-legacy-get-deployment-policies.html) API. ### Sample Request ```curl curl --request POST \ --url https://appdomains/api/1.4/patch/uninstallpatch \ --header 'Accept: application/json' \ --header 'Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52' \ --header 'Content-Type: application/json' \ --data '{}' ``` ### Sample Request Body ```json { "PatchIDs": [ 27170 ], "ConfigName": "API install patch test1", "ConfigDescription": "API test", "actionToPerform": "Deploy", "DeploymentPolicyTemplateID": "1" } ``` ## Response Parameters ### HTTP Code 200 Response body: `application/json` JSON Object: - **message_type** `string` Value: `uninstallpatch` - **message_response** `object` Uninstall result object. - **message_version** `string` API version: `1.4` - **status** `string` Operation status: `success` #### Sample Response ```json { "message_type": "uninstallpatch", "message_response": { "uninstallpatch": {} }, "message_version": "1.4", "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. #### Sample Response: No Patch IDs Specified for Uninstall ```json { "error_code": "PATCH_UNINSTALL_FAILED_CODE", "error": "PATCH_UNINSTALL_FAILED", "error_description": "No Patches Specified" } ``` #### Sample Response: Patches Span Multiple Platform Types ```json { "error_code": "PATCH_INSTALL_FAILED_CODE", "error": "PATCH_INSTALL_FAILED", "error_description": "Specified Patches are not of the same platform/type" } ``` ### HTTP Code 401 Response body: `application/json` JSON Object: - **errorCode** `long` Unauthorized error code returned when authentication credentials are missing, expired, or invalid (`authentication=required`). - **errorMsg** `string` Authentication failure reason. #### Sample Response Authentication credentials are missing, expired, or invalid. ```json { "error_code": "UAC_UNAUTHORIZED", "error_description": "dc.rest.authentication.unauthorized" } ``` ### HTTP Code 403 Response body: `application/json` JSON Object: - **errorCode** `long` Forbidden error code returned when the authenticated user does not have the required `uem-roles` (e.g., `DataEncryption_Admin` or `DataEncryptionRecoveryKey_Admin`). - **errorMsg** `string` Message indicating insufficient privileges to access this resource. #### Sample Response Authenticated user lacks the required role or scope. ```json { "errorCode": "FORBIDDEN", "errorMessage": "You do not have sufficient privileges to perform this operation" } ``` ### HTTP Code 429 Response body: `application/json` JSON Object: - **errorCode** `long` Rate limit error code returned when the API call threshold (configured via `threshold/duration` in security XML) is exceeded; client is locked out for `lock-period` minutes. - **errorMsg** `string` Rate limit exceeded message with retry guidance. #### Sample Response API call threshold exceeded. ```json { "errorCode": "RATE_LIMIT_EXCEEDED", "errorMessage": "API call limit exceeded. Retry after the lock period elapses" } ``` ## Rate Limits ![](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.