Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Hi Community,
I am working on a task that involves creating tables in a Power BI Datamart and logging their refresh activity using the REST API. The goal is to monitor refreshes and cancel any that exceed 5 minutes.
To capture the refresh history, I tried using the Service Principal method with the following REST APIs:
These APIs worked perfectly for retrieving refresh history for the Semantic Model (dataset). However, when I attempted to use the same APIs for the Datamart, I received the following error message:
"Invalid dataset. This API can only be called on a Model-based dataset."
This leads me to believe that the Datamart is not supported by these APIs.
Any guidance or ideas would be greatly appreciated. Thank you!
Hi @prabavathym
As per me:
REST API for Datamart Refresh History: Currently, there is no specific REST API for directly capturing refresh history for Power BI Datamarts, as the existing APIs like Get Refresh History only work for model-based datasets.
Alternative Approach: Use Power BI Activity Log via the Microsoft 365 Admin Center or Audit Logs to monitor Datamart refresh activities. You can extract these logs programmatically using the Microsoft Graph API or PowerShell.
Logging and Monitoring: Set up an external logging mechanism to capture refresh triggers and completion statuses by integrating Power Automate or similar tools that track refresh activity through the Power BI API triggers or email notifications.
No direct REST API exists yet, so using audit logs or automation tools is the best alternative.
Did I answer your question? Mark my post as a solution, this will help others!
If my response(s) assisted you in any way, don't forget to drop me a "Kudos" 🙂
Kind Regards,
Poojara
Data Analyst | MSBI Developer | Power BI Consultant
Please Subscribe my YouTube for Beginners/Advance Concepts: https://youtube.com/@biconcepts?si=04iw9SYI2HN80HKS
Thank you for the helpful insights. @Poojara_D12
Your suggestion about using the Power BI Activity Log through the Microsoft 365 Admin Center or Audit Logs is a great alternative. However, in our specific requirement, we are focusing on a REST API solution to capture refresh history for Datamarts. Since there is currently no direct REST API available for this, I’m exploring other methods like using Microsoft Graph API or PowerShell to extract the logs programmatically.
Additionally, the idea of leveraging Power Automate or similar automation tools to track refresh activities via API calls or email notifications could be useful, but we are primarily looking for a REST API approach to stay within the Power BI API ecosystem.
Thanks again for your valuable input, and I’ll keep exploring the available options!
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the September 2025 Power BI update to learn about new features.