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 bulk node_info and taxon_info api call options #145

Open
snacktavish opened this issue Jun 13, 2023 · 2 comments
Open

New bulk node_info and taxon_info api call options #145

snacktavish opened this issue Jun 13, 2023 · 2 comments

Comments

@snacktavish
Copy link
Contributor

Hi!
We wanted to let you know that we (@OpenTreeOfLife) now have an, as yet undocumented, bulk node info call.

curl -X POST https://api.opentreeoflife.org/v3/tree_of_life/node_info -H "content-type:application/json" -d '{"node_ids":["mrcaott246ott3364","mrcaott22834ott532753","mrcaott252688ott489372"]} '

We (@bredelings) are developing a bulk taxon_info call as well. (as yet only on devapi, will be on production soon).

curl -X POST https://devapi.opentreeoflife.org/v3/taxonomy/taxon_info -d '{"ott_ids": [1,2,3,4,5]}'

Would be great if you could include in your upcoming release, as it will speed things up on user side, and use less resources on our side.
Thanks,

@fmichonneau
Copy link
Member

Thanks! I can add this in a future release. Are these the only 2 end-points that support bulk queries? How many nodes or taxa can be queried at once? Could you please ping me again once the taxon_info endpoint is in production?

@bredelings
Copy link

These are up on production now. You can query 10,000 nodes or taxa at once. If you have any feedback or find bugs, please let me know.

I only added a bulk-query version for these two endpoints. The motivation was that, looking at the server logs, we sometimes get bursts of taxon_info or node_info calls that could reasonably be condensed into a single call.

Are there any other calls were a bulk option might be helpful? For calls like "tree_of_life/mrca", I didn't add such an option because "mrca" can already receive a bunch of taxa in order to perform a single call. But if there were a use case, then we could talk about it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants