Assigning an Agent

Use this command to assign agents to a manager in a redundant setup.

URL: http://<eG manager IP:port>/api/eg/orchestration/assignagents

Method: POST

Content-Type: application/json

Inputs to be Specified
Parameters Key values Example

Headers

managerurl: Base URL of the eG Manager i.e., http://<IP address of the eG console:Port>

user: eG username or domain/eG username

pwd: Base64 encoded password

{

"managerip":"192.168.8.191",

"agentname":"egdp119,egdp201"

}

Body

{

"managerip":"IP of the eG manager to which agents are to be assigned",

"agents":"comma-separated list of agents"

}

 

Success Response
Type Code Content

JSON

200

{

"Succeed": "one or more agents assigned successfully."

}

 

Failure Response
Type Code Content

JSON

401 UNAUTHORIZED

{

"Error": "One or more agents in not valid. Please give valid agent name."

}

Figure 1 : Assigning an agent to the eG manager in a redundant setup using Postman REST Client

Assigning an Agent using cURL

To assign an eG agent to an eG manager in a redundant setup through the REST API using cURL, the command should be specified in the following format:

curl --location --request POST "http://<eG Manager IP:Port>/api/eg/orchestration/assignagents" -H "managerurl:http://<eG Manager IP:Port>"-H "user:<eG username or domain/eG username>" -H "pwd:Base64 encoded password" -H "Content-Type: application/json" --data-raw "{'managerip':'IP address of the eG manager to which agents are to be assigned', 'agents':'Comma-separated list of agents'}"

Figure 2 shows an example of assigning the eG agent to an eG manager in a redundant setup using cURL.

Figure 2 : Assigning an agent to the eG manager in a redundant setup using cURL