PUT Extensions Scripts

The PUT /Extensions/Scripts method is used to update a script. This method returns HTTP 200 OK on a success 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. to the PUT method.

Table 429: 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 method (see GET Extensions Scripts) 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 430: 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.

Tip:  See the Keyfactor API Reference and Utility which provides a utility through which the Keyfactor APIClosed A set of functions to allow creation of applications. Keyfactor offers the Keyfactor API, which allows third-party software to integrate with the advanced certificate enrollment and management features of Keyfactor Command. endpoints can be called and results returned. It is intended to be used primarily for validation, testing and workflowClosed A workflow is a series of steps necessary to complete a process. In the context of Keyfactor Command, it refers to the workflow builder, which allows you automate event-driven tasks when a certificate is requested or revoked. development. It also serves secondarily as documentation for the API. The link to the Keyfactor API Reference and Utility is in the dropdown from the help icon () at the top of the Management Portal page next to the Log Out button.