Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
VendettaBob
Helper II
Helper II

PowerBI Rest API to export report as PNG file

Hi,

 

We are using PowerBI Pro. 

 

We want to utilise the PowerBI rest API to export reports as PNG files and  to email these out to customers.

 

Is this possible to do using the REST API:

 

POST https://api.powerbi.com/v1.0/myorg/reports/{reportId}/ExportTo

 

Do I need to be on Priemum Capacity in order to achieve this?

 

Thanks,

 

 

1 ACCEPTED SOLUTION
v-luwang-msft
Community Support
Community Support

Hi @VendettaBob ,

Official article announced on March 6, 2020  that allowed you to export a Power BI report by using a REST call, to the following file formats: PDF, PPTX (PowerPoint) and PNG.

Send to print button – In your application, create a button that when clicked on triggers an export job. The job can export the viewed report as a PDF or a PPTX, and when it’s complete, the user can receive the file as a download. As the API is asynchronous, it may take some time for the file to be available.

Email attachment – Send an automated email at set intervals, with an attached PDF report. This scenario can be useful if you want to automate sending a weekly report to executives.

When the Export-To-File API is called, it triggers an export job. After triggering the export job, you can use the Polling API to track the job until it is complete. When the export job is complete, the Polling API call returns a Power BI URL for getting the file (The URL is available for 24 hours). The API supports concurrent export job requests. The number of jobs you can run at the same time, depends on the SKU your report resides on, as detailed in this table.

 

Wish it is helpful for you!

 

Best Regards

Lucien

 

View solution in original post

5 REPLIES 5
v-luwang-msft
Community Support
Community Support

Hi @VendettaBob ,

Has your problem been solved, if so, please consider Accept a correct reply as the solution to help others find it.
 
Best Regards
Lucien
VendettaBob
Helper II
Helper II

There is a limitation on this article: 

 

Limitations: Premium Per User (PPU) is not supported.

 

So I assume Pro is not supported too:

 

https://docs.microsoft.com/en-us/rest/api/power-bi/reports/exporttofile

Hi @VendettaBob ,

Yes, otherwise the following error will be reported:

{
  "error": {
    "code": "InvalidRequest",
    "message": "Report requested for export is not on dedicated capacity"
  }
}

 

refer :https://community.powerbi.com/t5/Developer/REST-API-for-Power-BI-Reports-Export-To-File-giving-error... 

 

Best Regards

Lucien

v-luwang-msft
Community Support
Community Support

Hi @VendettaBob ,

Official article announced on March 6, 2020  that allowed you to export a Power BI report by using a REST call, to the following file formats: PDF, PPTX (PowerPoint) and PNG.

Send to print button – In your application, create a button that when clicked on triggers an export job. The job can export the viewed report as a PDF or a PPTX, and when it’s complete, the user can receive the file as a download. As the API is asynchronous, it may take some time for the file to be available.

Email attachment – Send an automated email at set intervals, with an attached PDF report. This scenario can be useful if you want to automate sending a weekly report to executives.

When the Export-To-File API is called, it triggers an export job. After triggering the export job, you can use the Polling API to track the job until it is complete. When the export job is complete, the Polling API call returns a Power BI URL for getting the file (The URL is available for 24 hours). The API supports concurrent export job requests. The number of jobs you can run at the same time, depends on the SKU your report resides on, as detailed in this table.

 

Wish it is helpful for you!

 

Best Regards

Lucien

 

Hi, 
is this API can only be used using C# code as mentioned in sample code 

or i can use this REST with any form of language like NODE.js?
@v-luwang-msft 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors
Top Kudoed Authors