-
Notifications
You must be signed in to change notification settings - Fork 3
Description
The new WoS REST API seems to have issues with some authors, throwing errors.
https://app.honeybadger.io/projects/50046/faults/99684154/01HB323CCE7F43DYFQ5SBH0QJT?page=0
For example, this author fails to get results back with an XML error as you can see from the HB error above.
You can reproduce the problem without attempting to harvest by just querying for the UIDs
author=Author.find(157210)
options = {load_time_span: '3W', relDate: '21'}
author_query = WebOfScience::QueryAuthor.new(author, options)
puts "WOS (by name): #{author_query.name_query.send(:name_query)}"
uids = author_query.uids
This is likely due to some problematic responses from Clarivate (like some invalid XML documents) and needs to be investigated with them.
If you use their Swagger interface (https://developer.clarivate.com/apis/wos) to generate the actual rest call and execute on the console, you will get a response:
curl -X 'GET' 'https://wos-api.clarivate.com/api/wos/?databaseId=WOK&usrQuery=AU%3D%28%22Miller%2CD%22%20OR%20%22Miller%2CD%2CCraig%22%20OR%20%22Miller%2CD%2CC%22%29%20AND%20AD%3D%28%22stanford%22%29&loadTimeSpan=3W&count=100&firstRecord=1' -H 'accept: application/xml' -H 'X-ApiKey: API_KEY_REDACTED'
For just the 200 header:
curl -I -X 'GET' 'https://wos-api.clarivate.com/api/wos/?databaseId=WOK&usrQuery=AU%3D%28%22Miller%2CD%22%20OR%20%22Miller%2CD%2CCraig%22%20OR%20%22Miller%2CD%2CC%22%29%20AND%20AD%3D%28%22stanford%22%29&loadTimeSpan=3W&count=100&firstRecord=1' -H 'accept: application/xml' -H 'X-ApiKey: API_KEY_REDACTED'