# Update Cleanup Settings Updates patch cleanup settings. ## Endpoint `PUT /dcapi/patch/settings/cleanupSettings` ## Request ### Request URL `https://{server-hostname}:8383/dcapi/patch/settings/cleanupSettings` ### Scope `PatchMgmt.UPDATE` ### Header `Authorization: d92d4xxxxxxxxxxxxx15f52` ### Request Body `application/json` JSON Object: | Parameter | Type | Required | Description | |---|---|---|---| | cleanupEnabled | boolean | Optional | Whether patch cleanup is enabled | | cleanupIntervalDays | string | Optional | Interval in days between cleanup runs | | cleanupOlderThanDays | string | Optional | Delete patches older than this many days | | deleteSupersededPatches | boolean | Optional | Whether to delete superseded patches | | deleteDeclinedPatches | boolean | Optional | Whether to delete declined patches | ### Sample Request ```curl curl --request PUT \ --url https://appdomain/dcapi/patch/settings/cleanupSettings \ --header 'Authorization: d92d4xxxxxxxxxxxxx15f52' \ --header 'content-type: application/json' \ --data '{"cleanupOlderThanDays":90,"cleanupIntervalDays":30,"deleteDeclinedPatches":true,"cleanupEnabled":true,"deleteSupersededPatches":true}' ``` ### Sample Request Body Enable declined patch cleanup ```json { "cleanupOlderThanDays": 90, "cleanupIntervalDays": 30, "deleteDeclinedPatches": true, "cleanupEnabled": true, "deleteSupersededPatches": true } ``` ## Response Parameters ### HTTP Code 200 Response Body: `application/json` JSON Object: | Parameter | Type | Description | |---|---|---| | remarks | string | Confirmation message: Cleanup settings have saved successfully | ### HTTP Code 401 Response Body: `application/json` JSON Object: | Parameter | Type | Description | |---|---|---| | error_code | string | Error code: UAC_UNAUTHORIZED for missing or invalid credentials | | error_description | string | Localized description: dc.rest.authentication.unauthorized | ## Possible Response Codes | HTTP Code | |---| | 200 | | 401 | ## Sample Responses ### HTTP 200 Cleanup settings saved ```json { "remarks": "Cleanup settings have saved successfully" } ``` ### HTTP 401 Unauthorized access ```json { "error_description": "dc.rest.authentication.unauthorized", "error_code": "UAC_UNAUTHORIZED" } ``` ## API Request 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.