Forum Discussion
Issue when scheduling refresh using postman rest api public key
- 5 years ago
Hi Anonymous ,
Would you please try to select the "skip test connection" option? For more details, please refer to https://kohera.be/blog/power-bi/the-hidden-gems-of-the-function-web-contents/
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Best Regards,
Dedmon Dai
Hi. Sometimes Power Bi Service needs more detail about the url. It needs to understand which part of the URL means what. That is why it is a good practise to split in the correct parameteres. Check this post out showing relative path and query path:
This can help Power Bi to identify the source and credentials.
Hope this helps,
Eventhough it is not working. Data can be pulled in desktop and still in service can't able to refresh. It's showing refresh error as failed to update data source crendentials. since it's public key doesn't have credentials
- ibarrau5 years agoSuper User
Can you show the complete error message? In addition, please be sure to have the credentials configurated in the schedule refresh options like this:
You can specify anonymous and sign in without anything else. This is an example of a dataset I have connected exactly like you.
Regards,
- Anonymous5 years agoNot applicable
Hi,
I am getting the below error, when I tried in anonymous
Regards,
Krithika
- v-deddai1-msft5 years agoCommunity Support
Hi Anonymous ,
Would you please try to chang your anonymous to "basic" connection on power bi desktop and passed the API key as the username (left password blank).
But make sure you get rid of API key in your advanced editor if you did set one.
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Best Regards,
Dedmon Dai
- Anonymous5 years agoNot applicable
Hi v-deddai1-msft,
I tried that, even though it's not working. Actual problem is I am fetching data from postman using public key as header. In Power bi, using web web connector It's working. while refreashing it's asking for update credentials. My question, for public key why I want credentials?. Kindly help me with this..
Regrads,
Krithika
- ibarrau5 years agoSuper User
Ok let's add the key as headers. Check this example: if your URL is this one "https://swapi.dev/api/people/?search=Skywalker" you can build this:
let Json_body = Json.FromValue("{ ""first_param"": ""AAAAA"", ""second_param"": ""BBBBBB""}",), Source = Json.Document(Web.Contents("https://swapi.dev/api/", [ RelativePath="people/", Query=[search="Skywalker"], Headers=[ #"Content-Type"="application/json", Otherparameter"ValueOfParameter" ], Content=Json_body ])) in SourceThat is an example with body and headers. Try adding your public key there like in postman.
Regards,