Docker registry API V2 authentication

I’m trying to use docker registry APIs
I want to collect some data from the docker public registry (registry-1.docker.io hope this is correct)

But I couldn’t find the way to authenticate these APIs. Here it says use basic auth to GET v2/ endpoint . I have a dockerhub account and I used it’s username & password for this API, but it says unauthorized.

Can some one please explain me how I can authenticate docker registry API V2?

Have you tried to click on links in the linked postman page? Never rely on outdated information from unofficial sources. Always start from the official documentation.

You can find some useful link here and find this for example:

If you need info about images on Docker Hub, you can also use the Docker hub API:

or just use the hub-tool

Whihc is part of the Docker Desktop installation too.

1 Like

I was managed to solve this after referring to the API refference.