Forum Discussion
DBirdmanAR
6 years agoRegular Visitor
Connecting PowerBI to REDCap via API with token
Hi All, I am trying to connect PowerBI to REDCap (see https://projectredcap.org/) which is a PHP/MySQL application that has an API which uses HTTP POST to allow users to pull data with a valid to...
DBirdmanAR
6 years agoRegular Visitor
It was two issues:
- I need to change to x-www-form-urlencoded
- There were serious formating errors with both the Headers and the Content
let
actualUrl = "https://bbmc.ouhsc.edu/redcap/api/",
record =[token="9A81268476645C4E5F03428B8AC3AA7B",
content="record",
format="csv"
],
body = Text.ToBinary(Uri.BuildQueryString(record)),
options = [Headers =[#"Content-type"="application/x-www-form-urlencoded"], Content=body],
result = Web.Contents(actualUrl, options)
in
result
v-lid-msft
Community Support
6 years agoHi DBirdmanAR ,
Your query works well on my side, we tried to convert the result with csv format and get the dummy data as the document. If you have any other questions , please kindly ask here and we will try to resolve it.
Best regards,
- 274188A5 years ago
Advocate I
Perfect for my needs - a year later but THANKS!! Life Saver.
Is there a limit on the number of fields I can connect to? I have 250!
Cheers,
John
- Dianamoor4 years agoNew Member
Hi guys,
I'm new in power BI and I wanna make the same connexion RedCap => power BI above with token
Can you please show me what I must set in parameters header :
Url :...
token:..
content:record
format:csv
I download the file example but i didn't found the way 😞
Thank very much for your help
Diana