Retrieves all of the groups for a given enterprise. The user must have admin permissions to inspect enterprise's groups.
id,type,name
A comma-separated list of attributes to include in the response. This can be used to request fields that are not normally returned in a standard response.
Be aware that specifying this parameter will have the effect that none of the standard fields are returned in the response unless explicitly specified, instead only fields for the mini representation are returned, additional to the fields requested.
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 group objects. If there are no groups, an empty collection will be returned.
An unexpected client error.
curl -X GET https://api.box.com/2.0/groups \
-H 'Authorization: Bearer <ACCESS_TOKEN>'
BoxCollection<BoxGroup> groups = await client.GroupsManager.GetAllGroupsAsync();
Iterable<BoxGroup.Info> groups = BoxGroup.getAllGroups(api);
for (BoxGroup.Info groupInfo : groups) {
// Do something with the group.
}
groups = client.get_groups()
for group in groups:
print('Group "{0}" has ID "{1}"'.format(group.name, group.id))
client.groups.getAll()
.then(groups => {
/* groups -> {
total_count: 1,
entries: [ { type: 'group', id: '1786931', name: 'friends' } ],
limit: 100,
offset: 0 }
*/
});
client.groups.listForEnterprise() { results in
switch results {
case let .success(iterator):
for i in 1 ... 10 {
iterator.next { result in
switch result {
case let .success(group):
print("Group with name \(group.name) retrieved")
case let .failure(error):
print(error)
}
}
}
case let .failure(error):
print(error)
}
}