Skip to content

Latest commit

 

History

History
47 lines (33 loc) · 1.29 KB

groups.md

File metadata and controls

47 lines (33 loc) · 1.29 KB

Groups

Groups are sets of users that can be used in collaborations.

Get All Groups

Calling the static getAllGroups(BoxAPIConnection) will return an iterable that will page through all of the user's groups.

Iterable<BoxGroup.Info> groups = BoxGroup.getAllGroups(BoxAPIConnection api);
for (BoxGroup.Info groupInfo : groups) {
    // Do something with the group.
}

Create a Group

The static createGroup(BoxAPIConnection, String) method will let you create a new group with a specified name.

BoxGroup.Info groupInfo = BoxGroup.createGroup(api, "My Group");

Delete a Group

A group can be deleted by calling the delete() method.

BoxGroup group = new BoxGroup(api, "id");
group.delete();