# Saves the auto-update package cleanup policy settings Configures the cleanup policy for auto-update packages including enabling/disabling cleanup and specifying the number of recent package versions to retain. ## Endpoints **POST** `/dcapi/swDeployment/savePackageCleanupSettings` ## Request URL `https://[{serverurl}](https://www.manageengine.com/products/desktop-central/help/api/cloud/oauth-authentication-endpoint-domain.html)/dcapi/swDeployment/savePackageCleanupSettings` ## Scope `DesktopCentralCloud.SWDeployment.CREATE` ## Header `Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52` ## Request Parameters ### Request Headers - **Content-Type** `string` **Mandatory**: `application/savePackageCleanup.v1+json` - **Accept** `string` **Mandatory**: `application/savePackageCleanup.v1+json` ### Request Body `application/json` `JSON Object` - **isEnableAutoUpdateCleanup** `boolean` Optional: true to enable auto-update package cleanup, false to disable - **noOfRecentAutoUpdatePkgs** `integer` Optional: Number of recent auto-update package versions to retain per software (2-8) ## Sample Request ```curl curl --request POST \ --url https://appdomains/dcapi/swDeployment/savePackageCleanupSettings \ --header 'Accept: application/savePackageCleanup.v1+json' \ --header 'Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52' \ --header 'Content-Type: application/savePackageCleanup.v1+json' \ --data '{}' ``` ## Sample Request Body ### Enable cleanup, keep 3 recent ```json { "noOfRecentAutoUpdatePkgs": 3, "isEnableAutoUpdateCleanup": true } ``` ### Disable cleanup ```json { "noOfRecentAutoUpdatePkgs": 2, "isEnableAutoUpdateCleanup": false } ``` ## Response Parameters ### HTTP code 200 Response Body - `application/json` `JSON Object` - **remarks** `string`: Human-readable result message ### HTTP code 500 Response Body - `application/json` `JSON Object` - **errorCode** `string`: SW_INTERNAL_ERROR for cleanup settings failures, INTERNAL_ERROR for restore operation errors - **errorMessage** `string`: Internal server error with details about the cleanup policy or archive restore failure ## Possible Response Codes - **200** HTTP code - **500** HTTP code ## Sample Response: HTTP 200 ### Settings saved ```json { "remarks": "Package Cleanup Settings SuccessFully Updated" } ``` ## Sample Response: HTTP 500 ### Server error ```json { "errorMessage": "Internal Server Error", "errorCode": "SW_INTERNAL_ERROR" } ``` ![ ](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.