<?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>Web API configuration to upload a file along with input data</title><link>https://community.appian.com/discussions/f/process/24259/web-api-configuration-to-upload-a-file-along-with-input-data</link><description>Hi Team, 
 We have a requirement to get files from external system along with some input parameters to our process model via a web api. 
 The web api which starts a process would upload the file to the target folder and write/update data in respective</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Web API configuration to upload a file along with input data</title><link>https://community.appian.com/thread/93576?ContentTypeID=1</link><pubDate>Wed, 13 Apr 2022 13:10:29 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:373e5e2b-385a-4915-85b8-fd9bf6c1ac4a</guid><dc:creator>Dimitris Soulovaris</dc:creator><description>&lt;p&gt;Did you go through the link I&amp;#39;ve attached? That contains pretty much everything you need including examples on how to build the API, how to initiate the PM and how to pass the process variables into it.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Simply, on the given example the&amp;nbsp;&lt;span class="gs"&gt;http!request.body will be your json message which you have to pass into the Process Model in a pv. For example:&lt;/span&gt;&lt;span class="gs"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;pre&gt;&lt;span class="nf"&gt;a!startProcess&lt;/span&gt;&lt;span class="ow"&gt;(&lt;/span&gt;
      &lt;span class="ss"&gt;processModel:&lt;/span&gt; &lt;span class="no"&gt;cons!UPLOAD_STUDENT_TRANSCRIPT&lt;/span&gt;&lt;span class="ow"&gt;,&lt;/span&gt;
      &lt;span class="ss"&gt;processParameters:&lt;/span&gt; &lt;span class="ow"&gt;{&lt;br /&gt;&lt;/span&gt;
       jsonData&lt;span class="gs"&gt;: http!request.body&lt;br /&gt;&lt;/span&gt;
      &lt;span class="ow"&gt;},&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;The jsonData should be a process variable of type text in the PM.&lt;/p&gt;
&lt;p&gt;For parsing the jsonData and getting your information from it, use the&amp;nbsp;a!fromJson() function in an expression rule.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Web API configuration to upload a file along with input data</title><link>https://community.appian.com/thread/93569?ContentTypeID=1</link><pubDate>Wed, 13 Apr 2022 11:53:05 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:d9699a31-cc5a-466f-971f-936a1c982ec1</guid><dc:creator>SS</dc:creator><description>&lt;p&gt;Will it be possible for you to share some sample codes if you have any?&lt;br /&gt;And for passing the input as json, I can create a web api using startprocess template right?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Web API configuration to upload a file along with input data</title><link>https://community.appian.com/thread/93568?ContentTypeID=1</link><pubDate>Wed, 13 Apr 2022 10:59:27 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:b19d9ddd-4324-47b1-8245-fd3baff075eb</guid><dc:creator>Dimitris Soulovaris</dc:creator><description>&lt;p&gt;I guess you can do that and inside the Process Model that the API will initiate, you can then parse the json and export&amp;nbsp; the document (transcript data) and the rest of your variables.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Web API configuration to upload a file along with input data</title><link>https://community.appian.com/thread/93566?ContentTypeID=1</link><pubDate>Wed, 13 Apr 2022 10:47:37 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:346a3e1f-6f36-4a81-84ef-4de7175297ce</guid><dc:creator>SS</dc:creator><description>&lt;p&gt;Hi Dimitris,&lt;/p&gt;
&lt;p&gt;Thanks for your reply.&amp;nbsp;&lt;br /&gt;Is there no way like I can send the files as well the input parameters as a json input or form input instead of passing input parameters inside query&amp;nbsp;parameters.&lt;br /&gt;Also I have one more question : Can&amp;#39;t we authorize our web api for the above action with Appian key authorization?&amp;nbsp;&lt;br /&gt;I was trying to call the web api from postman I get 403 error while using Appian key.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Web API configuration to upload a file along with input data</title><link>https://community.appian.com/thread/93565?ContentTypeID=1</link><pubDate>Wed, 13 Apr 2022 10:41:17 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:6d6dcad3-7422-4bb9-b67b-4e0cc8138111</guid><dc:creator>Dimitris Soulovaris</dc:creator><description>&lt;p&gt;I think this is what you are looking for:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://docs.appian.com/suite/help/22.1/passing-a-web-api-document-into-a-process-model.html"&gt;docs.appian.com/.../passing-a-web-api-document-into-a-process-model.html&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>