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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
v-yiruan-msft
Community Support
Community Support

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

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thanks a lot @v-yiruan-msft ! 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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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

Top Solution Authors