Adding/Removing Users from a Group

The DataReportive API provides endpoints to manage group membership, allowing you to add and remove users from groups. These operations require appropriate authentication and permissions. Both adding and removing users accept a list of user IDs in the request body.

Adding Users
POST /api/v1/groups/[GROUP ID]/add_users/

Removing
POST /api/v1/groups/[GROUP ID]/remove_users/
or
DELETE /api/v1/groups/[GROUP ID]/remove_users/

Required fields:

usersA list of User IDs (e.g [22,24]).

Adding Users to a Group example

curl 'https://acmeinc.datareportive.com/api/v1/groups/1/add_users/' \
            -X POST \
            -H 'Authorization: Token [ TOKEN ]' \
            -H 'Content-Type: application/json' \
            -d '{"users":[1,2]}'
                                        

Remove Users to a Group example

curl 'https://acmeinc.datareportive.com/api/v1/groups/1/remove_users/' \
            -X POST \
            -H 'Authorization: Token [ TOKEN ]' \
            -H 'Content-Type: application/json' \
            -d '{"users":[1,2]}'