Summary:
List servers currently assigned to a specified config set, and add and remove servers from a config set.
URL:
http(s)://{server hostname}/api/cfg/serverGroupMembership/{serverGroupId}
POST Method detail - add a server to a config set
POST Method detail - remove a server from a config set
Methods summary
- GET Method - lists servers currently assigned to a specified config set.
- POST Method - add a server to a config set.
- POST Method - remove a server from a config set.
GET Method detail
Lists servers currently assigned to a specified config set.
Response:
Name | Description |
---|---|
serverId |
unique server identifier. |
serverGroupId |
config set ID. |
count |
number of servers assigned to the config set. |
Example:
INPUT
curl -u admin:admin https://localhost/api/cfg/serverGroupMembership/bb816bfa-4f95-4337-9618-de220e055905?media=json
OUTPUT
{
"items" : [ {
"serverId" : "8acd818b-e0e7-4e8f-83d5-20070c942d3a",
"serverGroupId" : "bb816bfa-4f95-4337-9618-de220e055905",
}, {
"count" : 1
}
POST Method detail - add a server to a config set
Add a server to a config set.
Request:
Specify the server(s) to be added using the 'membersAdded' parameter, listing the serverId.
Response:
Success or error. An error may arise if the server that is being added to the config set already belongs to another config set. Please see 'Config Sets - Force Control of Server' to force control of servers in this case.
Example:
INPUT
curl -u admin:admin https://localhost/api/cfg/serverGroupMembership/82e7c418-cd48-4fbf-857b-cddb475841a2?media=json -X POST -H "content-type:application/json" -d \
{
"membersAdded": [ "8acd818b-e0e7-4e8f-83d5-20070c942d3a" ]
}'
OUTPUT
{"code":412,"reasonPhrase":"Precondition Failed","description":"Error modifying Entuity Server Group membership: serverId=8acd818b-e0e7-4e8f-83d5-20070c942d3a, errorCode=ERROR_OPERATION_FAILURE. Server is already controlled: controllingServer=SOARQUIST, controllingGroup=Kim1"}
POST Method detail - remove a server from a config set
Remove a server from a config set.
Request:
Specify the server(s) to be removed using the 'membersRemoved' parameter, listing the serverId.
Example:
INPUT
curl -u admin:admin https://localhost/api/cfg/serverGroupMembership/82e7c418-cd48-4fbf-857b-cddb475841a2?media=json -X POST -H "content-type:application/json" -d \
{
"membersRemoved": [ "d176aa00-d3d4-4ba1-9409-b480858f7a4d" ]
}'
OUTPUT
{
"items" : [ ],
"count" : 0
}
Comments
0 comments
Please sign in to leave a comment.