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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
Zed101
Frequent Visitor

Power BI Api to get parent dataset id by report id

If I have a report which is getting data from a dataset 1 which itself is getting data from another dataset 2, how to get dataset 2 id through report id as we can only know id of dataset 1, using api getDatasets(group id, report id).

Till now, I'm using an approach not very performant, which is like once I get datasource for dataset 1, I compare datasource name with all datasets database connection names, to filter out parent datasets.
As you can see in above, each time a call to get all datasets is time consuming.

Is there any better way to do this using either one or multiple api calls?

5 REPLIES 5
lbendlin
Super User
Super User

This step is followed as part of my approach, however, there is no dataset id in response, only datasource information.

"server" points to the workspace

"database"  points to the dataset

Hi thanks for the post and I am just experiencing the same problem. I am using the exact API you mentioned the problem is "database" only returns dataset name instead of dataset id, but the get dataset requires dataset id... so do you might know a better way? Thank you!

You are supposed to have harvested the dataset IDs in the previous step. The API call for this thread is focusing on the data sources.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

Feb2025 NL Carousel

Fabric Community Update - February 2025

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