Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
I created an M query to pull data from an anonymous API hosted by an IoT device at its public IP address. It works well in Power BI Desktop but fails to refresh once uploaded to the Service workspace. It requests that I set credentials for the data source, but appears to fail to sign in once I do.
This is the M query. Notice it is a static data source (by use of a static uri as the first argument to Web.Contents), and so it should be refreshable in the service.
let
Username = "MyUsername",
Host = "http://123.123.123.123:8080/",
WebResponse = Web.Contents(Host, [RelativePath="some/path/to/a/public/api", Query=[ username = Username ]]),
ResponseXml = Xml.Tables(WebResponse),
#"Changed Type" = Table.TransformColumnTypes(ResponseXml,{{"sessionID", type text}, {"challenge", type text}, {"iterations", Int64.Type}, {"isIrreversible", type logical}, {"salt", type text}, {"sessionIDVersion", Int64.Type}, {"Attribute:version", Int64.Type}})
in
#"Changed Type"
In the service, this is where it claims the data source requires credentials:
After confirming the API/data source is anonymous in the corresponding dialog, I press "Sign in" and the loading indicator never goes away:
I tried setting up another Web data source pointing to cnn.com, which worked fine. I also tried setting the privacy level to various values, to no avail.
Is an IP-based web data source not supported?
Solved! Go to Solution.
Hi @Ibu
I think this is because it is running on port 8080
If you need to use that port I would create a connecting with the On-Premise Gateway to get it working successfully.
Hi @Ibu
I think this is because it is running on port 8080
If you need to use that port I would create a connecting with the On-Premise Gateway to get it working successfully.
Gotcha. I was hoping to implement my simple script in a way that doesn't require an on-premises gateway, but it looks like that won't be possible.
Thanks!
Check out the September 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.