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 Method

\Files\Model\DesktopConfigurationProfile::list;

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.

Additional Arguments

Example Request

try {
  $desktop_configuration_profiles = \Files\Model\DesktopConfigurationProfile::list();
  foreach ($desktop_configuration_profiles as $desktop_configuration_profile) {
    // Operate on $desktop_configuration_profile
  }
} catch (\Files\NotAuthenticated\InvalidUsernameOrPasswordException $e) {
  echo 'Authentication Error Occurred (' . get_class($e) . '): ', $e->getMessage(), "\n";
} catch (\Files\FilesException $e) {
  echo 'Unknown Error Occurred (' . get_class($e) . '): ', $e->getMessage(), "\n";
}

Show Desktop Configuration Profile

SDK Method

\Files\Model\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.

Method Arguments

ArgumentDescription
id
int64
Required
Desktop Configuration Profile ID.

Example Request

try {
  $desktop_configuration_profile = \Files\Model\DesktopConfigurationProfile::find($id);
  // Operate on $desktop_configuration_profile
} catch (\Files\NotAuthenticated\InvalidUsernameOrPasswordException $e) {
  echo 'Authentication Error Occurred (' . get_class($e) . '): ', $e->getMessage(), "\n";
} catch (\Files\FilesException $e) {
  echo 'Unknown Error Occurred (' . get_class($e) . '): ', $e->getMessage(), "\n";
}

Create Desktop Configuration Profile

SDK Method

\Files\Model\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.

Method 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

try {
  $desktop_configuration_profile = \Files\Model\DesktopConfigurationProfile::create([
    'name' => "North America Desktop Profile",
    'mount_mappings' => {"key":"example value"}
  ]);
  // Operate on $desktop_configuration_profile
} catch (\Files\NotAuthenticated\InvalidUsernameOrPasswordException $e) {
  echo 'Authentication Error Occurred (' . get_class($e) . '): ', $e->getMessage(), "\n";
} catch (\Files\FilesException $e) {
  echo 'Unknown Error Occurred (' . get_class($e) . '): ', $e->getMessage(), "\n";
}

Update Desktop Configuration Profile

SDK Method

$desktop_configuration_profile->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.

Method Arguments

ArgumentDescription
name
string
Profile name
workspace_id
int64
Workspace ID
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.
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

Example Request

try {
  // Find the desktop_configuration_profile object by its id.
  $desktop_configuration_profile = \Files\Model\DesktopConfigurationProfile::find(id);
  $desktop_configuration_profile->update([
    'name' => "North America Desktop Profile"
  ]);
} catch (\Files\NotAuthenticated\InvalidUsernameOrPasswordException $e) {
  echo 'Authentication Error Occurred (' . get_class($e) . '): ', $e->getMessage(), "\n";
} catch (\Files\FilesException $e) {
  echo 'Unknown Error Occurred (' . get_class($e) . '): ', $e->getMessage(), "\n";
}

Delete Desktop Configuration Profile

SDK Method

$desktop_configuration_profile->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

try {
  // Find the desktop_configuration_profile object by its id.
  $desktop_configuration_profile = \Files\Model\DesktopConfigurationProfile::find(id);
  $desktop_configuration_profile->delete();
} catch (\Files\NotAuthenticated\InvalidUsernameOrPasswordException $e) {
  echo 'Authentication Error Occurred (' . get_class($e) . '): ', $e->getMessage(), "\n";
} catch (\Files\FilesException $e) {
  echo 'Unknown Error Occurred (' . get_class($e) . '): ', $e->getMessage(), "\n";
}

The DesktopConfigurationProfile Object

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