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.
Is it possible to connect dataset via cURL to PowerBI ?
I have cURL generate by graphql but not sure i I can use it somehow in PB
curl 'https://api.com/graphql' -H 'Accept-Encoding: gzip, deflate, br' -H 'Content-Type: application/json' -H 'Accept: application/json' -H 'Connection: keep-alive' -H 'DNT: 1' -H 'Origin: https://api.com' -H 'access_token: ' --data-binary '{"query":"# Write your query or mutation here\n{\n members{\n data{\n user{\n name\n }\n }\n }\n}\n"}' --compressed
So far I managed to create below m code but i doesnt work. Im newbie to M language, can someone support me with it?
let apiUrl = "https://apiname.com/graphql", options = [Headers =[#"Content-Type"="application/json", #"Subscription-Key"="<my token>"], Content = Text.ToBinary({"query:{\n members{\n data{\n user{\n name\n }\n }\n }\n}\n"}) ], Content = options[Content] in Content
Error message: We cannot converte List type to Text type
Hi @wabanek
Do you want to connect to the Microsoft Graph Security API?
If so, please follow this this article to use the Microsoft Graph Security connector of Power BI Desktop.
If you'd like to connect to your secure API like this article
In the editor, enter the API’s address and any header information needed for that api.
After this, when a warning message pops up, Click “Edit Credentials”
let
apiUrl = "https://xxxxxxx/api/info",
options = [Headers =[#"Subscription-Key"="xxxxxxxxxxxxxxxxxxxxx"]],
result = Web.Contents(apiUrl , options)
in
result
Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks Maggie for you reply. I'm Trying to connect to secure Api, tried your step and not sure how to move further, could you advise
Hi Again,
Could you check below why Im getting below error?
let Source = Web.Contents( "https://api.com/graphql", [ Headers=[ #"Method"="POST", #"Content-Type"="application/json", #"Authorization"="Origin: https://api.com' -H 'access_token: <my token>" ], // Notice the quote escaping here Content=Text.ToBinary("{""query"":""{ invoices{data{number}}}""}") ] ), #"JSON" = Json.Document(Source) in #"JSON"
curl 'https://api.com/graphql' -H 'Accept-Encoding: gzip, deflate, br' -H 'Content-Type: application/json' -H 'Accept: application/json' -H 'Connection: keep-alive' -H 'DNT: 1' -H 'Origin: https://api.com' -H 'access_token: <my token>' --data-binary '{"query":"# Write your query or mutation here\n\n{\n invoices{\n data {\n number\n \t}\n \n }\t\n }\n\n"}' --compressed
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.