指定した会社のすべてのグループを取得します。会社のグループを調べるには、管理者権限が必要です。
id,type,name
応答に含める属性のカンマ区切りリスト。このパラメータを使用すると、標準の応答には通常含まれないフィールドをリクエストできます。
このパラメータを指定すると、明示的に指定しない限り標準フィールドは応答に含まれず、リクエストしたフィールドのほかには、簡易版レプリゼンテーションのフィールドしか返されないことに注意してください。
1000
1000
返す項目の1ページあたりの最大数。
1000
0
応答が開始される項目のオフセット。
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)
}
}