<?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 Problem in passing JSON parameter in TMC REST API call /tmc/v2.2/executions in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Problem-in-passing-JSON-parameter-in-TMC-REST-API-call-tmc-v2-2/m-p/2332568#M101436</link>
    <description>&lt;P&gt;From a Java application, we are trying to run a Standard job in TMC by invoking this REST API endpoint -&lt;/P&gt;&lt;P&gt;&lt;A href="https://api.us-west.cloud.talend.com/tmc/swagger/swagger-ui.html#" target="_blank"&gt;https://api.us-west.cloud.talend.com/tmc/swagger/swagger-ui.html#&lt;/A&gt; !/executions/execute&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the Body of the request, one of the parameters, say "arg2" is a JSON string as shown. This request fails with HTTP error 400. We used escape characters and we are very sure it's a valid JSON.&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;"executable": "task id here",&lt;/P&gt;&lt;P&gt;&amp;nbsp;"parameters": {&lt;/P&gt;&lt;P&gt;"arg1": "a",&lt;/P&gt;&lt;P&gt;"arg2": {"one":"x", "two": "y"}&lt;/P&gt;&lt;P&gt;&amp;nbsp;},&lt;/P&gt;&lt;P&gt;&amp;nbsp;"logLevel": "WARN"&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, if we change "arg2" to just a string value, it works successfully. &lt;/P&gt;&lt;P&gt;&amp;nbsp;"executable": "",&lt;/P&gt;&lt;P&gt;&amp;nbsp;"parameters": {&lt;/P&gt;&lt;P&gt;"arg1": "a",&lt;/P&gt;&lt;P&gt;"arg2": "b"&lt;/P&gt;&lt;P&gt;&amp;nbsp;},&lt;/P&gt;&lt;P&gt;&amp;nbsp;"logLevel": "WARN"&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anybody know how to pass an argument that itself is a JSON string ?'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Sat, 16 Nov 2024 00:23:41 GMT</pubDate>
    <dc:creator>SI3</dc:creator>
    <dc:date>2024-11-16T00:23:41Z</dc:date>
    <item>
      <title>Problem in passing JSON parameter in TMC REST API call /tmc/v2.2/executions</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Problem-in-passing-JSON-parameter-in-TMC-REST-API-call-tmc-v2-2/m-p/2332568#M101436</link>
      <description>&lt;P&gt;From a Java application, we are trying to run a Standard job in TMC by invoking this REST API endpoint -&lt;/P&gt;&lt;P&gt;&lt;A href="https://api.us-west.cloud.talend.com/tmc/swagger/swagger-ui.html#" target="_blank"&gt;https://api.us-west.cloud.talend.com/tmc/swagger/swagger-ui.html#&lt;/A&gt; !/executions/execute&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the Body of the request, one of the parameters, say "arg2" is a JSON string as shown. This request fails with HTTP error 400. We used escape characters and we are very sure it's a valid JSON.&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;"executable": "task id here",&lt;/P&gt;&lt;P&gt;&amp;nbsp;"parameters": {&lt;/P&gt;&lt;P&gt;"arg1": "a",&lt;/P&gt;&lt;P&gt;"arg2": {"one":"x", "two": "y"}&lt;/P&gt;&lt;P&gt;&amp;nbsp;},&lt;/P&gt;&lt;P&gt;&amp;nbsp;"logLevel": "WARN"&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, if we change "arg2" to just a string value, it works successfully. &lt;/P&gt;&lt;P&gt;&amp;nbsp;"executable": "",&lt;/P&gt;&lt;P&gt;&amp;nbsp;"parameters": {&lt;/P&gt;&lt;P&gt;"arg1": "a",&lt;/P&gt;&lt;P&gt;"arg2": "b"&lt;/P&gt;&lt;P&gt;&amp;nbsp;},&lt;/P&gt;&lt;P&gt;&amp;nbsp;"logLevel": "WARN"&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anybody know how to pass an argument that itself is a JSON string ?'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 00:23:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Problem-in-passing-JSON-parameter-in-TMC-REST-API-call-tmc-v2-2/m-p/2332568#M101436</guid>
      <dc:creator>SI3</dc:creator>
      <dc:date>2024-11-16T00:23:41Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in passing JSON parameter in TMC REST API call /tmc/v2.2/executions</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Problem-in-passing-JSON-parameter-in-TMC-REST-API-call-tmc-v2-2/m-p/2332569#M101437</link>
      <description>&lt;P&gt;Hi &lt;/P&gt;&lt;P&gt;Can you try &lt;/P&gt;&lt;P&gt;&amp;nbsp;"{\"one\":\"x\", \"two\": \"y\"}"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Shong&lt;/P&gt;</description>
      <pubDate>Tue, 23 Mar 2021 03:26:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Problem-in-passing-JSON-parameter-in-TMC-REST-API-call-tmc-v2-2/m-p/2332569#M101437</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-03-23T03:26:55Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in passing JSON parameter in TMC REST API call /tmc/v2.2/executions</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Problem-in-passing-JSON-parameter-in-TMC-REST-API-call-tmc-v2-2/m-p/2332570#M101438</link>
      <description>&lt;P&gt;Hi Shong, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your response. As I have mentioned earlier, we have already escaped all the " characters and any slashes that needs escaping.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The body of the request is a valid JSON. However, the TMC REST API fails with 400&lt;/P&gt;</description>
      <pubDate>Tue, 23 Mar 2021 12:09:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Problem-in-passing-JSON-parameter-in-TMC-REST-API-call-tmc-v2-2/m-p/2332570#M101438</guid>
      <dc:creator>SI3</dc:creator>
      <dc:date>2021-03-23T12:09:42Z</dc:date>
    </item>
  </channel>
</rss>

