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

Endpoint for batch queries #5

Open
duetosymmetry opened this issue Jun 19, 2020 · 4 comments
Open

Endpoint for batch queries #5

duetosymmetry opened this issue Jun 19, 2020 · 4 comments

Comments

@duetosymmetry
Copy link

I think it would be useful if there was a (POST) endpoint, e.g. /api/batch, where several queries could be batched together. Similar to how the page BiblioTools: Generating Your Bibliography allows one to get batch bibtex responses from a list of keys, this should be possible through an API endpoint.

@michamos
Copy link
Contributor

We are currently porting the bibliography generation tools to the new platform, so we could expose its API once it's done. Would that work for you or do you have something more general in mind?

@duetosymmetry
Copy link
Author

That could possibly work for the use case I had in mind, but I was thinking more generally. For example, the tool filltex makes queries to INSPIRE, one for each bibkey. With a batch endpoint, all of those queries could be combined into one request.

@michamos
Copy link
Contributor

Note that you can already get results for several queries by using (query1) OR (query2) OR (query3) etc., instead of doing those queries separately. This only works if you don't care which queries caused a given record to appear in the result or can independently figure it out, but that seems to be the case for this class of tools.

We'll keep your suggestion in mind for future improvements to the API, but it probably won't be happening very soon as the current priority is to add all missing features to the new website so we can switch off the old one.

@duetosymmetry
Copy link
Author

That is a useful suggestion, thanks @michamos. I was just writing up a tool last night (ads2inspire) where I needed to keep track of which result came from which query. It should be possible with an OR query and some extra post-processing, but it would be simpler with a batch query approach. I'll stay tuned!

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

2 participants