Implement an Integration to Send a PDF/CSV Document Downloaded from an SFTP Server to an External REST API that Accepts Only application/octet-stream as the Content Type

In an integration, the FTP adapter is only supported as an invoke connection. Implement this use case by selecting either an Application or Schedule integration on the Integration Style dialog.

The following example provides a high level overview on how to implement this use case as a schedule integration.
Description of oic3_readfiles_int.png follows
Description of the illustration oic3_readfiles_int.png

  1. Configure an FTP Adapter with the List Files operation to list files from an SFTP server.



  2. Configure a for-each action to iterate through the List Files operation response.



  3. Configure a second FTP Adapter with the Read Files operation to read individual files inside the loop.



  4. Configure the FTP Adapter to not specify a structure of the file.



  5. Configure a REST Adapter. The reference of the Read Files operation is handed over to the outbound REST Adapter.



  6. Configure the REST Adapter payload as application/octet-stream.

  7. Configure the mapper to read individual files in the for-each loop.
    1. Perform the following Source to Target mappings:
      • $file > File > directory to SyncReadFile > FileReadRequest > directory
      • $file > File > filename to SyncReadFile > FileReadRequest > filename
  8. Configure the mapper to send the read file to the outbound REST Adapter.
    1. Perform the following Source to Target mapping:
      • $ReadFile > SyncReadFileResponse > FileReadResponse > ICSFile > FileReference > to execute > streamReference.