Move one or more sensors to trash after dependency checks

Open in ChatGPT Open in ChatGPT to ask questions about this page
Open in Claude Open in Claude to ask questions about this page
Copy as MarkdownCopy this page as markdown to use with AI assistants
View as Markdown Open this page as markdown in a new tab

Moves one or more sensors to trash. To get sensor IDs use Get Sensor Libraries

Request URL

https://{serverurl}/intelligence/sensors/api/moveToTrash

Scope

DesktopCentralCloud.Platform.DELETECopied!

Header

Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52

Request Parameters

- Request Headers

Content-TypestringMandatory
application/jsonapplication/jsonCopied!
AcceptstringMandatory
application/jsonapplication/jsonCopied!

- Request Body

application/json
JSON Object
Hide Sub-Attributes
sensorIDsarrayOptional

Array of sensor IDs (long) to move to trash. Max 200 items

forceDeletebooleanOptional

true to force-trash sensors even if dependencies exist; false to block on dependencies

Sample Request

Curl
Java
Python
Deluge
PowerShell
Copied!
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

Copied!
  {
    "forceDelete": false,
    "sensorIDs": [
      101,
      102,
      103
    ]
  }
                
Show full

Force-trash a sensor ignoring dependencies

Copied!
  {
    "forceDelete": true,
    "sensorIDs": [
      101
    ]
  }
                
Show full

Response Parameters

- HTTP code 200

Response Body - application/json
JSON Object
Hide Sub-Attributes
statusstring

Result of the operation: 'success' or 'failure'

messagestring

A confirmation message about the trash operation

- HTTP code 400

Response Body - application/json
JSON Object
Hide Sub-Attributes
errorCodestring

Error code when sensor cannot be deleted due to dependencies

errorMessagestring

Details about which dependencies prevent deletion

- HTTP code 401

Response Body - application/json
JSON Object
Hide Sub-Attributes
errorCodelong

Unauthorized error code: credentials missing, expired, or invalid

errorMsgstring

Authentication failure reason

- HTTP code 500

Response Body - application/json
JSON Object
Hide Sub-Attributes
statusCodestring

HTTP status code (500)

errorCodestring

Internal error code identifying the server-side failure

messagestring

Error message describing the server-side failure

Possible Response Codes

200HTTP code
400HTTP code
401HTTP code
500HTTP code

Sample Response: HTTP 200

Single sensor moved to trash

Copied!
  {
    "message": "Sensor Disk Health Sensor moved to trash successfully",
    "status": "success"
  }
                
Show full

Multiple sensors moved to trash

Copied!
  {
    "message": "Selected sensors moved to trash successfully",
    "status": "success"
  }
                
Show full

Sample Response: HTTP 400

Sensor is used by other features and cannot be deleted

Copied!
  {
    "errorMessage": "Sensor has dependencies in other modules and cannot be trashed.",
    "errorCode": "SENORS_DEPENDENCY_EXISTS"
  }
                
Show full

Sample Response: HTTP 401

You do not have permission for this action

Copied!
  {
    "errorMessage": "Sensor is not in the authorized user scope.",
    "errorCode": "UNAUTHORIZED"
  }
                
Show full

Sample Response: HTTP 500

Server error

Copied!
  {
    "errorMessage": "An internal error occurred.",
    "errorCode": "INTERNAL_ERROR"
  }
                
Show full

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.