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

New breaking argovis API version 2 #246

Open
gmaze opened this issue Feb 15, 2023 · 5 comments
Open

New breaking argovis API version 2 #246

gmaze opened this issue Feb 15, 2023 · 5 comments
Labels
backends breaking-change Will break code if not updated with new API stale No activity over the last 90 days

Comments

@gmaze
Copy link
Member

gmaze commented Feb 15, 2023

I've noticed this morning that argovis has moved to API version 2
and it's not backward compatible, hence it's breaking argopy ds='argovis' data source
and it now requires to register and get an API key

That's a lot to handle to keep it working with argopy
any will from your team @donatagiglio to make a PR and keep argovis available in argopy ?

https://argovis.colorado.edu/
https://argovis-api.colorado.edu/docs/

Example of request for a float:

curl -H "x-argokey: <KEY>" -H "accept: application/json" -X GET "https://argovis-api.colorado.edu/argo?platform=6902915&data=all"
@gmaze gmaze added backends breaking-change Will break code if not updated with new API labels Feb 15, 2023
@gmaze
Copy link
Member Author

gmaze commented Feb 15, 2023

And because the old API is not turned off, our method to check if argovis is alive was misleading:
We check if the url "https://argovis.colorado.edu/selection/overview" is responding. if it is, argovis is considered alive.
But this url is indeed responding but returning nothing.

@gmaze gmaze changed the title New argovis API ! New breaking argovis API version 2 Feb 15, 2023
@donatagiglio
Copy link

donatagiglio commented Feb 15, 2023 via email

@gmaze
Copy link
Member Author

gmaze commented Feb 15, 2023

hi @donatagiglio
Sorry your email found its way to my SPAM folder ...
I noticed the legacy version change of url, I'm updating argopy to work with it (#247 )
But in the argovis website, it's mentioned to be valid only to March 31st
So I'll be happy to work with @billmills to make argopy ready for the new API v2

@gmaze
Copy link
Member Author

gmaze commented Feb 15, 2023

for the future PR, the way to pass a key in the request header using our filesystem would be something like:

client_kwargs = {'headers': {'x-argokey': apikey}}
fs = argopy.stores.httpstore(client_kwargs=client_kwargs)
fs.open_json('https://argovis-api.colorado.edu/argo?platform=6902915&data=all')

@github-actions
Copy link

This issue was marked as staled automatically because it has not seen any activity in 90 days

@github-actions github-actions bot added the stale No activity over the last 90 days label May 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backends breaking-change Will break code if not updated with new API stale No activity over the last 90 days
Projects
None yet
Development

No branches or pull requests

2 participants