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.
Hi All,
I have below content as my source:
Source =
Json.Document(
Web.Contents(
"https://abcd.azurewebsites.net/api/CompatAPI/GetVSOItemsByQueryId?queryId=abcd-efgh-ijh",[Headers=[key="abcdefgh12345678"]])),
and i have checked the link "Chris Webb's BI Blog: Using The RelativePath And Query Options With Web.Contents() In Power Query An..."
but it does not provide any conditions related to my request which has queriId and Header with Key.
Can anyone provide any lead on how to change my source to make it error free to schedule refresh.
Regards
Santosh Kumar P
Solved! Go to Solution.
Issue :
Source =Json.Document( Web.Contents( "https://abcd.azurewebsites.net/api/CompatAPI/GetVSOItemsByQueryId?queryId=abcd-efgh-ijh",[Headers=[key="abcdefgh12345678"]]))
i have went through few videos in the youtube and noticed that for all web API contents everyone has provided query links in BASIC mode where as i have provided query in Advanced mode.
so, i have modified my query to make is consume data with BASIC mode only.
previous steps i followed is
1. go to advance mode
2. provide query string in URl
3. key in Header
Current way:
1.append query in Basic mode only as below:
Source =Json.Document( Web.Contents(
"https://abcd.azurewebsites.net/api/CompatAPI/GetVSOItemsByQueryId?queryId=abcd-efgh-ijh&key=abcdefgh12345678"))
then after i went to Settings Data set and Edit Credentials,choose Anonymous and Save.
Then my issue got resolved.
Issue :
Source =Json.Document( Web.Contents( "https://abcd.azurewebsites.net/api/CompatAPI/GetVSOItemsByQueryId?queryId=abcd-efgh-ijh",[Headers=[key="abcdefgh12345678"]]))
i have went through few videos in the youtube and noticed that for all web API contents everyone has provided query links in BASIC mode where as i have provided query in Advanced mode.
so, i have modified my query to make is consume data with BASIC mode only.
previous steps i followed is
1. go to advance mode
2. provide query string in URl
3. key in Header
Current way:
1.append query in Basic mode only as below:
Source =Json.Document( Web.Contents(
"https://abcd.azurewebsites.net/api/CompatAPI/GetVSOItemsByQueryId?queryId=abcd-efgh-ijh&key=abcdefgh12345678"))
then after i went to Settings Data set and Edit Credentials,choose Anonymous and Save.
Then my issue got resolved.
@SantoshKumar , Based on what I got from the issues and what I found. The syntax I got is
Web.Contents("https://contoso.com/api/customers/get", [ApiKeyName="api_key"])
at https://docs.microsoft.com/en-us/powerquery-m/web-contents
Suggested at
https://community.powerbi.com/t5/Power-Query/Web-API-Key-Authentication/td-p/2389219
Also check
@amitchandak the information which you have provided is regarding how to provide key value to Web API.
here i have already provided those things and my data is flowing as expected.
my problem here is that "with the format which appear, i am not able to schedule refresh". i went through few links and found that it should be changed certain format (mentioned in my query) but those links does not deals with "Web Content with Advanced option data".
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.
User | Count |
---|---|
113 | |
97 | |
85 | |
70 | |
61 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |