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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Cherie
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?

2 REPLIES 2
v-henryk-mstf
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.

vhenrykmstf_1-1624589215031.png

 

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.

vhenrykmstf_0-1624588821119.png

 

related blog link:

Automate Your Power BI Dataset Refresh with Python - Pivotal BI

Data refresh in Power BI - Power BI | Microsoft Docs

Best Regards,
Henry

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.

PREVIEW
 
 
 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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.

Top Solution Authors
Top Kudoed Authors