简体   繁体   中英

Removing a user from a specific user group

I need to make a call on the BOX API to remove a user from a group. I looked at the BOX API documentation - https://developer.box.com/v2.0/reference#delete-a-group-membership . The RESTful call is:

DELETE https://api.box.com/2.0/group_memberships/group_membership_id

However, it does not tell me how to remove a user from a specific group . Is this possible? If yes, what is the API call?

I think that by deleting membership, you're deleting the user form the group.

This is an example of how a group membership looks like:

[
        {
            "type": "group_membership",
            "id": "1560354",
            "user": {
                "type": "user",
                "id": "13130406",
                "name": "Alison Wonderland",
                "login": "alice@gmail.com"
            },
            "group": {
                "type": "group",
                "id": "119720",
                "name": "family"
            },
            "role": "member"
        }
    ]

So, by calling https://api.box.com/2.0/group_memberships/1560354 you would remove user Alison Wonderland form the group family

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM