Hide

RegistryUI Documentation

Display
Print

API Overview

RegistryUI offers two endpoints to access the repositories:

Throughout this documentation registry.yoursite.com is used as the URL for your RegistryUI installation.

Docker Registry HTTP API V2

The complete Docker Registry API is available as documented at https://docs.docker.com/registry/spec/api/. This API is accessed using

https://registry.yoursite.com/v2/    or
http://registry.yoursite.com/v2/     (use of http is not recommended except for testing purposes)

RegistryUI Extended API

In addition to the official Docker Registry API, RegistryUI offers the following API endpoint to access additional functionality, such as setting the registry offline, removing tags and repositories, performing garbage collection, etc.

https://registry.yoursite.com/udr/v1api/    or
http://registry.yoursite.com/udr/v1api/     (use of http is not recommended except for testing purposes)
EndpointMethodDescription
/udr/v1api/isofflineGETReturns the current online/offline status of the Docker Registry.
/udr/v1api/setofflinePOSTSets the Docker Registry offline.
/udr/v1api/setonlinePOSTSets the Docker Registry online.
/udr/v1api/garbagecollectionPOSTPerforms garbage collection.
/udr/v1api/project/createPOSTCreates a new project/repository.
/udr/v1api/repositoriesGETReturns all available repositories (based on user's permission).
/udr/v1api/folderDELETERemoves a folder/repository.
/udr/v1api/tagsGETReturns all available tags in a repository (based on user's permission).
/udr/v1api/taginfoGETReturns information about a named tag.
/udr/v1api/taginfo (delete)DELETERemoves a named tag.

Authentication

In order to use both the Docker Registry HTTP API V2 and the RegistryUI Extended API, Basic Authentication is required for most API calls.

Authorization: Basic QWxhZGRpbjpPcGVuU2VzYW1l   (example)

The Basic authentication string is the result of base64 encoding "username:usertoken", where username is the user's user name defined in RegistryUI and usertoken is the token defined by the user (see User > Token in your instance of RegistryUI, which shows what the Authorization header for a user would look like).

Because Basic Authentication is used, it is strongly recommended to use https:// to access RegistryUI and the Docker Registry (except in a test environment).

Standard API Response

All RegistryUI Extended API calls return a JSON object.

FieldTypeDescription
errorstringIf the "error" field is not null, an error occurred and the "error" field will contain a descriptive error message or one of the Standard Error Codes shown below.
other dataDepending on the API used, additional data is returned.

Standard Error Codes

CodeDescription
OFFLINEThe API call failed because the Docker Registry is currently offline.
NOTAUTHORIZEDThe API call failed because the user is not authorized (the Authorization header may be invalid, missing or the user doesn't have the required privileges for this action). Most API calls require administrator privileges.
EXISTSThe resource being created already exists.
Example
{ "error":"NOTAUTHORIZED","data":false }