<?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>REST CALL Problem</title><link>https://community.appian.com/discussions/f/integrations/20699/rest-call-problem</link><description>Hi , 
 I am setting a rest call using Integration Smart Service and on the field which is text I need to sent a sprecific structure like follow: 
 
 { { &amp;quot;Name&amp;quot;: &amp;quot;Name1&amp;quot;,&amp;quot;Value&amp;quot;: pv!Value1}, { &amp;quot;Name&amp;quot;: &amp;quot;Name2&amp;quot;,&amp;quot;Value&amp;quot;: pv!Value2}} . 
 
 I try several different</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: REST CALL Problem</title><link>https://community.appian.com/thread/80654?ContentTypeID=1</link><pubDate>Thu, 01 Apr 2021 13:32:37 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:113a1aba-908d-4ecb-8cb7-3a7836556aab</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;If you put a string containing quotations marks into a toJson, it escapes the quotes to make it valid JSON.&lt;/p&gt;
&lt;p&gt;It is pretty hard to understand what you are doing. Did you try to follow my last post?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: REST CALL Problem</title><link>https://community.appian.com/thread/80653?ContentTypeID=1</link><pubDate>Thu, 01 Apr 2021 13:28:38 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:c5fe0c5b-3fbf-4c7b-91ee-0d0dff1948e2</guid><dc:creator>natasav</dc:creator><description>&lt;p&gt;Now ri!parametars is text same as parametar on the other side.&lt;/p&gt;
&lt;p&gt;There I past an expression and save into pv!text variable for double check.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;But on my pv the value is OK ,on received site it is with addtional &amp;quot;&amp;quot;.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: REST CALL Problem</title><link>https://community.appian.com/thread/80652?ContentTypeID=1</link><pubDate>Thu, 01 Apr 2021 13:19:28 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:fb74d269-89c4-4e27-83c8-5ab50893e24c</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;OK. So this is all about &amp;quot;Parameters&amp;quot;? Which data type is &amp;quot;ri!Parametarts&amp;quot; (Is this a typo?)? String? If yes, why?&lt;/p&gt;
&lt;p&gt;What I see is that it seems that the API expects a list of Name/Value pairs. The easiest way to create this is like you initially did&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;{
  {
    &amp;quot;Name&amp;quot;: &amp;quot;requested&amp;quot;,
    &amp;quot;Value&amp;quot; : ri!SystemInfo.Firewall_requestedFor
  },
  {
    &amp;quot;Name&amp;quot;: &amp;quot;Source&amp;quot;,
    &amp;quot;Value&amp;quot;: ri!SystemInfo.Firewall_sourceAD_IP
  },
  {
    &amp;quot;Name&amp;quot;: &amp;quot;Destination&amp;quot;,
    &amp;quot;Value&amp;quot;: ri!SystemInfo.Firewall_destinationIPs
  }
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;But make the rule input &amp;quot;Parametarts&amp;quot; (Typo?) an &amp;quot;any&amp;quot; type. This way you pass a data structure into the integration. Here it &amp;nbsp;is added to the internal data structure and then it is turned into JSON altogether.&lt;/p&gt;
&lt;p&gt;BTW an integration turns a dictionary or CDT into JSON on its own. The toJson() is not needed.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: REST CALL Problem</title><link>https://community.appian.com/thread/80651?ContentTypeID=1</link><pubDate>Thu, 01 Apr 2021 12:54:47 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:4f0c3698-69e5-4f8d-97f0-910bf8d4b588</guid><dc:creator>natasav</dc:creator><description>&lt;p&gt;We have systems where this parameters is null and those calls are OK the problem are the call where we have parameters.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Here is the body of the integration:&lt;/p&gt;
&lt;p&gt;=a!toJson({&lt;br /&gt; &amp;quot;AppianID&amp;quot; : ri!AppianID,&lt;br /&gt; &amp;quot;GetProvisioningApproversInfo&amp;quot;:{&lt;br /&gt; &amp;quot;SystemID&amp;quot;:ri!SystemRolesDetails.SystemID,&lt;br /&gt; &amp;quot;roleID&amp;quot;: ri!SystemRolesDetails.RoleID[1],&lt;br /&gt; &amp;quot;moduleID&amp;quot;: ri!SystemRolesDetails.ModuleID,&lt;br /&gt; &amp;quot;employeeID&amp;quot;:ri!SystemRolesDetails.EmployeeID,&lt;br /&gt; &amp;quot;ContractID&amp;quot; : ri!ContractID,&lt;br /&gt; &amp;quot;ADUserNameRequstby&amp;quot;:ri!SystemRolesDetails.ADUserNameRequstby,&lt;br /&gt; &amp;quot;validTo&amp;quot; : ri!ValidTo,&lt;br /&gt; &amp;quot;validFrom&amp;quot; : ri!ValidFrom,&lt;br /&gt; &amp;quot;Parameters&amp;quot; : ri!Parametarts&lt;br /&gt; }})&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;This is what you need?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: REST CALL Problem</title><link>https://community.appian.com/thread/80650?ContentTypeID=1</link><pubDate>Thu, 01 Apr 2021 12:51:05 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:ac97e2a3-43a3-4234-8845-985d566e2fd3</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;OK. Then I need a screenshot of the call integration node showing how you pass the values. Similar to the screenshot above, but click on &amp;quot;SystemRolesDetails&amp;quot; first.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: REST CALL Problem</title><link>https://community.appian.com/thread/80649?ContentTypeID=1</link><pubDate>Thu, 01 Apr 2021 12:47:39 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:2e363086-0813-4d68-9035-9c2e8998ac73</guid><dc:creator>natasav</dc:creator><description>&lt;p&gt;From integration definition and postman it works&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: REST CALL Problem</title><link>https://community.appian.com/thread/80648?ContentTypeID=1</link><pubDate>Thu, 01 Apr 2021 12:46:40 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:2a17eefd-69cd-4b2d-9db0-1194e992eb2f</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;It is really hard to understand what is going on.&lt;/p&gt;
&lt;p&gt;I suggest to test the integration objects itself. Not via a process model. Once that works, you will have abetter understanding of the data to pass in.&lt;/p&gt;
&lt;p&gt;Once again, I would like to see how the integration object looks like.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: REST CALL Problem</title><link>https://community.appian.com/thread/80647?ContentTypeID=1</link><pubDate>Thu, 01 Apr 2021 12:44:17 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:1eed7526-98d4-4b2b-ae5c-87d969428ef4</guid><dc:creator>natasav</dc:creator><description>&lt;p&gt;Maybe tostring () or somethig else will prevent ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: REST CALL Problem</title><link>https://community.appian.com/thread/80646?ContentTypeID=1</link><pubDate>Thu, 01 Apr 2021 12:42:45 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:e2072bf1-f00e-437f-8061-e83af71a097a</guid><dc:creator>natasav</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;We just have some improvement but I need a little help&amp;nbsp; once more. So I sent it without a!tojson and the request is going but on the other site we have&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;quot;{\&amp;quot;Name\&amp;quot;:\&amp;quot;distributionPlace\&amp;quot;,\&amp;quot;Value\&amp;quot;:\&amp;quot;008M- САЛОН ТЦ ВЕРО\&amp;quot;}&amp;quot;&lt;/p&gt;
&lt;p&gt;So my question is prevent and sent it like this&amp;nbsp;&lt;/p&gt;
&lt;p&gt;{\&amp;quot;Name\&amp;quot;:\&amp;quot;distributionPlace\&amp;quot;,\&amp;quot;Value\&amp;quot;:\&amp;quot;008M- САЛОН ТЦ ВЕРО\&amp;quot;}&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;without &amp;quot; at the begining and end.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;BR,Natasa&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: REST CALL Problem</title><link>https://community.appian.com/thread/80644?ContentTypeID=1</link><pubDate>Thu, 01 Apr 2021 11:55:45 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:c2e7f731-caff-4db4-b0cf-bffbc4eab574</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;It is not the same. The parameter expects a data structure and not a string. Please add a screenshot of how the parameter assignment looks like.&lt;/p&gt;
&lt;p&gt;In Appian, square brackets &amp;quot;[ ]&amp;quot; are only used to index an item in a list or a field in a CDT. Even if it looks like JSON, it is not the same.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: REST CALL Problem</title><link>https://community.appian.com/thread/80643?ContentTypeID=1</link><pubDate>Thu, 01 Apr 2021 11:40:30 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:8510b4bb-43fe-44db-9552-98c4b3891dd1</guid><dc:creator>natasav</dc:creator><description>&lt;p&gt;It is the same but only the value is with [ not with { as expected.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: REST CALL Problem</title><link>https://community.appian.com/thread/80642?ContentTypeID=1</link><pubDate>Thu, 01 Apr 2021 11:37:34 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:0b739dfc-113e-4d90-8010-733ee5cf98a8</guid><dc:creator>natasav</dc:creator><description>&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/18/INT_5F00_Object.png" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: REST CALL Problem</title><link>https://community.appian.com/thread/80641?ContentTypeID=1</link><pubDate>Thu, 01 Apr 2021 11:35:01 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:4f809a7d-5afa-403a-ab37-2413087a3c81</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;OK. I think this is pretty clear. The integration expects a data structure &amp;nbsp;but not a string. What happens if you remove the toJson()?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: REST CALL Problem</title><link>https://community.appian.com/thread/80640?ContentTypeID=1</link><pubDate>Thu, 01 Apr 2021 11:32:03 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:d3500d29-aed3-4540-a0cf-8843db90d1f9</guid><dc:creator>natasav</dc:creator><description>&lt;div&gt;Here is the error:&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;There is a problem with task &amp;ldquo;Get Provisioning ID&amp;rdquo; in the process &amp;ldquo;Get&lt;br /&gt; Approvers-Flow 1-ProvisioningRequest&amp;rdquo;. Expression evaluation error in&lt;br /&gt; rule &amp;#39;icarm_post_provisioningrequest&amp;#39;: The value parameter must be a&lt;br /&gt; CDT, a dictionary, or a list. Received type: [Text], value:&lt;br /&gt; [{"Name":"distributionPlace","Value":"010M- САЛОН ЧЕНТО"}]&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: REST CALL Problem</title><link>https://community.appian.com/thread/80639?ContentTypeID=1</link><pubDate>Thu, 01 Apr 2021 11:21:12 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:33473d98-8485-4bf5-89af-4acb3b0f2747</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;Do you see any error messages? Please post them. Can you provide a screenshot of the integration object?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: REST CALL Problem</title><link>https://community.appian.com/thread/80638?ContentTypeID=1</link><pubDate>Thu, 01 Apr 2021 11:17:54 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:554138cc-241f-4e2c-88be-9e3b5211e6b9</guid><dc:creator>natasav</dc:creator><description>&lt;p&gt;For one of the application from expression rule&amp;nbsp;ICARM_Define_Parametarts&lt;/p&gt;
&lt;p&gt;I sent in output&lt;/p&gt;
&lt;p&gt;{{&lt;/p&gt;
&lt;p&gt;&amp;quot;Name&amp;quot; : &amp;quot;requested&amp;quot;,&lt;br /&gt; &amp;quot;Value&amp;quot; :ri!SystemInfo.Firewall_requestedFor},&lt;br /&gt; {&amp;quot;Name&amp;quot;:&amp;quot;Source&amp;quot;,&lt;br /&gt; &amp;quot;Value&amp;quot;: ri!SystemInfo.Firewall_sourceAD_IP},&lt;br /&gt; {&amp;quot;Name&amp;quot;:&amp;quot;Destination&amp;quot;,&lt;br /&gt; &amp;quot;Value&amp;quot;: ri!SystemInfo.Firewall_destinationIPs}}&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;And on the Integration Smart I sent the data in format&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;a!toJson (rule!&lt;span&gt;ICARM_Define_Parametarts(pv!SystemInfo).&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The other approach that I try is to same the data&amp;nbsp; into process variable define as&amp;nbsp; CDT with structure.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;and than sent the data a!tojson pv!variable)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;But no one of this two scenarios worked.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;BR,Natasa&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;a!tojson (rule!Expression&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: REST CALL Problem</title><link>https://community.appian.com/thread/80637?ContentTypeID=1</link><pubDate>Thu, 01 Apr 2021 11:04:58 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:48e281c0-0a31-4965-9f15-c816c69a8e8b</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;If the integration object expects text in JSON format, the putting your code inside a toJson() should help. Did you try that? How does the integration object look like?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>