I am trying to build an integration that takes a CSV file from a SFTP server and uploads it via an API endpoint.
Building a proof of concept in Postman was easily done by sending the request body as a multipart form-data payload.
However, while trying to build this integration through webMethods . io I have reached some roadblocks which I am looking for further information about.
In a WorkFlow when using the SFTP: Download File connector it does now allow me to upload a SSH Key file. Instead it again asks for a path. The tool tip for SSH Key says “Provide the path for the SSH Key associated with the specified username”. Since this is a cloud environment. Where would the file need to sit for the path to be valid?
In a Workflow when doing a HTTP Request it gives the option to use a file for the “Value” field but it asks to specify a local filepath relative to flow engine The tooltip for “Value” reads “Incase value type is file, put local filepath relative to flow engine or public http or https url”. What does this mean? How can I place a file where a path for this is valid? Ultimately, I wish to first use the SFTP: Download File connector to download the file and this file will be the input for the HTTP POST call.
Since I have hit a roadblock with SSH Key Authorization in Workflows I have tried to do this as a FlowService. When using the Get operation with the Secure File Transfer Protocol (SFTP) service it returns a stream.
The HTTP Request can take the “contentStream” as input in the “stream” field. Or using the StreamToBytes service it can convert the stream to bytes and use that in the “bytes” input field. However, this is not accepted by the vendor. This brings me to my question. Is there no existing way to send the request body as a multipart form-data payload?