Adding External Agents

Use this REST API to add external agents to the target eG manager.

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

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

Example with Default key values:

{

"hostip":"192.168.8.191",

"agentname":"egdp119"

}

Example containing both Default and Optional key values:

{

"hostip":"192.168.8.191",

"agentname":"egdp119",

"clientemulation":"yes"

}

Body

Default:

{

"hostip":"IP address of the component",

"agentname":"Agent name"

}

Optional:

{

"clientemulation":"yes/no"

}

 

Success Response
Type Code Content

JSON

200

{

"Succeed": "External agent has been added successfully."

}

 

Failure Response
Type Code Content

JSON

401 UNAUTHORIZED

{

"Error": "Space is not allowed in component name/agent name."

}

Figure 1 : Example to add an external agent using Postman REST Client

Adding External Agents using cURL

To add external agents 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/addexternalagent" -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 "{ 'hostip': 'IP address of the component', 'agentname': 'Agent name', 'clientemulation': 'yes/no'}"

Note that the command specified above contains both Default and Optional key values.

Figure 2 shows an example of adding external agents using cURL.

Figure 2 : Adding an external agent using cURL