Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Web of Science API can return empty string #207

Open
edsu opened this issue Mar 4, 2025 · 1 comment
Open

Web of Science API can return empty string #207

edsu opened this issue Mar 4, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@edsu
Copy link
Contributor

edsu commented Mar 4, 2025

It appears that an API request can return an empty string instead of a JSON object.

Get the Web of Science API Key:

$ vault kv get puppet/application/sul_pub/prod/wos-api-key

Then try this request for ORCID 280000-0002-3271-7861:

$ curl --header "application/json" --header 'X-ApiKey: PUT_KEY_HERE' 'https://wos-api.clarivate.com/api/wos?databaseId=WOK&usrQuery=AI%3D%280000-0002-3271-7861%29&count=100&firstRecord=1'

And notice you get no output, but that it's a 200 OK. Once we figure out a reason for this we should adjust the rialto_airflow.harvester.wos.

We talked about emailing our contact at Clarivate to see if there is a reason that we are seeing this behavior. Otherwise this API route works fine.

@edsu edsu added the bug Something isn't working label Mar 4, 2025
@edsu
Copy link
Contributor Author

edsu commented Mar 4, 2025

Noting that @peetucket reports the curl command works for him. It looks like wos-api.clarivate.com resolves to multiple IP addresses so maybe I'm talking to one that works a bit differently?

$ host wos-api.clarivate.com
wos-api.clarivate.com is an alias for wos-api.prod1.prod.oneplatform.build.
wos-api.prod1.prod.oneplatform.build is an alias for api-pub.us-west-2.prod1.prod.oneplatform.build.
api-pub.us-west-2.prod1.prod.oneplatform.build is an alias for kongapi-prod-us-west-2.prod.sp.aws.clarivate.net.
kongapi-prod-us-west-2.prod.sp.aws.clarivate.net has address 44.225.8.221
kongapi-prod-us-west-2.prod.sp.aws.clarivate.net has address 35.155.244.135
kongapi-prod-us-west-2.prod.sp.aws.clarivate.net has address 44.228.82.11

Adding --verbose to the curl command highlights that I'm talking to 44.225.8.221:

* Host wos-api.clarivate.com:443 was resolved.
* IPv6: (none)
* IPv4: 44.225.8.221, 35.155.244.135, 44.228.82.11
*   Trying 44.225.8.221:443...
* Connected to wos-api.clarivate.com (44.225.8.221) port 443

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant