server-client-python icon indicating copy to clipboard operation
server-client-python copied to clipboard

[TYPE 1] Add bulk removal for users from groups

Open tkonsta opened this issue 1 year ago • 3 comments

Summary

Please add the operation that is already supported by the API to bulk remove users from a group.

Description

The API endpoint PUT /api/api-version/sites/site-id/groups/group-id/users/remove (see https://help.tableau.com/current/api/rest_api/en-us/REST/rest_api_ref_users_and_groups.htm#remove_user_to_group ) allows to specify a list of users in the request body and all of them are removed from the group with only one API call. It would be nice to have this functionality in the Python library as well so we don't need to loop over the users one by one to remove them from a group.

tkonsta avatar Jun 26 '24 12:06 tkonsta

Work in progress.

jorwoods avatar Jun 27 '24 14:06 jorwoods

Great to see you're working on this @jorwoods and thank you!

One remark, since I've just checked the PR you opened: So far you only consider the bulk user addition/removal to the site as far as I see. It would be great, if you could also support the endpoint for bulk group assignments (add/remove users from group) which is available from API version 3.21 as described in the docs of the endpoint I linked above in the issue description.

tkonsta avatar Jun 28 '24 14:06 tkonsta

Ah, you're right. Yeah, I misread the issue name as site instead of group. I'll try to add the bulk group edits sometime soon.

jorwoods avatar Jun 28 '24 15:06 jorwoods