The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
Hello Gurus,
I'm trying to see if there's any APIs to extract the data we get using .csv download option within refresh history either via API or some other call. So far everything that I've seen doesn't show "rowsProcessed" which is what we're after.
Please let me know
Thanks!
-Pawan
Hi, @pvuppala
Power BI does provide an API to access and extract the refresh history of a dataset, but the .csv download functionality directly through the API may not be directly supported. However, you can accomplish this indirectly by following the steps below:
First, you need to use the Power BI REST API to get the refresh history for a dataset. This usually involves several steps such as getting a list of workspaces, getting a list of datasets, and then for each dataset getting its refresh history.
https://learn.microsoft.com/en-us/rest/api/power-bi/datasets/get-refresh-history
The response from the API will contain the data you requested, which is the refresh history of the dataset. This data is usually returned in JSON format. Once you have obtained the refresh history in JSON format, you can convert it to CSV format using a variety of methods. This can be done server-side (for example, using Python's pandas library or similar) or client-side (for example, using a JavaScript library in the browser).
If you are working with this data in a web application, you can provide the user with a download link or button that, when clicked, triggers an HTTP request to generate the CSV file and send it to the user's browser for download.
Please note that providing the .csv download option directly through the Power BI interface or API may not be a native feature of Power BI. Therefore, you may need to write some custom code or use a third-party library to implement this feature.
Best Regards,
hackcrr
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @pvuppala
Do you mean you are looking for a way to extract the dataflow refresh history via an API call?
Yes Gilbert, there's a "Get Dataflow Transactions" API but, that doesn't give any details. More ideas welcome, please keep 'em coming..
Thank you all.
Yes, my customer would like to track rowcounts on each scheduled refresh. I see that field as part of refresh history available as .csv download but, we're trying to get it programatically. Please let me know if anyone had to deal with it.
Hi @pvuppala
You would need to query the dataflow and possibly use some DAX to extract the rowcounts?
No, we're talking about Refresh History and how many records were processed each run. All that info is available when you click on refresh history it lets you download .csv for each run. We just want to be able to programatically get that info for all runs. I opened a microsoft case, they said there isn't an API for this yet.