0

My question is simple, I'm trying to build a system to manage Users and Groups for each User, so in order to add a user to a group (or remove the user from a group) I need to know which groups this user belongs to in both sides. Otherwise I have to go through each group, check if the user exist there and perform the corresponding operation.

So I'd like to do:

external_groups = box_client.get_groups_for_user(@user)
internal_groups = @user.get_groups

#Add User to group
(internal_groups - external_groups).each{ |group_id|
   add_user_to_group(group_id)
}

#Remove User from group
(external_groups - internal_groups).each{ |group_id|
   remove_user_from_group(group_id)
}

Is there any API action that allows me to list which Groups a User belongs to in Box?

LuisVM
  • 2,763
  • 3
  • 20
  • 22
  • The v2 API doesn't support the concept of groups. Are you thinking of collaborations? – John Hoerr Jun 01 '13 at 00:21
  • Actually I integrated Groups with Box API V1, since it does support it... it's not in the docs but was wondering if there is an undocumented endpoint that allows you to list them? – LuisVM Jun 03 '13 at 18:11

1 Answers1

1

Groups support is not yet available in the V2 API but is something we're working on currently. There isn't a firm ETA at this time.

seanrose
  • 8,185
  • 3
  • 20
  • 21