Modify the metadata of an existing script

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

Updates the metadata of an existing script, such as its description, arguments, successful exit codes, and sharing setting. The script file itself is replaced through the Update Script File API.

Request URL

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

Scope

DesktopCentralCloud.Common.CREATECopied!

Header

Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52

Request Parameters

- Request Headers

Content-TypestringMandatory
application/scriptDetails.v1+jsonapplication/scriptDetails.v1+jsonCopied!
AcceptstringMandatory
application/updateScriptStatus.v1+jsonapplication/updateScriptStatus.v1+jsonCopied!

- Path Parameters

scriptIdstringMandatory

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

- Request Body

application/json
JSON Object
Hide Sub-Attributes
scriptFileJSON ObjectMandatory

The uploaded script file to register. Upload the file first (POST /emsapi/files) and pass the returned fileID here.

Show Sub-Attributes
fileIDlongMandatory

Identifier of the uploaded script file. Upload the file first (POST /emsapi/files) and pass the fileID returned by that call.

argumentsstringOptional

Default command-line arguments passed to the script when it runs. Masked in responses.

platformstringOptional

Operating system the script targets. Allowed values:
Windows
Mac
Linux

descriptionstringOptional

Free-text description of what the script does.

exitCodesstringOptional

Comma-separated list of exit codes to treat as success (e.g., "0,1"). Any other exit code marks the execution as failed.

scriptIDstringOptional

Existing script identifier. Omit when adding a new script.

Sample Request

Curl
Java
Python
Deluge
PowerShell
Copied!
curl --request POST \
  --url https://appdomains/dcapi/configuration/scriptRepository/{scriptId} \
  --header 'Accept: application/updateScriptStatus.v1+json' \
  --header 'Authorization: Zoho-oauthtoken  d92d4xxxxxxxxxxxxx15f52' \
  --header 'Content-Type: application/scriptDetails.v1+json' \
  --data '{"scriptFile":{"fileID":12345}}'

Sample Request Body

Modify a Windows script's arguments, description, and exit codes

Copied!
  {
    "scriptID": 67890,
    "description": "Updated script description",
    "exitCodes": "0,1,2",
    "arguments": "--timeout 30",
    "scriptFile": {
      "fileID": 12345
    },
    "platform": "Windows"
  }
                
▼ Show full

Response Parameters

- HTTP code 200

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

false when the user does not have permission to modify the script

accessDeniedReasonstring

Reason for access denial

- 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

User does not have permission to modify this script

Copied!
  {
    "accessDeniedReason": "createdByDifferentUser",
    "allowAccess": false
  }
                
▼ 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 modification

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.