<?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: Upload a JSON file using Power BI API in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Upload-a-JSON-file-using-Power-BI-API/m-p/2157764#M32615</link>
    <description>&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/335181"&gt;@FelixC&lt;/a&gt;&amp;nbsp;I thought json files were only for importing dataflows.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://docs.microsoft.com/en-us/rest/api/power-bi/imports/post-import" target="_blank"&gt;Imports - Post Import - REST API (Power BI Power BI REST APIs) | Microsoft Docs&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Is this being set? Hard to see in your screen shots:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;To import a file, specify the content type&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;multipart/form-data&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;in the request headers and encode the file as&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://www.w3.org/TR/html401/interact/forms.html" data-linktype="external" target="_blank"&gt;form data&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;in the request body.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 27 Oct 2021 09:24:14 GMT</pubDate>
    <dc:creator>Greg_Deckler</dc:creator>
    <dc:date>2021-10-27T09:24:14Z</dc:date>
    <item>
      <title>Upload a JSON file using Power BI API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Upload-a-JSON-file-using-Power-BI-API/m-p/2157720#M32614</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm trying to upload a small json file to create a new dataset using the import API with Postman but I always get 400 Bad Request (RequestedFileIsEncryptedOrCorrupted) as response.&lt;/P&gt;&lt;P&gt;Here is the response&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;{
    "error": {
        "code": "RequestedFileIsEncryptedOrCorrupted",
        "pbi.error": {
            "code": "RequestedFileIsEncryptedOrCorrupted",
            "parameters": {},
            "details": [],
            "exceptionCulprit": 1
        }
    }
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The content of my json&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;[
	{
		"id": 1,
		"name": "Luke",
		"randomNumber" : 5.854668
	},
	{
		"id": 2,
		"name": "Lisa",
		"randomNumber" : 10.3846846
	},
	{
		"id": 3,
		"name": "Tom",
		"randomNumber" : 52.36541
	}
]&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Postman snapshots&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="FelixC_0-1635325268146.png" style="width: 809px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/620375i4626EA7FD1DFCA68/image-dimensions/809x97?v=v2" width="809" height="97" role="button" title="FelixC_0-1635325268146.png" alt="FelixC_0-1635325268146.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="FelixC_1-1635325284720.png" style="width: 807px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/620377i60509EED08F95BF5/image-dimensions/807x339?v=v2" width="807" height="339" role="button" title="FelixC_1-1635325284720.png" alt="FelixC_1-1635325284720.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I also tried with others .json and .xlsx but I get the same error and I don't know why, maybe I missed something in the doc.&lt;/P&gt;&lt;P&gt;Thanks for help!&lt;/P&gt;</description>
      <pubDate>Wed, 27 Oct 2021 09:16:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Upload-a-JSON-file-using-Power-BI-API/m-p/2157720#M32614</guid>
      <dc:creator>FelixC</dc:creator>
      <dc:date>2021-10-27T09:16:24Z</dc:date>
    </item>
    <item>
      <title>Re: Upload a JSON file using Power BI API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Upload-a-JSON-file-using-Power-BI-API/m-p/2157764#M32615</link>
      <description>&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/335181"&gt;@FelixC&lt;/a&gt;&amp;nbsp;I thought json files were only for importing dataflows.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://docs.microsoft.com/en-us/rest/api/power-bi/imports/post-import" target="_blank"&gt;Imports - Post Import - REST API (Power BI Power BI REST APIs) | Microsoft Docs&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Is this being set? Hard to see in your screen shots:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;To import a file, specify the content type&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;multipart/form-data&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;in the request headers and encode the file as&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://www.w3.org/TR/html401/interact/forms.html" data-linktype="external" target="_blank"&gt;form data&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;in the request body.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Oct 2021 09:24:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Upload-a-JSON-file-using-Power-BI-API/m-p/2157764#M32615</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2021-10-27T09:24:14Z</dc:date>
    </item>
    <item>
      <title>Re: Upload a JSON file using Power BI API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Upload-a-JSON-file-using-Power-BI-API/m-p/2157883#M32617</link>
      <description>&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/313"&gt;@Greg_Deckler&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Yes, Content-Type is set to "multipart/form-data", you can click on screenshot to open image.&lt;BR /&gt;&lt;BR /&gt;I'm new with PowerBi and this API so maybe it's not the good way to create dataset.&lt;BR /&gt;I just want to create new dataset in Power BI online service from a web server with json or directly from my database. This has to be automatic so I can't use Power BI Desktop.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Oct 2021 10:00:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Upload-a-JSON-file-using-Power-BI-API/m-p/2157883#M32617</guid>
      <dc:creator>FelixC</dc:creator>
      <dc:date>2021-10-27T10:00:34Z</dc:date>
    </item>
    <item>
      <title>Re: Upload a JSON file using Power BI API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Upload-a-JSON-file-using-Power-BI-API/m-p/2157946#M32619</link>
      <description>&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/335181"&gt;@FelixC&lt;/a&gt;&amp;nbsp;Here's what I would try. Create a small, couple MB PBIX file and see if you can post it as a dataset using the API. This should remove any doubt about whether it is something you are doing wrong in postman or it is simply that you are trying to do something that is not supported with a JSON file. I can't find any information about using JSON to create datasets other than maybe Push datasets. This article claims to do what you want to do but doesn't actually use the Power BI REST API, I think the author is confused.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.sqlshack.com/importing-data-from-json-files-and-power-bi-rest-apis-into-power-bi/" target="_blank"&gt;Importing data from JSON files and Power BI Rest APIs into Power BI (sqlshack.com)&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Oct 2021 10:24:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Upload-a-JSON-file-using-Power-BI-API/m-p/2157946#M32619</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2021-10-27T10:24:29Z</dc:date>
    </item>
    <item>
      <title>Re: Upload a JSON file using Power BI API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Upload-a-JSON-file-using-Power-BI-API/m-p/2157987#M32620</link>
      <description>&lt;P&gt;&lt;A href="https://community.powerbi.com/t5/user/viewprofilepage/user-id/313" target="_blank"&gt;@Greg_Deckler&lt;/A&gt;&lt;BR /&gt;I just tried and it works with a&amp;nbsp;&lt;SPAN&gt;PBIX file so maybe it's not possible with json.&amp;nbsp;&lt;BR /&gt;I read this article but the author use an external api to generate data and connect PowerBI desktop on it and that's not what I want.&lt;BR /&gt;&lt;BR /&gt;It's really strange there is no way to add new data from json or database to PowerBI online like in PowerBI desktop.&lt;BR /&gt;Maybe I sould create a new ticket for this question.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Oct 2021 10:43:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Upload-a-JSON-file-using-Power-BI-API/m-p/2157987#M32620</guid>
      <dc:creator>FelixC</dc:creator>
      <dc:date>2021-10-27T10:43:59Z</dc:date>
    </item>
    <item>
      <title>Re: Upload a JSON file using Power BI API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Upload-a-JSON-file-using-Power-BI-API/m-p/2167985#M32708</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/335181"&gt;@FelixC&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think you can try Post Import or Post Import in Group Rest API to import Json File in your My Workspace or App Workspaces.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="1.png" style="width: 888px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/623835iC0172D7ED0DFFE25/image-size/large?v=v2&amp;amp;px=999" role="button" title="1.png" alt="1.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;For reference:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://docs.microsoft.com/en-us/rest/api/power-bi/imports/post-import" target="_self"&gt;Imports - Post Import&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://docs.microsoft.com/en-us/rest/api/power-bi/imports/post-import-in-group" target="_self"&gt;Imports - Post Import In Group&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;To use this Rest API, you need &lt;SPAN&gt;Dataset.ReadWrite.All permission. You can select it in API Permission in Azure portal.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;You can use "Try it" to have a test from Link. If you configure your APP correctly, you should succeed.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I suggest you to check your Authorization Bear token. I can get access token by API in Postman then copy this bear token into Authorization pane instead of adding it in Header pane.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;For reference:&amp;nbsp;&lt;A href="https://community.powerbi.com/t5/Developer/Power-BI-REST-API-using-postman-generate-embed-token/m-p/310054" target="_self"&gt;Power BI REST API using postman - generate embed token.&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Rico Zhou&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Tue, 02 Nov 2021 08:52:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Upload-a-JSON-file-using-Power-BI-API/m-p/2167985#M32708</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-11-02T08:52:49Z</dc:date>
    </item>
    <item>
      <title>Re: Upload a JSON file using Power BI API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Upload-a-JSON-file-using-Power-BI-API/m-p/2168004#M32709</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;how in the&amp;nbsp;&lt;SPAN&gt;"Try it" I can upload my json file?&lt;BR /&gt;&lt;BR /&gt;Thanks for your help&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Nov 2021 08:58:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Upload-a-JSON-file-using-Power-BI-API/m-p/2168004#M32709</guid>
      <dc:creator>FelixC</dc:creator>
      <dc:date>2021-11-02T08:58:59Z</dc:date>
    </item>
    <item>
      <title>Re: Upload a JSON file using Power BI API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Upload-a-JSON-file-using-Power-BI-API/m-p/2168014#M32710</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/335181"&gt;@FelixC&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;According to the blog, Power BI supports us to create a dataflow from a model.json file.&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;To import a file, specify the content type&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;multipart/form-data&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;in the request headers and encode the file as&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://www.w3.org/TR/html401/interact/forms.html" data-linktype="external" target="_blank"&gt;form data&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;in the request body.&lt;/LI&gt;
&lt;/UL&gt;
&lt;UL&gt;
&lt;LI&gt;To create a dataflow from a model.json file, set&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;datasetDisplayName&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;to&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;model.json&lt;/EM&gt;, as described in&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://docs.microsoft.com/en-us/rest/api/power-bi/imports/post-import-in-group#uri-parameters" target="_blank" rel="noopener" data-linktype="absolute-path"&gt;URI parameters&lt;/A&gt;.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;We can use dataflow as the datasource to create a dataset.&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Rico Zhou&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Tue, 02 Nov 2021 09:08:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Upload-a-JSON-file-using-Power-BI-API/m-p/2168014#M32710</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-11-02T09:08:25Z</dc:date>
    </item>
    <item>
      <title>Re: Upload a JSON file using Power BI API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Upload-a-JSON-file-using-Power-BI-API/m-p/2168038#M32711</link>
      <description>&lt;P&gt;Yes, but here&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="FelixC_0-1635844763827.png" style="width: 999px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/623860iF4A5370E1E1F9AED/image-size/large?v=v2&amp;amp;px=999" role="button" title="FelixC_0-1635844763827.png" alt="FelixC_0-1635844763827.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I can't add my file and I don't know how to&amp;nbsp;&lt;SPAN&gt;encode the file as&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://www.w3.org/TR/html401/interact/forms.html" target="_blank" rel="nofollow noopener noreferrer"&gt;form data&lt;/A&gt;&amp;nbsp;in this form.&lt;BR /&gt;In postman there is a section for "form data" file and it works for pbix file but not for json.&lt;BR /&gt;&lt;BR /&gt;Félix&lt;/P&gt;</description>
      <pubDate>Tue, 02 Nov 2021 09:22:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Upload-a-JSON-file-using-Power-BI-API/m-p/2168038#M32711</guid>
      <dc:creator>FelixC</dc:creator>
      <dc:date>2021-11-02T09:22:15Z</dc:date>
    </item>
    <item>
      <title>Re: Upload a JSON file using Power BI API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Upload-a-JSON-file-using-Power-BI-API/m-p/2172087#M32741</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/335181"&gt;@FelixC&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I find a post with similar requirement like yours. I hope it could help you.&lt;/P&gt;
&lt;P&gt;For reference:&amp;nbsp;&lt;A href="https://community.powerbi.com/t5/Service/Power-BI-API-Dataflow-Import-Operation/td-p/578283" target="_self"&gt;Power BI API Dataflow Import Operation&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Rico Zhou&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Thu, 04 Nov 2021 07:45:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Upload-a-JSON-file-using-Power-BI-API/m-p/2172087#M32741</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-11-04T07:45:44Z</dc:date>
    </item>
    <item>
      <title>Re: Upload a JSON file using Power BI API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Upload-a-JSON-file-using-Power-BI-API/m-p/2172139#M32742</link>
      <description>&lt;P&gt;Hi&amp;nbsp;@Anonymous&lt;/a&gt;,&lt;BR /&gt;Thanks for the link, I'll give it a try.&lt;BR /&gt;So after multiple research it is not possible to add data in dataset from a json. This API route is used to create dataflow!&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Best Regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Félix&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Nov 2021 08:14:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Upload-a-JSON-file-using-Power-BI-API/m-p/2172139#M32742</guid>
      <dc:creator>FelixC</dc:creator>
      <dc:date>2021-11-04T08:14:33Z</dc:date>
    </item>
  </channel>
</rss>

