Agent Configuration

The following API commands enable you to configure an Agent:

config server:agent::add

The config server:agent::add command enables you to add an Agent to a specific Control-M/Server. This allows the Control-M/Server to run jobs on the host where the Agent is installed. Also, it verifies the connectivity between the Control-M/Server and the Agent.

CLI Syntax

Copy
ctm config server:agent::add <server> <host> <port> [tag] [-f <configuration file>]

The following table describes the config server:agent::add command parameters.

Parameter

Description

server

Name of Control-M/Server.

host

Name of host or alias of the Agent. This will be registered in the Control-M/Server as the logical name of the Agent.

port

Number of port for communication from Control-M/Server to Agent.

Valid Values: 1025–65535. For example, 7006.

tag

9.0.20.000 (Optional) A tag associated with the Agent, used in Role-Based Administration (RBA)

Tags can contain alphanumeric characters, as well as the underscore character, and can be up to 85 characters long.

  • You can, alternatively, include this parameter in the configuration file.

  • This parameter is available only if your Control-M/EM Server is of version 9.0.20 or higher.

configuration file

(Optional) Defines the path to a JSON file that contains additional parameters, as in the following example:

Copy
{
   "persistentConnection": true,
   "sslState": "Enabled",
   "tag": "abc_12345",
   "agentType": "Agent"
}

For details of the parameters that you can include in the configuration file, see the next table.

The following table describes additional config server:agent::add command parameters that you can include in the configuration file:

Parameter

Description

persistentConnection

Creates a permanent connection between Control-M/Server and Agent for a firewall environment.

Valid Values:

  • true

  • false

Default: false

sslState

Determines whether the Secure Socket Layer (SSL) protocol is used to encrypt the communication between the Control-M/Server and the Control-M/Agent:

  • Default: Default SSL state, as defined in the Control-M/Server.

  • Enabled: SSL is enabled.

  • Disabled: SSL is disabled.

Default: Default

This parameter is available only if your Control-M/EM Server is of version 9.0.20 or higher.

tag

Agent tag, as described above.

agentType

Determines the type of Agent to add to the Control-M/Server:

  • Agent: A regular Control-M/Agent

  • LoadBalancer: A Network Load Balancer Router, which automatically routes jobs to the required Agent based on a pre-defined configuration

Default: Agent

If annotation is enabled for the Configuration Management category in Control-M, you must also provide an annotation to justify your action. For more information, see Annotation Input.

REST API Syntax

cURL:

Copy
server=controlm
host=myhost
port=7006
AuthHeader="x-api-key: $token"
# AuthHeader="Authentication: Bearer $token"  #for a session token

curl -H "$AuthHeader" -H "Content-Type: application/json" -X POST
-d "{\"host\":\"$host\",\"port\":\"$port\",\"tag\":\"abc_12345\",\"sslState\":\"Default\"}"
"$endpoint/config/server/$server/agent"

To determine the correct AuthHeader value—"Authentication: Bearer $token" or "x-api-key: $token"—see Authentication Tokens.

config server:agent::update

The config server:agent::update command enables you to update one of the parameters in the configuration of the Control-M/Agent, as registered to the Control-M/Server.

CLI Syntax

Copy
ctm config server:agent::update <server> <agent> <name> <value> [-f <json file>]

The following table describes the config server:agent::update command parameters.

Parameter

Description

server

Defines the name of the Control-M/Server.

agent

Defines the hostname or alias of the Agent. This is the logical name of the Agent.

name

Defines the name of the parameter that you want to update.

For a list of parameters that you can update, see the next table.

value

Defines a new value for the parameter.

json file

(Optional) Defines the path to a JSON file that contains the parameter name and value.

You can use this JSON file instead of specifying the parameter name and value in the command line.

The following sample JSON content sets a new value for the maximumRetries parameter:

Copy
{
    "name": "maximumRetries",
    "value": "9"
}

 

The following table describes the Agent parameters that are supported by the config server:agent::update and config server:agent::test API commands.

Agent Parameter

Description

communicationTimeout

Determines the maximum number of seconds that Control-M/Server attempts to connect to the Agent before the Agent is set to Unavailable.

Values: 30–65534

Default: 120

maximumRetries

Determines the number of times that the Control-M/Server attempts to connect to the Agent before the Agent is set to Unavailable.

Value range: 1–100

persistentConnection

Determines whether to connect to a specific Agent with either a persistent or transient connection.

  • Y: Persistent connection.

  • N: Transient connection.

Default: N

sessionIdleTimeout

Determines the maximum number of seconds that a session can be idle before the Control-M/Server terminates it.

Value range: 30–86400

Default: 900

maximumDisconnectTime

Determines the maximum number of seconds that the Control-M/Server allows an Agent to be disconnected before it initiates a session.

Value range: 30–86400

Default: 300

serverToAgentPortNumber

Determines the port number that receives data from the Control-M/Server to the Control-M/Agent.

Value range: 1025–65535

Default: 7006

unavailabilityShoutUrgency

Defines the urgency level of a message sent with high priority when an Agent has an Unavailable status.

Urgent messages are sent with a special indication so that the recipient of the message is aware of the urgency.

  • R: Regular

  • U: Urgent

  • V: Very urgent.

Default: R

allowAgentDisconnection

Determines if the current connection to this Agent can be disconnected when the maximum number of concurrent sessions is reached.

Allowing a persistent connection on an Agent to disconnect requires the connection to be reestablished before communication with the Agent can continue. If you run time-sensitive jobs on the Control-M/Agent, you might want to set this parameter to N.

  • Y: Allow disconnection.

  • N: Do not allow disconnection.

Default: Y

communicationProtocolVersion

Determines the version of the protocol for communication between Control-M/Server and the Agent.

Valid Values: 12–14, where 14 is the most recent protocol version.

avalibleAgentCheckInterval

Determines the number of seconds between status checks for Agent communication with theControl-M/Server.

If you decrease the default value, it might impact Control-M/Server performance.

Value range: 30–65534

Default: 7,200 (2 hours)

unavalibleAgentRetryInterval

Determines the number of seconds between attempts to communicate with an Agent computer whose status is Unavailable.

If you decrease the default value, it might impact Control-M/Server performance.

Value range: 30–65534

Default: 90

sslState

Determines whether the Secure Socket Layer (SSL) protocol is used to encrypt the communication between the Control-M/Server and the Control-M/Agent:

  • Default: Default SSL state, as defined in the Control-M/Server.

  • Enabled: SSL is enabled.

  • Disabled: SSL is disabled.

Default: Default

tag

Defines a logical name that is used to label specific Agents into a group with specific authorizations.

Valid Characters: A–Z, a–z, 0–9, ‘_’.

If annotation is enabled for the Configuration Management category in Control-M, you must also provide an annotation to justify your action. For more information, see Annotation Input.

REST API Syntax

cURL:

Copy
server=controlm
agent=myHost
name=maximumRetries
value=10
AuthHeader="x-api-key: $token"
# AuthHeader="Authentication: Bearer $token"  #for a session token

curl -H "$AuthHeader" -H "Content-Type: application/json" -X POST 
-d "{\"name\":\"$name\", \"value\":\"$value\"}" "$endpoint/config/server/$server/agent/$agent/update"

To determine the correct AuthHeader value—"Authentication: Bearer $token" or "x-api-key: $token"—see Authentication Tokens.

config server:agent::test

The config server:agent::test command enables you to test the connectivity of a Control-M/Agent to a Control-M/Server.

As part of the connectivity test, you can submit a configuration file that contains Agent parameter settings, to simulate new values for Agent parameters during the Agent connectivity test.

This command requires Control-M/EM version 9.0.21.200 or later.

CLI Syntax

Copy
ctm config server:agent::test <server> <agent> [-f <configuration file>]

The following table describes the config server:agent::test command parameters.

Parameter

Description

server

Defines the name of the Control-M/Server.

agent

Defines the hostname or alias of the Agent. This is the logical name of the Agent.

This can also be the name of a Load Balancer Router.

configuration file

(Optional) Defines the path to a JSON file that contains new Agent parameter values for simulation during the Agent connectivity test.

The following sample JSON content simulates new values for two parameters during the Agent connectivity test:

Copy
{
    "parameters": [
        {
            "name": "serverToAgentPortNumber",
            "value": 7005,
            "type": "PARAM"
        },
        {   
            "name": "maximumRetries",
            "value": 20,
            "type": "PARAM"
        }
    ]
}

For each parameter that you include in the configuration file, you must provide the parameter name, the value to set for the parameter, and the parameter type (always PARAM).

For details of the Agent parameters that you can include in the configuration file for simulation during the Agent connectivity test, see the table that appears in the description of the config server:agent::update API command. For the parameters of a Load Balancer Router, see the table that appears in the description of the config server:loadbalancer::update API command.

REST API Syntax

cURL:

Copy
server=controlm
agent=myHost
AuthHeader="x-api-key: $token"
# AuthHeader="Authentication: Bearer $token"  #for a session token

curl -H "$AuthHeader" -H "Content-Type: application/json" -X POST 
-d "{\"name\":\"maximumRetries\", \"value\":\"20\", \"type\":\"PARAM\"}"
-d "{\"name\":\"serverToAgentPortNumber\", \"value\":\"7005\", \"type\":\"PARAM\"}"
"$endpoint/config/server/$server/agent/$agent/test"

To determine the correct AuthHeader value—"Authentication: Bearer $token" or "x-api-key: $token"—see Authentication Tokens.

config server:agent::delete

The config server:agent::delete command enables you to delete an Agent from the Control-M/Server database, which removes the Agent from a Control-M/Server, without shutting the Agent down.

CLI Syntax

Copy
ctm config server:agent::delete <server> <agent>

The following table describes the config server:agent::delete command parameters.

Parameter

Description

server

Name of Control-M/Server.

agent

Host name or alias of the Agent. This is the logical name of the Agent.

This can also be the name of a Load Balancer Router.

If annotation is enabled for the Configuration Management category in Control-M, you must also provide an annotation to justify your action. For more information, see Annotation Input.

REST API Syntax

cURL:

Copy
server=controlm
agent=myhost
AuthHeader="x-api-key: $token"
# AuthHeader="Authentication: Bearer $token"  #for a session token

curl -H "$AuthHeader" -X DELETE "$endpoint/config/server/$server/agent/$agent"

To determine the correct AuthHeader value—"Authentication: Bearer $token" or "x-api-key: $token"—see Authentication Tokens.

config server:agent::ping

The config server:agent::pingcommand enables you to check if the Agent is available.

CLI Syntax

Copy
ctm config server:agent::ping <server> <agent> [-f <configuration file>]

The following table describes the config server:agent::ping command parameters.

Parameter

Description

server

Name of Control-M/Server.

agent

Name of Agent.

configuration file

(Optional) JSON file that contains additional parameters.

The following is a list of the additional parameters that can be used in the configuration file:

Copy
{
   "discover": true,
   "timeout":60
}

The following table describes additional config server:agent::ping command parameters.

Parameter

Description

discover

When true, the Agent is added to the Control-M/Server when the ping status is unavailable.

Valid Values:

  • true

  • false

Default: false

timeout

Maximum time (in seconds) to wait for a ping response.

Default: 60

REST API Syntax

cURL:

Copy
server=controlm
agent=quickstart
AuthHeader="x-api-key: $token"
# AuthHeader="Authentication: Bearer $token"  #for a session token

curl -X POST -H "$AuthHeader" -H "Content-Type: application/json" -d "{\"discover\": false, \"timeout\":60}" "$endpoint/config/server/$server/agent/$agent/ping"

To determine the correct AuthHeader value—"Authentication: Bearer $token" or "x-api-key: $token"—see Authentication Tokens.

config server:agents::get

The config server:agents::get command enables you to get a list of all Agents registered to the Control-M/Server, along with basic details about each Agent. You can optionally filter the list for Agents that match a specific pattern.

CLI Syntax

Copy
ctm config server:agents::get <server> ["agent=<agent_pattern>"]

The following table describes the config server:agents::get command parameters.

Parameter

Description

server

Name of Control-M/Server.

agent_pattern

(Optional) Filter the list to include only Agents that match a specified pattern. Use * for wildcards.

  • "Agent*"

  • "*Agent*"

REST API Syntax

cURL:

Copy
server=controlm
AuthHeader="x-api-key: $token"
# AuthHeader="Authentication: Bearer $token"  #for a session token

curl -H "$AuthHeader" "$endpoint/config/server/$server/agents?agent=Agent*1*"

To determine the correct AuthHeader value—"Authentication: Bearer $token" or "x-api-key: $token"—see Authentication Tokens.

Response

For each agent, the following details are provided: node ID, status (Available, Unavailable, Disabled, or Discovering), a list of host groups to which the Agent is associated, product version, and host operating system. The following example shows the details returned for each agent:

Copy
{
  "agents": [
    {
      "nodeid": "myAgent",
      "status": "Available",
      "hostgroups": [
        "group1",
        "group2",
        "group3"
      ],
      "version": "9.0.21.000",
      "operatingSystem": "Microsoft Windows Server 2016  (Build 14393)"
    }
  ]
}

config server:agent::disable

The config server:agent::disable command enables you to disable the Agent from the Control-M/Server. New jobs cannot run on the Agent.

CLI Syntax

Copy
ctm config server:agent::disable <server> <agent>

The following table describes the config server:agent::disable command parameters.

Parameter

Description

server

Name of Control-M/Server.

agent

Name of Agent.

This can also be the name of a Load Balancer Router.

If annotation is enabled for the Configuration Management category in Control-M, you must also provide an annotation to justify your action. For more information, see Annotation Input.

REST API Syntax

cURL:

Copy
AuthHeader="x-api-key: $token"
# AuthHeader="Authentication: Bearer $token"  #for a session token

curl -X POST -H "$AuthHeader" "$endpoint/config/server/$server/agent/$agent/disable"

To determine the correct AuthHeader value—"Authentication: Bearer $token" or "x-api-key: $token"—see Authentication Tokens.

config server:agent::enable

The config server:agent::enable command enables you to enable jobs to run on the Agent after it was disabled.

CLI Syntax

Copy
ctm config server:agent::enable <server> <agent>

The following table describes the config server:agent::enable command parameters.

Parameter

Description

server

Name of Control-M/Server.

agent

Name of Agent.

This can also be the name of a Load Balancer Router.

REST API Syntax

cURL:

Copy
AuthHeader="x-api-key: $token"
# AuthHeader="Authentication: Bearer $token"  #for a session token

curl -X POST -H "$AuthHeader" "$endpoint/config/server/$server/agent/$agent/enable"

To determine the correct AuthHeader value—"Authentication: Bearer $token" or "x-api-key: $token"—see Authentication Tokens.

config server:agent::analysis

The config server:agent::analysis command enables you to get Agent Communication Analysis data, for troubleshooting purposes. The returned report includes the following sections:

  • Basic Agent communication information.

  • Agent Tests: Results from several Agent analyses, including host resolution, connectivity, and ping tests to the Agent host and from the Control-M/Server to the Agent.

  • Unavailability History: A list of timestamps when the Agent changed status and became unavailable.

You must have Control-M/EM version 9.0.21 or higher to run this command.

CLI Syntax

Copy
ctm config server:agent::analysis <server> <agent>

The following table describes the config server:agent::analysis command parameters.

Parameter

Description

server

Name of Control-M/Server.

agent

Name of Agent.

REST API Syntax

cURL:

Copy
AuthHeader="x-api-key: $token"
# AuthHeader="Authentication: Bearer $token"  #for a session token

curl -X POST -H "$AuthHeader" "$endpoint/config/server/$server/agent/$agent/analysis"

To determine the correct AuthHeader value—"Authentication: Bearer $token" or "x-api-key: $token"—see Authentication Tokens.

config server:loadbalancer::get

The config server:loadbalancer::get command enables you to get a detailed list of parameters defined for a Load Balancer Router. The Load Balancer Router enables load balancing between Control-M/Agents and routes jobs to Agents.

The output is returned in JSON format. You can use this output as a template when you use the config server:loadbalancer::update command to set new values for Load Balancer parameters.

This command requires Control-M/EM version 9.0.21.200 or later.

CLI Syntax

Copy
ctm config server:loadbalancer::get <server> <loadbalancer>

The following table describes the config server:loadbalancer::get command parameters.

Parameter

Description

server

Defines the name of the Control-M/Server.

loadbalancer

Defines the name of a Load Balancer Router.

REST API Syntax

cURL:

Copy
server=controlm
loadbalancer=myLoadBalancerHost
AuthHeader="x-api-key: $token"
# AuthHeader="Authentication: Bearer $token"  #for a session token

curl -H "$AuthHeader" "$endpoint/config/server/$server/loadbalancer/$loadbalancer"

To determine the correct AuthHeader value—"Authentication: Bearer $token" or "x-api-key: $token"—see Authentication Tokens.

config server:loadbalancer::update

The config server:loadbalancer::update command enables you to update parameters in the configuration of a Load Balancer Router, as registered to a Control-M/Server. The Load Balancer Router enables load balancing between Control-M/Agents and routes jobs to Agents.

This command requires Control-M/EM version 9.0.21.200 or later.

CLI Syntax

Copy
ctm config server:loadbalancer::update <server> <loadbalancer> -f <configuration file>

The following table describes the config server:loadbalancer::update command parameters.

Parameter

Description

server

Defines the name of the Control-M/Server.

loadbalancer

Defines the name of a Load Balancer Router.

configuration file

Defines the path to a JSON file that contains new parameter values for the Load Balancer Router.

The following sample JSON contains the details of two Load Balancer parameters:

Copy
{
    "parameters": [
        {
            "name": "unavailabilityShoutUrgency",
            "value": "U",
            "type": "PARAM"
        },
        {   
            "name": "maximumRetries",
            "value": 20,
            "type": "PARAM"
        }
    ]
}

For each parameter that you include in the configuration file, you must provide the parameter name, the value to set for the parameter, and the parameter type (always PARAM).

You can use the output of config server:loadbalancer::get as a template for your configuration file.

For details of the Load Balancer parameters that you can include in the configuration file, see the next table.

If annotation is enabled for the Configuration Management category in Control-M, you must also provide an annotation to justify your action. For more information, see Annotation Input.

The following table describes the Load Balancer parameters that are supported by the config server:loadbalancer::update API command. These parameters are also supported by the config server:agent::test API command, when used to test the connection with a Load Balancer Router.

Agent Parameter

Description

serverToAgentPortNumber

Determines the port number that receives data from the Control-M/Server to the Control-M/Agent.

Valid Values: 1025-65535

Default: 7006

sslState

Determines whether the Secure Socket Layer (SSL) protocol is used to encrypt the communication between the Control-M/Server and the Control-M/Agent:

  • Default: Default SSL state, as defined in the Control-M/Server.

  • Enabled: SSL is enabled.

  • Disabled: SSL is disabled.

Default: Default

unavailabilityShoutUrgency

Defines the urgency level of a message sent with high priority when an Agent has an Unavailable status.

Urgent messages are sent with a special indication so that the recipient of the message is aware of the urgency.

  • R: Regular

  • U: Urgent

  • V: Very urgent.

Default: R

avalibleAgentCheckInterval

Determines the number of seconds between status checks for Agent communication with theControl-M/Server.

If you decrease the default value, it might impact Control-M/Server performance.

Value range: 30–65534

Default: 7200 (2 hours)

unavalibleAgentRetryInterval

Determines the number of seconds between attempts to communicate with an Agent computer whose status is Unavailable.

If you decrease the default value, it might impact Control-M/Server performance.

Value range: 30–65534

Default: 90

communicationTimeout

Determines the maximum number of seconds that Control-M/Server attempts to connect to the Agent before the Agent is set to Unavailable.

Values: 30–65534

Default: 120

maximumRetries

Determines the number of times that the Control-M/Server attempts to connect to the Agent before the Agent is set to Unavailable.

Value range: 1–100

Default: 12

REST API Syntax

cURL:

Copy
server=controlm
loadbalancer=myLoadBalancerHost
AuthHeader="x-api-key: $token"
# AuthHeader="Authentication: Bearer $token"  #for a session token

curl -H "$AuthHeader" -H "Content-Type: application/json" -X PUT 
-d "{\"name\":\"maximumRetries\", \"value\":\"20\", \"type\":\"PARAM\"}"
-d "{\"name\":\"unavailabilityShoutUrgency\", \"value\":\"U\", \"type\":\"PARAM\"}"
"$endpoint/config/server/$server/loadbalancer/$loadbalancer"

To determine the correct AuthHeader value—"Authentication: Bearer $token" or "x-api-key: $token"—see Authentication Tokens.

config item::recycle

The config item::recycle command enables you to recycle a specific Control-M component. Use this command to restart a component to solve server issues. You can use this command to recycle Agents or services.

CLI Syntax

Copy
ctm config item::recycle <id>

The following table describes the config item::recycle command parameters.

Parameter

Description

id

The ID of the component that you want to recycle. This ID has the following syntax:

  • (For an Agent) "<type>:<host>:<name>".

  • (For a Service) "<type>:<host>:<name>:<extension>".

The ID is composed of the following elements:

  • type: One of the following types of Control-M components:

    • CTMS:Agent

    • CTMS:Service

  • host: The name of the machine that hosts the Control-M component. For an Agent, this is the name of the Control-M/Server.

  • name: The logical name of the Control-M component. For an Agent, this is the host name or alias of the Agent.

  • extension: The service extension.

REST API Syntax

cURL:

Copy
id="CTMS:Agent:controlm:myAgent"
AuthHeader="x-api-key: $token"
# AuthHeader="Authentication: Bearer $token"  #for a session token

curl -H "$AuthHeader" -X POST "$endpoint/config/item/$id/recycle"

To determine the correct AuthHeader value—"Authentication: Bearer $token" or "x-api-key: $token"—see Authentication Tokens.

config server:hostRestrictions::get

The config server:hostRestrictions::get command enables you to get all the Agent (Host) Restrictions for a Control-M/Server.

Agent (Host) Restrictions enables you to restrict the resources used and the number of concurrent jobs that you can execute on one or more Agents. This helps prevent resource overload.

CLI Syntax

Copy
ctm config server:hostRestrictions::get <server>

where server is the name of the Control-M/Server.

REST API Syntax

cURL:

Copy
server=controlm
AuthHeader="x-api-key: $token"
# AuthHeader="Authentication: Bearer $token"  #for a session token

curl -H "$AuthHeader" "$endpoint/config/server/$server/hostRestrictions"

To determine the correct AuthHeader value—"Authentication: Bearer $token" or "x-api-key: $token"—see Authentication Tokens.

config server:hostRestriction::add

The config server:hostRestriction::add command enables you to add an Agent (Host) restriction to an Agent.

Agent (Host) Restrictions enables you to restrict the resources used and the number of concurrent jobs that you can execute on one or more Agents. This helps prevent resource overload.

CLI Syntax

Copy
ctm config server:hostRestriction::add <server> <nodePrefix> <maxJobsAllowed> <maxCPUPct>

The following table describes the config server:hostRestriction::add command parameters.

Parameter

Description

server

Defines the name of the Control-M/Server.

nodePrefix

Defines the name of the Agent where the host restrictions are added.

maxJobsAllowed

Determines the maximum number of jobs that can concurrently execute.

Valid Values:

  • UNLIMITED

  • 1–999,999

maxCPUPct

Determines the maximum percentage of CPU usage that the Agents can utilize.

Valid Values:

  • UNLIMITED

  • 1–100

REST API Syntax

cURL:

Copy
server=controlm
AuthHeader="x-api-key: $token"
# AuthHeader="Authentication: Bearer $token"  #for a session token

curl -H "$AuthHeader" -H "Content-Type: application/json" -X POST \
-d "{\"nodePrefix\":\"ctm21200\",\"maxJobsAllowed\":\"UNLIMITED\",\"maxCPUPct\":\"80\"}" \
"$endpoint/config/server/$server/hostRestriction"

To determine the correct AuthHeader value—"Authentication: Bearer $token" or "x-api-key: $token"—see Authentication Tokens.

config server:hostRestriction::update

The config server:hostRestriction::update command enables you to update the Agent (Host) restrictions on an Agent.

CLI Syntax

Copy
ctm config server:hostRestriction::update <server> <nodePrefix> <maxJobsAllowed> <maxCPUPct>

The following table describes the config server:hostRestriction::update command parameters.

Parameter

Description

server

Defines the name of the Control-M/Server.

nodePrefix

Defines the name of the Agent where host restrictions are updated.

maxJobsAllowed

Determines the maximum number of jobs that can concurrently execute.

Valid Values:

  • UNLIMITED

  • 1–999,999

maxCPUPct

Determines the maximum percentage of CPU usage that the Agents can utilize.

Valid Values:

  • UNLIMITED

  • 1–100

REST API Syntax

cURL:

Copy
server=controlm
AuthHeader="x-api-key: $token"
# AuthHeader="Authentication: Bearer $token"  #for a session token

curl -H "$AuthHeader" -H "Content-Type: application/json" -X PUT \
-d "{\"nodePrefix\":\"ctm21200\",\"maxJobsAllowed\":\"UNLIMITED\",\"maxCPUPct\":\"80\"}" \
"$endpoint/config/server/$server/hostRestriction"

To determine the correct AuthHeader value—"Authentication: Bearer $token" or "x-api-key: $token"—see Authentication Tokens.

config server:hostRestriction::delete

The config server:hostRestriction::delete command enables you to remove all the Agent (Host) restrictions on one or more Agents.

CLI Syntax

Copy
ctm config server:hostRestriction::delete <server> <nodePrefixes>

The following table describes the config server:hostRestriction::delete command parameters.

Parameter

Description

server

Defines the name of the Control-M/Server.

nodePrefixes

Defines a CSV list of one or more Agents where all host restrictions are removed.

REST API Syntax

cURL:

Copy
server=controlm
nodePrefixes = "agent1,agent2"
AuthHeader="x-api-key: $token"
# AuthHeader="Authentication: Bearer $token"  #for a session token

curl -H "$AuthHeader" -X DELETE "$endpoint/config/server/$server/hostRestriction?nodePrefix=$nodePrefixes"

To determine the correct AuthHeader value—"Authentication: Bearer $token" or "x-api-key: $token"—see Authentication Tokens.