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,
Are you guys able to clone reports with the Api.Core library? This is what I'm trying to do:
1) I have a report in workspace X
2) Want to clone the report from workspace X to workspace Y
3) I'm not specifying the dataset id, as it is an optional value and I assume will be cloned as well
This is the code I'm trying:
var cloneReportRequest = new CloneReportRequest(newName, targetWorkspaceId); var credentials = new TokenCredentials(Utils.accessKey, "AppKey"); var client = new PowerBIClient(credentials); client.BaseUri = new Uri(Utils.apiEndpointUri); Report report; using (client) { report = client.Reports.CloneReport( workspaceCollectionName, workspaceId, reportId, cloneReportRequest); }
I have tried the provision sample for PowerBI Embeded, PowerCli and the code above. All of them return "Bad Request". There is not much documentation on it other than: https://docs.microsoft.com/de-ch/dotnet/api/microsoft.powerbi.api.v1.reportsextensions.clonereport?v...
The same config works to create reports, generate embed tokens, etc.
Any suggestion is appareciated.
Thanks,
Hey Guys,
Please follow the MSDN API specification here: https://msdn.microsoft.com/en-us/library/mt784674.aspx.
Clone API within workspace and across workspaces is available for a while both for the old (deprecated) Azure embedding using app key authenication and through the new way of embdding using user AAD token to Power BI.
Actually this API is availbale for every Power BI user who whiches to automate his workflow.
I believe the issue you encountered is due to lacking dataset id in the "Y" workspace which is mandatory paramter when cloning reports across workspaces.
Let me know in case you encounter any other issues,
Arina
@Eric_Zhang Thanks for your comment!
I have tried both, the API and the Provision Sample, none of then worked.
Do you have a replied yet?
Cheers,
Fairly certain that is deprecated at this point, it doesn't look like there is a "clone" capability on the currently supported version.
Api docs
https://msdn.microsoft.com/library/dn877544.aspx
c# client sdk for api
https://github.com/Microsoft/PowerBI-CSharp
note that the github repo mentioned has not been commited to in awhile, my guess is that it's not being actively maintained.
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 | |
1 | |
1 | |
1 |
User | Count |
---|---|
23 | |
3 | |
2 | |
2 | |
2 |