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
it_russ
Frequent Visitor

Power BI API - Get datasources in group not returning dataflow information

I'm trying to attempt to pull information about the datasources of the datasets through the Power BI API.  I was hoping it would allow me to see which dataflows the report is using as a datasource.  When I pull the information using this API call - https://docs.microsoft.com/en-us/rest/api/power-bi/datasets/getdatasourcesingroup

I noticed im only getting information similar to below where it has no reference to the actual dataflow ID or name from the connection details.  Is there another way of pulling this information? or is this just not available through the API yet? Also is there any way to get refresh times of a dataflow? I didnt see that in the API either.

 

I'm currently using PowerShell scripting to pull this kind of information from the workspace since I dont have access at the tenant level to pull this information.

 

    {
      "datasourceType": "Extension",
      "connectionDetails": {
        "path": "PowerBI",
        "kind": "PowerBI"
      },

 

Thanks!

4 REPLIES 4
Anonymous
Not applicable

Hi,

I am doing something similar to build up a full lineage model and refresh times.

1. Dataflows linked to Datasets

Don't know if this is solved yet. But what you need is this API call

 

https://docs.microsoft.com/en-us/rest/api/power-bi/admin/datasets_getdatasettodataflowslinksingroupa...

You need to be a Power BI service admin to run it.

 

It returns the dataflows linked to a given dataset.

 

You can then use

https://docs.microsoft.com/en-us/powershell/module/microsoftpowerbimgmt.data/get-powerbidataflow?vie...

to get the details of the dataflow.

2. Dataflow refresh schedules

There doesn't appear to be an API that will give you this information.

However if you export the dataflow itself, which can be done by API, (in a JSON format) then in that file is the date and time that entities in dataflows were last refreshed. You can use this information to determine this information. I assume that all refreshes in the last 24 hours are scheduled refreshes.

I download all the dataflows (which I store in a Git) and then run a powershell script through them all to get the refresh timings.

jpierzchala
Helper I
Helper I

This is something I would be interested in as well.

 

I'm trying to develop a whole tenant lineage view and being unable to get dataflow sources for the dataset is holding me back. 

 

If anyone manages to solve this I would appreciate an answer in this thread

v-xuding-msft
Community Support
Community Support

Hi @it_russ ,

You could use Get Dataflow Data Sources to get the specific connection details and  Get Dataflows to get a list of all dataflows from the specified workspace which contains dataflow id. And for fresh times, we can only update the refresh times and can't get it.

 

Best Regards,

Xue Ding

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

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

Thank you for the input.  That would get me the datasources of each dataflow and then I could link that back to the dataflow itself.  So from what I can tell, there is no way to directly link a dataflow ID using an API call to the dataset? https://docs.microsoft.com/en-us/rest/api/power-bi/datasets/getdatasourcesingroup

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
Top Kudoed Authors