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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
johnihab
Frequent Visitor

How Schedule Refresh When the Data Source is an API

Hello Everyone, 

I want to Scheduale refresh my reports but I can't do that because in my data model, the main data source is a Rest API.

 

I could connect to it with python script , but the problem is it needs personal gateway to do so ( and I want the data to be updated when I am offline ) 

 

I also tried to connect to the API through PowerQuery M language, But couldn't do it because I must use PUT Request Method and according to this article,this Put request isn't supported 

https://social.technet.microsoft.com/Forums/security/en-US/ad808464-8819-45ac-a015-b53938095aae/how-...

 

So is there anyway to live connect to the api and scheduale refresh only from Power BI service even when I am offline ? Thanks

4 REPLIES 4
johnihab
Frequent Visitor

So, What are the possible free web connector that I Can connect Power BI with to get the data when refreshing the power BI web service, Such as sharepoint.

In Sharepoint whenever the data updates on the same file, the powerbi online report gets refreshed " Through MS FLow" without the need of gateway or running script on server or cloud 

What are the other reliable options as sharepoint ? 

 

Thank you

Anonymous
Not applicable

HI @johnihab,

I'd like to suggest you take a look at the following link to know how to get data from rest API with OAuth authorization with 'relative path' parameters, then you can directly configure it on data source credentials use 'anonymous' authorization mode to refresh: (cloudy data source can direct refresh without gateway)

Pull data from a REST API Authentication  

Using The RelativePath And Query Options With Web.Contents() In Power Query And Power BI M Code 

BTW, if you are working with a report with multiple types of data source that required gateway to refresh, please turn on the following option to allow guest access to the cloud data source)

Merge or append on-premises and cloud data sources 

For detail information on power bi refreshes, you can check the following document:
Data refresh in Power BI 

Regards,
Xiaoxin Sheng

Thank you for reply, 

 

This is not the problem that you provided the solution for

 

I could Connect to the API using Powerquery M Code, but for a specific call I couldn't, Why? Because it is PUT request, and M language doesn't get responses for PUT Reuqests only for Get and Post 

 

So I Tried another solution, Which is Getting the data with python Script ,, and it worked fine on the desktop version, but when I published it, it wasn't able to scheduale refresh. unless in the existence of Personal Gateway.

 

But I don't want that solution, Why ? Because I Need it to be upated whether I am Online or Offline , I want it to be refreshed through the online service directly and not related to the Desktop at all

 

So is there any solution for that ? 

Anonymous
Not applicable

HI @johnihab,

It sounds more related to programming requirements, current power bi does not suitable to handle these operations.
Perhaps you can deploy a web service to handle these requests/operations, then you can use web connector to invoke this service to get result data tables.

Regards,

Xiaoxin Sheng

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.