Domino Developer Network

New Group Management API

You may use HTTP commands to programmatically add or remove members within a group. These commands are processed immediately by an agent on your hosting server. You can use these commands within your user registration process or any other applications that require group management. For increased security the HTTP commands may only be called from code running on our hosting severs (you cannot call them from outside our network). Member names may contain spaces and other special characters which require encoding. You may use either "ISO-8859-1", "UTF-8" or "Shift_JIS" encoding formats ("ISO-8859-1" covers most Western languages). If your group exceeds 500 members, the system will automatically generate sub-groups for you.

Example Function
The following LotusScript function may be used in your own scripts to both add and remove members from a group.

Function ModifyGroup (cmd As String, groupid As String, member As String) As Boolean Dim s As New NotesSession, url As String eval = Evaluate(|@URLEncode("ISO-8859-1";"| + member + |")|) url = "http://api.dominodeveloper.net/" + cmd + "/groupid=" + groupid +_ "&member=" + eval(0) ModifyGroup = Cbool(s.CurrentDatabase.GetDocumentByURL(url,True).body) End Function


Adding a member to a group
Calling the function above returns TRUE if a member has been successfully added or already exists within a group.

result = ModifyGroup ("addMember","CE2097AA453AB12088257070003A1F41","Test User/ORG")


Removing a member from a group
Calling the function above returns TRUE if a member has been successfully removed from a group.

result = ModifyGroup ("removeMember","CE2097AA453AB12088257070003A1F41","Test User/ORG")