Unmanaging a Component
To unmanage a component from the target environment, use this API.
URL: http://<eG manager IP:port>/api/eg/orchestration/unmanagecomponent
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: { "componenttype":"Oracle Database", "componentname":"oracleDB", "port":"1521", "sid":"egurkha" } Example with Default key values: { "componenttype":"Microsoft SQL", "componentname":"MSSQL", "port":"1433" } |
Body |
Default: { "componenttype":"component type", "componentname":"Nick name", "port":"Port", } Optional: { "sid":"SID" }
|
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 unmanaging 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 unmanaged successfully." } |
Type | Code | Content |
---|---|---|
JSON |
401 UNAUTHORIZED |
{ "Error": "Please enter the SID of the component." } |
Figure 1 : Unmanaging a component using Postman REST Client
Unmanaging a Component using cURL
To unmanage 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/unmanagecomponent" -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':'Nick name', 'port':'Port', 'sid':'SID'}"
Note that the command specified above contains both the Default and Optional key values. Figure 2 shows an example of unmanaging a component using cURL.