Retrieves all the members for a group. The user must have admin permissions to inspect enterprise's groups.
57645
The ID of the group.
1000
1000
The maximum number of items to return per page.
1000
0
The offset of the item at which to begin the response.
Returns a collection of membership objects. If there are no memberships, an empty collection will be returned.
An unexpected client error.
curl -X GET https://api.box.com/2.0/groups/57645/memberships \
-H 'Authorization: Bearer <ACCESS_TOKEN>'
BoxCollection<BoxGroupMembership> memberships = await client.GroupsManager
.GetAllGroupMembershipsForGroupAsync("11111");
BoxGroup group = new BoxGroup(api, id);
Iterable<BoxGroupMembership.Info> memberships = group.getAllMemberships();
for (BoxGroupMembership.Info membershipInfo : memberships) {
// Do something with the membership.
}
group_memberships = client.group(group_id='11111').get_memberships()
for membership in group_memberships:
print('{0} is a {1} of the {2} group'.format(membership.user.name, membership.role, membership.group.name))
client.groups.getMemberships('11111')
.then(memberships => {
/* memberships -> {
total_count: 2,
entries:
[ { type: 'group_membership',
id: '44444',
user:
{ type: 'user',
id: '22222',
name: 'Alice',
login: 'alice@example.com' },
group: { type: 'group', id: '11111', name: 'Employees' },
role: 'member' },
{ type: 'group_membership',
id: '55555',
user:
{ type: 'user',
id: '66666',
name: 'White Rabbit',
login: 'rabbit@example.com' },
group: { type: 'group', id: '11111', name: 'Employees' },
role: 'member' } ],
offset: 0,
limit: 100 }
*/
});
client.groups.listMembership(groupId: "12345") {
switch results {
case let .success(iterator):
for i in 1 ... 10 {
iterator.next { result in
switch result {
case let .success(membership):
print("Group Membership with ID \(membership.id) was retrieved")
case let .failure(error):
print(error)
}
}
}
case let .failure(error):
print(error)
}
}