Forum Discussion
Refresh Power BI dataset connected to Scopus API database
Hi MHadi ,
Have you checked the limitation list of that API? If your scenario does not meet the requirement, it will block the request you send from power query tables.
In addition, have you tried to add custom steps to check and get the last API key from rest API? (it will prevent API key expired issues)
Regards,
Xiaoxin Sheng
Dear Xiaoxin Sheng
Thanks so much for your answer to my question, but your recommendation can not resolve my issue. I should clarify more the problem.
I have two following queries which both of them works well and refereshed without any error in desktop Power BI. The first query also can be refereshed well on Power BI web but the second query could not referesh on web and returns credential error. The first query returns only 25 records, but because I had to return all of my records (809 records) I changed it by making a relative path using recommendation in here. I think using a relative path in second query which is my problem case, may prevent credeintial data to be detected. But I have no solution for this. ( in the queries just APIKEY should be replaced with your APIkey, you can register for api key here ). Thanks again for any help
First query:
let
source=Json.Document(Web.Contents("https://api.elsevier.com/content/search/scopus?&view=complete&query=AFFIL ({Environmental Research Center} OR {Institute for Environmental Research} ) AND AFFIL({Tehran University of Medical Sciences} OR {Tehran University of Medical Science} )&apiKey=APIKEY"))
in
source
Second query:
let
source=Json.Document(Web.Contents(
"https://api.elsevier.com/",
[
RelativePath="content/search/scopus/",
Query=
[
view="complete",
query="AFFIL ( {Environmental Research Center} OR {Institute for Environmental Research} ) AND AFFIL ( {Tehran University of Medical Sciences} OR {Tehran University of Medical Science} )",
apiKey="APIKEY"
]
]
))
in
source
- Anonymous6 years agoNot applicable
HI MHadi ,
Maybe you can contact ImkeF to get some suggestions about power query web connector with rest API.
Regards,
Xiaoxin Sheng
- ImkeF6 years agoCommunity Champion
Hi MHadi
the first query is not working for me. This is the errror I'm getting in the browser:
Could you please check the code? (I've created my own API key)
- MHadi6 years agoFrequent Visitor
Hi Dear ImkeF
Thanks for your answer, I checked it. It works for me with no problem. I think your case may be due two possible things:
- You may not pasted your APIkey in username box in credential Basic setting.
- Your system may not subscribed to Scopus. Our university has purchased Scopus subscription.
Thanks again.