Retrieving Problem Distribution of Components

Use the URL specified below to retrieve the priority based problem distribution of the chosen components in the target environment using the eG REST API.

URL: http://<eG manager IP:port>/api/eg/analytics/getServerListProblemDistribution

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

{

componentList":"Microsoft SQL:TEZ-MSSQL-DB:1433,Oracle Database Server:Oradb123:1521:egora"

}

Body

Default:

{

"componentList":"comma-separated
list of ComponentType:
Component:Port/Null:SID",

}

 

Success Response
Type Code Content

JSON

200

{

"Microsoft SQL:TEZ-MSSQL-DB:1433": [

{

"date": "18/08",

"critical": "0",

"major": "0",

"minor": "0"

},

.

.

.

}

 

Failure Response
Type Code Content

JSON

401 UNAUTHORIZED

{"code": 401,"error": "Invalid username or password"}

JSON

400 BAD REQUEST

You may receive one of the following responses:

{"code": 400,"error": " Bad Request. Header parameters : Username or Password or Manager Url is missing"} (or)

{"code": 400,"error": " Bad Request. Manager Url,Username,password is not provided"} (or)

{"code": 400,"error": " Bad Request. Please refer EG REST API documentation and add required parameters for this API."} (or)

{"code": 400,"error": "Component List 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 priority based problem distribution of a chosen component using Postman REST Client

Retrieving Problem Distribution of Components using cURL

To retrieve the priority based problem distribution of the chosen components using cURL, the command should be specified in the following format:

curl -L -X POST "http://<eG Manager IP:Port>/api/eg/analytics/getServerListProblemDistribution" -H "user:<eG username or domain/eG username>" -H "pwd:Base64 encoded password" -H "managerurl:http://<eG Manager IP:Port>" -H"Content-Type:application/json" --data-raw "{\"componentList\":\"comma-separated list of ComponentType:Componentname:Port/Null:SID\"}

Figure 2 shows an example of retrieving the priority based problem distribution of the chosen component using cURL.

Figure 2 : Retrieving the priority based problem distribution of a chosen component using cURL