Include Tests for Component

Use this API to include one/more tests for a component.

URL: http://<eG manager IP:port>/api/eg/orchestration/includetestsforcomponent

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 with Default key values:

{

"componenttype":"Active Directory",

"componentname":"actDir:389",

"testname":"AD Replications,Application Events."

}

Example with both Default and Optional Key Values:

{

"componenttype":"Active Directory",

"componentname":"actDir:389",

"testtype":"configuration",

"testname":"Operating System,Drives"

}

Body

Default:

{

"componenttype":"component type",

"componentname":Component name:Port number",

"testname":"comma-separated list of test names"

}

 

Optional:

{

"testtype":"performance/ configuration",

}

 

 

Success Response
Type Code Content

JSON

200

{

"Succeed": "Test(s) is/are included successfully."

}

 

Failure Response
Type Code Content

JSON

401 UNAUTHORIZED

{

"Error": "One or more tests are not available for this component type."

}

Including Tests for Component Using Postman REST Client

Figure 1 : Example to include one/more tests for a component using Postman REST Client

Including Tests for Component using cURL

To include one/more tests for a component through the REST API using cURL, the command should be specified in the following format:

curl --location --request POST "http://<eG Manager IP:Port>/api/eg/orchestration/includetestsforcomponent" -H "managerurl:http://<eG Manager IP:Port>" -H "user:<eG username or domain/eG username>" -H "pwd:Base64 encoded password" -H "Content-Type: application/json" --data-raw "{'componenttype':'component type', 'componentname':Component name:Port number', 'testname':'comma-separated list of test names', 'testtype':'performance/ configuration'}"

Note that the command specified above contains both the Default and Optional key values.

Figure 2 shows an example of including one/more tests for a component using cURL.

Including Tests for Component Using cURL

Figure 2 : Including one/more tests for a component using cURL