Forum Discussion
Overwrite report when copy/clone via powershell or API?
Hi Anonymous ,
I'd like to suggest you refer to following blog about use powershell and rest api to duplicate workspace:
Duplicate workspaces using the Power BI REST APIs: a step-by-step tutorial
Regards,
Xiaoxin Sheng
- Anonymous7 years agoNot applicable
Thank you for the suggestion Xiaoxin. I have followed that guide, and can move datasets (or pbix with embedded datasets) around without duplicating.
My issue now is with .pbix files without embedded datasets (i.e. ones built when directly connected to a cloud dataset). I can import these with my previous code to the workspace of the associated dataset, however the code fails when uploading to a different workspace. If I try Cloning by first uploading to the initial workspace then cloning to the new workspace I get duplicates if the report already exists in the target space. The comments in section 4 (Cloning) of the referenced article seem to indicate that Cloning is the only way to move a report if the dataset exists, but that causes me issues. I don't think I should delete the report in the target workspace first as that might remove Dashboards and permissions?
Maybe I am going about this the wrong way or am missing something with the PowerBI service... How should reports flow through DEV/TEST/PROD in an enterprise environment? I envision having a dataset upon which many reports may be built (and then extended to Dashboards), and I'd like to have an automated process that "deploys" a report to PROD as opposed to manually using the desktop to repoint the dataset and republishing.
- Anonymous7 years agoNot applicable
Hi Anonymous ,
Maybe you can try to use template app to share your contents:
What are Power BI template apps?
Regards,
Xiaoxin Sheng
- Anonymous5 years agoNot applicable
Were you able to solve this efficiently?
I am facing the same issue.
The two options I am exploring are:
1. Use Copy-PowerBIReport and the find and delete the old report, but this negatively impacts references to the existing report
2. Use New-PowerBIReport with the "Overwrite" option. In this case, however, I have to find the reportId and then rebind it.
Thanks,
Chris
- mbutler714 years agoAdvocate I
Has anybody solved this?
I want the PBI Service to overwrite/update my report and not give me back a new Report Id everytime I deploy to a workspace(/environment).
I can use the "Import" REST API and/or the MicrosoftPowerBIMgmt New-PowerBIReport cmdlet to post an updated report, but both will give me a new Report Id for the report which will break all links and references to the original report of the same name.