Displaying the Hosts Managed in the Target Environment
Use this API to display the hosts that are managed in the target environment.
URL: http://<eG manager IP:port>/api/eg/orchestration/showmanagedhosts
Method: POST
Content-Type: application/json
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: { "agentname":"192.168.11.136" } Example with Default and Optional Key values: { "agentname":"ext12" "agenttype":" External agent" } |
Body |
Default: { "agentname":"Agent name" } |
|
Optional: { "agenttype":"External agent/Remote agent" } |
Note that the agentname key value is case-sensitive.
Type | Code | Content |
---|---|---|
JSON |
200 |
{ "managedHosts": [ "Esx_14", "mobilecollector", "network_10", "Rds_196", "Vdi_113", "windows1" ] } |
Figure 1 : Displaying the hosts managed in the target environment using Postman REST Client
Displaying the Hosts Managed in the Target Environment using cURL
To display the hosts managed in the target environment 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/showmanagedhosts" -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 "{'agentname':'Agent name', 'agenttype':'External agent/Remote agent'}"
Note that the command specified above contains both the Default and Optional key values. Figure 2 shows an example of displaying the hosts managed in the target environment using cURL.
Figure 2 : Displaying the hosts managed in the target environment using cURL