Include Components for Test

Use this API to include one/more components for a test.

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

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":"2X Client Gateway",

"componentname":"client_1:80,client_2:80",

"testname":"2X Gateway Status"

}

Example with both Default and Optional Key Values:

{

"componenttype":"2X Client Gateway",

"componentname":"client_1:80,client_2:80",

"testtype":"configuration",

"testname":"Drives"

}

Body

Default:

{

"componenttype":"component type",

"componentname":"comma-separated list of component names:Port number",

"testname":"Test name"

}

 

Optional:

{

"testtype":"performance/ configuration",

}

 

 

Success Response
Type Code Content

JSON

200

{

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

}

 

Failure Response
Type Code Content

JSON

401 UNAUTHORIZED

{

"Error": "One or more component names do not exist."

}

Figure 1 : Example to include one/more components for a test using Postman REST Client

Include Components for Test using cURL

To include one/more components for a test 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/includecomponentsfortest" -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':'comma-separated list of component names:Port number', 'testname':'Test name', 'testtype':'performance/configuration'}"

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

shows an example of including one/more components for a test using cURL.

Figure 2 : Including one/more components for a test using cURL