Hi Suraj,
To access your sftp server, you'll need to write a xsl stylesheet that uses a dp:url-open extension function using a sftp url. Here's a link to the DataPower knowledge center for an example. https://www.ibm.com/docs/en/datapower-gateway/10.0.1?topic=open-url-sftp. You can do this in API Connect as an xslt policy. I understand many like GatewayScript policies instead of xslt as stylesheet coding is becoming a lost art, but unfortunately, DataPower GatewayScript only supports http(s), (dp)mq, and graphql protocols. There are more protocols supported by the xslt extension function. If you need this capability in a more general sense than just this one API, then yes you could create a UDP where the UDP property could be the sftp server url, or perhaps broken down further to sftp server, username, password, path where your xslt in the UDP would build the url from the UDP properties.
Best Regards,
Steve
------------------------------
Steve Linn
Senior Consulting I/T Specialist
IBM
------------------------------
Original Message:
Sent: Tue January 24, 2023 07:03 AM
From: Suraj Sakpal
Subject: How to create a get api to download a file from a SFTP server file path
Hi Guys,
Could anyone guide me on how to download a file from a seperate sftp server to the response body using API Connect
------------------------------
Suraj Sakpal
------------------------------