Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

GET Request and Token authentication to download file as JSON

Hello Community,

 

I have very minimal knowledge on APIs . I got a request from one of the clients to design a report . However, they said we should get data from JSON as data source. They just provided me a link as shown in screenshot. 

 

They said We need to Post a GET command and also provided a Token for authentication purpose. By downloading file in JSON format , we can get use data option from Power BI for JSON and use data. 

 

However, I am not able to download file . Could some one please suggest how to get data from the link and token code provided below .''

 

 

 

 

6 Replies

  • in Power Query use the "from Web"  data source dialog which translates into Web.Contents(<url>,[<parameters]).  Once you have the raw data you can open it with JSON.Document() etc.

     

    "We need to Post a GET command"  - this made me chuckle - thank you.

    • Anonymous's avatar
      Anonymous
      Not applicable
      Hi, Thanks for the help. I knew that my question will make you laugh. But i am picking this up for the first time. I managed to insert the URL and this is hw it looks. let Source = Web.BrowserContents("https://addm-dc.lowes.com/") in Source Could you please help me how to provide token information as well ? I am looking for M-query similar to the code shown above.