<?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 Importing a large pbix via Post Import In Group in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Importing-a-large-pbix-via-Post-Import-In-Group/m-p/767787#M20384</link>
    <description>&lt;P&gt;I am struggling with the rest api and i'm hoping i'm just missing something.&amp;nbsp; I am able to post to the import endpoint and publish a file using the .net client&lt;/P&gt;&lt;PRE&gt;var upload2 = await client.Imports.PostImportWithFileAsyncInGroup(groupid, fs, "test");&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;works great.&amp;nbsp; Now when i try and use the temporary file location for a large file i keep getting 400 bad request errors.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;            var temp = await client.Imports.CreateTemporaryUploadLocationInGroupAsync(groupid);


            var fs = new FileStream("xxxxx.pbix", FileMode.Open,FileAccess.Read);
            fs.Position = 0;
            await saveBlob(temp.Url, fs);
            var importdetails = new Microsoft.PowerBI.Api.V2.Models.ImportInfo
            {
                //ConnectionType = ConnectionType.Import
                FileUrl = temp.Url,
                //FilePath = string.Empty
            };

            var upload = await client.Imports.PostImportInGroupAsync(groupid, "testpositions", importdetails);&lt;/PRE&gt;&lt;P&gt;The create of the tempfile works and the upload of that file is successful. Here is the raw request&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;POST https://api.powerbi.com/v1.0/myorg/groups/[groupid removed from sampl]/imports?datasetDisplayName=testpositions HTTP/1.1
Authorization: Bearer [removed from sample]
User-Agent: FxVersion/4.6.27414.05 OSName/Windows OSVersion/Microsoft.Windows.10.0.15063. Microsoft.PowerBI.Api.V2.PowerBIClient/3.4.0.19204
Content-Type: application/json; charset=utf-8
Content-Length: 315
Host: api.powerbi.com

{
  "fileUrl": "https://wabincuspbiv2p1.blob.core.windows.net/d331431b-899c-4666-8094-e82e6bfc3964/a7634353-a598-4420-b125-6b55801d2baa/Import/00a33942-a321-476c-8718-c27a0b2d8f02?sv=2015-04-05&amp;amp;sr=b&amp;amp;sig=pF8MdpeBu3mhyi8LPSQlNP6V63iUgMpaKFXVbEoNsiY%3D&amp;amp;st=2019-08-15T16%3A22%3A19Z&amp;amp;se=2019-08-16T16%3A27%3A19Z&amp;amp;sp=w"
}&lt;/PRE&gt;&lt;P&gt;I've tried ever combination of parameters in the post but always get back&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;HTTP/1.1 400 Bad Request
Content-Length: 0
Strict-Transport-Security: max-age=31536000; includeSubDomains
X-Frame-Options: deny
X-Content-Type-Options: nosniff
Access-Control-Expose-Headers: RequestId
RequestId: 54c996a6-217b-40ef-ae39-da47e450a04b
Date: Thu, 15 Aug 2019 16:27:19 GMT

&lt;/PRE&gt;&lt;P&gt;Does anyone have a sample successful post call to imports using the fileURL parameter?&lt;/P&gt;</description>
    <pubDate>Thu, 15 Aug 2019 16:32:55 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2019-08-15T16:32:55Z</dc:date>
    <item>
      <title>Importing a large pbix via Post Import In Group</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Importing-a-large-pbix-via-Post-Import-In-Group/m-p/767787#M20384</link>
      <description>&lt;P&gt;I am struggling with the rest api and i'm hoping i'm just missing something.&amp;nbsp; I am able to post to the import endpoint and publish a file using the .net client&lt;/P&gt;&lt;PRE&gt;var upload2 = await client.Imports.PostImportWithFileAsyncInGroup(groupid, fs, "test");&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;works great.&amp;nbsp; Now when i try and use the temporary file location for a large file i keep getting 400 bad request errors.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;            var temp = await client.Imports.CreateTemporaryUploadLocationInGroupAsync(groupid);


            var fs = new FileStream("xxxxx.pbix", FileMode.Open,FileAccess.Read);
            fs.Position = 0;
            await saveBlob(temp.Url, fs);
            var importdetails = new Microsoft.PowerBI.Api.V2.Models.ImportInfo
            {
                //ConnectionType = ConnectionType.Import
                FileUrl = temp.Url,
                //FilePath = string.Empty
            };

            var upload = await client.Imports.PostImportInGroupAsync(groupid, "testpositions", importdetails);&lt;/PRE&gt;&lt;P&gt;The create of the tempfile works and the upload of that file is successful. Here is the raw request&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;POST https://api.powerbi.com/v1.0/myorg/groups/[groupid removed from sampl]/imports?datasetDisplayName=testpositions HTTP/1.1
Authorization: Bearer [removed from sample]
User-Agent: FxVersion/4.6.27414.05 OSName/Windows OSVersion/Microsoft.Windows.10.0.15063. Microsoft.PowerBI.Api.V2.PowerBIClient/3.4.0.19204
Content-Type: application/json; charset=utf-8
Content-Length: 315
Host: api.powerbi.com

{
  "fileUrl": "https://wabincuspbiv2p1.blob.core.windows.net/d331431b-899c-4666-8094-e82e6bfc3964/a7634353-a598-4420-b125-6b55801d2baa/Import/00a33942-a321-476c-8718-c27a0b2d8f02?sv=2015-04-05&amp;amp;sr=b&amp;amp;sig=pF8MdpeBu3mhyi8LPSQlNP6V63iUgMpaKFXVbEoNsiY%3D&amp;amp;st=2019-08-15T16%3A22%3A19Z&amp;amp;se=2019-08-16T16%3A27%3A19Z&amp;amp;sp=w"
}&lt;/PRE&gt;&lt;P&gt;I've tried ever combination of parameters in the post but always get back&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;HTTP/1.1 400 Bad Request
Content-Length: 0
Strict-Transport-Security: max-age=31536000; includeSubDomains
X-Frame-Options: deny
X-Content-Type-Options: nosniff
Access-Control-Expose-Headers: RequestId
RequestId: 54c996a6-217b-40ef-ae39-da47e450a04b
Date: Thu, 15 Aug 2019 16:27:19 GMT

&lt;/PRE&gt;&lt;P&gt;Does anyone have a sample successful post call to imports using the fileURL parameter?&lt;/P&gt;</description>
      <pubDate>Thu, 15 Aug 2019 16:32:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Importing-a-large-pbix-via-Post-Import-In-Group/m-p/767787#M20384</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-08-15T16:32:55Z</dc:date>
    </item>
    <item>
      <title>Re: Importing a large pbix via Post Import In Group</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Importing-a-large-pbix-via-Post-Import-In-Group/m-p/768952#M20407</link>
      <description>&lt;P&gt;Turns out the api handles large files automatically.&amp;nbsp; Just need to use the&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;.PostImportWithFileAsyncInGroup&lt;/PRE&gt;&lt;P&gt;and it detects if the file is over 1gb.&amp;nbsp; Very nice&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Aug 2019 20:50:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Importing-a-large-pbix-via-Post-Import-In-Group/m-p/768952#M20407</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-08-16T20:50:43Z</dc:date>
    </item>
    <item>
      <title>Re: Importing a large pbix via Post Import In Group</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Importing-a-large-pbix-via-Post-Import-In-Group/m-p/1749622#M28638</link>
      <description>&lt;P&gt;i know this is old but im looking at this exact issue right now. so for files over a gig i can still just upload the raw file using&amp;nbsp;PostImportWithFileInGroup and dont have to upload to a temporary location first?&lt;/P&gt;</description>
      <pubDate>Sat, 27 Mar 2021 21:02:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Importing-a-large-pbix-via-Post-Import-In-Group/m-p/1749622#M28638</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-03-27T21:02:34Z</dc:date>
    </item>
  </channel>
</rss>

