Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
I am attempting to utilize the "export to PDF" with REST API query in Power BI, but despite using Power BI, I'm encountering difficulties in generating the PDF file.Please provide me solution to reterei data from reports
Hi @lovepreet81988 ,
You can refer the following links to get it:
Using Python:
Reports - Export To File - REST API (Power BI Power BI REST APIs) | Microsoft Learn
POST https://api.powerbi.com/v1.0/myorg/reports/{reportId}/ExportTo
pip install pbirest
import pbirest
pbirest.connect(
client_id = [client_id (required)],
username = [username (required)],
password = [password (required)],
tenant_id = [tenant_id],
client_secret = [client_secret]
)
Documentation · AntoineDW/powerbi-rest-api-python Wiki · GitHub
pbirest.export_report(workspace_id, report_id, out_file)
Using Postman:
How to use Power BI Rest API to export the Power B... - Microsoft Fabric Community
Best Regards
hi @Anonymous
Upon attempting to use the POST method with the endpoint URL "https://api.powerbi.com/v1.0/myorg/reports/{reportId}/ExportTo," I encountered an error response:
{
"error": {
"code": "InvalidRequest",
"message": "Report requested for export is not on dedicated capacity"
}
}can u please explain this why i am getting this error
Hi @lovepreet81988 ,
There are some limitations when using export to file API, it includes that the report you're exporting must reside on a Premium or Embedded capacity. So please check that your report is in a shared capacity or dedicated capacity...
Export Power BI report to file
Best Regards
@Anonymous
Could you kindly guide me with a step-by-step guide on how to save a report in Embedded capacity?
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 4 | |
| 3 | |
| 2 | |
| 1 | |
| 1 |
| User | Count |
|---|---|
| 11 | |
| 8 | |
| 4 | |
| 3 | |
| 3 |