Delete a script from the Script Repository

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

Deletes the specified script from the Script Repository. A script that is still referenced by a configuration, deployment policy, dynamic custom group, or Endpoint Analytics workflow is not deleted; the call returns HTTP 200 with the corresponding isUsedIn flag set to true.

Request URL

https://{serverurl}/dcapi/configuration/scriptRepository/{scriptId} Copied!

Scope

DesktopCentralCloud.Common.DELETECopied!

Header

Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52

Request Parameters

- Request Headers

AcceptstringMandatory
application/deleteScriptStatus.v1+jsonapplication/deleteScriptStatus.v1+jsonCopied!

- Path Parameters

scriptIdstringMandatory

Unique identifier of the script to update. Fetch from List Scripts.

Sample Request

Curl
Java
Python
Deluge
PowerShell
Copied!
curl --request DELETE \
  --url https://appdomains/dcapi/configuration/scriptRepository/{scriptId} \
  --header 'Accept: application/deleteScriptStatus.v1+json' \
  --header 'Authorization: Zoho-oauthtoken  d92d4xxxxxxxxxxxxx15f52'

Response Parameters

- HTTP code 200

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

true - user has access but script cannot be deleted because it is in use

isUsedInConfigboolean

true if the script is associated with a configuration

isUsedInDeploymentPolicyboolean

true if the script is used in a deployment policy

isUsedInDynamicCustomGroupboolean

true if the script is used in a dynamic custom group

isUsedInEAboolean

true if the script is used in an Endpoint Analytics workflow

messagestring

I18N message describing where the script is in use

- HTTP code 401

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

Product error code for the authorization failure

errorMsgstring

Localised error message for the error code

- HTTP code 500

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

Product error code for the failure

errorMsgstring

Localised error message for the error code

Sample Response: HTTP 200

Script is associated with configurations and cannot be deleted

Copied!
  {
    "isUsedInDeploymentPolicy": false,
    "isUsedInEA": false,
    "isUsedInDynamicCustomGroup": false,
    "isUsedInConfig": true,
    "allowAccess": true,
    "message": "dc.admin.ScriptRep.used_in_config"
  }
                
▼ Show full

Script is associated with Dynamic Custom Groups and cannot be deleted

Copied!
  {
    "isUsedInDeploymentPolicy": false,
    "isUsedInEA": false,
    "isUsedInDynamicCustomGroup": true,
    "isUsedInConfig": false,
    "allowAccess": true,
    "message": "dc.admin.ScriptRep.used_in_dynamic_cg"
  }
                
▼ Show full

Script is associated with Endpoint Analytics workflows and cannot be deleted

Copied!
  {
    "isUsedInDeploymentPolicy": false,
    "isUsedInEA": true,
    "isUsedInDynamicCustomGroup": false,
    "isUsedInConfig": false,
    "allowAccess": true,
    "message": "dc.admin.ScriptRep.used_in_ea"
  }
                
▼ Show full

Sample Response: HTTP 401

The API user does not have the role required for this operation

Copied!
  {
    "errorCode": 1001,
    "errorMsg": "Access denied - You are not allowed to access the requested resource."
  }
                
▼ Show full

Sample Response: HTTP 500

Unexpected server error during script deletion

Copied!
  {
    "errorCode": 1003,
    "errorMsg": "An Internal Error occurred, try again later."
  }
                
▼ 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.