Forum Discussion
Power BI API - Get datasources in group not returning dataflow information
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_getdatasettodataflowslinksingroupasadmin
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?view=powerbi-ps
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.