PUT Extensions Scripts

The PUT /Extensions/Scripts operation updates a script stored in the database. Scripts are used for certificate requests, SSHClosed The SSH (secure shell) protocol provides for secure connections between computers. It provides several options for authentication, including public key, and protects the communications with strong encryption. alerts, and workflows, and are stored in the Keyfactor Command database to ensure they are securely managed and accessed only with appropriate permissions. On success, the operation returns HTTP 200 OK with  details of the updated script record.

Tip:  The following permissions (see Security Roles and Claims) are required to use this feature:

/scripts/modify/

Note:  You cannot change the name of a script once it has been created, so that field is not available as an input parameterClosed A parameter or argument is a value that is passed into a function in an application..

Table 551: PUT Extensions Scripts Input Parameters

Name In Description
id Body Required.  An integer indicating the Keyfactor Command reference ID for the script.

Use the GET Extensions Scripts operation to retrieve a list of all the scripts to determine the ID.

Contents

Body

A JSON-escaped string containing the contents of the script on a single line. If the contents field is not provided or is an empty string, the field will be ignored. (The contents of a script in the database cannot be cleared.)

Tip:  See POST Extensions Scripts for examples of creating and handling this string.
Categories Body

Required.  An array of either integers or case-sensitive strings indicating which category or categories the script applies to. The category of a script cannot be changed if it is in use in any alerts or workflows of that category. ClosedShow possible category values.

Tip:  The list of categories provided will completely replace any previously supported categories for the script. However, you cannot remove a category if the script is configured to be used by that category. You can add additional categories to a script that is already in use by select categories by including the existing categories in the parameter entry and adding any others as desired.

Table 552: PUT Extensions Scripts Response Data

Name Description
id An integer indicating the Keyfactor Command reference ID for the script.
Name A string indicating the user-defined name of the script. The name of a script cannot be changed once posted.

Contents

A JSON-escaped string containing the contents of the script on a single line.

Categories

An array of either integers or case-sensitive strings indicating which category or categories the script applies to. The category of a script cannot be changed if it is in use in any alerts or workflows of that category. ClosedShow possible category values.