Remote Server Credentials

A RemoteServerCredential is a way to store a credential for Remote Servers in a centralized vault and then reference it from Remote Server definitions.

This allows you to manage your credentials in one place and avoid duplicating them across multiple Remote Server configurations. It also enhances security by allowing you to use Terraform or APIs for Remote Server management without having to worry about credential exposure.

List Remote Server Credentials

SDK Method

RemoteServerCredential.List();

Return Object

FilesList<RemoteServerCredential>

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 remoteServerCredentialIterator = RemoteServerCredential.List();
    foreach (RemoteServerCredential remoteServerCredential in remoteServerCredentialIterator.ListAutoPaging()) {
        // Operate on remoteServerCredential
    }
}
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 Remote Server Credential

SDK Method

RemoteServerCredential.Find();

Return Object

RemoteServerCredential

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
Remote Server Credential ID.

Example Request

using FilesCom.Models;

try
{
    var remoteServerCredential = await RemoteServerCredential.Find(id);
    // Operate on remoteServerCredential
}
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 Remote Server Credential

SDK Method

RemoteServerCredential.Create();

Return Object

RemoteServerCredential

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
Internal name for your reference
description
string
Internal description for your reference
server_type
string
Remote server type. Remote Server Credentials are only valid for a single type of Remote Server.
Possible values: ftp, sftp, s3, google_cloud_storage, webdav, wasabi, backblaze_b2, one_drive, box, dropbox, google_drive, azure, sharepoint, s3_compatible, azure_files, files_agent, filebase, cloudflare, linode, files_com
aws_access_key
string
AWS Access Key.
s3_assume_role_arn
string
AWS IAM Role ARN for AssumeRole authentication.
s3_assume_role_duration_seconds
int64
Session duration in seconds for AssumeRole authentication (900-43200).
cloudflare_access_key
string
Cloudflare: Access Key.
filebase_access_key
string
Filebase: Access Key.
google_cloud_storage_s3_compatible_access_key
string
Google Cloud Storage: S3-compatible Access Key.
linode_access_key
string
Linode: Access Key
s3_compatible_access_key
string
S3-compatible: Access Key
sharepoint_client_id
string
SharePoint: Microsoft Entra application client ID for app-only authentication.
sharepoint_tenant_id
string
SharePoint: Microsoft Entra tenant ID for app-only authentication.
username
string
Remote server username.
wasabi_access_key
string
Wasabi: Access Key.
password
string
Password, if needed.
private_key
string
Private key, if needed.
private_key_passphrase
string
Passphrase for private key if needed.
aws_secret_key
string
AWS: secret key.
azure_blob_storage_access_key
string
Azure Blob Storage: Access Key
azure_blob_storage_sas_token
string
Azure Blob Storage: Shared Access Signature (SAS) token
azure_files_storage_access_key
string
Azure File Storage: Access Key
azure_files_storage_sas_token
string
Azure File Storage: Shared Access Signature (SAS) token
backblaze_b2_application_key
string
Backblaze B2 Cloud Storage: applicationKey
backblaze_b2_key_id
string
Backblaze B2 Cloud Storage: keyID
cloudflare_secret_key
string
Cloudflare: Secret Key
filebase_secret_key
string
Filebase: Secret Key
google_cloud_storage_credentials_json
string
Google Cloud Storage: JSON file that contains the private key. To generate see https://cloud.google.com/storage/docs/json_api/v1/how-tos/authorizing#APIKey
google_cloud_storage_s3_compatible_secret_key
string
Google Cloud Storage: S3-compatible secret key
linode_secret_key
string
Linode: Secret Key
s3_compatible_secret_key
string
S3-compatible: Secret Key
sharepoint_client_certificate
string
SharePoint: PEM-encoded certificate and unencrypted private key for app-only authentication.
sharepoint_client_secret
string
SharePoint: Microsoft Entra application client secret for app-only authentication.
wasabi_secret_key
string
Wasabi: Secret Key
workspace_id
int64
0Workspace ID (0 for default workspace)
copy_values_from_credential_id
int64
ID of Remote Server Credential to copy omitted values from.

Example Request

using FilesCom.Models;

var parameters = new Dictionary<string, object>();
parameters.Add("name", "My Credential");

try
{
    var remoteServerCredential = await RemoteServerCredential.Create(parameters);
    // Operate on remoteServerCredential
}
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 Remote Server Credential

SDK Method

remoteServerCredential.Update();

Return Object

RemoteServerCredential

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
Internal name for your reference
description
string
Internal description for your reference
server_type
string
Remote server type. Remote Server Credentials are only valid for a single type of Remote Server.
Possible values: ftp, sftp, s3, google_cloud_storage, webdav, wasabi, backblaze_b2, one_drive, box, dropbox, google_drive, azure, sharepoint, s3_compatible, azure_files, files_agent, filebase, cloudflare, linode, files_com
aws_access_key
string
AWS Access Key.
s3_assume_role_arn
string
AWS IAM Role ARN for AssumeRole authentication.
s3_assume_role_duration_seconds
int64
Session duration in seconds for AssumeRole authentication (900-43200).
cloudflare_access_key
string
Cloudflare: Access Key.
filebase_access_key
string
Filebase: Access Key.
google_cloud_storage_s3_compatible_access_key
string
Google Cloud Storage: S3-compatible Access Key.
linode_access_key
string
Linode: Access Key
s3_compatible_access_key
string
S3-compatible: Access Key
sharepoint_client_id
string
SharePoint: Microsoft Entra application client ID for app-only authentication.
sharepoint_tenant_id
string
SharePoint: Microsoft Entra tenant ID for app-only authentication.
username
string
Remote server username.
wasabi_access_key
string
Wasabi: Access Key.
password
string
Password, if needed.
private_key
string
Private key, if needed.
private_key_passphrase
string
Passphrase for private key if needed.
aws_secret_key
string
AWS: secret key.
azure_blob_storage_access_key
string
Azure Blob Storage: Access Key
azure_blob_storage_sas_token
string
Azure Blob Storage: Shared Access Signature (SAS) token
azure_files_storage_access_key
string
Azure File Storage: Access Key
azure_files_storage_sas_token
string
Azure File Storage: Shared Access Signature (SAS) token
backblaze_b2_application_key
string
Backblaze B2 Cloud Storage: applicationKey
backblaze_b2_key_id
string
Backblaze B2 Cloud Storage: keyID
cloudflare_secret_key
string
Cloudflare: Secret Key
filebase_secret_key
string
Filebase: Secret Key
google_cloud_storage_credentials_json
string
Google Cloud Storage: JSON file that contains the private key. To generate see https://cloud.google.com/storage/docs/json_api/v1/how-tos/authorizing#APIKey
google_cloud_storage_s3_compatible_secret_key
string
Google Cloud Storage: S3-compatible secret key
linode_secret_key
string
Linode: Secret Key
s3_compatible_secret_key
string
S3-compatible: Secret Key
sharepoint_client_certificate
string
SharePoint: PEM-encoded certificate and unencrypted private key for app-only authentication.
sharepoint_client_secret
string
SharePoint: Microsoft Entra application client secret for app-only authentication.
wasabi_secret_key
string
Wasabi: Secret Key

Example Request

using FilesCom.Models;

var parameters = new Dictionary<string, object>();
parameters.Add("name", "My Credential");

try
{
    // Find the remoteServerCredential object by its id.
    var remoteServerCredential = await RemoteServerCredential.Find(id);
    await remoteServerCredential.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 Remote Server Credential

SDK Method

remoteServerCredential.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 remoteServerCredential object by its id.
    var remoteServerCredential = await RemoteServerCredential.Find(id);
    await remoteServerCredential.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 RemoteServerCredential Object

Some of the methods above return a RemoteServerCredential object. The attributes of this object are listed below.

AttributeDescription
id
int64
Remote Server Credential ID
workspace_id
int64
Workspace ID (0 for default workspace)
name
string
Internal name for your reference
description
string
Internal description for your reference
server_type
string
Remote server type. Remote Server Credentials are only valid for a single type of Remote Server.
Possible values: ftp, sftp, s3, google_cloud_storage, webdav, wasabi, backblaze_b2, one_drive, box, dropbox, google_drive, azure, sharepoint, s3_compatible, azure_files, files_agent, filebase, cloudflare, linode, files_com
aws_access_key
string
AWS Access Key.
s3_assume_role_arn
string
AWS IAM Role ARN for AssumeRole authentication.
s3_assume_role_duration_seconds
int64
Session duration in seconds for AssumeRole authentication (900-43200).
s3_assume_role_external_id
string
External ID for AssumeRole authentication.
google_cloud_storage_s3_compatible_access_key
string
Google Cloud Storage: S3-compatible Access Key.
wasabi_access_key
string
Wasabi: Access Key.
s3_compatible_access_key
string
S3-compatible: Access Key
filebase_access_key
string
Filebase: Access Key.
cloudflare_access_key
string
Cloudflare: Access Key.
linode_access_key
string
Linode: Access Key
sharepoint_tenant_id
string
SharePoint: Microsoft Entra tenant ID for app-only authentication.
sharepoint_client_id
string
SharePoint: Microsoft Entra application client ID for app-only authentication.
sharepoint_app_credential_type
string
SharePoint: App-only credential type. Either secret or certificate.
username
string
Remote server username.