Associating Elements to User

Using this API, administrators can associate elements (i.e., zones or segments) to a user.

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/associateelementstouser

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:

{

"userid":"john",

"elementtype":"zone",

"components":"sen_Zone,sen_ORACLE.Zone"

}

Body

Default:

{

"userid":"User ID",

"elementtype":"zone/segment",

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

}

 

Success Response
Type Code Content

JSON

200

{

"Succeed": "One or more elements have been associated successfully."

}

 

Failure Response
Type Code Content

JSON

401 UNAUTHORIZED

{

"Error": "Given elements have been already associated."

}

Figure 1 : Example to associate elements to a user using Postman REST Client

Associating Elements to User using cURL

To associate elements to a user 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/associatecomponentstouser" -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 "{'userid':'User ID', 'elementype':'zone/segment', 'elements':'comma-separated list of zones/segments'}"

Figure 2 shows an example of associating elements to a user using cURL.

Figure 2 : Associating elements to a user using cURL