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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

Discover data source

Dears, 

I have an issue when I'm using the Rest API, when I'm using it in the local desktop it works fine but when I tried to publish it, the refresh not working an give this error: 

Dynamic data source.PNG

 

In my case: I have a list of pages for each student "let us say", and I iterate over all pages that related to the student to get the list of subjects and the Auth for each, after that I invok that key for each student and each subject to get the clasess:

 

 

 

let 
    
    
    MainUrl =Json.Document(Web.Contents("https://StudentAdmin.com/api/Student?page=", [Headers=[Authorization="Bearer XXXXXXXXXXXXXXXXXXX",Accept="application/json",#"Content-Type"="application/json"]])),
    meta1 = MainUrl[meta],
    last_page = {1.. meta1[last_page]},
    #"Converted to Table" = Table.FromList(last_page, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
    #"Changed Type" = Table.TransformColumnTypes(#"Converted to Table",{{"Column1", type text}}),
    #"Added Custom" = Table.AddColumn(#"Changed Type", "Student", each let
    Source = Json.Document(Web.Contents("https://StudentAdmin.com/api/Student?page="&[Column1]&"", [Headers=[Authorization="Bearer XXXXXXXXXXXXXXXXXXX", Accept="application/json", #"Content-Type"="application/json"]])),
    data = Source[data]
in
    data),
    #"Expanded Student" = Table.ExpandListColumn(#"Added Custom", "Student"),
    #"Expanded Student1" = Table.ExpandRecordColumn(#"Expanded Student", "Student", {"id", "country_iso_code", "name"})
    in 

    #"Expanded Student1"

 

And as Chris mention in his post to use the relative path, i have change the code to use the same idea but still is not getting the credentials

 

Scheduled refresh is disabled because at least one data source is missing credentials. To start the refresh again, go to this dataset's settings page and enter credentials for all data sources. Then reactivate scheduled refresh.

Any Idea? 

1 REPLY 1
lbendlin
Super User
Super User

You can't do this:

MainUrl =Json.Document(Web.Contents("https://StudentAdmin.com/api/Student?page=",

Either drop the page parameter, or provide a dummy value.

MainUrl =Json.Document(Web.Contents("https://StudentAdmin.com/api/Student",

That will trick the service into thinking it's not a dynamic URL. Then use the [query=...] option to specify your parameters.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

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 Kudoed Authors