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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
Anonymous
Not applicable

PowerBI API ExportTo individual page/visual

Hello.

 

I'm trying to use the PowerBI API to export a specific page of a report as a PNG. The functionality works, giving me a zip file containing a PNG file for every page in the report.

 

My issue comes when I'm trying to select a specific visual or page by modifying the payload. Following the documentation, this is how my payload looks like

 

 

{
    'format': 'PNG',
    'powerBIReportConfiguration': {
        'settings': {
            'locale': 'en-US',
            'excludeHiddenPages': 'true'
        },
        'pages': [
            {
                'pageName': 'Test report page',
            }
        ]
    }

 

 

 

But I am still getting a zip file with all the pages instead of just the selected one. Same thing happens when selecting a specific visual.

1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

The pagename is likely not what you think it is. It is more of a GUID based identifier. If you don't specify the right pagename the export will ignore your request and give you all pages.

 

Unfortunately the main documentation Reports - Export To File In Group - REST API (Power BI Power BI REST APIs) | Microsoft Docs is not very helpful. However, there's this : Export Power BI embedded analytics reports API - Power BI | Microsoft Docs  which gives you the hint on how to fetch the page names via a different API call.

 

 

View solution in original post

5 REPLIES 5
lbendlin
Super User
Super User

The pagename is likely not what you think it is. It is more of a GUID based identifier. If you don't specify the right pagename the export will ignore your request and give you all pages.

 

Unfortunately the main documentation Reports - Export To File In Group - REST API (Power BI Power BI REST APIs) | Microsoft Docs is not very helpful. However, there's this : Export Power BI embedded analytics reports API - Power BI | Microsoft Docs  which gives you the hint on how to fetch the page names via a different API call.

 

 

Anonymous
Not applicable

Hello!

 

Thank you for your reply! I used the Get Pages API Endpoint and I noticed that it gave both a "Name" and a "Display Name", just like you mentioned. I tried running the same code using the GUID-like given to me by the API, but I still get all of the pages in the report.

 

Could I be missing something in the payload that makes the API ignore it?

You can use the sandbox to try the API call in the service. That helps with the debugging.

Anonymous
Not applicable

So I have found the issue by pure luck. I was using Python's requests package to send the requests, and the payload was written as a Python dictionary and given to the package, since that work usually.

 

Apparently, this endpoint does not like that and I had to write it as a JSON string and pass it like that.

can you share the payload for the report configuration to isolate just a single visual? I am working on the same use case. Thank you

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.