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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
khshakur
Regular Visitor

Get List Of Report Pages via C# Rest API

I see from documentation that it is possible to get some information about groups, reports and etc. via the C# Rest API. I am wondering if I am able to get all the pages within a report via the API.

1 ACCEPTED SOLUTION

Thanks for the reply. I should have clarified a bit. I am aware that you can use the JS API (currently I have a bit of a hack to get the information I need to my C# app). I was able to get in touch with someone on the PowerBi team and they informed me it is not possible at the moment via the C# REST API.

View solution in original post

5 REPLIES 5
v-micsh-msft
Employee
Employee

Yes, it is possible.

You could get all the pages within a Report through Power BI Javascript API:

Gets the list of pages within the report.

report.getPages()
 .then(pages => {
     ...
 });

More information, see:

Get Pages 

 

Regards,

Michael

Thanks for the reply. I should have clarified a bit. I am aware that you can use the JS API (currently I have a bit of a hack to get the information I need to my C# app). I was able to get in touch with someone on the PowerBi team and they informed me it is not possible at the moment via the C# REST API.

@khshakur - Hi there! Even I am searching for this solution from quite a long time. Using PhantomJS hack for the time being to load the report behind the scene and calling getPages() js API method to get the list of sections. If you dont mind sharing, what hack you are using?

I am doing the same thing minus PhantomJS. I will actually look into using PhantomJS as seems like a cleaner solution.

This would be a handy API to have!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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