<?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: Posting Data to Qlik- Using Java Rest Template giving 308 in Qlik Automate</title>
    <link>https://community.qlik.com/t5/Qlik-Automate/Posting-Data-to-Qlik-Using-Java-Rest-Template-giving-308/m-p/1933424#M575</link>
    <description>&lt;P&gt;this post should probably be moved to another section (has nothing to do with Qlik Application Automation) but i would still like to comment on it.&lt;/P&gt;
&lt;P&gt;I myself tried this yesterday when I saw this API endpoint. I get the same error message that the request must contain a 'name' parameter (400 - Bad request). I use postman and I believe the request should be ok;&lt;/P&gt;
&lt;DIV&gt;
&lt;DIV&gt;&lt;LI-CODE lang="javascript"&gt;curl --location --request POST "https://xxxxxxx.eu.qlikcloud.com/api/v1/data-files" \
--header "Content-Type: multipart/form-data" \
--header "Authorization: Bearer xxxxxxxxxxxx" \
--form "name=\"testFromAPI.csv\"" \
--form "connectionId=\"9ee38f4f-bedf-44f2-aeba-8c29d82eef5\"" \
--form "file=@\"/C:/xxxxxxx/testFromAPI.csv\""&lt;/LI-CODE&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;Accourding to&amp;nbsp;&lt;A href="https://qlik.dev/apis/rest/data-files#%23%2Fentries%2Fdata-files-post" target="_self"&gt;qlik.dev data-files post&lt;/A&gt;&amp;nbsp; only name and file is mandatory, others are optional.&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;Br Johan&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 20 May 2022 07:38:32 GMT</pubDate>
    <dc:creator>blaise</dc:creator>
    <dc:date>2022-05-20T07:38:32Z</dc:date>
    <item>
      <title>Posting Data to Qlik- Using Java Rest Template giving 308</title>
      <link>https://community.qlik.com/t5/Qlik-Automate/Posting-Data-to-Qlik-Using-Java-Rest-Template-giving-308/m-p/1933369#M574</link>
      <description>&lt;P&gt;Hi Qlik users,&lt;/P&gt;
&lt;P&gt;I am relatively new to Qlik&amp;nbsp; and trying to develop a POC.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My requirement is to post a user data file to Qlik account - call the REST end point -&lt;A href="https://your-tenant.us.qlikcloud.com/api/v1/data-files" target="_blank" rel="noopener"&gt;https://your-tenant.us.qlikcloud.com/api/v1/data-files&lt;/A&gt;&amp;nbsp;via Java and see the file appear in the Data option in my account .&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When I try the end point via postman getting the error -Request must have 'name' specified while posting new file . Adding my request screen -&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Poornima_Menon_0-1653019115721.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/79901i5E30CA72162CBE26/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Poornima_Menon_0-1653019115721.png" alt="Poornima_Menon_0-1653019115721.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Poornima_Menon_1-1653019128016.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/79902i9FCE74D3D54B2A28/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Poornima_Menon_1-1653019128016.png" alt="Poornima_Menon_1-1653019128016.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Response :&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Poornima_Menon_2-1653019139155.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/79903i4D5FF97637B7D72A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Poornima_Menon_2-1653019139155.png" alt="Poornima_Menon_2-1653019139155.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Poornima_Menon_3-1653019167411.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/79904i3DC71A8CBBE11933/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Poornima_Menon_3-1653019167411.png" alt="Poornima_Menon_3-1653019167411.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Also I tried via calling this with Rest Template - but getting 308 . A sample to make this request successfully would be much appreciated and useful for me . Also an explanation of what the variables in BOLD should be which is given in the&amp;nbsp; developer portal -&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;'{"name":"MyFile.csv","&lt;STRONG&gt;appId&lt;/STRONG&gt;":"f34b91a1-0dc3-44ac-a847-51cb84122c84","&lt;STRONG&gt;connectionId&lt;/STRONG&gt;":"ee6a390c-5d33-11e8-9c2d-fa7ae01bbebc","&lt;STRONG&gt;sourceId&lt;/STRONG&gt;":"f34b91a1-0dc3-44ac-a847-51cb84122c84","&lt;STRONG&gt;tempContentFileId&lt;/STRONG&gt;":"624b0f54459f1c00018dade4"}'&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 20 May 2022 04:04:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Automate/Posting-Data-to-Qlik-Using-Java-Rest-Template-giving-308/m-p/1933369#M574</guid>
      <dc:creator>Poornima_Menon</dc:creator>
      <dc:date>2022-05-20T04:04:09Z</dc:date>
    </item>
    <item>
      <title>Re: Posting Data to Qlik- Using Java Rest Template giving 308</title>
      <link>https://community.qlik.com/t5/Qlik-Automate/Posting-Data-to-Qlik-Using-Java-Rest-Template-giving-308/m-p/1933424#M575</link>
      <description>&lt;P&gt;this post should probably be moved to another section (has nothing to do with Qlik Application Automation) but i would still like to comment on it.&lt;/P&gt;
&lt;P&gt;I myself tried this yesterday when I saw this API endpoint. I get the same error message that the request must contain a 'name' parameter (400 - Bad request). I use postman and I believe the request should be ok;&lt;/P&gt;
&lt;DIV&gt;
&lt;DIV&gt;&lt;LI-CODE lang="javascript"&gt;curl --location --request POST "https://xxxxxxx.eu.qlikcloud.com/api/v1/data-files" \
--header "Content-Type: multipart/form-data" \
--header "Authorization: Bearer xxxxxxxxxxxx" \
--form "name=\"testFromAPI.csv\"" \
--form "connectionId=\"9ee38f4f-bedf-44f2-aeba-8c29d82eef5\"" \
--form "file=@\"/C:/xxxxxxx/testFromAPI.csv\""&lt;/LI-CODE&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;Accourding to&amp;nbsp;&lt;A href="https://qlik.dev/apis/rest/data-files#%23%2Fentries%2Fdata-files-post" target="_self"&gt;qlik.dev data-files post&lt;/A&gt;&amp;nbsp; only name and file is mandatory, others are optional.&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;Br Johan&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 20 May 2022 07:38:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Automate/Posting-Data-to-Qlik-Using-Java-Rest-Template-giving-308/m-p/1933424#M575</guid>
      <dc:creator>blaise</dc:creator>
      <dc:date>2022-05-20T07:38:32Z</dc:date>
    </item>
  </channel>
</rss>

