Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
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.