Modifying a Zone

Administrators can use this API to modify the details of a zone created in eG Enterprise.

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

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

{

"zonename":"westzone",

"displayimage":"Banking",

"disassociateelements":"Microsoft SQL:MSSQL_DB:1433"

}

Body

Default:

{

"zonename":"Zone name"

}

Optional:

{

"associateelements":"Elements",

"disassociateelements":"Elements",

"displayimage":"Display image",

"autoassociate":"yes/no"

}

 

Success Response
Type Code Content

JSON

200

{

"Succeed": "Zone has been modified successfully."

}

 

Failure Response
Type Code Content

JSON

401 UNAUTHORIZED

{

"Error": "One or more invalid elements to associate. Invalid elements"

}

Figure 1 : Example to modify a zone using Postman REST Client

Modifying a Zone using cURL

To modify the details of a zone 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/modifyzone" -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 "{'zonename':'Zone name', 'associateelements':'Elements', 'disassociateelements':'Elements', 'displayimage':'Display image', 'autoassociate':'yes/no'}"

Note that the command specified above contains both the Default and Optional key values. Figure 2 shows an example of modifying a zone using cURL.

Figure 2 : Modifying a zone using cURL