Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Kmburke0330
New Member

Setting up autorefresh of datasets in AWS MySQL database

I'm trying to use Power BI REST APIs to connect(Refresh Dataset) to set up autorefresh of my report.  Do I need to set up a gateway or connection for this?  Can someone point me to a documentation/explanation page on how to do this?

1 ACCEPTED SOLUTION
johnbasha33
Solution Sage
Solution Sage

@Kmburke0330 

To use Power BI REST APIs to refresh a dataset, you do not necessarily need to set up a gateway or connection. However, if your dataset is based on an on-premises data source, you may need to use a gateway to enable the dataset to connect to the underlying data source for refresh.

Here are the general steps to refresh a dataset using Power BI REST APIs:

1. **Register an Application**: First, you need to register an application in the Azure portal and obtain the necessary credentials (client ID, client secret, etc.) to authenticate your requests to the Power BI service. You can follow the documentation [here](https://docs.microsoft.com/en-us/power-bi/developer/embedded/register-app) for detailed instructions on registering an application.

2. **Authenticate with Azure AD**: Use Azure AD authentication to obtain an access token that will be used to authenticate your requests to the Power BI service. You can find information on how to authenticate with Azure AD [here](https://docs.microsoft.com/en-us/power-bi/developer/embedded/embed-service-principal#using-the-servi...).

3. **Refresh Dataset**: Once you have obtained an access token, you can use the Power BI REST API to trigger a dataset refresh. You can find the documentation for refreshing a dataset [here](https://docs.microsoft.com/en-us/rest/api/power-bi/datasets/refreshdatasetingroup).

4. **Handle Errors and Monitor Refresh Status**: Make sure to handle any errors that may occur during the refresh process and monitor the status of the refresh operation. You can use the Power BI REST API to check the refresh history and status of a dataset. Documentation for monitoring refresh status can be found [here](https://docs.microsoft.com/en-us/rest/api/power-bi/refresh/reportservices#check-the-refresh-history-...).

Regarding setting up a gateway, it depends on whether your dataset is based on an on-premises data source. If your dataset connects to an on-premises data source, you will need to install and configure an On-premises data gateway to enable refresh. You can find information on setting up a gateway [here](https://docs.microsoft.com/en-us/power-bi/connect-data/service-gateway-onprem).

For more detailed information and step-by-step instructions, refer to the official Microsoft documentation for Power BI REST APIs:
- [Power BI REST API Reference](https://docs.microsoft.com/en-us/rest/api/power-bi/)
- [Power BI Developer Documentation](https://docs.microsoft.com/en-us/power-bi/developer/)

These resources should provide you with the necessary information to set up autorefresh of your report using Power BI REST APIs.

Did I answer your question? Mark my post as a solution! Appreciate your Kudos !!

View solution in original post

3 REPLIES 3
v-zhengdxu-msft
Community Support
Community Support

Hi @Kmburke0330 

 

Since AWS MySQL is a cloud data source, typically, you wouldn't need an on-premises data gateway for direct cloud-to-cloud data refresh scenarios. Power BI can connect directly to cloud data sources like AWS MySQL without the need for a gateway.
For setting up auto-refresh using Power BI REST APIs, you can follow the steps outlined in the Power BI documentation for Refresh Dataset REST API. This guide provides detailed instructions on how to use the REST API for dataset refresh operations, including prerequisites, limitations, and how to make the API calls.

 

Best Regards

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

johnbasha33
Solution Sage
Solution Sage

@Kmburke0330 

To use Power BI REST APIs to refresh a dataset, you do not necessarily need to set up a gateway or connection. However, if your dataset is based on an on-premises data source, you may need to use a gateway to enable the dataset to connect to the underlying data source for refresh.

Here are the general steps to refresh a dataset using Power BI REST APIs:

1. **Register an Application**: First, you need to register an application in the Azure portal and obtain the necessary credentials (client ID, client secret, etc.) to authenticate your requests to the Power BI service. You can follow the documentation [here](https://docs.microsoft.com/en-us/power-bi/developer/embedded/register-app) for detailed instructions on registering an application.

2. **Authenticate with Azure AD**: Use Azure AD authentication to obtain an access token that will be used to authenticate your requests to the Power BI service. You can find information on how to authenticate with Azure AD [here](https://docs.microsoft.com/en-us/power-bi/developer/embedded/embed-service-principal#using-the-servi...).

3. **Refresh Dataset**: Once you have obtained an access token, you can use the Power BI REST API to trigger a dataset refresh. You can find the documentation for refreshing a dataset [here](https://docs.microsoft.com/en-us/rest/api/power-bi/datasets/refreshdatasetingroup).

4. **Handle Errors and Monitor Refresh Status**: Make sure to handle any errors that may occur during the refresh process and monitor the status of the refresh operation. You can use the Power BI REST API to check the refresh history and status of a dataset. Documentation for monitoring refresh status can be found [here](https://docs.microsoft.com/en-us/rest/api/power-bi/refresh/reportservices#check-the-refresh-history-...).

Regarding setting up a gateway, it depends on whether your dataset is based on an on-premises data source. If your dataset connects to an on-premises data source, you will need to install and configure an On-premises data gateway to enable refresh. You can find information on setting up a gateway [here](https://docs.microsoft.com/en-us/power-bi/connect-data/service-gateway-onprem).

For more detailed information and step-by-step instructions, refer to the official Microsoft documentation for Power BI REST APIs:
- [Power BI REST API Reference](https://docs.microsoft.com/en-us/rest/api/power-bi/)
- [Power BI Developer Documentation](https://docs.microsoft.com/en-us/power-bi/developer/)

These resources should provide you with the necessary information to set up autorefresh of your report using Power BI REST APIs.

Did I answer your question? Mark my post as a solution! Appreciate your Kudos !!

Thank-you

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors