Retrieving Details of Components Associated with a User
To retrieve the details of the components such as the Component Type to which each component belongs to, count of components, name of the components and their severity for each user logged into eG Enterprise, administrators can use the eG REST API. The URL can be specified in the following format:
URL: http://<eG manager IP:port>/api/eg/analytics/getComponentsDetails
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 |
{ "total": 54, "summary": [ { "critical": 37, "color": "#cd0f0f" }, { "major": 1, "color": "#fa9d1c" }, { "minor": 7, "color": "#ccc100" }, { "unknown": 3, "color": "#30a1d9" }, { "normal": 6, "color": "#0c9a12" } ], "details": [ { "eG Agent": [ { "componentName": "172.16.10.90", "priority": "critical" }, { "componentName": "C2112TS2DDC1", "priority": "critical" }, { "componentName": "C2112TS2SF", "priority": "critical" }, { "componentName": "C2112TS2XA2", "priority": "critical" } ] }, { "Citrix License": [ { "componentName": "C2112TS2DDC1:27000", "priority": "critical" } ] }, { "Citrix Delivery Controller 7.x": [ { "componentName": "C2112TS2DDC1:80", "priority": "critical" }, { "componentName": "CTXCONNECTSRV:80", "priority": "critical" } ] }, . . . ] } |
Type | Code | Content |
---|---|---|
JSON |
401 UNAUTHORIZED |
{"code": 401,"error": "Invalid username or password"} |
JSON |
400 BAD REQUEST |
{"code": 400,"error": "Bad Request. Header parameters : Username or Password or Manager URL is missing"} (or) {"code": 400,"error": "Bad Request. Header parameters : Manager URL, Username or Password is not provided"} |
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 details of the components associated with a user using Postman REST Client
Retrieving Details of Components Associated with Users using cURL
To retrieve the details of the components associated with a user logged into eG Enterprise using cURL, the command should be specified in the following format:
curl -L -X POST "http://<eG Manager IP:Port>/api/eg/analytics/getComponentsDetails" -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 details of all the components associated with a user using cURL.
Figure 2 : Retrieving the details of all the components associated with a user using cURL