Skip to main content

Replace a user's group memberships

PUT 

/tap/api/v3/groups/user/:userId/memberships

Sets the complete set of groups a user belongs to. The user is added to each listed group they are not in, and removed from each group they are in that is not listed, so an empty groupIds removes every membership. Every group to be added is checked before any membership changes, so a 404 changes nothing. Each new membership stores a copy of the user's fullName, email, and userRole. A membership that cannot be saved or removed is skipped without an error. Unlike POST /tap/api/v3/groups/{groupId}/members, a server ID is accepted, so a server can be made a group member. Requires the admin role.

Request​

Responses​

The memberships were updated.