Membership Sync of One Group
POST {{baseUrl}}/.api/api.svc/usergroups/:userGroupId/members/sync?rename={{$randomDepartment}}&originalids={{$randomUUID}}, {{$randomUUID}}, {{$randomUUID}}&ids={{$randomUUID}}, {{$randomUUID}}, {{$randomUUID}}
This endpoint updates membership in a specified group using the difference between two provided lists. This endpoint can be used to add or remove users, or to do both in a single call.
The originalids parameter is the list of users currently in the group, and the ids parameter is the list of users who should be in the group when the changes are complete. The difference between these two lists is what determines which users will be added and removed.
To only remove users, enter their user IDs in the originalids parameter, and leave the ids parameter blank. Since the ids in the originalids parameter do not appear in the ids parameter, they will be removed from the group.
To only add users, enter their user IDs in the ids parameter, and leave the originalids parameter blank. Since these users to not appear in the list of original users, they will be added to the group.
If you use both parameters, any users who appear in originalids but not in ids will be removed from the group, and any users who appear in ids but not in originalids will be added. Users who appear in both lists will not have any action taken.
Request Params
| Key | Datatype | Required | Description |
| rename
| string | | String
Rename the group to the given value (left unchanged if empty or not provided) |
| originalids
| string | | GUID
The list of GUIDs for users who are currently in the group. If a user is in this list and does not appear in the ids list, they will be removed from the group. |
| ids
| string | | GUID
List of user Ids for the updated membership list. If a user is in this list and not in the originalids list they will be added to the group. |
HEADERS
| Key | Datatype | Required | Description |
| Accept
| string | | The type of response data to request. By default this endpoint will respond with XML.
The options are:
- application/json
- application/xml |
RESPONSES
status: OK
{"minRequestPeriod":0,"requestSupportCode":637757144351403140,"dictionary":null,"response":{"__type":"userGroup:http://schemas.iglooplatform.com/Igloo.Old.Common","id":"{{$randomUUID}}","href":"","navType":0,"type":3,"communityId":"{{$randomUUID}}","name":"{{$randomDepartment}}","spaceId":"","numMembers":2,"ldapSynced":false,"spaceTitle":""}}