Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi,
I need help converting curl into Power Query. Now I have curl expression that works (tested in Postman) but I can't make it work in Power Query. I'm doing auth by ApiKey named x-fireeye-api-key. APIKeyName needs to be passed through header. So far I tried through Web.Contents. Advice pls, need push to right direction. Thanks in advance
curl -k "https://hexsks639-hx-webui-1.hex03.helix.apps.fireeye.com/hx/api/v3/token" -X "http://gate.zrh.XXX.com:8080" -X "GET" -H "Accept: application/json" -H "x-fireeye-api-key:XYZ" -i
What I have so far
let
GetAPIKeyName = "x-fireeye-api-key",
HttpRequest = [#"RelativePath" = "hx/api/v3/token", #"ApiKeyName" = GetAPIKeyName, Headers = [#"Accept" = "application/json"]],
Result = Json.Document(Web.Contents("https://gate.zrh.XXX.com:8080/hexsks639-hx-webui-1.hex03.helix.apps.fireeye.com/", HttpRequest ))
in Result
HttpRequest = [RelativePath = "hx/api/v3/token", ApiKeyName = GetAPIKeyName, Headers = [Accept = "application/json"]],
Yes, I tried that one also but it looks that problem is in passing
"http://gate.zrh.XXX.com:8080"
through Web.Contents function.
Web.Contents does not handle redirects very well. Have a look at Web.BrowserContents.
Yes, that will not work for what I have. Thanks for trying to help
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
72 | |
71 | |
57 | |
38 | |
36 |
User | Count |
---|---|
81 | |
67 | |
61 | |
46 | |
45 |