Docker Community Forums

Share and learn in the Docker community.

Docker Hub API retrieve images

docker
dockerhub

(Girish) #1

I am trying to make a rest call to retrieve images on my private repository on Docker Hub. I created this repository within the last month and I have successfully pushed images to it. They all show up under the “Tags” tabs.

I am trying to use Postman/CURL to make these calls. This is what I do in Postman - I create a new request, setup basic authentication, setup headers for “Accept”, “Content-Type” and “X-Docker-Token”. This is the URL for the request:
http://index.docker.io/v1/repositories/${namespace}/${reponame}/images

The response body only contains “[]”.
The response header contains the following information:

Content-Type →application/json
Date →Wed, 05 Oct 2016 23:35:23 GMT
Server →nginx/1.6.2
Strict-Transport-Security →max-age=31536000
Transfer-Encoding →chunked
Vary →Cookie
X-Docker-Endpoints →registry-1.docker.io
X-Docker-Token →signature=${signature},repository="${namespace}/${reponame}",access=read
X-Frame-Options →SAMEORIGIN

The response status is 200 OK
I expected the response body to contain information of the images. I have also tried this using CURL and I get the same response. Any suggestions on what I am doing wrong would be appreciated.