FTP
Purpose
Section titled “Purpose”The FTP Operator enables file operations with FTP and FTPS servers. It provides functionality for listing, downloading, uploading, and deleting files on remote FTP servers, supporting both secure (FTPS) and standard FTP protocols.
Use Cases
Section titled “Use Cases”- Transferring files between systems
- Backing up data to remote servers
- Retrieving data from legacy systems
- Automating file distribution workflows
- Integrating with systems that expose FTP interfaces
- Scheduled file synchronization
- Secure file transfer using FTPS
Supported Operations
Section titled “Supported Operations”list-files
Section titled “list-files”Lists files and directories in the specified FTP directory.
Input Parameters
Section titled “Input Parameters”host
(string): The FTP server hostnameport
(integer): The FTP server portusername
(string): Username for authenticationpassword
(string): Password for authenticationremotePath
(string): The directory path on the FTP server to listsecure
(boolean): Whether to use secure FTPS connection
Output
Section titled “Output”Returns an FTPListOutput
object containing an array of FTPFileInfo
objects with the following properties:
directory
(boolean): Whether the item is a directoryname
(string): The file or directory namepath
(string): The full path of the file or directorysize
(long): The file size in bytesmodificationTime
(long): The last modification time as a timestampaccessTime
(long): The last access time as a timestamppermissions
(integer): The file permissions as a numeric mask
delete-file
Section titled “delete-file”Deletes a file from the FTP server.
Input Parameters
Section titled “Input Parameters”host
(string): The FTP server hostnameport
(integer): The FTP server portusername
(string): Username for authenticationpassword
(string): Password for authenticationremotePath
(string): The full path of the file to deletesecure
(boolean): Whether to use secure FTPS connection
Output
Section titled “Output”Returns a boolean indicating whether the deletion was successful.
download-file
Section titled “download-file”Downloads a file from the FTP server.
Input Parameters
Section titled “Input Parameters”host
(string): The FTP server hostnameport
(integer): The FTP server portusername
(string): Username for authenticationpassword
(string): Password for authenticationremotePath
(string): The full path of the file to downloadsecure
(boolean): Whether to use secure FTPS connection
Output
Section titled “Output”Returns a FileDto
object containing information about the downloaded file, including:
id
(string): The unique identifier of the filename
(string): The file namecontentType
(string): The content type of the filesize
(long): The file size in bytesorganizationId
(string): The organization ID associated with the file
upload-file
Section titled “upload-file”Uploads a file to the FTP server.
Input Parameters
Section titled “Input Parameters”host
(string): The FTP server hostnameport
(integer): The FTP server portusername
(string): Username for authenticationpassword
(string): Password for authenticationremotePath
(string): The destination path on the FTP serversecure
(boolean): Whether to use secure FTPS connectionfile
(FileDto): The file to upload, containing:id
(string): The unique identifier of the fileorganizationId
(string): The organization ID associated with the file
Output
Section titled “Output”Returns a boolean indicating whether the upload was successful.
Example
Section titled “Example”{ "host": "ftp.example.com", "port": 21, "username": "ftpuser", "password": "password123", "remotePath": "/uploads/data.csv", "secure": true, "file": { "id": "file-123", "organizationId": "org-456" }}