Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi,
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.
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:
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.
2) Clone report: From my tests, this will create a new report each time, so it can't be used for updating. It that true?
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 sourceType="ExistingReport", but what does that do and what are the other options?
Thanks
Mathieu
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
Here is the code which you can use as a starting point.
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
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
12 | |
2 | |
2 | |
1 | |
1 |
User | Count |
---|---|
20 | |
3 | |
2 | |
2 | |
2 |