Skip to content

SFTP

The SFTP Operator enables secure file operations with SFTP (SSH File Transfer Protocol) servers. It provides functionality for listing, downloading, uploading, and deleting files on remote SFTP servers, offering a more secure alternative to standard FTP.

  • Secure transferring of files between systems
  • Backing up data to secure remote servers
  • Retrieving data from systems that require encrypted connections
  • Automating secure file distribution workflows
  • Integrating with systems that expose SFTP interfaces
  • Scheduled secure file synchronization
  • Compliance with security requirements for file transfers

Lists files and directories in the specified SFTP directory.

  • host (string): The SFTP server hostname
  • port (integer): The SFTP server port
  • username (string): Username for authentication
  • password (string): Password for authentication
  • remotePath (string): The directory path on the SFTP server to list

Returns an SFTPListOutput object containing an array of SFTPFileInfo objects with the following properties:

  • directory (boolean): Whether the item is a directory
  • name (string): The file or directory name
  • path (string): The full path of the file or directory
  • size (long): The file size in bytes
  • modificationTime (long): The last modification time as a timestamp
  • accessTime (long): The last access time as a timestamp
  • permissions (integer): The file permissions as a numeric mask
  • uid (integer): The user ID of the file owner
  • gid (integer): The group ID of the file

Deletes a file from the SFTP server.

  • host (string): The SFTP server hostname
  • port (integer): The SFTP server port
  • username (string): Username for authentication
  • password (string): Password for authentication
  • remotePath (string): The full path of the file to delete

Returns a boolean indicating whether the deletion was successful.

Downloads a file from the SFTP server.

  • host (string): The SFTP server hostname
  • port (integer): The SFTP server port
  • username (string): Username for authentication
  • password (string): Password for authentication
  • remotePath (string): The full path of the file to download

Returns a FileDto object containing information about the downloaded file, including:

  • id (string): The unique identifier of the file
  • name (string): The file name
  • contentType (string): The content type of the file
  • size (long): The file size in bytes
  • organizationId (string): The organization ID associated with the file

Uploads a file to the SFTP server.

  • host (string): The SFTP server hostname
  • port (integer): The SFTP server port
  • username (string): Username for authentication
  • password (string): Password for authentication
  • remotePath (string): The destination path on the SFTP server
  • file (FileDto): The file to upload, containing:
    • id (string): The unique identifier of the file
    • organizationId (string): The organization ID associated with the file

Returns a boolean indicating whether the upload was successful.

{
"host": "sftp.example.com",
"port": 22,
"username": "sftpuser",
"password": "password123",
"remotePath": "/uploads/data.csv",
"file": {
"id": "file-123",
"organizationId": "org-456"
}
}
  • The SFTP operator uses the SSH protocol for secure file transfers
  • All connections use a promiscuous host key verifier, which accepts any host key (suitable for testing but may need to be enhanced for production use)
  • Only password authentication is currently supported