Showing results for 
Search instead for 
Did you mean: 
New Member

Automatically connect to API Requiring Dates in Parts

I'm connecting to an External API and the API URL requires the parts {date_start} and {date_end}.

GET /ranks/{site_id}/{date_start}/{date_end}


I can connect to the API easily but, I don't know how I could automatically connect to the API daily and automatically change the date parts to reflect this to then push the data to the data set.


I've done this historically through a script but I've new to PowerBI.
When reading the automation document all I find is scheduling the REST API for Power BI.


Should I be using the Python Script Connector to call to the API to auto add new data on a schedule?

Community Support
Community Support

Hi @Cherie ,


In the api you provide, you can only manually enter the date range, but you cannot create a date column to dynamically get the latest date.


As for the Python Script Connector, I read the related documents, and it didn’t mention that you can set the dynamic date parameter to get the latest data set.



If you want to dynamically get the latest date and refresh the data set, my suggestion is to configure a scheduled refresh, you can set the refresh interval.



related blog link:

Automate Your Power BI Dataset Refresh with Python - Pivotal BI

Data refresh in Power BI - Power BI | Microsoft Docs

Best Regards,

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

Thanks for the advice @v-henryk-mstf,
I'll try it an dlet you know if it works.


Helpful resources

UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

November Power BI Update 768x460.png

Check it Out!

Click here to read more about the November 2021 Updates!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.