Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
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:
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?
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.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.