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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
michaelsh
Kudo Kingpin
Kudo Kingpin

Dynamic Base URL with prefix for API calls - Power Query

Hello friends,

I've built a function that calls API, parses the json results and loads to a table in Power BI.

= Json.Document(Web.Contents(pBaseURL, [RelativePath="/v1/students", Headers=[#"Authorization"=pToken, #"Content-Type"="application/json"]]))

Now I want to call this function for a list multiple base URLs.

The Authentication is Annonymous (I have a Token for each client)

The base URL has a prefix for each client:

"client1.theapi.com/", "client2.theapi.com/", "client3.theapi.com/"

I think it treats each call as a new Data Source and wants me to specify an authentication method each one of them.... 

 

How do I specify "Annonymous" for every call?

 

Thanks

1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

You can't.  The beginning part of a dynamic URL needs to be static. 🙂  Your URL schema is unsuitable for consumption by Power BI.

View solution in original post

3 REPLIES 3
michaelsh
Kudo Kingpin
Kudo Kingpin

Thanks, @lbendlin 

I would rather think of it this way:

Power BI is not yet suitable for consuming my URL schema...

🙂

Anonymous
Not applicable

Hey,

 

I'm facing the similar problem, have you had any solution to it (or adapted scheme)?

 
lbendlin
Super User
Super User

You can't.  The beginning part of a dynamic URL needs to be static. 🙂  Your URL schema is unsuitable for consumption by Power BI.

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.