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

DesktopConfigurationProfile.List();

Return Object

FilesList<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

using FilesCom.Models;

try
{
    var desktopConfigurationProfileIterator = DesktopConfigurationProfile.List();
    foreach (DesktopConfigurationProfile desktopConfigurationProfile in desktopConfigurationProfileIterator.ListAutoPaging()) {
        // Operate on desktopConfigurationProfile
    }
}
catch (FilesCom.NotAuthenticatedException e)
{
    Console.WriteLine($"Authentication Error Occurred ({e.GetType().Name}): " + e.Message);
}
catch (FilesCom.SdkException e)
{
    Console.WriteLine($"Unknown Error Occurred ({e.GetType().Name}): " + e.Message);
}

Show Desktop Configuration Profile

SDK Method

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

using FilesCom.Models;

try
{
    var desktopConfigurationProfile = await DesktopConfigurationProfile.Find(id);
    // Operate on desktopConfigurationProfile
}
catch (FilesCom.NotAuthenticatedException e)
{
    Console.WriteLine($"Authentication Error Occurred ({e.GetType().Name}): " + e.Message);
}
catch (FilesCom.SdkException e)
{
    Console.WriteLine($"Unknown Error Occurred ({e.GetType().Name}): " + e.Message);
}

Create Desktop Configuration Profile

SDK Method

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

using FilesCom.Models;

var parameters = new Dictionary<string, object>();
parameters.Add("name", "North America Desktop Profile");
parameters.Add("mount_mappings", (object) {"key":"example value"});

try
{
    var desktopConfigurationProfile = await DesktopConfigurationProfile.Create(parameters);
    // Operate on desktopConfigurationProfile
}
catch (FilesCom.NotAuthenticatedException e)
{
    Console.WriteLine($"Authentication Error Occurred ({e.GetType().Name}): " + e.Message);
}
catch (FilesCom.SdkException e)
{
    Console.WriteLine($"Unknown Error Occurred ({e.GetType().Name}): " + e.Message);
}

Update Desktop Configuration Profile

SDK Method

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.

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

using FilesCom.Models;

var parameters = new Dictionary<string, object>();
parameters.Add("name", "North America Desktop Profile");

try
{
    // Find the desktopConfigurationProfile object by its id.
    var desktopConfigurationProfile = await DesktopConfigurationProfile.Find(id);
    await desktopConfigurationProfile.Update(parameters);
}
catch (FilesCom.NotAuthenticatedException e)
{
    Console.WriteLine($"Authentication Error Occurred ({e.GetType().Name}): " + e.Message);
}
catch (FilesCom.SdkException e)
{
    Console.WriteLine($"Unknown Error Occurred ({e.GetType().Name}): " + e.Message);
}

Delete Desktop Configuration Profile

SDK Method

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

using FilesCom.Models;

try
{
    // Find the desktopConfigurationProfile object by its id.
    var desktopConfigurationProfile = await DesktopConfigurationProfile.Find(id);
    await desktopConfigurationProfile.Delete();
}
catch (FilesCom.NotAuthenticatedException e)
{
    Console.WriteLine($"Authentication Error Occurred ({e.GetType().Name}): " + e.Message);
}
catch (FilesCom.SdkException e)
{
    Console.WriteLine($"Unknown Error Occurred ({e.GetType().Name}): " + e.Message);
}

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.