<?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 REST API Usage:  Reports - Update Report Content vs Clone vs Import in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/REST-API-Usage-Reports-Update-Report-Content-vs-Clone-vs-Import/m-p/556401#M17420</link>
    <description>&lt;P&gt;&lt;SPAN class="pl-smi"&gt;Hi,&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="pl-smi"&gt;I'm writing a program to copy a workspace content to another one using the REST API. I've looked at the tutorial by Sirui Sun, but his example doesn't work if there are already reports in the target workspace. &lt;/SPAN&gt;&lt;SPAN class="pl-smi"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="pl-smi"&gt;I see that there is 3 different ways of creating/updating a report and some documentation comparing each approach would be very appreciated. My understanding is:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="pl-smi"&gt;1) Export and import the pbix: This can be used to create or update a report. It's the best option to create the datasets. The downside is that you have to download and upload everything so very unefficient.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="pl-smi"&gt;2) Clone report: From my tests, this will create a new report each time, so it can't be used for updating. &lt;STRONG&gt;It that true?&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="pl-smi"&gt;3) UpdateReportContent: I looked at the documentation and it doesn't really say much. My understanding is that, to update a report based on an existing one, this is the way to go. But in the request definition, there's a sourceType. What the **** is a sourceType. I've seen some example putting&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;&lt;SPAN class="pl-smi"&gt;sourceType&lt;/SPAN&gt;&lt;SPAN class="pl-k"&gt;=&lt;/SPAN&gt;&lt;/EM&gt;&lt;SPAN class="pl-s"&gt;&lt;EM&gt;&lt;SPAN class="pl-pds"&gt;"&lt;/SPAN&gt;ExistingReport&lt;/EM&gt;&lt;SPAN class="pl-pds"&gt;&lt;EM&gt;"&lt;/EM&gt;, &lt;STRONG&gt;but what does that do and what are the other options?&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="pl-s"&gt;&lt;SPAN class="pl-pds"&gt;Thanks&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="pl-s"&gt;&lt;SPAN class="pl-pds"&gt;Mathieu&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 30 Oct 2018 13:23:41 GMT</pubDate>
    <dc:creator>matvi</dc:creator>
    <dc:date>2018-10-30T13:23:41Z</dc:date>
    <item>
      <title>REST API Usage:  Reports - Update Report Content vs Clone vs Import</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/REST-API-Usage-Reports-Update-Report-Content-vs-Clone-vs-Import/m-p/556401#M17420</link>
      <description>&lt;P&gt;&lt;SPAN class="pl-smi"&gt;Hi,&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="pl-smi"&gt;I'm writing a program to copy a workspace content to another one using the REST API. I've looked at the tutorial by Sirui Sun, but his example doesn't work if there are already reports in the target workspace. &lt;/SPAN&gt;&lt;SPAN class="pl-smi"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="pl-smi"&gt;I see that there is 3 different ways of creating/updating a report and some documentation comparing each approach would be very appreciated. My understanding is:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="pl-smi"&gt;1) Export and import the pbix: This can be used to create or update a report. It's the best option to create the datasets. The downside is that you have to download and upload everything so very unefficient.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="pl-smi"&gt;2) Clone report: From my tests, this will create a new report each time, so it can't be used for updating. &lt;STRONG&gt;It that true?&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="pl-smi"&gt;3) UpdateReportContent: I looked at the documentation and it doesn't really say much. My understanding is that, to update a report based on an existing one, this is the way to go. But in the request definition, there's a sourceType. What the **** is a sourceType. I've seen some example putting&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;&lt;SPAN class="pl-smi"&gt;sourceType&lt;/SPAN&gt;&lt;SPAN class="pl-k"&gt;=&lt;/SPAN&gt;&lt;/EM&gt;&lt;SPAN class="pl-s"&gt;&lt;EM&gt;&lt;SPAN class="pl-pds"&gt;"&lt;/SPAN&gt;ExistingReport&lt;/EM&gt;&lt;SPAN class="pl-pds"&gt;&lt;EM&gt;"&lt;/EM&gt;, &lt;STRONG&gt;but what does that do and what are the other options?&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="pl-s"&gt;&lt;SPAN class="pl-pds"&gt;Thanks&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="pl-s"&gt;&lt;SPAN class="pl-pds"&gt;Mathieu&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Oct 2018 13:23:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/REST-API-Usage-Reports-Update-Report-Content-vs-Clone-vs-Import/m-p/556401#M17420</guid>
      <dc:creator>matvi</dc:creator>
      <dc:date>2018-10-30T13:23:41Z</dc:date>
    </item>
    <item>
      <title>Re: REST API Usage:  Reports - Update Report Content vs Clone vs Import</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/REST-API-Usage-Reports-Update-Report-Content-vs-Clone-vs-Import/m-p/557600#M17471</link>
      <description>&lt;P&gt;I wrote a c# console application a while back to clone app workspace content. It is still a work in progress but it will help you get started.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the approach I am using&amp;nbsp;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Export/import all the PBIX projects you have created with Power BI Desktop. However, you must filter out reports that have been created in the browser or reports that are not paired with a dataset in a single import.&lt;/LI&gt;&lt;LI&gt;Clone all dashboards and thier tiles (my code shows how to do this)&lt;/LI&gt;&lt;LI&gt;Clone reports that&amp;nbsp;were not cloned by export/import in step #1 (my code does not contain this functionality yet)&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the code which you can use as a starting point.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A title="C# cod eto clone a Power BI workspace" href="https://github.com/CriticalPathTraining/PBD365/blob/master/Modules/07_PBIRestApi/Demo/ClonePowerBiWorkspace/ClonePowerBiWorkspace/Program.cs" target="_blank"&gt;https://github.com/CriticalPathTraining/PBD365/blob/master/Modules/07_PBIRestApi/Demo/ClonePowerBiWorkspace/ClonePowerBiWorkspace/Program.cs&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 31 Oct 2018 13:12:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/REST-API-Usage-Reports-Update-Report-Content-vs-Clone-vs-Import/m-p/557600#M17471</guid>
      <dc:creator>TedPattison</dc:creator>
      <dc:date>2018-10-31T13:12:48Z</dc:date>
    </item>
    <item>
      <title>Re: REST API Usage:  Reports - Update Report Content vs Clone vs Import</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/REST-API-Usage-Reports-Update-Report-Content-vs-Clone-vs-Import/m-p/560140#M17520</link>
      <description>&lt;P&gt;Thanks for your answer. I did something similar in Python. The main difference is that I only exported/imported pbix for reports defining datasets. I don't like that download/upload thing so for the left reports, I cloned the new ones and updated existing ones.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was wondering how you handle the Azure Usage Metric report?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, I see that you have some code to update the datasource credentials. Have you faced the issue of ownership? I wrote a method to take the ownership of a dataset before changing the credentials but is there a way of doing it without being the owner? I don't want my "service account" to be the owner of all workspaces....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Mathieu&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 05 Nov 2018 13:11:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/REST-API-Usage-Reports-Update-Report-Content-vs-Clone-vs-Import/m-p/560140#M17520</guid>
      <dc:creator>matvi</dc:creator>
      <dc:date>2018-11-05T13:11:24Z</dc:date>
    </item>
  </channel>
</rss>

