Forum Discussion

scottc097's avatar
scottc097
Regular Visitor
2 years ago

More Granular when pulling Semantic Models from Rest API

I am trying to pull all the tables inside my lakehouse using PowerBI's Rest API.

 

Originally, I used:

Reports - Get Reports In Group - REST API (Power BI Power BI REST APIs) | Microsoft Learn

then created a loop to pull all datasources of reports using the datasetID:

Datasets - Get Datasources - REST API (Power BI Power BI REST APIs) | Microsoft Learn

However, I notice when it is a semantic model it just shows as a SQL and does not provide the tables. Additionally, It only pulls the sources of reports. I want all the data inside a workspace. Is there a way to the next granular level, so I may see if we are duplicating pulls of tables. Also, is there a way to tell if a table is a shortcut or another re-pull of the same datasource?

 

I am going to test this pull:

Admin - WorkspaceInfo GetScanResult - REST API (Power BI Power BI REST APIs) | Microsoft Learn

to see if I can get tables.

1 Reply

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi scottc097 ,

    To determine whether a table is a shortcut or repull to the same data source, you may need to analyze the metadata of the table and data source returned by the API call. Unfortunately, it may not be possible to distinguish between a shortcut and an actual table through a direct API call. However, you can use the information in the Lakehouse Explorer and OneLake API documentation to understand how tables and shortcuts are represented, and possibly to write comparison logic scripts.

    Below is the official link will help you:

    Lakehouse and Delta tables - Microsoft Fabric | Microsoft Learn

    Best Regards,

    Xianda Tang

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