Secrets Configuration

The config secret service enables you to add, delete, or update named secrets in the Control-M vault, which is a secure collection of name and value pairs of secrets.

For more information, see Secrets in Code.

The following API commands enable you to configure and manage secrets in the Control-M vault:

config secret::addLink copied to clipboard

The config secret::add command enables you to create a pair, which consists of named secret and value in the Control-M vault.

CLI Syntax

CopyCopied to clipboard
ctm config secret::add <name> <value>

The following table describes the config secret::add command parameters.

If annotation is enabled for the Scheduling definitions category in the Configuration domain, you must also provide an annotation to justify your action. For more information, see Annotation Input.

REST API Syntax

cURL:

CopyCopied to clipboard
curl -H "x-api-key: $token" -X POST -d "{\"name\":\"$name\",\"value\":\"$value\"}" "$endpoint/config/secret"

config secret::deleteLink copied to clipboard

The config secret::delete command enables you to delete a pair of named secret and value from the Control-M vault.

CLI Syntax

CopyCopied to clipboard
ctm config secret::delete <name>

Where name is the name of the secret.

If annotation is enabled for the Scheduling definitions category in the Configuration domain, you must also provide an annotation to justify your action. For more information, see Annotation Input.

REST API Syntax

cURL:

CopyCopied to clipboard
curl -H "x-api-key: $token" -X DELETE "$endpoint/config/secret/$name"

config secret::updateLink copied to clipboard

The config secret::update command enables you to update the value of the named secret in the Control-M vault.

CLI Syntax

CopyCopied to clipboard
ctm config secret::update <name> <value>

The following table describes the config secret::update command parameters.

If annotation is enabled for the Scheduling definitions category in the Configuration domain, you must also provide an annotation to justify your action. For more information, see Annotation Input.

REST API Syntax

cURL:

CopyCopied to clipboard
curl -H "x-api-key: $token" -X POST -d "{\"value\":\"$value\"}" "$endpoint/config/secret/$name"

config secrets::getLink copied to clipboard

The config secrets::get command enables you to get a list of names of defined secrets in the Control-M vault.

CLI Syntax

CopyCopied to clipboard
ctm config secrets::get

REST API Syntax

cURL:

CopyCopied to clipboard
curl -H "x-api-key: $token" "$endpoint/config/secrets"