Desktop Configuration Profiles

A Desktop Configuration Profile centrally defines desktop mount point mappings for users in a Site or Workspace.

List Desktop Configuration Profiles

SDK Function

DesktopConfigurationProfile.list()

Return Object

ListIterator<DesktopConfigurationProfile>

Authorization Requirement

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

Additional Arguments

Example Request

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

try {
  HashMap<String, Object> parameters = new HashMap<>();
  ListIterator<DesktopConfigurationProfile> desktopConfigurationProfiles = DesktopConfigurationProfile.list(parameters);
  for (DesktopConfigurationProfile desktopConfigurationProfile : desktopConfigurationProfiles.listAutoPaging()) {
    // Operate on desktopConfigurationProfile
  }
} 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 Desktop Configuration Profile

SDK Function

DesktopConfigurationProfile.find()

Return Object

DesktopConfigurationProfile

Authorization Requirement

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

Function Arguments

ArgumentDescription
id
int64
Required
Desktop Configuration Profile ID.

Example Request

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

try {
  HashMap<String, Object> parameters = new HashMap<>();
  DesktopConfigurationProfile desktopConfigurationProfile = DesktopConfigurationProfile.find(id, parameters);
  // Operate on desktopConfigurationProfile
} 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 Desktop Configuration Profile

SDK Function

DesktopConfigurationProfile.create()

Return Object

DesktopConfigurationProfile

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
name
string
Required
Profile name
mount_mappings
object
Required
Mount point mappings for the desktop app. Keys must be a single uppercase Windows drive letter other than A, B, or C, and values are Files.com paths to mount there.
workspace_id
int64
0Workspace ID
use_for_all_users
boolean
falseWhether this profile applies to all users in the Workspace by default
disable_drive_mounting
boolean
falseWhether the desktop app should hide drive mounting, prevent new drive mounts, and unmount active drive mounts for users with this profile

Example Request

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

try {
  HashMap<String, Object> parameters = new HashMap<>();
  parameters.put("name", "North America Desktop Profile");
  parameters.put("mount_mappings", {"key" => "example value"});
  
  DesktopConfigurationProfile desktopConfigurationProfile = DesktopConfigurationProfile.create(parameters);
  // Operate on desktopConfigurationProfile
} 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 Desktop Configuration Profile

SDK Function

desktopConfigurationProfile.update();

Return Object

DesktopConfigurationProfile

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
setName
string
Profile name
setWorkspaceId
int64
Workspace ID
setMountMappings
object
Mount point mappings for the desktop app. Keys must be a single uppercase Windows drive letter other than A, B, or C, and values are Files.com paths to mount there.
setUseForAllUsers
boolean
Whether this profile applies to all users in the Workspace by default
setDisableDriveMounting
boolean
Whether the desktop app should hide drive mounting, prevent new drive mounts, and unmount active drive mounts for users with this profile

Example Request

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

try {
  // Find the desktopConfigurationProfile object by its id.
  DesktopConfigurationProfile desktopConfigurationProfile = DesktopConfigurationProfile.find(id, null);
  HashMap<String, Object> parameters = new HashMap<>();
  parameters.put("name", "North America Desktop Profile");
  desktopConfigurationProfile.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 Desktop Configuration Profile

SDK Function

desktopConfigurationProfile.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.DesktopConfigurationProfile;

try {
  // Find the desktopConfigurationProfile object by its id.
  DesktopConfigurationProfile desktopConfigurationProfile = DesktopConfigurationProfile.find(id, null);
  desktopConfigurationProfile.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 DesktopConfigurationProfile Object

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

AttributeDescription
id
int64
Desktop Configuration Profile ID
name
string
Profile name
workspace_id
int64
Workspace ID
use_for_all_users
boolean
Whether this profile applies to all users in the Workspace by default
disable_drive_mounting
boolean
Whether the desktop app should hide drive mounting, prevent new drive mounts, and unmount active drive mounts for users with this profile
mount_mappings
object
Mount point mappings for the desktop app. Keys must be a single uppercase Windows drive letter other than A, B, or C, and values are Files.com paths to mount there.