Forum Discussion
Fabric - Create Reports model via Microsoft Fabric API
- 1 year ago
Hi Anonymous,
The error here is likely caused by a manually modified .pbir or report.json file, or the semantic model is not being referenced in the exact format expected by the API.
So please switch back to the byConnection which you were using earlier since the Fabric REST API supports it.
And try the above steps which i mentioned earlier like re-export the report again using power bi desktop and connect to the live semantic model in the same Fabric workspace. Do not modify any of the generated files. Encode each file in Base64 and send it to the API.
This makes sure the byConnection block is generated correctly by the backend schema.
If this post helps, then please consider Accepting as solution to help the other members find it more quickly, don't forget to give a "Kudos" – I’d truly appreciate it!
Thanks and regards,
Anjan Kumar Chippa
Hi Anonymous,
Please try re-exporting the report as a Power BI Project (.pbir) using Power bi desktop with the preview feature enabled:
- Open Power bi desktop and connect to the exact semantic model in the Fabric workspace, go to File --> Export --> Power BI Project (.pbir).
- Use the generated definition.pbir, report.json, and .platform files without any modifications. Encode each file in Base64 and deploy via the Fabric REST API.
This ensures all the required fields are correctly generated and match the backend schema.
If the issue still persists after this, double check that the semantic model is published to a Fabric enabled workspace, not a classic workspace. And share the full API error response including the inner error if available.
If this post helps, then please consider Accepting as solution to help the other members find it more quickly, don't forget to give a "Kudos" – I’d truly appreciate it!
Thanks and regards,
Anjan Kumar Chippa
Hi Anonymous,
As we haven’t heard back from you, we wanted to kindly follow up to check if the solution I have provided for the issue worked? or let us know if you need any further assistance.
If my response addressed, please mark it as "Accept as solution" and click "Yes" if you found it helpful.
Thanks and regards,
Anjan Kumar Chippa