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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

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!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.