Where is the new docker hub api documentation?

10,588

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:

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:

Share:
10,588
michael_bitard
Author by

michael_bitard

I'm just a dev and I love it.

Updated on June 15, 2022

Comments

  • michael_bitard
    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
    michael_bitard almost 8 years
    Ok 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
    pedrorijo91 almost 8 years
    I 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
    AC88 almost 7 years
    Linked 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
    Jay Blanchard over 6 years
    I am finding the same inconsistencies - which one is the Docker Hub registry API?