# Move one or more sensors to trash after dependency checks Moves one or more sensors to trash. To get sensor IDs, use [Get Sensor Libraries](https://www.manageengine.com/products/desktop-central/help/api/cloud/sensors-get-libraries.html). ## Endpoint `POST /intelligence/sensors/api/moveToTrash` ## Request ### Request URL `https://[{serverurl}](https://www.manageengine.com/products/desktop-central/help/api/cloud/oauth-authentication-endpoint-domain.html)/intelligence/sensors/api/moveToTrash` ### Scope `DesktopCentralCloud.Platform.DELETE` ### Header `Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52` ### Request Parameters #### Request Headers - **Content-Type** `string` — **Mandatory** - `application/json` - **Accept** `string` — **Mandatory** - `application/json` #### Request Body `application/json` - `JSON Object` - **sensorIDs** `array` — Optional - Array of sensor IDs (long) to move to trash. Max 200 items - **forceDelete** `boolean` — Optional - true to force-trash sensors even if dependencies exist; false to block on dependencies ### Sample Request ```curl curl --request POST \ --url https://appdomains/intelligence/sensors/api/moveToTrash \ --header 'Accept: application/json' \ --header 'Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52' \ --header 'Content-Type: application/json' \ --data '{}' ``` ### Sample Request Body #### Move multiple sensors to trash ```json { "forceDelete": false, "sensorIDs": [ 101, 102, 103 ] } ``` #### Force-trash a sensor ignoring dependencies ```json { "forceDelete": true, "sensorIDs": [ 101 ] } ``` ## Response Parameters ### HTTP Code 200 #### Response Body `application/json` - `JSON Object` - **status** `string` - Result of the operation: 'success' or 'failure' - **message** `string` - A confirmation message about the trash operation ### HTTP Code 400 #### Response Body `application/json` - `JSON Object` - **errorCode** `string` - Error code when sensor cannot be deleted due to dependencies - **errorMessage** `string` - Details about which dependencies prevent deletion ### HTTP Code 401 #### Response Body `application/json` - `JSON Object` - **errorCode** `long` - Unauthorized error code: credentials missing, expired, or invalid - **errorMsg** `string` - Authentication failure reason ### HTTP Code 500 #### Response Body `application/json` - `JSON Object` - **statusCode** `string` - HTTP status code (500) - **errorCode** `string` - Internal error code identifying the server-side failure - **message** `string` - Error message describing the server-side failure ## Sample Responses ### HTTP 200 #### Single sensor moved to trash ```json { "message": "Sensor Disk Health Sensor moved to trash successfully", "status": "success" } ``` #### Multiple sensors moved to trash ```json { "message": "Selected sensors moved to trash successfully", "status": "success" } ``` ### HTTP 400 #### Sensor is used by other features and cannot be deleted ```json { "errorMessage": "Sensor has dependencies in other modules and cannot be trashed.", "errorCode": "SENORS_DEPENDENCY_EXISTS" } ``` ### HTTP 401 #### You do not have permission for this action ```json { "errorMessage": "Sensor is not in the authorized user scope.", "errorCode": "UNAUTHORIZED" } ``` ### HTTP 500 #### Server error ```json { "errorMessage": "An internal error occurred.", "errorCode": "INTERNAL_ERROR" } ``` ## Possible Response Codes - `200` — HTTP code - `400` — HTTP code - `401` — HTTP code - `500` — HTTP code ## Rate Limit **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.