<?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>Integrations:  Passing parameters in the body of a HTTP POST request</title><link>https://community.appian.com/discussions/f/integrations/13189/integrations-passing-parameters-in-the-body-of-a-http-post-request</link><description>I am attempting to set up an Integration in Appian (v18.2) to retrieve data using an HTTP POST request. The parameters are being sent as Text in the body of the request which is set as Multipart Form Data. The request completes without error, but the</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Integrations:  Passing parameters in the body of a HTTP POST request</title><link>https://community.appian.com/thread/59558?ContentTypeID=1</link><pubDate>Fri, 24 Aug 2018 21:37:40 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:882c2726-bc1c-4a62-a861-52e7c9284730</guid><dc:creator>bent978</dc:creator><description>Thanks for taking the time to respond.&lt;br /&gt;
&lt;br /&gt;
The Usage value is set to &amp;#39;Queries Data&amp;#39;.&lt;br /&gt;
&lt;br /&gt;
The Content Type of the body is set to Multipart Form Data.&lt;br /&gt;
&lt;br /&gt;
This particular Web API does not work when the parameters are passed as &amp;#39;Parameters&amp;#39; (in Appian or Postman), only when they are passed in the request body (which works with Postman).  The API is only provided as a POST method.  I will try to get more details about the &amp;#39;expectations&amp;#39; of the API from the service provider.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Integrations:  Passing parameters in the body of a HTTP POST request</title><link>https://community.appian.com/thread/59556?ContentTypeID=1</link><pubDate>Fri, 24 Aug 2018 20:06:12 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:7cee0f91-7992-49e1-b2f4-a237a71acba1</guid><dc:creator>mattk</dc:creator><description>It&amp;#39;s difficult to know what the issue is without knowing what the source system looks like/expects.&lt;br /&gt;
&lt;br /&gt;
I assume your body is formatted something like the following:&lt;br /&gt;
&lt;br /&gt;
a!toJson(&lt;br /&gt;
  {&lt;br /&gt;
    &amp;quot;createTransactionRequest&amp;quot;: {&lt;br /&gt;
      &amp;quot;merchantAuthentication&amp;quot;: {&lt;br /&gt;
        &amp;quot;name&amp;quot;: cons!AUTHORIZE_DOT_NET_API_LOGIN_ID,&lt;br /&gt;
        &amp;quot;transactionKey&amp;quot;: cons!AUTHORIZE_DOT_NET_TRANSACTION_KEY&lt;br /&gt;
      },&lt;br /&gt;
      &amp;quot;transactionRequest&amp;quot;: {&lt;br /&gt;
        &amp;quot;transactionType&amp;quot;: &amp;quot;authCaptureTransaction&amp;quot;,&lt;br /&gt;
        &amp;quot;amount&amp;quot;: &amp;quot;100.00&amp;quot;,&lt;br /&gt;
        &amp;quot;payment&amp;quot;: {&lt;br /&gt;
          &amp;quot;creditCard&amp;quot;: {&lt;br /&gt;
            &amp;quot;cardNumber&amp;quot;: &amp;quot;5424000000000015&amp;quot;,&lt;br /&gt;
            &amp;quot;expirationDate&amp;quot;: &amp;quot;1220&amp;quot;,&lt;br /&gt;
            &amp;quot;cardCode&amp;quot;: &amp;quot;999&amp;quot;&lt;br /&gt;
          }&lt;br /&gt;
        }&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
Referenced from the Integration Tutorial: &lt;a href="https://docs.appian.com/suite/help/18.2/Integration_Tutorial.html"&gt;docs.appian.com/.../Integration_Tutorial.html&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
The above tutorial shows Appian working with a POST request passing parameters within the body (tested working for both querying and modifying data). However, it seems as though there is some configuration issue/mismatch from the API as Appian cannot retrieve the data in a similar manner as seen in the above example.&lt;br /&gt;
&lt;br /&gt;
I will outline some things to double check along with alternatives, hopefully they are helpful.&lt;br /&gt;
&lt;br /&gt;
When using a POST request to retrieve data with an Integration be sure to pay attention to the Usage value. The Usage value should be set to the &amp;quot;Queries data&amp;quot; option. When selecting POST for the Method value Appian automatically sets the Usage value to &amp;quot;Modifies data.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The only other option I see is implementing a GET version of the request both in Appian and for the API.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Integrations:  Passing parameters in the body of a HTTP POST request</title><link>https://community.appian.com/thread/59551?ContentTypeID=1</link><pubDate>Fri, 24 Aug 2018 16:58:38 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:337add33-8efd-477c-b795-b81b01603250</guid><dc:creator>bent978</dc:creator><description>When looking at the HTTP requests generated by Postman and the Appian integration, the differences are as follows:&lt;br /&gt;
&lt;br /&gt;
1) The multipart/form-data boundaries are different:&lt;br /&gt;
&lt;br /&gt;
Postman:  ----WebKitFormBoundary7MA4YWxkTrZu0gW&lt;br /&gt;
Appian:  TnQmfygKfP801A_kE1bGL-7YAFk_k6gl9&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2) Appian adds the following to the header:&lt;br /&gt;
&lt;br /&gt;
Content-Length: 1278&lt;br /&gt;
Connection: Keep-Alive&lt;br /&gt;
User-Agent: Appian&lt;br /&gt;
Accept-Encoding: gzip,deflate&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3) Appian adds the following for each parameter passed in the body of the request:&lt;br /&gt;
&lt;br /&gt;
Content-Type: text/plain; charset=UTF-8&lt;br /&gt;
Content-Transfer-Encoding: 8bit&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>