Remote Server Configuration Files

A RemoteServerConfigurationFile is a configuration file (required for some Remote Server integrations, such as the Files.com Agent).

Download configuration file (required for some Remote Server integrations, such as the Files.com Agent)

SDK Method

remoteserver.FindConfigurationFile()

Return Object

RemoteServerConfigurationFile

Authorization Requirement

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

RemoteServerFindConfigurationFileParams Fields

FieldDescription
Id
int64
Required
Remote Server ID.

Example Request

import (
    "fmt"
    "errors"

    files_sdk "github.com/Files-com/files-sdk-go/v3"
    remote_server "github.com/Files-com/files-sdk-go/v3/remoteserver"
)

remoteServerConfigurationFile, err := remote_server.FindConfigurationFile(files_sdk.RemoteServerFindConfigurationFileParams{Id: 1})
if err != nil {
    var respErr files_sdk.ResponseError
    if errors.As(err, &respErr) {
        fmt.Println("Response Error Occurred (" + respErr.Type + "): " + respErr.ErrorMessage)
    } else {
        fmt.Printf("Unexpected Error: %s\n", err.Error())
    }
}

Post local changes, check in, and download configuration file (used by some Remote Server integrations, such as the Files.com Agent)

SDK Method

remoteserver.ConfigurationFile()

Return Object

RemoteServerConfigurationFile

Authorization Requirement

No authentication required; you may call this endpoint without a key or session.

RemoteServerConfigurationFileParams Fields

FieldDescription
Id
int64
Required
Remote Server ID.
ApiToken
string
Files Agent API Token
PermissionSet
string
The permission set for the agent ['read_write', 'read_only', 'write_only']
Root
string
The root directory for the agent
Hostname
string
Port
int64
Incoming port for files agent connections
Status
string
either running or shutdown
ConfigVersion
string
agent config version
PrivateKey
string
The private key for the agent
PublicKey
string
public key
ServerHostKey
string
Subdomain
string
Files.com subdomain site name

Example Request

import (
    "fmt"
    "errors"

    files_sdk "github.com/Files-com/files-sdk-go/v3"
    remote_server "github.com/Files-com/files-sdk-go/v3/remoteserver"
)

remoteServerConfigurationFile, err := remote_server.ConfigurationFile(files_sdk.RemoteServerConfigurationFileParams{Id: 1})
if err != nil {
    var respErr files_sdk.ResponseError
    if errors.As(err, &respErr) {
        fmt.Println("Response Error Occurred (" + respErr.Type + "): " + respErr.ErrorMessage)
    } else {
        fmt.Printf("Unexpected Error: %s\n", err.Error())
    }
}

The RemoteServerConfigurationFile Object

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

AttributeDescription
Id
int64
The remote server ID of the agent
PermissionSet
string
The permission set for the agent ['read_write', 'read_only', 'write_only']
PrivateKey
string
The private key for the agent
Subdomain
string
Files.com subdomain site name
Root
string
The root directory for the agent
NodeName
string
Optional customer-facing name for this Agent installation
FollowLinks
boolean
Follow symlinks when traversing directories
PreferProtocol
string
Preferred network protocol ['udp', 'tcp'] (default udp)
Dns
string
DNS lookup method ['auto','doh','system'] (default auto)
ProxyAllOutbound
boolean
Proxy all outbound traffic through files.com proxy server
EndpointOverride
string
Custom site endpoint URL
LogFile
string
Log file name and location
LogLevel
string
Log level for the agent logs ['debug', 'info', 'warn', 'error', 'fatal'] (default info)
LogRotateNum
int64
Log route for agent logs. (default 5)
LogRotateSize
int64
Log route size in MB for agent logs. (default 20)
OverrideMaxConcurrentJobs
int64
Maximum number of concurrent jobs (default 500)
GracefulShutdownTimeout
int64
Graceful shutdown timeout in seconds (default 15)
TransferRateLimit
string
File transfer (upload/download) rate limit
<limit>-<period>, with the given periods:
* 'S': second
* 'M': minute
* 'H': hour
* 'D': day
Examples:
* 5 requests/second: '5-S'
* 10 requests/minute: '10-M'
* 1000 requests/hour: '1000-H'
* 2000 requests/day: '2000-D'
AutoUpdatePolicy
string
Auto update policy ['manual_trigger', 'critical_only', 'always', 'never'] (default always)
ApiToken
string
Files Agent API Token
Port
int64
Incoming port for files agent connections
Hostname
string
PublicKey
string
public key
Status
string
either running or shutdown
ServerHostKey
string
ConfigVersion
string
agent config version