Forum Discussion

pjose's avatar
pjose
Helper I
5 years ago

Using web as a datasource to JSON data but instead asking to open or save as a JSON source file

Hi all,

 

I have a url which links to JSON data like below.

But when I enter this address in the web data source in POwer BI to connect to the JSON data, I get the below screen instead asking whether to save or open as a file with that JSON data in there.

 

Can you please help me to understand what I am missing here? I need to use this link to load my JSON data.

 

Thanks in advance. needhelp 

9 Replies

  • When I tried to provide the link in Power Query, it showed me the below issue.

     

    Can anyone please help?

     

    Thank you!

  • Hi pjose 

    That pop-up window indcates that the URL is sending a file with the extension .json, that's not the same as sending raw JSON data.

    Try opening the URL with Web.Contents or Web.BrowserContents and then process the result.

    Phil


    If I answered your question please mark my post as the solution.
    If my answer helped solve your problem, give it a kudos by clicking on the Thumbs Up.

  • Hi pjose 

    Not sure if you are still needing help to query the JSON and use a 2nd query parameter?  Without knowing the API specifications it's hard to assist. Can you point me at any documentation?

    It's a bit odd that adding a 2nd query param causes different behaviour, unless that 2nd param actually tells the API to send a file.

    Can you share the query without any sensitive info like username and password?

    Phil


    If I answered your question please mark my post as the solution.
    If my answer helped solve your problem, give it a kudos by clicking on the Thumbs Up.

  • Hi pjose 

    That URL has 2 query parameters- does it result in the json file being downloaded?

    I'm afraid that wihout any info for me to understand how the API works, I'm not sure what else I can offer.

    Phil


    If I answered your question please mark my post as the solution.
    If my answer helped solve your problem, give it a kudos by clicking on the Thumbs Up.

    • pjose's avatar
      pjose
      Helper I

      Hi PhilipTreacy 

      Thank you for responding. The second query parameter is just to select the right data from the database, it doesn't have any other role.

      Sorry, I didn't understand when you say this - "That URL has 2 query parameters- does it result in the json file being downloaded?". What does this mean?

       

      Thank you again.