<?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: Web API Services - Custom Code in Product Forum</title>
    <link>https://community.blueprism.com/t5/Product-Forum/Web-API-Services-Custom-Code/m-p/101261#M48261</link>
    <description>&lt;a href="https://community.blueprism.com/t5/user/viewprofilepage/user-id/41966"&gt;@JozefSovič&lt;/a&gt;,&lt;BR /&gt;&lt;BR /&gt;Any time you're creating custom code for the request there will be a default Out data item named &lt;STRONG&gt;Request_Content&lt;/STRONG&gt;.​ You must set it with the final value that you expect to see in the body of your request. Here's an example:&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="36664.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/36680i376BCED21B7D2A77/image-size/large?v=v2&amp;amp;px=999" role="button" title="36664.png" alt="36664.png" /&gt;&lt;/span&gt;&lt;BR /&gt;So, in your case you would end up with something like this:&lt;BR /&gt;
&lt;PRE class="language-vbnet"&gt;&lt;CODE&gt;Request_Content = ConvertToString(Data)​&lt;/CODE&gt;&lt;/PRE&gt;
&lt;BR /&gt;Cheers,</description>
    <pubDate>Thu, 13 Oct 2022 12:29:37 GMT</pubDate>
    <dc:creator>ewilson</dc:creator>
    <dc:date>2022-10-13T12:29:37Z</dc:date>
    <item>
      <title>Web API Services - Custom Code</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Web-API-Services-Custom-Code/m-p/101259#M48259</link>
      <description>Hello everyone&lt;BR /&gt;&lt;BR /&gt;I have some small issues with &lt;STRONG&gt;API - Custom Code&lt;/STRONG&gt;, I have no idea how to get it work correctly.&lt;BR /&gt;&lt;BR /&gt;We just have in a company XXL APIs with tons of inputs and not all the inputs are mandatory and sometimes we don't have all values to fill-in in that particular time. Today I just added a 9th version of same API with a different JSON Body. So we just decided that we do not want to have hundred versions of the same API and we want to keep everything as simple as possible.&lt;BR /&gt;&lt;BR /&gt;So I just want to create some really simple code that convert collection to JSON Template.&lt;BR /&gt;
&lt;DIV class="media" style="overflow: hidden; zoom: 1;"&gt;
&lt;DIV class="media" style="overflow: hidden; zoom: 1;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="36665.jpg"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/36679iC22C12A286CCBFF1/image-size/large?v=v2&amp;amp;px=999" role="button" title="36665.jpg" alt="36665.jpg" /&gt;&lt;/span&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;BR /&gt;The result of the function was tested without any issue when I changed the &lt;STRONG&gt;Action API - Body Content &lt;/STRONG&gt;to&lt;STRONG&gt; Template&lt;/STRONG&gt; and &lt;STRONG&gt;worked&lt;/STRONG&gt;.&lt;BR /&gt;&lt;BR /&gt;But What should I put it here to work ?&lt;BR /&gt;
&lt;DIV class="media" style="overflow: hidden; zoom: 1;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="36666.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/36673iC1D46335D012E09C/image-size/large?v=v2&amp;amp;px=999" role="button" title="36666.png" alt="36666.png" /&gt;&lt;/span&gt;&lt;/DIV&gt;
&lt;BR /&gt;Because this is throwing me a error 500.&lt;BR /&gt;Thank you for all the answers.&lt;BR /&gt;&lt;BR /&gt;BR</description>
      <pubDate>Thu, 13 Oct 2022 08:00:05 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Web-API-Services-Custom-Code/m-p/101259#M48259</guid>
      <dc:creator>JozefSovič</dc:creator>
      <dc:date>2022-10-13T08:00:05Z</dc:date>
    </item>
    <item>
      <title>Re: Web API Services - Custom Code</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Web-API-Services-Custom-Code/m-p/101260#M48260</link>
      <description>Hi J,&lt;BR /&gt;&lt;BR /&gt;While not being a programmer in the language used in the example: Wouldn't a TRY and CATCH combination provide you with more info on what goes wrong?&lt;BR /&gt;&lt;BR /&gt;Happy coding!&lt;BR /&gt;---------------&lt;BR /&gt;Paul&lt;BR /&gt;Sweden</description>
      <pubDate>Thu, 13 Oct 2022 10:34:52 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Web-API-Services-Custom-Code/m-p/101260#M48260</guid>
      <dc:creator>PvD_SE</dc:creator>
      <dc:date>2022-10-13T10:34:52Z</dc:date>
    </item>
    <item>
      <title>Re: Web API Services - Custom Code</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Web-API-Services-Custom-Code/m-p/101261#M48261</link>
      <description>&lt;a href="https://community.blueprism.com/t5/user/viewprofilepage/user-id/41966"&gt;@JozefSovič&lt;/a&gt;,&lt;BR /&gt;&lt;BR /&gt;Any time you're creating custom code for the request there will be a default Out data item named &lt;STRONG&gt;Request_Content&lt;/STRONG&gt;.​ You must set it with the final value that you expect to see in the body of your request. Here's an example:&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="36664.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/36680i376BCED21B7D2A77/image-size/large?v=v2&amp;amp;px=999" role="button" title="36664.png" alt="36664.png" /&gt;&lt;/span&gt;&lt;BR /&gt;So, in your case you would end up with something like this:&lt;BR /&gt;
&lt;PRE class="language-vbnet"&gt;&lt;CODE&gt;Request_Content = ConvertToString(Data)​&lt;/CODE&gt;&lt;/PRE&gt;
&lt;BR /&gt;Cheers,</description>
      <pubDate>Thu, 13 Oct 2022 12:29:37 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Web-API-Services-Custom-Code/m-p/101261#M48261</guid>
      <dc:creator>ewilson</dc:creator>
      <dc:date>2022-10-13T12:29:37Z</dc:date>
    </item>
  </channel>
</rss>

