With the “Update Group” REST API, we are able to add the user to a group, but we should be able to remove a user from the group.
Initially, I created a group “grouptest” and ran the Update group REST API by adding the ‘users1’ and ‘user2’
POST - http://localhost:8081/artifactory/api/security/groups/grouptest
{ "name": "grouptest", "description" : "Test for visa", "autoJoin" : "false", "adminPrivileges" : "false", *"userNames" : [ "user1", "user2"]* }The users were successfully added to the group.
When I ran the REST API again removing ‘user1’ from the payload the user still exists in the group.
POST - http://localhost:8081/artifactory/api/security/groups/grouptest
{ "name": "grouptest", "description" : "Test for visa", "autoJoin" : "false", "adminPrivileges" : "false", *"userNames" : [ "user2"]* }