Unmanaging Components in Bulk

The components to be unmanaged should be included in a CSV file that is created exclusively for this purpose.

Such a CSV file should contain entries of the following format:

Element,action
Component,unmanage
componenttype,componentname,port,sid
<Component1 to be managed>
<Component2 to be managed>
.
.
.

For instance:

Element,action
Component,unmanage
componenttype,componentname,port,sid
Microsoft Windows,win1,,
AGate,agte10,3900,
Oracle Database,ora55,1521,multi

Note that the column names used in the CSV file are the same as the input parameters of the ‘unmanagecomponent’ command supported by the eG REST API.

Note:

  • Components included in a zone, segment, or service cannot be unmanaged.
  • If an Oracle database server with multiple SIDs is to be managed, then the entry for the Oracle server in your CSV file should not include a comma-separated list of SIDs; instead, you should provide a separate entry for each SID to be managed.
  • If one/more column names in your CSV file are not applicable to a component specification, then make sure that such columns are left empty in the specification.

Once the CSV file (let's say, the name of the file is unmanagecomponent.csv) is created on the eG manager, invoke the URL command mentioned in the below table from the eG REST API Client to update the eG manager with all the modifications contained in the CSV file.

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

Method: POST

Content-Type: multipart/form-data

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

{

"file": G:\unmanagecomponent.csv

}

Body

Default:

{

"file" : "Full path to the CSV file"

}

 

Success Response
Type Code Content

JSON

200

{

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

}

 

Failure Response
Type Code Content

JSON

401 UNAUTHORIZED

{

"Error": "Following component(s) could not be unmanaged.",

"Description": [

"The selected component does not exist. Component type :<Component Type>,Component name :<host name of the Component>",

"The selected component does not exist. Component type <Component Type>,Component name :<host name of the Component>",

"The selected component does not exist. Component type :<Component Type>,Component name :<host name of the Component>"

]

}

Figure 1 : Unmanaging Components in bulk using Postman REST Client

Unmanaging Components in Bulk using cURL

To unmanage components in bulk 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/bulk" -H "managerurl:http://<eG Manager IP:Port>" -H "user:<eG username or domain/eG username>" -H "pwd:Base64 encoded password" -H "Content-Type: multipart/form-data" --form "file=@ Full path to the CSV file"

Figure 2 shows an example of unmanaging components in bulk using cURL.

Figure 2 : Unmanaging components in bulk using cURL