Forum Discussion
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
- pjoseHelper I
When I tried to provide the link in Power Query, it showed me the below issue.
Can anyone please help?
Thank you!
- PhilipTreacySuper User
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. - pjoseHelper I
Thank you Phil.
I found out that the problem is with having a second query parameter in my url. It works well with just one query parameter, for example https://www.test.com.au/PBI/?q=1234&pe=ui doesn't work for me where as https://www.test.com.au/PBI/?q=1234 works. I made both to return the same data by the way. I would like to add the second query parameter too as I need to deal with different use cases.
- PhilipTreacySuper User
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.- pjoseHelper I
Hi PhilipTreacy
Thank you for your response. Unfortunately, the API cannot be accessed externally at the moment, but the API URL looks like this.
https://insync/admin/AxusGroup/?action=FSM&surveyId=7
Not sure if this would be of any use. But the second parameter don't specify to send a file.
Thanks
- PhilipTreacySuper User
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.- pjoseHelper 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.
- PhilipTreacySuper User
Hi pjose
Earlier you said the problem is with having a second query parameter in my url. It works well with just one query parameter so when you posted this url
https://insync/admin/AxusGroup/?action=FSM&surveyId=7
I was asking if that worked - it has 2 query parameters
Phil
- pjoseHelper I
Hi PhilipTreacy
Sorry about the confusion, it works with
https://insync/admin/AxusGroup/?action=FSM
but not with
https://insync/admin/AxusGroup/?action=FSM&surveyId=7
Thank you.