Summary:
This article entails three calls:
- Modify user membership of a specified user group on a specified config set:
http(s)://{server hostname}/api/cfg/serverGroupConfig/{serverGroupId}/userGroups/{userGroupName} - Add users to a specified user group on a specified config set:
http(s)://{server hostname}/api/cfg/serverGroupConfig/{serverGroupId}/userGroups/{userGroupName}/members - Delete a user from a specified user group on a specified config set:
http(s)://{server hostname}/api/cfg/serverGroupConfig/{serverGroupId}/userGroups/{userGroupName}/members/{username}
Method summary
- PUT Method - modifies the user membership of a user group on a config set.
- POST Method - add users to a specified user group on a specified config set.
- DELETE Method - delete a user from a specified user group on a specified config set.
PUT Method detail
Modifies the user membership of a user group on a config set.
Request:
Name | Description |
---|---|
userGroupName |
name of the user group for which the membership is to be modified. |
members |
list the users who will now become members of this user group. This list overwrites the previous users in the user group. |
errorCode |
code for the change outcome, e.g. 'Success'. |
errorDetails |
details of an error, if applicable. |
configurationChangeId |
ID of the current configuration change, referred to in the table under the Sync History tab on the Multi-Server Configuration page. Each time a config set is updated, the set gains a new configuration change ID. This ID is an auto-incrementing number. |
serverGroupId |
ID of the config set. |
timestampSec |
timestamp of the change. |
modifiedBy |
user who made the change. |
Example:
INPUT
curl -u admin:admin -k https://localhost/api/cfg/serverGroupConfig/82e7c418-cd48-4fbf-857b-cddb475841a2/userGroups/Administrators -X PUT -H 'content-type:application/json'
{
"userGroupName" : "24",
"members" : [ "kim1", "admin", "super1" ]
}'
OUTPUT
{
"errorCode" : "SUCCESS",
"errorDetails" : null,
"data" : {
"configurationChangeId" : 100,
"serverGroupId" : "82e7c418-cd48-4fbf-857b-cddb475841a2",
"timestampSec" : 1677587075,
"modifiedBy" : "admin"
}
}
POST Method detail
Add users to a specified user group on a specified config set.
Request:
Specify the username and password of the user to be added.
Response:
'SUCCESS' when successfully added.
Example:
INPUT
curl -u admin:admin https://localhost/api/cfg/serverGroupConfig/82e7c418-cd48-4fbf-857b-cddb475841a2/userGroups/usergroup1/members?media=json -X POST -H "content-type:application/json" -d \
{
"username" : "guy9"
"password" : "supersecret"
}'
OUTPUT
{
"errorCode" : "SUCCESS",
"errorDetails" : null,
"data" : {
"configurationChangeId" : 79,
"serverGroupId" : "82e7c418-cd48-4fbf-857b-cddb475841a2",
"timestampSec" : 1677514827,
"modifiedBy" : "admin"
}
}
DELETE Method detail
Deletes a user from a specified user group on a specified config set
Response:
'SUCCESS' when successfully deleted.
Example:
INPUT
curl -u admin:admin https://localhost/api/cfg/serverGroupConfig/82e7c418-cd48-4fbf-857b-cddb475841a2/userGroups/userGroup1/members/guy9?media=json -X DELETE
OUTPUT
{
"errorCode": "SUCCESS",
"errorDetails": "user 'guy9' removed"
}
Comments
0 comments
Please sign in to leave a comment.