Skip to content

The protocol-based backends in this section let you mount file transfer services into the Hoody virtual filesystem. Use these endpoints to connect FTP, SFTP, SMB, WebDAV, HTTP, and HDFS servers. Each endpoint accepts a JSON configuration body and returns the new backend’s identifier, which you can then mount to a filesystem path.

Connect a new FTP backend.

This endpoint takes no parameters.

NameTypeRequiredDefaultDescription
hoststringYes""FTP host to connect to (e.g. ftp.example.com).
portintegerNo21FTP port number.
userstringNo"user"FTP username.
passstringNo""FTP password.
ask_passwordbooleanNofalseAllow asking for the FTP password at runtime when none is supplied.
tlsbooleanNofalseUse Implicit FTPS (FTP over TLS), usually served on port 990.
explicit_tlsbooleanNofalseUse Explicit FTPS — upgrades a plain text connection to TLS.
no_check_certificatebooleanNofalseSkip verification of the server’s TLS certificate.
no_check_uploadbooleanNofalseSkip post-upload size/mtime verification.
disable_epsvbooleanNofalseDisable EPSV even when the server advertises support.
disable_mlsdbooleanNofalseDisable MLSD even when the server advertises support.
disable_utf8booleanNofalseDisable UTF-8 even when the server advertises support.
disable_tls13booleanNofalseDisable TLS 1.3 (workaround for servers with buggy TLS).
force_list_hiddenbooleanNofalseUse LIST -a to force listing of hidden files (disables MLSD).
writing_mdtmbooleanNofalseUse MDTM to set modification time (VsFtpd quirk).
concurrencyintegerNo0Maximum number of simultaneous FTP connections (0 = unlimited).
idle_timeoutintegerNo60Max idle time before closing connections (seconds; 0 = indefinite).
close_timeoutintegerNo60Max time to wait for a close response (seconds).
shut_timeoutintegerNo60Max time to wait for data-connection close status (seconds).
tls_cache_sizeintegerNo32Size of the TLS session cache for control and data connections (0 disables).
encodingstringNo"35749890"Backend encoding. One of: Asterisk,Ctl,Dot,Slash, BackSlash,Ctl,Del,Dot,RightSpace,Slash,SquareBracket, Ctl,LeftPeriod,Slash.
descriptionstringNo""Description of the remote.
socks_proxystringNo""SOCKS5 proxy host. Format: user:pass@host:port, user@host:port, or host:port.
{
"data": {
"backend_type": "ftp",
"id": "bk_ftp_3a8c1f9d2e7b",
"mount_paths": [],
"type": "backend"
},
"message": "FTP backend connected successfully",
"success": true
}
await client.files.backends.connectFtp({
data: {
host: "ftp.example.com",
port: 21,
user: "alice",
pass: "s3cret",
explicit_tls: true
}
});

Connect a new SSH/SFTP backend.

This endpoint takes no parameters.

NameTypeRequiredDefaultDescription
hoststringYes""SSH host to connect to (e.g. example.com).
portintegerNo22SSH port number.
userstringNo"user"SSH username.
passstringNo""SSH password (leave blank to use ssh-agent).
key_filestringNo""Path to a PEM-encoded private key file.
key_file_passstringNo""Passphrase for an encrypted PEM private key (old OpenSSH format only).
key_pemstringNo""Raw PEM-encoded private key, single line with \n for line breaks.
key_use_agentbooleanNofalseForce usage of the ssh-agent.
pubkeystringNo""SSH public certificate for public certificate authentication.
pubkey_filestringNo""Path to a public key file.
ask_passwordbooleanNofalseAllow prompting for the password at runtime when none is supplied.
disable_hashcheckbooleanNofalseDisable SSH-command-based detection of remote file hashing.
disable_concurrent_readsbooleanNofalseDisable concurrent reads.
disable_concurrent_writesbooleanNofalseDisable concurrent writes.
copy_is_hardlinkbooleanNofalseImplement server-side copies as hardlinks.
set_modtimebooleanNotrueSet the modified time on the remote after writing.
skip_linksbooleanNofalseSkip symlinks and other non-regular files.
use_fstatbooleanNofalseUse fstat instead of stat to avoid exceeding server file-open limits.
use_insecure_cipherbooleanNofalseAllow insecure ciphers/key exchange (must be false if ciphers or key_exchange is set).
concurrencyintegerNo64Maximum outstanding requests per file.
connectionsintegerNo0Maximum simultaneous SFTP connections (0 = unlimited).
idle_timeoutintegerNo60Max idle time before closing connections (seconds; 0 = indefinite).
chunk_sizestringNo"32768"Upload/download chunk size in bytes (RFC limit 32768; some servers accept more).
ciphersstringNo[]Space-separated list of ciphers ordered by preference.
macsstringNo[]Space-separated list of MAC algorithms ordered by preference.
key_exchangestringNo[]Space-separated list of key exchange algorithms ordered by preference.
host_key_algorithmsstringNo[]Space-separated list of host key algorithms ordered by preference.
known_hosts_filestringNo""Optional path to a known_hosts file to enable host key validation.
md5sum_commandstringNo""Command used to read md5 hashes (blank = autodetect).
sha1sum_commandstringNo""Command used to read sha1 hashes (blank = autodetect).
path_overridestringNo""Override path used by SSH shell commands (prefix with @ to keep subpaths).
server_commandstringNo""Path/command to start the SFTP server on the remote host.
subsystemstringNo"sftp"SSH2 subsystem on the remote host.
shell_typestringNo""Type of SSH shell on the remote server. One of: none, unix, powershell, cmd.
sshstringNo[]Path and arguments to an external ssh binary.
set_envstringNo[]Environment variables to pass to sftp and remote commands.
socks_proxystringNo""SOCKS5 proxy host. Format: user:pass@host:port, user@host:port, or host:port.
descriptionstringNo""Description of the remote.
{
"data": {
"backend_type": "sftp",
"id": "bk_sftp_7d2e9c4a1f0b",
"mount_paths": [],
"type": "backend"
},
"message": "SFTP backend connected successfully",
"success": true
}
await client.files.backends.connectSftp({
data: {
host: "sftp.example.com",
port: 22,
user: "alice",
key_file: "~/.ssh/id_ed25519",
chunk_size: "262144"
}
});

Connect a new SMB/CIFS backend.

This endpoint takes no parameters.

NameTypeRequiredDefaultDescription
hoststringYes""SMB server hostname (e.g. example.com).
portintegerNo445SMB port number.
userstringNo"user"SMB username.
passstringNo""SMB password.
domainstringNo"WORKGROUP"Domain name for NTLM authentication.
spnstringNo""Service principal name. Required by some clusters.
case_insensitivebooleanNotrueWhether the server is case-insensitive (always true on Windows shares).
hide_special_sharebooleanNotrueHide special shares such as print$.
idle_timeoutintegerNo60Max idle time before closing connections (seconds; 0 = indefinite).
encodingstringNo"56698766"Backend encoding identifier.
descriptionstringNo""Description of the remote.
{
"data": {
"backend_type": "smb",
"id": "bk_smb_4f1b8a2c6d09",
"mount_paths": [],
"type": "backend"
},
"message": "SMB backend connected successfully",
"success": true
}
await client.files.backends.connectSmb({
data: {
host: "files.example.local",
port: 445,
user: "alice",
pass: "s3cret",
domain: "EXAMPLE"
}
});

Connect a new WebDAV backend.

This endpoint takes no parameters.

NameTypeRequiredDefaultDescription
urlstringYes""URL of the WebDAV host (e.g. https://example.com).
userstringNo""Username. For NTLM, use the format Domain\User.
passstringNo""Password.
bearer_tokenstringNo""Bearer token (e.g. a Macaroon) used instead of user/password.
bearer_token_commandstringNo""Shell command that prints a bearer token at runtime.
vendorstringNo""WebDAV vendor. One of: fastmail, nextcloud, owncloud, sharepoint, sharepoint-ntlm, hoody-vfs, other.
headersstringNo[]Comma-separated key,value HTTP header pairs applied to every request.
unix_socketstringNo""Path to a Unix domain socket to dial instead of opening a TCP connection.
auth_redirectbooleanNofalsePreserve the Authorization header across redirects.
owncloud_exclude_mountsbooleanNofalseExclude ownCloud-mounted storages from listings.
owncloud_exclude_sharesbooleanNofalseExclude ownCloud shares from listings.
pacer_min_sleepintegerNo0Minimum sleep between API calls (seconds).
nextcloud_chunk_sizestringNo"10485760"Nextcloud upload chunk size in bytes (0 disables chunked uploads).
encodingstringNo""Backend encoding.
descriptionstringNo""Description of the remote.
{
"data": {
"backend_type": "webdav",
"id": "bk_webdav_5e2c7a8b1d34",
"mount_paths": [],
"type": "backend"
},
"message": "WebDAV backend connected successfully",
"success": true
}
await client.files.backends.connectWebdav({
data: {
url: "https://cloud.example.com/remote.php/dav/files/alice",
user: "alice",
pass: "s3cret",
vendor: "nextcloud"
}
});

Connect a new HTTP backend (read-only mount of an HTTP/HTTPS host).

This endpoint takes no parameters.

NameTypeRequiredDefaultDescription
urlstringYes""URL of the HTTP host (e.g. https://example.com). You can embed credentials as https://user:pass@example.com.
headersstringNo[]Comma-separated key,value HTTP headers applied to every request.
no_escapebooleanNofalseDo not URL-escape metacharacters in path names.
no_headbooleanNofalseSkip HEAD requests (faster listings, but no sizes/timestamps).
no_slashbooleanNofalseTreat text/html content as directories (server doesn’t append /).
descriptionstringNo""Description of the remote.
{
"data": {
"backend_type": "http",
"id": "bk_http_8c3d6f2a9e71",
"mount_paths": [],
"type": "backend"
},
"message": "HTTP backend connected successfully",
"success": true
}
await client.files.backends.connectHttp({
data: {
url: "https://downloads.example.com/public",
no_head: true
}
});

Connect a new Hadoop Distributed File System (HDFS) backend.

This endpoint takes no parameters.

NameTypeRequiredDefaultDescription
namenodestringYes[]Hadoop name nodes and ports (e.g. namenode-1:8020,namenode-2:8020).
usernamestringNo""Hadoop user name. Allowed value: root.
service_principal_namestringNo""Kerberos Service Principal Name for the namenode (e.g. hdfs/namenode.hadoop.docker).
data_transfer_protectionstringNo""Kerberos data transfer protection. Allowed value: privacy.
encodingstringNo"50430082"Backend encoding identifier.
descriptionstringNo""Description of the remote.
{
"data": {
"backend_type": "hdfs",
"id": "bk_hdfs_1a9b4d2e7c80",
"mount_paths": [],
"type": "backend"
},
"message": "HDFS backend connected successfully",
"success": true
}
await client.files.backends.connectHdfs({
data: {
namenode: "namenode-1.hadoop.local:8020,namenode-2.hadoop.local:8020",
username: "root",
service_principal_name: "hdfs/namenode.hadoop.local"
}
});