<?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>Integration Object - Test Request - JSON request body with Arrays</title><link>https://community.appian.com/discussions/f/integrations/11905/integration-object---test-request---json-request-body-with-arrays</link><description>Hi, 
 We are on 17.3. Created an integration object with url, authentication, method etc. It is a POST api and for testing, gave a sample JSON request in &amp;quot;Body&amp;quot; with &amp;quot;Content Type&amp;quot; as &amp;quot;JSON&amp;quot;. The request body has arrays and therefore used &amp;quot;[&amp;quot; and &amp;quot;]&amp;quot;</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Integration Object - Test Request - JSON request body with Arrays</title><link>https://community.appian.com/thread/52809?ContentTypeID=1</link><pubDate>Wed, 21 Feb 2018 06:05:51 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:5e3849b3-8540-4d88-ae9c-504d2b3c1663</guid><dc:creator>Abhay Giri</dc:creator><description>Hi Satish,&lt;br /&gt;
&lt;br /&gt;
In Appian if you want to define array , please use  &amp;quot; {} &amp;quot;  brackets (curly brackets ) not  &amp;quot; [] &amp;quot; (big brackets) . And when you work with Process model with integration object by passing CDT, it will work because Process model know how to handle CDT array types.&lt;br /&gt;
&lt;br /&gt;
Regards&lt;br /&gt;
Abhay Giri&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Integration Object - Test Request - JSON request body with Arrays</title><link>https://community.appian.com/thread/52707?ContentTypeID=1</link><pubDate>Fri, 16 Feb 2018 08:50:07 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:1e2552b1-c04d-4ea8-b636-a3a97e208faf</guid><dc:creator>aloks0189</dc:creator><description>Hi &lt;a href="/members/sathishkumars"&gt;sathishkumars&lt;/a&gt;  generally usage of [] to represent Array in JSON is valid but when it comes to Appian, do not accept [] hence try replacing [] with {} that should work.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Integration Object - Test Request - JSON request body with Arrays</title><link>https://community.appian.com/thread/52699?ContentTypeID=1</link><pubDate>Fri, 16 Feb 2018 03:48:44 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:462bd8a8-88ac-4b50-a73e-09b90a772bea</guid><dc:creator>Prateek Bhatti</dc:creator><description>Hi Satish,&lt;br /&gt;
In Integration for the request body which has arrays we use &amp;quot;{&amp;quot; and &amp;quot;}&amp;quot; NOT &amp;quot;[&amp;quot;and &amp;quot;]&amp;quot;.&lt;br /&gt;
You can try in this way:&lt;br /&gt;
a!toJson(&lt;br /&gt;
  {&lt;br /&gt;
    endpoint: ri!endpoint,&lt;br /&gt;
    data: {&lt;br /&gt;
      item: {&lt;br /&gt;
        Name: ri!name,&lt;br /&gt;
        DOB: ri!dob,&lt;br /&gt;
        address: ri!address&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
)&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Integration Object - Test Request - JSON request body with Arrays</title><link>https://community.appian.com/thread/52696?ContentTypeID=1</link><pubDate>Thu, 15 Feb 2018 21:58:31 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:4621c9e4-d9bc-4ed2-92a8-1d069ba02dbf</guid><dc:creator>bradc</dc:creator><description>Hi Sathish,&lt;br /&gt;
&lt;br /&gt;
A request body I have implemented into an integration looks like this:&lt;br /&gt;
&lt;br /&gt;
a!toJson(&lt;br /&gt;
 ri!CDT&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
You can add and type your input specific to the CDT you are using in the body and use that input to input some test data from the integration object.&lt;br /&gt;
&lt;br /&gt;
If you do not want to add an input, you can use this code in the body instead: &lt;br /&gt;
&lt;br /&gt;
a!toJson(&lt;br /&gt;
 {&lt;br /&gt;
type!CDT(fieldA: &amp;quot;ABC&amp;quot;, fieldB: &amp;quot;123&amp;quot;),&lt;br /&gt;
type!CDT(fieldA: &amp;quot;XYZ&amp;quot;, fieldB: &amp;quot;987&amp;quot;),&lt;br /&gt;
}&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
Hope this helps!&lt;br /&gt;
Brad&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>