# Updates device audit settings Updates an existing device/file audit configuration by customer identifier. ## Endpoint `PUT /dcapi/device/auditsettings/{customerID}` ## Request URL `https://{server-hostname}:8383/dcapi/device/auditsettings/{customerID}` ## Scope `DeviceControl.UPDATE` ## Header `Authorization: d92d4xxxxxxxxxxxxx15f52` ## Request Parameters ### Request Headers - **Content-Type** `string` — **Mandatory**: `application/json` ### Path Parameters - **customerID** `string` — **Mandatory**: Customer identifier for audit settings ### Request Body `application/json` - `JSON object` - **auditsetting** `JSON object` — Optional: Audit settings object containing configuration ## Sample Request ### Curl ```curl curl --request PUT \ --url https://appdomain/dcapi/device/auditsettings/{customerID} \ --header 'Authorization: d92d4xxxxxxxxxxxxx15f52' \ --header 'Content-Type: application/json' \ --data '{"auditsetting":{"fileShadowReportEnabled":true,"selectedDeviceTypes":["1","2","3"],"fileOperations":[1,2,3,4],"deviceReportEnabled":true,"fileReportEnabled":true,"daysToRetainFileShadowReport":60,"daysToRetainArchivedFiles":60,"daysToRetainFile":90,"archievePath":"C:\\Archive","daysToRetainDevice":120,"archieveEnabled":true}}' ``` ## Sample Request Body Update audit settings ```json { "auditsetting": { "fileShadowReportEnabled": true, "selectedDeviceTypes": [ "1", "2", "3" ], "fileOperations": [ 1, 2, 3, 4 ], "deviceReportEnabled": true, "fileReportEnabled": true, "daysToRetainFileShadowReport": 60, "daysToRetainArchivedFiles": 60, "daysToRetainFile": 90, "archievePath": "C:\\Archive", "daysToRetainDevice": 120, "archieveEnabled": true } } ``` ## Response Parameters ### HTTP Code 200 Response Body — `application/json` - `JSON object` - **id** `long`: Audit settings identifier ### HTTP Code 400 Response Body — `application/json` - `JSON object` - **errorCode** `string`: Error code identifying the type of error - **errorMsg** `string`: Human-readable error message ### HTTP Code 500 Response Body — `application/json` - `JSON object` - **errorCode** `string`: Error code identifying the type of error - **errorMsg** `string`: Human-readable error message ## Possible Response Codes - **200** `HTTP code` - **400** `HTTP code` - **500** `HTTP code` ## Sample Response: HTTP 200 Audit settings update response ```json { "id": 1 } ``` ## Sample Response: HTTP 400 Bad request - invalid input or sensitive path ```json { "errorCode": "INCORRECT_REQUEST_DATA", "errorMsg": "Invalid audit settings data" } ``` ## Sample Response: HTTP 500 Internal server error ```json { "errorCode": "INTERNAL_ERROR", "errorMsg": "Internal Server Error!" } ``` ## Rate Limits **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.