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 Method

Group.list()

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.

Method 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 Group from 'files.com/lib/models/Group';
import * as FilesErrors from 'files.com/lib/Errors';

try {
  const groups = await Group.list({
    include_parent_site_groups: false,
  });
  for (const group of groups) {
    // Operate on group
  }
} catch (err) {
  if (err instanceof FilesErrors.NotAuthenticatedError) {
    console.error(`Authentication Error Occurred (${err.constructor.name}): ${err.error}`);
  } else if (err instanceof FilesErrors.FilesError) {
    console.error(`Unknown Error Occurred (${err.constructor.name}): ${err.error}`);
  } else {
    throw err;
  }
}

Show Group

SDK Method

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.

Method Arguments

ArgumentDescription
id
int64
Required
Group ID.

Example Request

import Group from 'files.com/lib/models/Group';
import * as FilesErrors from 'files.com/lib/Errors';

try {
  const group = await Group.find(id);
  // Operate on group
} catch (err) {
  if (err instanceof FilesErrors.NotAuthenticatedError) {
    console.error(`Authentication Error Occurred (${err.constructor.name}): ${err.error}`);
  } else if (err instanceof FilesErrors.FilesError) {
    console.error(`Unknown Error Occurred (${err.constructor.name}): ${err.error}`);
  } else {
    throw err;
  }
}

Create Group

SDK Method

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.

Method 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 Group from 'files.com/lib/models/Group';
import * as FilesErrors from 'files.com/lib/Errors';

try {
  const group = await Group.create({
    name: "name",
  });
  // Operate on group
} catch (err) {
  if (err instanceof FilesErrors.NotAuthenticatedError) {
    console.error(`Authentication Error Occurred (${err.constructor.name}): ${err.error}`);
  } else if (err instanceof FilesErrors.FilesError) {
    console.error(`Unknown Error Occurred (${err.constructor.name}): ${err.error}`);
  } else {
    throw err;
  }
}

Update Group

SDK Method

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.

Method Arguments

ArgumentDescription
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
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.
allowed_ips
string
A list of allowed IPs if applicable. Newline delimited
name
string
Group name.

Example Request

import Group from 'files.com/lib/models/Group';
import * as FilesErrors from 'files.com/lib/Errors';

try {
  // Find the group object by its id.
  const group = await Group.find(id);
  await group.update({
    notes: "example",
  });
} catch (err) {
  if (err instanceof FilesErrors.NotAuthenticatedError) {
    console.error(`Authentication Error Occurred (${err.constructor.name}): ${err.error}`);
  } else if (err instanceof FilesErrors.FilesError) {
    console.error(`Unknown Error Occurred (${err.constructor.name}): ${err.error}`);
  } else {
    throw err;
  }
}

Delete Group

SDK Method

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 Group from 'files.com/lib/models/Group';
import * as FilesErrors from 'files.com/lib/Errors';

try {
  // Find the group object by its id.
  const group = await Group.find(id);
  await group.delete();
} catch (err) {
  if (err instanceof FilesErrors.NotAuthenticatedError) {
    console.error(`Authentication Error Occurred (${err.constructor.name}): ${err.error}`);
  } else if (err instanceof FilesErrors.FilesError) {
    console.error(`Unknown Error Occurred (${err.constructor.name}): ${err.error}`);
  } else {
    throw err;
  }
}

The Group Object

Some of the methods 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