Groups

A Group is a powerful tool for permissions and user management on Files.com. Users can belong to multiple groups.

All permissions can be managed via Groups, and Groups can also be synced to your identity platform via LDAP or SCIM.

Files.com's Group Admin feature allows you to define Group Admins, who then have access to add and remove users within their groups.

List Groups

SDK Function

Group.list()

Return Object

ListIterator<Group>

Authorization Requirement

Requires either a Site-Wide API key or User API key or session from a User with Folder Admin permissions.

Function Arguments

ArgumentDescription
ids
string
Comma-separated list of group ids to include in results.
include_parent_site_groups
boolean
Include groups from the parent site.

Additional Arguments

Example Request

import com.files.ListIterator;
import com.files.exceptions.*;
import com.files.exceptions.ApiErrorException.*;
import com.files.models.Group;

try {
  HashMap<String, Object> parameters = new HashMap<>();
  parameters.put("include_parent_site_groups", false);
  
  ListIterator<Group> groups = Group.list(parameters);
  for (Group group : groups.listAutoPaging()) {
    // Operate on group
  }
} catch (NotAuthenticatedException e) {
  System.out.println("Authentication Error Occurred (" + e.getClass().getName() + "): " + e.getMessage());
} catch (SdkException e) {
  System.out.println("Unknown Error Occurred (" + e.getClass().getName() + "): " + e.getMessage());
}

Show Group

SDK Function

Group.find()

Return Object

Group

Authorization Requirement

Requires either a Site-Wide API key or User API key or session from a User with Folder Admin permissions.

Function Arguments

ArgumentDescription
id
int64
Required
Group ID.

Example Request

import com.files.exceptions.*;
import com.files.exceptions.ApiErrorException.*;
import com.files.models.Group;

try {
  HashMap<String, Object> parameters = new HashMap<>();
  Group group = Group.find(id, parameters);
  // Operate on group
} catch (NotAuthenticatedException e) {
  System.out.println("Authentication Error Occurred (" + e.getClass().getName() + "): " + e.getMessage());
} catch (SdkException e) {
  System.out.println("Unknown Error Occurred (" + e.getClass().getName() + "): " + e.getMessage());
}

Create Group

SDK Function

Group.create()

Return Object

Group

Authorization Requirement

Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.

Function Arguments

ArgumentDefaultDescription
notes
string
Group notes.
user_ids
string
A list of user ids. If sent as a string, should be comma-delimited.
admin_ids
string
A list of group admin user ids. If sent as a string, should be comma-delimited.
ai_assistant_personality_id
int64
AI Assistant Personality ID assigned to this Group, if any. Users in the Group inherit it unless a direct per-user or Partner assignment overrides it.
ftp_permission
boolean
falseIf true, users in this group can use FTP to login. This will override a false value of ftp_permission on the user level.
sftp_permission
boolean
falseIf true, users in this group can use SFTP to login. This will override a false value of sftp_permission on the user level.
dav_permission
boolean
falseIf true, users in this group can use WebDAV to login. This will override a false value of dav_permission on the user level.
restapi_permission
boolean
falseIf true, users in this group can use the REST API to login. This will override a false value of restapi_permission on the user level.
desktop_configuration_profile_id
int64
Desktop Configuration Profile ID assigned to this Group, if any. Users in the Group inherit it unless a direct per-user assignment overrides it.
integration_centric_profile_id
int64
Integration Centric Profile ID assigned to this Group, if any. Users in the Group inherit it unless a direct per-user assignment overrides it.
allowed_ips
string
A list of allowed IPs if applicable. Newline delimited
name
string
Required
Group name.
workspace_id
int64
0Workspace ID

Example Request

import com.files.exceptions.*;
import com.files.exceptions.ApiErrorException.*;
import com.files.models.Group;

try {
  HashMap<String, Object> parameters = new HashMap<>();
  parameters.put("name", "name");
  
  Group group = Group.create(parameters);
  // Operate on group
} catch (NotAuthenticatedException e) {
  System.out.println("Authentication Error Occurred (" + e.getClass().getName() + "): " + e.getMessage());
} catch (SdkException e) {
  System.out.println("Unknown Error Occurred (" + e.getClass().getName() + "): " + e.getMessage());
}

Update Group

SDK Function

group.update();

Return Object

Group

Authorization Requirement

Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.

Attribute Setters

SetterDescription
setNotes
string
Group notes.
setUserIds
string
A list of user ids. If sent as a string, should be comma-delimited.
setAdminIds
string
A list of group admin user ids. If sent as a string, should be comma-delimited.
setAiAssistantPersonalityId
int64
AI Assistant Personality ID assigned to this Group, if any. Users in the Group inherit it unless a direct per-user or Partner assignment overrides it.
setFtpPermission
boolean
If true, users in this group can use FTP to login. This will override a false value of ftp_permission on the user level.
setSftpPermission
boolean
If true, users in this group can use SFTP to login. This will override a false value of sftp_permission on the user level.
setDavPermission
boolean
If true, users in this group can use WebDAV to login. This will override a false value of dav_permission on the user level.
setRestapiPermission
boolean
If true, users in this group can use the REST API to login. This will override a false value of restapi_permission on the user level.
setDesktopConfigurationProfileId
int64
Desktop Configuration Profile ID assigned to this Group, if any. Users in the Group inherit it unless a direct per-user assignment overrides it.
setIntegrationCentricProfileId
int64
Integration Centric Profile ID assigned to this Group, if any. Users in the Group inherit it unless a direct per-user assignment overrides it.
setAllowedIps
string
A list of allowed IPs if applicable. Newline delimited
setName
string
Group name.

Example Request

import com.files.exceptions.*;
import com.files.exceptions.ApiErrorException.*;
import com.files.models.Group;

try {
  // Find the group object by its id.
  Group group = Group.find(id, null);
  HashMap<String, Object> parameters = new HashMap<>();
  parameters.put("notes", "example");
  group.update(parameters);
} catch (NotAuthenticatedException e) {
  System.out.println("Authentication Error Occurred (" + e.getClass().getName() + "): " + e.getMessage());
} catch (SdkException e) {
  System.out.println("Unknown Error Occurred (" + e.getClass().getName() + "): " + e.getMessage());
}

Delete Group

SDK Function

group.delete();

Return Object

No return value.

Authorization Requirement

Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.

Example Request

import com.files.exceptions.*;
import com.files.exceptions.ApiErrorException.*;
import com.files.models.Group;

try {
  // Find the group object by its id.
  Group group = Group.find(id, null);
  group.delete(null);
} catch (NotAuthenticatedException e) {
  System.out.println("Authentication Error Occurred (" + e.getClass().getName() + "): " + e.getMessage());
} catch (SdkException e) {
  System.out.println("Unknown Error Occurred (" + e.getClass().getName() + "): " + e.getMessage());
}

The Group Object

Some of the functions above return a Group object. The attributes of this object are listed below.

AttributeDescription
id
int64
Group ID
name
string
Group name
allowed_ips
string
A list of allowed IPs if applicable. Newline delimited
admin_ids
string
Comma-delimited list of user IDs who are group administrators (separated by commas)
notes
string
Notes about this group
user_ids
string
Comma-delimited list of user IDs who belong to this group (separated by commas)
usernames
string
Comma-delimited list of usernames who belong to this group (separated by commas)
ai_assistant_personality_id
int64
AI Assistant Personality ID assigned to this Group, if any. Users in the Group inherit it unless a direct per-user or Partner assignment overrides it.
ftp_permission
boolean
If true, users in this group can use FTP to login. This will override a false value of ftp_permission on the user level.
sftp_permission
boolean
If true, users in this group can use SFTP to login. This will override a false value of sftp_permission on the user level.
dav_permission
boolean
If true, users in this group can use WebDAV to login. This will override a false value of dav_permission on the user level.
restapi_permission
boolean
If true, users in this group can use the REST API to login. This will override a false value of restapi_permission on the user level.
desktop_configuration_profile_id
int64
Desktop Configuration Profile ID assigned to this Group, if any. Users in the Group inherit it unless a direct per-user assignment overrides it.
integration_centric_profile_id
int64
Integration Centric Profile ID assigned to this Group, if any. Users in the Group inherit it unless a direct per-user assignment overrides it.
site_id
int64
Site ID
workspace_id
int64
Workspace ID