Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi,
I'm trying to connect to Breathehr.com, which is a web based service. Trail gives you all options to play with it so went for it and created some dummy data. Sadly I can't connect to the API using the key.
They say on their website:
"Authentication to the breathe API is achieved with a token, sent in the HTTP headers of every request. The X-API-KEY header should contain the string shown in the app on/settings/modules/api_setup"
There are two kesys to be found. Production and sandbox:
" prod-GCcDDZpORrpQDXdAmRqoZg17-ElVGaqlSyHUaplPa8I; sandbox-y3et1u8ZDZN_NcNQtAzjuIdMuS704vGLlcVqoRstwuo"
I'm tryingto use one of them as it was suggested by the community in few topics:
let
Source = Json.Document(Web.Contents("https://hr.breathehr.com/allowances?identifier=centiq", [Headers =[Authorization="Bearer " & "prod-GCcDDZpORrpQDXdAmRqoZg17-ElVGaqlSyHUaplPa8I"]]))
in
Source
Unfortunately i get an error:
Also, if i try this:
let
Source = Json.Document(Web.Contents("https://hr.breathehr.com/allowances?identifier=centiq", [Headers=[#"x-api-key"="prod-GCcDDZpORrpQDXdAmRqoZg17-ElVGaqlSyHUaplPa8I"]])),
#"Converted to Table" = Record.ToTable(Source)
in
#"Converted to Table"
Same error happens:
"DataSource.Error: The downloaded data is HTML, which isn't the expected type. The URL may be wrong or you might not have provided the right credentials to the server."
Can anyone help?
Solved! Go to Solution.
Hi Rena,
Thanks for your message. I tried your solution, but unfortunatelly I get this error:
It was a stupid mistake. I was using a wrong link. Rather, than the URL showing report i was interested, I should've used what the service suggested in the documentation:
https://api.breathehr.com/v1/employees
Hi @Anonymous ,
Please connect to the web page by clicking "Get data"-> Web, then select Basic, enter your email address as the user name and the API Token as the password. Later check whether it can resolve the problem.
If the above one is not working, you can also refer the following documentations to get it.
how to connect my web api wtih Power BI Reports?
Best Regards
Rena
Hi Rena,
Thanks for your message. I tried your solution, but unfortunatelly I get this error:
It was a stupid mistake. I was using a wrong link. Rather, than the URL showing report i was interested, I should've used what the service suggested in the documentation:
https://api.breathehr.com/v1/employees
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
106 | |
93 | |
75 | |
62 | |
50 |
User | Count |
---|---|
146 | |
109 | |
106 | |
88 | |
61 |