Adding a Zone

Use this API to add a zone to the eG manager.

Note:

A few key values of the Body parameter are optional. These optional key values are mentioned separately in the below table.

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

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 both Default and Optional key values:

{

"zonename":"eastzone",

"elements":"IIS Web:web_ 2:80,group:dbgroup",

"displayimage":"Web",

"autoassociate":"yes"

}

Example with Default key values:

{

{

"zonename":"westzone",

"elements":"IIS Web:web_2:80",

}

Body

Default:

{

"zonename":"Zone name",

"elements":"comma-separated list of elements"

}

Optional:

{

"displayimage":"Display image",

"autoassociate":"yes/no"

}

 

Success Response
Type Code Content

JSON

200

{

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

}

 

Failure Response
Type Code Content

JSON

401 UNAUTHORIZED

{

"Error": "One or more elements do not exist or not available to associate. Invalid elements"

}

Adding Zone Using Postman REST Client

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

Adding a Zone using cURL

To add components 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/addzone" -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', 'elements':'comma-separated list of 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 adding a zone using cURL.

Adding Zone Using cURL

Figure 2 : Adding a zone using cURL