The REST APIs for the Docker Hub

The Docker Hub provides a REST API to integrate the Hub capabilities through programs. The REST API is supported for both user as well as repository management.

User management supports the following features:

  • User Login: This is used for user login to the Docker Hub:
    GET /v1/users
    
    $ curl --raw -L --user vinoddandy:password https://index.docker.io/v1/users
    4
    "OK"
    0
    $
    
  • User Register: This is used for registration of a new user:
    POST /v1/users
  • Update user: This is used to update the user's password and e-mail:
    PUT /v1/users/(usename)/

Repository management supports the following features:

  • Create a user repository: This creates a user repository:
    PUT /v1/repositories/(namespace)/(repo_name)/
    $ curl --raw -L -X POST --post301 ...

Get Learning Docker now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.