<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic RE: REST API JSON with repeating content in Product Forum</title>
    <link>https://community.blueprism.com/t5/Product-Forum/REST-API-JSON-with-repeating-content/m-p/84449#M35589</link>
    <description>&lt;P&gt;Hi Sigrid Kok,&lt;BR /&gt;&lt;BR /&gt;Below assets might be handy to write C# or vb.net . As&amp;nbsp; mentioned you might need to write custom code either in C#/vb.net&lt;BR /&gt;&lt;BR /&gt;I have done some thing similar in the past by using&amp;nbsp; "Function for JSON manipulation(Custom C#)"&lt;BR /&gt;&lt;BR /&gt;1) &lt;A href="https://digitalexchange.blueprism.com/dx/entry/3439/solution/utility---json" target="test_blank"&gt;https://digitalexchange.blueprism.com/dx/entry/3439/solution/utility---json&lt;/A&gt;&lt;BR /&gt;2) &lt;A href="https://digitalexchange.blueprism.com/dx/entry/7888/solution/json-manipulation-c" target="test_blank"&gt;https://digitalexchange.blueprism.com/dx/entry/7888/solution/json-manipulation-c&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;3) &lt;A href="https://digitalexchange.blueprism.com/dx/entry/122702/solution/coremoran---utility---json" target="test_blank"&gt;https://digitalexchange.blueprism.com/dx/entry/122702/solution/coremoran---utility---json&lt;/A&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;-----------------------&lt;BR /&gt;If I answered your query. Please  mark it as the "Best Answer"&lt;BR /&gt;&lt;BR /&gt;Harish M&lt;BR /&gt;Lead developer&lt;BR /&gt;America/New_York TX&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
    <pubDate>Fri, 05 May 2023 16:26:00 GMT</pubDate>
    <dc:creator>harish.mogulluri</dc:creator>
    <dc:date>2023-05-05T16:26:00Z</dc:date>
    <item>
      <title>REST API JSON with repeating content</title>
      <link>https://community.blueprism.com/t5/Product-Forum/REST-API-JSON-with-repeating-content/m-p/84444#M35584</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;It's been a while since I used the product and am getting back in the swing of things, so please forgive a somewhat newbie's question.&lt;BR /&gt;&lt;BR /&gt;I have a few REST API's with JSON body and output.&amp;nbsp; I have one working just fine, thanks to some tips I found on this site.&amp;nbsp; What isn't working is repeating content - something like this for multiple email addresses and multiple phone numbers that have country, phone and extension.&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;"my:to_EmailAddress": {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;"my:results_2": {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; "my:Repeating_Content": [&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;"my:to_EmailAddress_results_EmailAddress": "[inEmailAddress]"&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ]&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;BR /&gt;&amp;nbsp; },&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;"my:to_PhoneNumber": {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;"my:results_3": {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;"my:Repeating_Content": [&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; "my:to_PhoneNumber_results_DestinationLocationCountry": "[inCountryCode]",&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; "my:to_PhoneNumber_results_PhoneNumber": "[inPhoneNumber]",&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;"my:to_PhoneNumber_results_PhoneNumberExtension": "[inPhoneExtension]"&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;]&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;BR /&gt;&lt;BR /&gt;I thought I could specify these API parameters as collections &lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="28678.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/28807i7FCE8634AB97E360/image-size/large?v=v2&amp;amp;px=999" role="button" title="28678.png" alt="28678.png" /&gt;&lt;/span&gt;&lt;BR /&gt;and then create collections in my process&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="28679.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/28809iD7FBC62E123D322B/image-size/large?v=v2&amp;amp;px=999" role="button" title="28679.png" alt="28679.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="28680.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/28810i1FB185CE53A8ECE0/image-size/large?v=v2&amp;amp;px=999" role="button" title="28680.png" alt="28680.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;and map them to the API parameters matching the field names in my JSON&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="28681.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/28811i6F721E824BBCCFB2/image-size/large?v=v2&amp;amp;px=999" role="button" title="28681.png" alt="28681.png" /&gt;&lt;/span&gt;But it doesn't work.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;If I run without the collections, the API call works fine, but those fields with repeating values get a literal value of "&amp;lt;collection /&amp;gt;", like email.&lt;BR /&gt;&lt;BR /&gt;With it the collections mapped&amp;nbsp; like above, the API call doesn't even run.&amp;nbsp; I get a system exception, but no info on how to fix it.&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Can someone please point me in the right direction?&amp;nbsp; I think I'm close - just need repeating content in the JSON to be passed in properly.&lt;BR /&gt;&lt;BR /&gt;TIA&lt;BR /&gt;Sigrid&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Sigrid Kok&lt;BR /&gt;PSE&lt;BR /&gt;Winshuttle&lt;BR /&gt;America/Los_Angeles&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Thu, 04 May 2023 14:58:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/REST-API-JSON-with-repeating-content/m-p/84444#M35584</guid>
      <dc:creator>SigridKok</dc:creator>
      <dc:date>2023-05-04T14:58:00Z</dc:date>
    </item>
    <item>
      <title>RE: REST API JSON with repeating content</title>
      <link>https://community.blueprism.com/t5/Product-Forum/REST-API-JSON-with-repeating-content/m-p/84445#M35585</link>
      <description>&lt;P&gt;&lt;a href="https://community.blueprism.com/t5/user/viewprofilepage/user-id/2600"&gt;@SigridKok&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;So this is a Web API Service definition that you've created in Blue Prism with Collection as the data type for two of the input parameters, correct? I believe you'll need to set your Body Type to &lt;STRONG&gt;Custom Code&lt;/STRONG&gt; and then write some C#/VB to iterate over the input Collections and create the necessary JSON content from it. Alternatively, you might be able to create custom object definitions in the Global Code section that use List&amp;lt;T&amp;gt; as the type for those Collections and then use Newtonsoft to generate the JSON body.&lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Eric Wilson&lt;BR /&gt;Director, Integrations and Enablement&lt;BR /&gt;Blue Prism Digital Exchange&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Thu, 04 May 2023 16:27:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/REST-API-JSON-with-repeating-content/m-p/84445#M35585</guid>
      <dc:creator>ewilson</dc:creator>
      <dc:date>2023-05-04T16:27:00Z</dc:date>
    </item>
    <item>
      <title>RE: REST API JSON with repeating content</title>
      <link>https://community.blueprism.com/t5/Product-Forum/REST-API-JSON-with-repeating-content/m-p/84446#M35586</link>
      <description>&lt;P&gt;Thanks, Eric.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I had a feeling it might not be simple, and custom code/objects is not ideal, especially if the API call JSON contents change.&amp;nbsp; &lt;BR /&gt;&lt;BR /&gt;Having said that, do you know of any examples for either/both of the approaches you shared above?&lt;BR /&gt;&lt;BR /&gt;Thanks again,&lt;BR /&gt;Sigrid&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Sigrid Kok&lt;BR /&gt;PSE&lt;BR /&gt;Winshuttle&lt;BR /&gt;America/Los_Angeles&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Thu, 04 May 2023 18:43:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/REST-API-JSON-with-repeating-content/m-p/84446#M35586</guid>
      <dc:creator>SigridKok</dc:creator>
      <dc:date>2023-05-04T18:43:00Z</dc:date>
    </item>
    <item>
      <title>RE: REST API JSON with repeating content</title>
      <link>https://community.blueprism.com/t5/Product-Forum/REST-API-JSON-with-repeating-content/m-p/84447#M35587</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.blueprism.com/t5/user/viewprofilepage/user-id/2600"&gt;@SigridKok&lt;/a&gt; ,&lt;BR /&gt;&lt;BR /&gt;Try by removing the empty rows in the collections. There might be data validation in the API which has the fields as required fields because of which it might be failing (this is an assumption).&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Babjee Vangipurapu &lt;BR /&gt;Senior RPA Developer&lt;BR /&gt;Wonderbotz&lt;BR /&gt;India&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Thu, 04 May 2023 19:28:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/REST-API-JSON-with-repeating-content/m-p/84447#M35587</guid>
      <dc:creator>Babjee24</dc:creator>
      <dc:date>2023-05-04T19:28:00Z</dc:date>
    </item>
    <item>
      <title>RE: REST API JSON with repeating content</title>
      <link>https://community.blueprism.com/t5/Product-Forum/REST-API-JSON-with-repeating-content/m-p/84448#M35588</link>
      <description>&lt;P&gt;Thanks, Babjee.&lt;BR /&gt;&lt;BR /&gt;There aren't any blanks rows in the collections.&amp;nbsp; I wish it was that easy! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;Best Regards,&lt;BR /&gt;Sigrid&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Sigrid Kok&lt;BR /&gt;PSE&lt;BR /&gt;Winshuttle&lt;BR /&gt;America/Los_Angeles&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Thu, 04 May 2023 21:45:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/REST-API-JSON-with-repeating-content/m-p/84448#M35588</guid>
      <dc:creator>SigridKok</dc:creator>
      <dc:date>2023-05-04T21:45:00Z</dc:date>
    </item>
    <item>
      <title>RE: REST API JSON with repeating content</title>
      <link>https://community.blueprism.com/t5/Product-Forum/REST-API-JSON-with-repeating-content/m-p/84449#M35589</link>
      <description>&lt;P&gt;Hi Sigrid Kok,&lt;BR /&gt;&lt;BR /&gt;Below assets might be handy to write C# or vb.net . As&amp;nbsp; mentioned you might need to write custom code either in C#/vb.net&lt;BR /&gt;&lt;BR /&gt;I have done some thing similar in the past by using&amp;nbsp; "Function for JSON manipulation(Custom C#)"&lt;BR /&gt;&lt;BR /&gt;1) &lt;A href="https://digitalexchange.blueprism.com/dx/entry/3439/solution/utility---json" target="test_blank"&gt;https://digitalexchange.blueprism.com/dx/entry/3439/solution/utility---json&lt;/A&gt;&lt;BR /&gt;2) &lt;A href="https://digitalexchange.blueprism.com/dx/entry/7888/solution/json-manipulation-c" target="test_blank"&gt;https://digitalexchange.blueprism.com/dx/entry/7888/solution/json-manipulation-c&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;3) &lt;A href="https://digitalexchange.blueprism.com/dx/entry/122702/solution/coremoran---utility---json" target="test_blank"&gt;https://digitalexchange.blueprism.com/dx/entry/122702/solution/coremoran---utility---json&lt;/A&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;-----------------------&lt;BR /&gt;If I answered your query. Please  mark it as the "Best Answer"&lt;BR /&gt;&lt;BR /&gt;Harish M&lt;BR /&gt;Lead developer&lt;BR /&gt;America/New_York TX&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Fri, 05 May 2023 16:26:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/REST-API-JSON-with-repeating-content/m-p/84449#M35589</guid>
      <dc:creator>harish.mogulluri</dc:creator>
      <dc:date>2023-05-05T16:26:00Z</dc:date>
    </item>
    <item>
      <title>RE: REST API JSON with repeating content</title>
      <link>https://community.blueprism.com/t5/Product-Forum/REST-API-JSON-with-repeating-content/m-p/84450#M35590</link>
      <description>&lt;P&gt;Thanks @Harish M, I will check it out.&lt;BR /&gt;&lt;BR /&gt;Best Regards,&lt;BR /&gt;Sigrid&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Sigrid Kok&lt;BR /&gt;PSE&lt;BR /&gt;Winshuttle&lt;BR /&gt;America/Los_Angeles&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Fri, 05 May 2023 23:25:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/REST-API-JSON-with-repeating-content/m-p/84450#M35590</guid>
      <dc:creator>SigridKok</dc:creator>
      <dc:date>2023-05-05T23:25:00Z</dc:date>
    </item>
  </channel>
</rss>

