Forum Discussion
REST API Usage: Reports - Update Report Content vs Clone vs Import
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.
Here is the approach I am using
- 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.
- Clone all dashboards and thier tiles (my code shows how to do this)
- Clone reports that were not cloned by export/import in step #1 (my code does not contain this functionality yet)
Here is the code which you can use as a starting point.
- matvi7 years agoFrequent Visitor
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.
I was wondering how you handle the Azure Usage Metric report?
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....
Thanks,
Mathieu