Groups
Manage groups and their memberships.
List all groups
Returns every group, sorted by name (ignoring case). Requires the admin role.
Create a group
Creates a new group. Requires the admin role.
Get a group
Returns a single group by its identifier. Requires the admin role.
Update a group
Updates a group. Only the fields present in the request body are changed. Requires the admin role.
Delete a group
Deletes a group and all of its memberships. Requires the admin role.
List group members
Returns the members of a group. Requires the admin role. Members with the super_admin role are included only for a super_admin caller.
Add members to a group
Adds one or more users to a group. Every ID is checked before any membership is written, so a 400, 403, or 404 response adds no one. Users already in the group are skipped. Each membership stores a copy of the user's fullName, email, and userRole. Requires the admin role.
Remove a member from a group
Removes a user from a group. Requires the admin role.
List a user's groups
Returns the groups a user belongs to, sorted by name (ignoring case). An unknown user ID returns an empty list. Allowed for an admin or the user themselves.
List my groups
Returns the groups the authenticated user belongs to, sorted by name (ignoring case).