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
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
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,
- v-deddai1-msft5 years agoCommunity Support
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
- Anonymous5 years agoNot applicable
Thanks Dedmon, that has worked wonders for me. Thanks.