Managing Components

Administrators can use this API to manage components in eG Enterprise.

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

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":"Microsoft SQL",

"componentname":"MSSQL",

"port":"1433"

}

Example with both Default and Optional Key Values:

{

"componenttype":"Oracle Database Server",

"componentname":"Oradb",

"port":"1521",

"sid":"egora"

}

Body

Default:

{

"componentname":"The nick name of the component",

"componenttype":"Component type",

"port":"Port"

}

 

Optional:

{

"sid":"SID"

}

 

 

Success Response
Type Code Content

JSON

200

{

"Succeed": "Component has been managed successfully."

}

 

Failure Response
Type Code Content

JSON

401 UNAUTHORIZED

{

"Error": "The selected component does not exist."

}

Figure 1 : Example to manage components using Postman REST Client

Managing Components using cURL

To manage 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/managecomponent" -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 "{'componentname':'The nick name of the component', 'componenttype':'Component type', 'port':'Port', 'sid':'SID'}"

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

Figure 2 shows an example of managing a component using cURL.

Figure 2 : Managing a component using cURL