<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.appian.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>How to download a file using REST service</title><link>https://community.appian.com/discussions/f/integrations/14621/how-to-download-a-file-using-rest-service</link><description>Hello, 
 
 one of the REST webservice returns the file. is there any way I can download that in knowledge center and show the link on SAIL form ? 
 Have anyone implemented this kind of solution ? 
 
 Thanks, 
 Tushar</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: How to download a file using REST service</title><link>https://community.appian.com/thread/65563?ContentTypeID=1</link><pubDate>Tue, 02 Apr 2019 05:36:06 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:220ee4ca-7c43-4298-9605-6e4364d0f2b1</guid><dc:creator>aloks0189</dc:creator><description>&lt;p&gt;Hi &lt;a href="/members/tushark171"&gt;tushark171&lt;/a&gt;&amp;nbsp;a quick question here:&lt;/p&gt;
&lt;p&gt;Is this REST API defined in Appian using WEB-API or in some Third-Party system and you are trying to consume it and want to download the document as part of this activity?&lt;/p&gt;
&lt;p&gt;&lt;span style="text-decoration:underline;"&gt;&lt;strong&gt;Scenario - 1 (When an API is defined in Appian and you are expecting some third-party system to push the data into it)&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Define a&amp;nbsp;Web-API having it&amp;#39;s method as POST&lt;/li&gt;
&lt;li&gt;Notify third party system to push the data in JSON format into it&amp;#39;s&amp;nbsp;body, where the body will contain the file URL identified with a key&lt;/li&gt;
&lt;li&gt;Start a process in Appian and pass the body as a parameter to this process&lt;/li&gt;
&lt;li&gt;Parse the File URL inside the process&lt;/li&gt;
&lt;li&gt;Use&amp;nbsp;&lt;em&gt;HTTP File Download&lt;/em&gt;&amp;nbsp;OOTB Smart Service to download this file and store it into the KC (provide the authentication, if required)&lt;/li&gt;
&lt;li&gt;Once you have the document available, you&amp;nbsp;should be able to show the link over SAIL&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="text-decoration:underline;"&gt;&lt;strong&gt;Scenario - 2 (When there is an API&amp;nbsp;defined by some&amp;nbsp;third party system and Appian need to consume it)&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style="text-decoration:underline;"&gt;&lt;/span&gt;You can ask the service provider to enable a GET API to return a&amp;nbsp;JSON response which should include their file url&amp;nbsp;
&lt;ul&gt;
&lt;li&gt;This depends upon, whether the service provider agrees to&amp;nbsp;enable a GET API for you or not&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Consume this API using an Integration Object / by any other preferred way(provide the authentication, if required)&lt;/li&gt;
&lt;li&gt;Parse the response and find the document URL&lt;/li&gt;
&lt;li&gt;Call this integration object in a process and use&amp;nbsp;&lt;em&gt;HTTP File Download&lt;/em&gt;&lt;span&gt;&amp;nbsp;OOTB Smart Service to download this file and store it into the KC (provide the authentication, if required)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;Once you have the document available, you should be able to show the link over SAIL&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Out of interest, why do you want store these documents into Appian? As you know that Appian is not a Content Management System and hence i would not recommend you to store huge volume of documents into KC, because this may result into server performance slowness.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You should consider any&amp;nbsp;content management system (if possible) such as Alfreso, Sharepoint or Azure and use their unique link generated against each document upload, to shown it on Appian SAIL UI.&lt;/p&gt;
&lt;p&gt;Hope this will help.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to download a file using REST service</title><link>https://community.appian.com/thread/65561?ContentTypeID=1</link><pubDate>Tue, 02 Apr 2019 04:11:10 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:fd48c57a-eec2-4aba-bb15-335a68f642ed</guid><dc:creator>josep</dc:creator><description>&lt;p&gt;Hello Tushar, &lt;/p&gt;
&lt;p&gt;Maybe you can handle everything on a process, maybe directly on the interface but to give you a really good suggestion, Can you explain little more about the rest service? &lt;/p&gt;
&lt;p&gt;How it returns the file? Base64? Is it just text? &lt;/p&gt;
&lt;p&gt;Does the rest service just return the file? &amp;nbsp;Can you show a sample responde of the rest service ? &lt;/p&gt;
&lt;p&gt;Jose&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>