Power BI enables anyone to get insights from data in minutes. But, to unlock the full potential of Power BI, the data needs to be kept up-to-date. Scheduling dataset refreshes in Power BI allows you to do this, regardless of how your dashboards and reports are distributed and consumed. However, we’ve heard feedback that it can be difficult to manage the increasing number of datasets and refresh schedules as an organization scales up Power BI.
Today, I am excited to announce the general availability of new APIs for managing data refresh in the Power BI service. These new APIs will allow you to programmatically trigger data refreshes and retrieve refresh history for any dataset that you own. With these versatile new tools, you’ll be able to easily automate and scale out Power BI data refresh management – no more clicking through dataset settings or flipping through refresh histories. In addition, these APIs open the door to integrating data refresh into your existing ETL or deployment processes. You could, for example, trigger Power BI data refresh as the last step in your Azure Data Factory ETL pipeline. And, as an ISV, you can easily manage the data for all your embedded analytics solutions.
We’re very excited about what you can accomplish with these new tools. Read on for an overview of how to use them, and all these tools can do for you. Or, jump right into the documentation or sample code.
Some additional tips:
- Once you make the request, a data refresh will immediately be kicked off in the Power BI service
- This works for any dataset imported to the Power BI service that you own
- To get the group ID and dataset ID, you can make a separate API call, or simpler yet, just navigate to dataset settings in Power BI. The URL will have both the group ID, and the dataset ID.
- Like all requests to the Power BI REST API, you will have to attach an AAD access token. For more information, see the Power BI REST API authentication documentation.
You can also check refresh history for a particular dataset by making a GET request to the same endpoint.
The service will then return a list representing the refresh history for that dataset, with the same information that you’d see in the refresh history UI in the service.
Some additional tips:
- You can use the ?top parameter to limit the number of entries you get back – e.g. for just checking on the latest refresh that you triggered with the API
- Unlike the API to trigger refreshes, this API is not limited to being called eight times a day in non-Premium capacity
We’re excited to see what you can accomplish with our new APIs. Check out our resources below to get started. And as always, please leave feedback or questions below or in the community – we’d love to hear from you!