Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreWe've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now
Hello friends, hoping you are well.
I have an api rest that can only be called by the methodo post and in Power BI Desktop I have no problems, but when wanting to have an updated programming in service I have problems.
This is my advanced editor to consume the api.
let
fechaI = Date.ToText(DateTime.Date(DateTime.LocalNow()),"yyyy-MM-dd'T'HH:mm:ss"),
fechaT = Replacer.ReplaceText(fechaI,"T00:00:00","T23:59:59"),
url = "url api",
body = "{""apiKey"":""api key"", ""inicio"":"""&fechaI&""", ""termino"":"""&fechaT&""", ""identificador"": null}",
Source = Json.Document(Web.Contents(url,[
Headers = [#"Content-Type"="application/json"],
Content = Text.ToBinary(body)
]
)),
in
Source
Then he asks me for a web credential where I can put Anonymous and make it public.
So far so good.
Then I publish my report but when I want to have a scheduled update, I have that error.
I already tried installing and reviewing my gateway and nothing please help.!!!!!!!!!!!!!!!!!!!!!!!!
Solved! Go to Solution.
Hi @ldroguett ,
It seems like detail REST API url not allow you to use anonymous authorizations on it. If this is a case, I'd like to suggest you to add relative path option to convert rest api url to root path and relative path.
let
Source=Web.Contents("https://xxxx.xxxxxxx.com",[Headers = [#"Content-Type"="application/json"],Content = Text.ToBinary(body),RelativePath="/api/xxxxxxx"])
in
Source
Regards,
Xiaoxin Sheng
Hi @ldroguett ,
It seems like detail REST API url not allow you to use anonymous authorizations on it. If this is a case, I'd like to suggest you to add relative path option to convert rest api url to root path and relative path.
let
Source=Web.Contents("https://xxxx.xxxxxxx.com",[Headers = [#"Content-Type"="application/json"],Content = Text.ToBinary(body),RelativePath="/api/xxxxxxx"])
in
Source
Regards,
Xiaoxin Sheng
Thanks !
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.