I want to add bulk users to different different groups (creating group via Webscripts) uusing API service or Java based Web Script.
Thanks,
Pravin Gupta
Hi @PravinGupta,
Take a look at this solution - it might provide the basis for your own solution.
HTH
Hi @EddieMay ,
I think solution provided by you is similar to my requirement but what i want is to Create group if Group is not Present and to add user to that Group(Group present by default or Group newly Created). I think createGroup service is to be used here but how to combine my both statement to Create group if not present and to add user to it
Thanks,
Pravin
Hi @PravinGupta,
When you write, "i want is to Create group if Group is not Present" - you will have to do a group lookup as mentioned in that post I referred to -https://api-explorer.alfresco.com/api-explorer/#!/groups/listGroups. If the group doesn't exist, then you will have to create the group https://api-explorer.alfresco.com/api-explorer/#!/groups/createGroup. To add a person to your existing or new group - https://api-explorer.alfresco.com/api-explorer/#!/groups/createGroupMembership - here's the documentation.
Also look at this api - https://api-explorer.alfresco.com/api-explorer/#!/groups/listGroupMembershipsForPerson & this documentation to see if the user belongs to a group or groups.
In psuedo code:
if (!group exist) { create group add user to group } else if (!user member of group) { add user to group }
I think that might work. Caveat: Not tested!
HTH,
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.