roadmap icon indicating copy to clipboard operation
roadmap copied to clipboard

Please offer pagination for /manifests endpoint in DockerHub API

Open lboix opened this issue 9 months ago • 2 comments

Tell us about your request Hello DockerHub team,

would it possible to offer pagination in the /manifests endpoint you are exposing (example: https://hub.docker.com/v2/namespaces/NAMESPACE/repositories/REPOSITORY/manifests) ?

It's already in place for /repositories and /tags for example (like https://hub.docker.com/v2/namespaces/NAMESPACE/repositories and https://hub.docker.com/v2/namespaces/NAMESPACE/repositories/REPOSITORY/tags) through the "next" URL returned in the response, which is perfect.

Best regards

Which service(s) is this request for? DockerHub API

Tell us about the problem you're trying to solve. What are you trying to do, and why is it hard? It will people to reclaim storage space on heavy repositories that do exist for years.

Are you currently working around the issue? We made our cleaning script run almost continuously as it can not treat more than 100 manifests by repo (no pagination).

Additional context Pagination offered for /tags endpoint VS no pagination offered for /manifests endpoint :

Image Image

lboix avatar Mar 11 '25 20:03 lboix

You cannot "page" in the same way, but if you pass the last_evaluated_key field in as a query param (it's returned in the response) you can get a similar effect. The full API is not documented though as it is not finalized and can still change as we make tweaks.

jcarter3 avatar Mar 11 '25 20:03 jcarter3

Thanks @jcarter3 for the tip : I confirm that it's working perfectly

lboix avatar Mar 12 '25 19:03 lboix