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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
xhan
Helper I
Helper I

Power BI Rest APIs to get report's source tables and fields

Hi friends,

I'm trying to use the Power BI Rest API to fetch report's source tables (tables in sqlserver or other storage), and the fields from those tables used in the reports. What would be the best APIs for getting these info?

 

I was looking at the dataset, dataflows APIs, but seem not containing the detailed info, or I missed something?

 

Thanks in advance!:)

2 REPLIES 2
Anonymous
Not applicable

Hi @xhan ,

You can refer the following links to get it.

Announcing new Admin APIs and Service Principal authentication to make for better tenant metadata sc...

Admin - WorkspaceInfo GetScanResult

GET https://api.powerbi.com/v1.0/myorg/admin/workspaces/scanResult/{scanId}

Getting Power BI Measures and Columns via REST API

The Power BI API returns admin info on the state of a dataset, but not the data structure.

If the dataset is compatible and the XMLA endpoint for the workspace is open, you can connect to that and use it like you would an Analysis Services database, including getting the measures and columns. You can use any tool or custom code that implements the MSOLAP or AMODB libraries. DAX Studio is just one of these options. The url of a workspace will be powerbi://api.powerbi.com/v1.0/[tenant name]/[workspace name]


Best Regards

Thanks a lot @Anonymous ! I'm now able to use the metadata API to get the scan result. The result returns reports, and datasets. But I wonder if it's possible to get the pages and the visuals on the pages? For a visual, I'd like to get which columns, measures it's using.
We are not using sql server or other MS data storage at this point.

 

Thank you!

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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