Forum Discussion
Power BI Post Rest API failed second time onwards
- 2 years ago
There could be some permission issue. Still could not figured it out. I have created separate workspaces and clone (post) Rest API working fine for new workspaces every time.
- 2 years ago
After 2 weeks trail and error, I found cause of the error. When I change workspace permission from Power BI service and after that the Rest API post request start giving 404 error even though the report present in the workspace. I do not know the reason for this. I had try to create new authenticate token for Rest API every time but it does not help. I know user permission does not relfect immediately in Rest API. that does not make any sense as I am using service principal and there is no permission changes for SP, so it should not fail.
Hi. Let's see. I would like to say two things.
First, if you are cloning the cloned report, it won't work. Cloning means creating a report that looks exactly like the original but connecting to the semantic model of the original report. If you want to clone that you might have issues. When cloned, reports with a live connection will lose that connection and instead have a direct binding to the target dataset. Maybe that can throw an exception.
Second, consider that the UI you are showing is just for testing purpose. If you want to clone many reports, you should write a code for doing it.
If you don't won't to clone and you are looking for something that really moves the report and it's semantic model, then it's a different request. SimplePBI Python library has created a method for copying between workspaces easy (combining two requests). You can read more about it here:
https://blog.ladataweb.com.ar/post/697833112208539648/simplepbipython-copiar-pbix-entre-áreas-de
I hope that helps,