Retrieving Configuration Changes

Using the eG REST API, administrators can figure out the configuration changes that were made to one/more components managed in the eG manager without logging into the eG console. The table below specifies the URL and the parameters that should be used to retrieve the health of the infrastructure.

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

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 to retrieve the configuration changes of the components managed in the target environment:

{

"filterBy":"component",

"timeline":"3 days"

}

Example to retrieve the configuration changes made to the components belonging to a zone:

{

"filterBy":"zone",

"zone":"SENTHIL-Oracle.Zone"

"timeline":"3 days"

}

Body

Default:

{

"filterBy":"zone/service/segment/component",

"zone":"Name of Zone",

"service":"Name of Service",

"segment":"Name of Segment",

"timeline":"Timeline for retrieving the data (in hours/days/weeks)"

}

 

Success Response
Type Code Content

JSON

200

{

"totalChanges": 5,

"details": [

{

"componentName": "Mic_AD_Cnct_ADDS_SEP1:443:Microsoft Azure AD Connect",

"changes": 1,

"changesIN": "Software"

},

{

"componentName": "Mic_AD_Cnct_ADFS_SEP1:443:Microsoft Azure AD Connect",

"changes": 1,

"changesIN": "Software"

},

{

"componentName": "Windows1:Microsoft Windows",

"changes": 1,

"changesIN": "Software"

},

{

"componentName": "Windows2:Microsoft Windows",

"changes": 1,

"changesIN": "Software"

},

{

"componentName": "ms_wndws_6PM_sep01:Microsoft Windows",

"changes": 1,

"changesIN": "Software"

}

]

}

 

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": "Provide a space between value and unit in Timeline"} (or)

{"code": 400,"error": "Invalid Timeline. Please refer EG REST API documentation for this API."} (or)

{"code": 400,"error": "filterBy is not provided"} (or)

{"code": 400,"error": "Invalid value for FilterBy"} (or)

{"code": 400,"error": "Service name is not available/ not associated with this user"} (or)

{"code": 400,"error": "Zone name is not available/ not associated with this user"} (or)

{"code": 400,"error": "Segment name is not available/ not associated with this user"}

JSON

500 Server Error

{"code": 500,"error": "Server Error. Please check /manager/logs/error_log in the installation directory for more informatio"}

Figure 1 : Retrieving configuration changes made to the components using Postman REST Client

Retrieving Configuration Changes using cURL

To retrieve the configuration changes that were made to one/more components managed in the eG manager using cURL, the command should be specified in the following format:

curl -L -X POST "http://<eG Manager IP:Port>/api/eg/analytics/getConfigurationChanges" -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 "{\"filterBy\":\"zone/service/segment/component\",\"zone\":\"Name of zone\",\"service\":\"Name of service\",\"segment\":\"Name of segment\",\"timeline\":\"Timeline for retrieving the data (in hours/days/weeks)\"}”

Figure 2 shows an example of retrieving the configuration changes made to the components managed in the target environment using cURL.

Figure 2 : Retrieving the configuration changes made to the components using cURL