Skip to content

Stable API for listing package names #4282

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

Closed
jonasfj opened this issue Nov 24, 2020 · 2 comments
Closed

Stable API for listing package names #4282

jonasfj opened this issue Nov 24, 2020 · 2 comments

Comments

@jonasfj
Copy link
Member

jonasfj commented Nov 24, 2020

GET /api/package-names
{
  "packages": [..., 'retry', ...], // first N package names,
  "nextUrl": null, // URL for next page, null, if this is the last page.
}

I would suggest we document this in doc/api.md, and that we state that:

  • page size (N) may change at any time,
  • ordering is unspecified and may change at any time,
  • the API is eventually consistent and it may take time before new packages appear.

Presumably, it's most sensible for us to do an ordering by name, but we shouldn't promise that this is what we'll always have.

@jonasfj
Copy link
Member Author

jonasfj commented Nov 24, 2020

Note. while this API is paging, we probably won't have multiple pages anytime soon.
The downside of this is that anyone who fails to implement the paging, won't get all package names -- but they'll still get a lot of packages.

We could also choose to not make the API paging, even at 1M package names, that's large but not impossible. And it would be very reasonable to only update the list once per hour.

@isoos
Copy link
Collaborator

isoos commented Nov 27, 2020

This has been released in prod.

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

No branches or pull requests

2 participants