Modifying a Component
Use this API to modify the details of a component.
URL: http://<eG manager IP:port>/api/eg/orchestration/modifycomponent
Method: POST
Content-Type: application/json
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 both Default and Optional Key Values: { "hostip":"192.168.11.175", "componenttype":"Microsoft SQL", "componentname":"MSSQL", "oldcomponentname":"MSSQL", "newcomponentname":"MSSQL_DB", "newport":"1433" } Example with Default key values: { "componenttype":"Microsoft SQL", "componentname":"MSSQL", "port":"1433" } |
Body |
Default: { "hostip":"Host IP", "componentname":"The nick name of the component", "componenttype":"Component type" }
|
|
Optional: { "port":"Port", "oldhostip":"Old host IP", "newhostip":"New host IP", "oldcomponentname":"Old nick name", "newcomponentname":"New nick name", "oldport":"Old port", "newport":"New port" } |
Note:
If an Oracle Database server is added with multiple SIDs, then the eG Enterprise system will monitor each SID as a different Oracle Database server. Therefore, while removing an Oracle Database server that supports multiple SIDs, you cannot issue a single command to remove all the SIDs at one shot. Instead, this command should be invoked separately for each SID.
Type | Code | Content |
---|---|---|
JSON |
200 |
{ "Succeed": "Component has been modified successfully." } |
Type | Code | Content |
---|---|---|
JSON |
401 UNAUTHORIZED |
{ "Error": "The old component name or port does not exist." } |
Figure 1 : Example to modify the details of a component using Postman REST Client
Modifying a Component using cURL
To modify the details of 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/modifycomponent" -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': 'ComponentType', 'hostip': 'IP address of the component', 'componentname': 'nick name of the component', 'port': 'port at which the component listens', 'oldhostip':'Old host IP', 'newhostip':'New host IP', 'oldcomponentname':'Old nick name', 'newcomponentname':'New nick name', 'oldport':'Old port', 'newport':'New port'}"
Note that the command specified above contains both the Default and Optional key values. Figure 2 shows an example of modifying a component using cURL.