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

Configurable limit for HTTP APIs and pagination indicator #21

Open
nirvana-msu opened this issue Feb 7, 2021 · 3 comments
Open

Configurable limit for HTTP APIs and pagination indicator #21

nirvana-msu opened this issue Feb 7, 2021 · 3 comments

Comments

@nirvana-msu
Copy link

Thank you for the valuable tool!

A few suggestions on improvements for HTTP API:

  1. Allow user to specify the limit (when we don't need the whole 10k - currently hardcoded limit). It could still be capped at 10k to prevent abuse.
  2. Provide indication in the response whether "next page" exists

Both of these would allow to query the service in a more considerate manner, which should also help reduce the load.

If possible, it would also be helpful if total count could be included in any paginated response.

@Cgboal
Copy link
Owner

Cgboal commented Feb 11, 2021

Doing a count to see how many rows there are in total can take quite a while on some queries which is why it wasn't included in the response. Doing dynamic limits should be doable though.

@nirvana-msu
Copy link
Author

nirvana-msu commented Feb 11, 2021

Doing a count to see how many rows there are in total can take quite

Yeah, that's why I added a suggestion to add an indicator of whether "next page" exists - that would at least tell users if they should make another query if they need all results.

Thanks!

@Cgboal
Copy link
Owner

Cgboal commented Aug 26, 2021

Try the gRPC API instead, you don't need to bother with pagination there as it streams the results.

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