Retrieving Details of Components Managed in the target environment
The eG REST API can be used to retrieve all the components managed in the eG Manager along with their respective Component Types. For this, specify the URL in the following format:
URL: http://<eG manager IP:port>/api/eg/miscservice/getComponentMapping
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 |
Not Applicable |
Type | Code | Content |
---|---|---|
JSON |
200 |
[ { "componentType": "O365 Synthetic Monitor", "components": [ "SYNO365" ] }, { "componentType": "Microsoft Exchange Online", "components": [ "OFFICE-365_exo" ] }, { "componentType": "Microsoft Office 365", "components": [ "OFFICE-365_365" ] }, { "componentType": "Microsoft OneDrive for Business", "components": [ "OFFICE-365_odb" ] }, { "componentType": "Microsoft SharePoint Online", "components": [ "OFFICE-365_spo" ] }, { "componentType": "Microsoft Teams", "components": [ "OFFICE-365_mtm" ] }, { "componentType": "Microsoft Yammer", "components": [ "OFFICE-365_ymr" ] }, . . . } ] |
Type | Code | Content |
---|---|---|
JSON |
401 UNAUTHORIZED |
{"code": 401,"error": "Invalid username or password."} |
JSON |
500 Server Error |
{"code": 500,"error": "Server Error. Please check /manager/logs/error_log in the installation directory for more information."} |
Figure 1 : Retrieving the components corresponding to all Component Types using Postman REST Client
Retrieving Details of Components Managed in the target environment using cURL
To retrieve the components corresponding to all component types managed in the target environment using cURL, the command should be specified in the following format:
curl -L -X POST "http://<eG Manager IP:Port>/api/eg/miscservice/getComponentMapping" -H "user:<eG username or domain/eG username>" -H "pwd:Base64 encoded password" -H "managerurl:http://<eG Manager IP:Port>"
Figure 2 shows an example for retrieving the components corresponding to all component types managed in the target environment using cURL.
Figure 2 : Retrieving the components corresponding to all Component Types using cURL