Retrieving Test Data

Using the eG REST API, administrators can retrieve the measurement data collected upon execution of tests across all relevant component types. The table below specifies the parameters that should be used to retrieve the measures of the tests.

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

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

{

"test":"TCP Port Status",

"host":"sql",

"port":"1433",

"lastmeasure":"true",

"startDate":"2020-01-29 18:00:26",

"endDate":"2020-01-29 18:15:03"

}

Body

Default:

{

"test":"Test name",

"host":"Host name",

"port":"Port",

"info":"info"

}

Optional:

{

"lastmeasure":"true/false",

"startDate":"start date",

"endDate":"End date",

"measures":"comma-separated list of measures",

"msmthost":"Measurement Host",

"type":"dd",

"segment":"Segment name",

"service":"Service name",

"searchhost":"Search Host",

"searchinfo":"Search info",

"groupby":"measure",

"orderby":"Ascending/Descending",

"dateformat":"Date format",

}

 

Success Response
Type Code Content

JSON

200

[

"TRGT_HOST PORT_NO SITE_NAME INFO MSMT_HOST MSMT_TIME AVAILABLE AVAILABLE_ST RESP_TIME RESP_TIME_ST TCP_CONN_AVAIL TCP_CONN_AVAIL_ST TCP_CONN_TIME TCP_CONN_TIME_ST SVR_RESP_TIME SVR_RESP_TIME_ST CONTENT_VAL CONTENT_VAL_ST RESP_CODE RESP_CODE_ST CONTENT_LEN CONTENT_LEN_ST DATA_XFER_TIME DATA_XFER_TIME_ST DNS_AVAILABILITY DNS_AVAILABILITY_ST DNS_RESP_TIME DNS_RESP_TIME_ST ",

"TEZWIN19O365 80 NULL +HomePage 172.16.14.93 2022-04-25 14:02:29 0 NONE -1.0000 NONE -5 NONE -1.0000 NONE -1.0000 NONE -1 NONE 0 NONE -5.0000 NONE -1.0000 NONE 0.0000 NONE -5.0000 NONE",

"TEZWIN19O365 80 NULL +HomePage 172.16.14.93 2022-04-25 14:07:14 0 NONE -1.0000 NONE -5 NONE -1.0000 NONE -1.0000 NONE -1 NONE 0 NONE -5.0000 NONE -1.0000 NONE 0.0000 NONE -5.0000 NONE",

"TEZWIN19O365 80 NULL +HomePage 172.16.14.93 2022-04-25 14:12:20 0 NONE -1.0000 NONE -5 NONE -1.0000 NONE -1.0000 NONE -1 NONE 0 NONE -5.0000 NONE -1.0000 NONE 0.0000 NONE -5.0000 NONE",

"TEZWIN19O365 80 NULL +HomePage 172.16.14.93 2022-04-25 14:16:56 0 NONE -1.0000 NONE -5 NONE -1.0000 NONE -1.0000 NONE -1 NONE 0 NONE -5.0000 NONE -1.0000 NONE 0.0000 NONE -5.0000 NONE",

"TEZWIN19O365 80 NULL +HomePage 172.16.14.93 2022-04-25 14:22:09 0 NONE -1.0000 NONE -5 NONE -1.0000 NONE -1.0000 NONE -1 NONE 0 NONE -5.0000 NONE -1.0000 NONE 0.0000 NONE -5.0000 NONE",

"TEZWIN19O365 80 NULL +HomePage 172.16.14.93 2022-04-25 14:26:46 0 HIGH -1.0000 GOOD -5 GOOD -1.0000 GOOD -1.0000 GOOD -1 UNKNOWN 0 GOOD -5.0000 GOOD -1.0000 GOOD 0.0000 HIGH -5.0000 GOOD",

.

.

.

]

 

Failure Response
Type Code Content

JSON

401 UNAUTHORIZED

{"code": 401,"error": "Unauthorized user"}

JSON

500 Server Error

{"code": 500,"error": " Server Error "}

Figure 1 : Retrieving measurement data of a test using Postman REST Client

Retrieving Test Data using cURL

To retrieve the measurement data collected upon execution of tests across all relevant component types using cURL, the command should be specified in the following format:

curl -location -request POST "http://<eG Manager IP:Port>/api/eg/analytics/getTestData" -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 "{\"test\":\"test name\"}

Figure 2 shows an example cURL command for retrieving the measurement data that is reported by eG Enterprise by monitoring all the components in the target environment.

Figure 2 : An example cURL command to retrieve the measurement data of the test

Figure 3 shows a sample output that retrieves the measurement data of a chosen test reported by eG Enterprise using cURL.

Figure 3 : Sample output with the measurement data of a test across all monitored component types