Where is the new docker hub api documentation?
Solution 1
V1 is deprecated. You can find the latest documentation here: https://docs.docker.com/registry/spec/api/
Here is a couple of example scripts using the api:
For a user account: https://gist.github.com/kizbitz/e59f95f7557b4bbb8bf2
For an organization account: https://gist.github.com/kizbitz/175be06d0fbbb39bc9bfa6c0cb0d4721
Solution 2
I had to use Docker Hub API v2 for private repo in order to get list of all tags, example is here if anyone needs it:
Comments
-
michael_bitard about 2 years
Since docker 1.8 you can see that:
This API is deprecated as of 1.7. To view the old version, see the Docker Hub API in the 1.7 documentation.
But when I look at the new documentation There is nothing about the API access.
I thought it was based on Docker Trusted Registry but I can't make it work.
Commands like that works:
curl -k https://registry.hub.docker.com/v1/repositories/ubuntu/tags
but it's v1 deprecated api. -
michael_bitard almost 8 yearsOk I'll accept it for now because that's what I suspected, but I can't find any reference saying that this is actually valid for the docker hub. It's the documentation for the docker registry. I know that docker hub act like a registry, but I'd like to see it written somewhere
-
pedrorijo91 almost 8 yearsI got this answer from the docker guys. My other question that you answered about docker API was already done in their forum, and it was the answer they gave me. not sure if it is public: support.docker.com/hc/en-us/…
-
AC88 almost 7 yearsLinked docs now seem to describe a totally different API to what the gists are using: e.g.
/v2/$ORG/$REPO/tags/list?n=10
returning{tags:string[],...}
instead of/v2/repostitory/$ORG/$REPO/tags/?page_size=10
returning{results:{name:string,...}[]}
. Whatever, gist examples still work. -
Jay Blanchard over 6 yearsI am finding the same inconsistencies - which one is the Docker Hub registry API?