github.com/npaton/distribution@v2.3.1-rc.0+incompatible/docs/spec/api.md (about)

     1  <!--[metadata]>
     2  +++
     3  title = "HTTP API V2"
     4  description = "Specification for the Registry API."
     5  keywords = ["registry, on-prem, images, tags, repository, distribution, api, advanced"]
     6  [menu.main]
     7  parent="smn_registry_ref"
     8  +++
     9  <![end-metadata]-->
    10  
    11  # Docker Registry HTTP API V2
    12  
    13  ## Introduction
    14  
    15  The _Docker Registry HTTP API_ is the protocol to facilitate distribution of
    16  images to the docker engine. It interacts with instances of the docker
    17  registry, which is a service to manage information about docker images and
    18  enable their distribution. The specification covers the operation of version 2
    19  of this API, known as _Docker Registry HTTP API V2_.
    20  
    21  While the V1 registry protocol is usable, there are several problems with the
    22  architecture that have led to this new version. The main driver of this
    23  specification these changes to the docker the image format, covered in
    24  [docker/docker#8093](https://github.com/docker/docker/issues/8093). The new, self-contained image manifest simplifies image
    25  definition and improves security. This specification will build on that work,
    26  leveraging new properties of the manifest format to improve performance,
    27  reduce bandwidth usage and decrease the likelihood of backend corruption.
    28  
    29  For relevant details and history leading up to this specification, please see
    30  the following issues:
    31  
    32  - [docker/docker#8093](https://github.com/docker/docker/issues/8093)
    33  - [docker/docker#9015](https://github.com/docker/docker/issues/9015)
    34  - [docker/docker-registry#612](https://github.com/docker/docker-registry/issues/612)
    35  
    36  ### Scope
    37  
    38  This specification covers the URL layout and protocols of the interaction
    39  between docker registry and docker core. This will affect the docker core
    40  registry API and the rewrite of docker-registry. Docker registry
    41  implementations may implement other API endpoints, but they are not covered by
    42  this specification.
    43  
    44  This includes the following features:
    45  
    46  - Namespace-oriented URI Layout
    47  - PUSH/PULL registry server for V2 image manifest format
    48  - Resumable layer PUSH support
    49  - V2 Client library implementation
    50  
    51  While authentication and authorization support will influence this
    52  specification, details of the protocol will be left to a future specification.
    53  Relevant header definitions and error codes are present to provide an
    54  indication of what a client may encounter.
    55  
    56  #### Future
    57  
    58  There are features that have been discussed during the process of cutting this
    59  specification. The following is an incomplete list:
    60  
    61  - Immutable image references
    62  - Multiple architecture support
    63  - Migration from v2compatibility representation
    64  
    65  These may represent features that are either out of the scope of this
    66  specification, the purview of another specification or have been deferred to a
    67  future version.
    68  
    69  ### Use Cases
    70  
    71  For the most part, the use cases of the former registry API apply to the new
    72  version. Differentiating use cases are covered below.
    73  
    74  #### Image Verification
    75  
    76  A docker engine instance would like to run verified image named
    77  "library/ubuntu", with the tag "latest". The engine contacts the registry,
    78  requesting the manifest for "library/ubuntu:latest". An untrusted registry
    79  returns a manifest. Before proceeding to download the individual layers, the
    80  engine verifies the manifest's signature, ensuring that the content was
    81  produced from a trusted source and no tampering has occured. After each layer
    82  is downloaded, the engine verifies the digest of the layer, ensuring that the
    83  content matches that specified by the manifest.
    84  
    85  #### Resumable Push
    86  
    87  Company X's build servers lose connectivity to docker registry before
    88  completing an image layer transfer. After connectivity returns, the build
    89  server attempts to re-upload the image. The registry notifies the build server
    90  that the upload has already been partially attempted. The build server
    91  responds by only sending the remaining data to complete the image file.
    92  
    93  #### Resumable Pull
    94  
    95  Company X is having more connectivity problems but this time in their
    96  deployment datacenter. When downloading an image, the connection is
    97  interrupted before completion. The client keeps the partial data and uses http
    98  `Range` requests to avoid downloading repeated data.
    99  
   100  #### Layer Upload De-duplication
   101  
   102  Company Y's build system creates two identical docker layers from build
   103  processes A and B. Build process A completes uploading the layer before B.
   104  When process B attempts to upload the layer, the registry indicates that its
   105  not necessary because the layer is already known.
   106  
   107  If process A and B upload the same layer at the same time, both operations
   108  will proceed and the first to complete will be stored in the registry (Note:
   109  we may modify this to prevent dogpile with some locking mechanism).
   110  
   111  ### Changes
   112  
   113  The V2 specification has been written to work as a living document, specifying
   114  only what is certain and leaving what is not specified open or to future
   115  changes. Only non-conflicting additions should be made to the API and accepted
   116  changes should avoid preventing future changes from happening.
   117  
   118  This section should be updated when changes are made to the specification,
   119  indicating what is different. Optionally, we may start marking parts of the
   120  specification to correspond with the versions enumerated here.
   121  
   122  Each set of changes is given a letter corresponding to a set of modifications
   123  that were applied to the baseline specification. These are merely for
   124  reference and shouldn't be used outside the specification other than to
   125  identify a set of modifications.
   126  
   127  <dl>
   128    <dt>j</dt>
   129    <dd>
   130      <ul>
   131        <li>Add ability to mount blobs across repositories.</li>
   132      </ul>
   133    </dd>
   134  
   135    <dt>i</dt>
   136    <dd>
   137      <ul>
   138        <li>Clarified expected behavior response to manifest HEAD request.</li>
   139      </ul>
   140    </dd>
   141  
   142    <dt>h</dt>
   143    <dd>
   144      <ul>
   145        <li>All mention of tarsum removed.</li>
   146      </ul>
   147    </dd>
   148  
   149    <dt>g</dt>
   150    <dd>
   151      <ul>
   152        <li>Clarify behavior of pagination behavior with unspecified parameters.</li>
   153      </ul>
   154    </dd>
   155  
   156    <dt>f</dt>
   157    <dd>
   158      <ul>
   159        <li>Specify the delete API for layers and manifests.</li>
   160      </ul>
   161    </dd>
   162  
   163    <dt>e</dt>
   164    <dd>
   165      <ul>
   166        <li>Added support for listing registry contents.</li>
   167        <li>Added pagination to tags API.</li>
   168        <li>Added common approach to support pagination.</li>
   169      </ul>
   170    </dd>
   171  
   172    <dt>d</dt>
   173    <dd>
   174      <ul>
   175        <li>Allow repository name components to be one character.</li>
   176        <li>Clarified that single component names are allowed.</li>
   177      </ul>
   178    </dd>
   179  
   180    <dt>c</dt>
   181    <dd>
   182      <ul>
   183        <li>Added section covering digest format.</li>
   184        <li>Added more clarification that manifest cannot be deleted by tag.</li>
   185      </ul>
   186    </dd>
   187  
   188    <dt>b</dt>
   189    <dd>
   190      <ul>
   191        <li>Added capability of doing streaming upload to PATCH blob upload.</li>
   192        <li>Updated PUT blob upload to no longer take final chunk, now requires entire data or no data.</li>
   193        <li>Removed `416 Requested Range Not Satisfiable` response status from PUT blob upload.</li>
   194      </ul>
   195    </dd>
   196  
   197    <dt>a</dt>
   198    <dd>
   199      <ul>
   200        <li>Added support for immutable manifest references in manifest endpoints.</li>
   201        <li>Deleting a manifest by tag has been deprecated.</li>
   202        <li>Specified `Docker-Content-Digest` header for appropriate entities.</li>
   203        <li>Added error code for unsupported operations.</li>
   204      </ul>
   205    </dd>
   206  </dl>
   207  
   208  ## Overview
   209  
   210  This section covers client flows and details of the API endpoints. The URI
   211  layout of the new API is structured to support a rich authentication and
   212  authorization model by leveraging namespaces. All endpoints will be prefixed
   213  by the API version and the repository name:
   214  
   215      /v2/<name>/
   216  
   217  For example, an API endpoint that will work with the `library/ubuntu`
   218  repository, the URI prefix will be:
   219  
   220      /v2/library/ubuntu/
   221  
   222  This scheme provides rich access control over various operations and methods
   223  using the URI prefix and http methods that can be controlled in variety of
   224  ways.
   225  
   226  Classically, repository names have always been two path components where each
   227  path component is less than 30 characters. The V2 registry API does not
   228  enforce this. The rules for a repository name are as follows:
   229  
   230  1. A repository name is broken up into _path components_. A component of a
   231     repository name must be at least one lowercase, alpha-numeric characters,
   232     optionally separated by periods, dashes or underscores. More strictly, it
   233     must match the regular expression `[a-z0-9]+(?:[._-][a-z0-9]+)*`.
   234  2. If a repository  name has two or more path components, they must be
   235     separated by a forward slash ("/").
   236  3. The total length of a repository name, including slashes, must be less the
   237     256 characters.
   238  
   239  These name requirements _only_ apply to the registry API and should accept a
   240  superset of what is supported by other docker ecosystem components.
   241  
   242  All endpoints should support aggressive http caching, compression and range
   243  headers, where appropriate. The new API attempts to leverage HTTP semantics
   244  where possible but may break from standards to implement targeted features.
   245  
   246  For detail on individual endpoints, please see the [_Detail_](#detail)
   247  section.
   248  
   249  ### Errors
   250  
   251  Actionable failure conditions, covered in detail in their relevant sections,
   252  are reported as part of 4xx responses, in a json response body. One or more
   253  errors will be returned in the following format:
   254  
   255      {
   256          "errors:" [{
   257                  "code": <error identifier>,
   258                  "message": <message describing condition>,
   259                  "detail": <unstructured>
   260              },
   261              ...
   262          ]
   263      }
   264  
   265  The `code` field will be a unique identifier, all caps with underscores by
   266  convention. The `message` field will be a human readable string. The optional
   267  `detail` field may contain arbitrary json data providing information the
   268  client can use to resolve the issue.
   269  
   270  While the client can take action on certain error codes, the registry may add
   271  new error codes over time. All client implementations should treat unknown
   272  error codes as `UNKNOWN`, allowing future error codes to be added without
   273  breaking API compatibility. For the purposes of the specification error codes
   274  will only be added and never removed.
   275  
   276  For a complete account of all error codes, please see the _Detail_ section.
   277  
   278  ### API Version Check
   279  
   280  A minimal endpoint, mounted at `/v2/` will provide version support information
   281  based on its response statuses. The request format is as follows:
   282  
   283      GET /v2/
   284  
   285  If a `200 OK` response is returned, the registry implements the V2(.1)
   286  registry API and the client may proceed safely with other V2 operations.
   287  Optionally, the response may contain information about the supported paths in
   288  the response body. The client should be prepared to ignore this data.
   289  
   290  If a `401 Unauthorized` response is returned, the client should take action
   291  based on the contents of the "WWW-Authenticate" header and try the endpoint
   292  again. Depending on access control setup, the client may still have to
   293  authenticate against different resources, even if this check succeeds.
   294  
   295  If `404 Not Found` response status, or other unexpected status, is returned,
   296  the client should proceed with the assumption that the registry does not
   297  implement V2 of the API.
   298  
   299  When a `200 OK` or `401 Unauthorized` response is returned, the
   300  "Docker-Distribution-API-Version" header should be set to "registry/2.0".
   301  Clients may require this header value to determine if the endpoint serves this
   302  API. When this header is omitted, clients may fallback to an older API version.
   303  
   304  ### Content Digests
   305  
   306  This API design is driven heavily by [content addressability](http://en.wikipedia.org/wiki/Content-addressable_storage).
   307  The core of this design is the concept of a content addressable identifier. It
   308  uniquely identifies content by taking a collision-resistant hash of the bytes.
   309  Such an identifier can be independently calculated and verified by selection
   310  of a common _algorithm_. If such an identifier can be communicated in a secure
   311  manner, one can retrieve the content from an insecure source, calculate it
   312  independently and be certain that the correct content was obtained. Put simply,
   313  the identifier is a property of the content.
   314  
   315  To disambiguate from other concepts, we call this identifier a _digest_. A
   316  _digest_ is a serialized hash result, consisting of a _algorithm_ and _hex_
   317  portion. The _algorithm_ identifies the methodology used to calculate the
   318  digest. The _hex_ portion is the hex-encoded result of the hash.
   319  
   320  We define a _digest_ string to match the following grammar:
   321  ```
   322  digest      := algorithm ":" hex
   323  algorithm   := /[A-Fa-f0-9_+.-]+/
   324  hex         := /[A-Fa-f0-9]+/
   325  ```
   326  
   327  Some examples of _digests_ include the following:
   328  
   329  digest                                                                            | description                                   |
   330  ----------------------------------------------------------------------------------|------------------------------------------------
   331  sha256:6c3c624b58dbbcd3c0dd82b4c53f04194d1247c6eebdaab7c610cf7d66709b3b           | Common sha256 based digest                    |
   332  
   333  While the _algorithm_ does allow one to implement a wide variety of
   334  algorithms, compliant implementations should use sha256. Heavy processing of
   335  input before calculating a hash is discouraged to avoid degrading the
   336  uniqueness of the _digest_ but some canonicalization may be performed to
   337  ensure consistent identifiers.
   338  
   339  Let's use a simple example in pseudo-code to demonstrate a digest calculation:
   340  ```
   341  let C = 'a small string'
   342  let B = sha256(C)
   343  let D = 'sha256:' + EncodeHex(B)
   344  let ID(C) = D
   345  ```
   346  
   347  Above, we have bytestring `C` passed into a function, `SHA256`, that returns a
   348  bytestring `B`, which is the hash of `C`. `D` gets the algorithm concatenated
   349  with the hex encoding of `B`. We then define the identifier of `C` to `ID(C)`
   350  as equal to `D`. A digest can be verified by independently calculating `D` and
   351  comparing it with identifier `ID(C)`.
   352  
   353  #### Digest Header
   354  
   355  To provide verification of http content, any response may include a `Docker-
   356  Content-Digest` header. This will include the digest of the target entity
   357  returned in the response. For blobs, this is the entire blob content. For
   358  manifests, this is the manifest body without the signature content, also known
   359  as the JWS payload. Note that the commonly used canonicalization for digest
   360  calculation may be dependent on the mediatype of the content, such as with
   361  manifests.
   362  
   363  The client may choose to ignore the header or may verify it to ensure content
   364  integrity and transport security. This is most important when fetching by a
   365  digest. To ensure security, the content should be verified against the digest
   366  used to fetch the content. At times, the returned digest may differ from that
   367  used to initiate a request. Such digests are considered to be from different
   368  _domains_, meaning they have different values for _algorithm_. In such a case,
   369  the client may choose to verify the digests in both domains or ignore the
   370  server's digest. To maintain security, the client _must_ always verify the
   371  content against the _digest_ used to fetch the content.
   372  
   373  > __IMPORTANT:__ If a _digest_ is used to fetch content, the client should use
   374  > the same digest used to fetch the content to verify it. The header `Docker-
   375  > Content-Digest` should not be trusted over the "local" digest.
   376  
   377  ### Pulling An Image
   378  
   379  An "image" is a combination of a JSON manifest and individual layer files. The
   380  process of pulling an image centers around retrieving these two components.
   381  
   382  The first step in pulling an image is to retrieve the manifest. For reference,
   383  the relevant manifest fields for the registry are the following:
   384  
   385   field    | description                                    |
   386  ----------|------------------------------------------------|
   387  name      | The name of the image.                         |
   388  tag       | The tag for this version of the image.         |
   389  fsLayers  | A list of layer descriptors (including digest) |
   390  signature | A JWS used to verify the manifest content      |
   391  
   392  For more information about the manifest format, please see
   393  [docker/docker#8093](https://github.com/docker/docker/issues/8093).
   394  
   395  When the manifest is in hand, the client must verify the signature to ensure
   396  the names and layers are valid. Once confirmed, the client will then use the
   397  digests to download the individual layers. Layers are stored in as blobs in
   398  the V2 registry API, keyed by their digest.
   399  
   400  #### Pulling an Image Manifest
   401  
   402  The image manifest can be fetched with the following url:
   403  
   404  ```
   405  GET /v2/<name>/manifests/<reference>
   406  ```
   407  
   408  The `name` and `reference` parameter identify the image and are required. The
   409  reference may include a tag or digest.
   410  
   411  A `404 Not Found` response will be returned if the image is unknown to the
   412  registry. If the image exists and the response is successful, the image
   413  manifest will be returned, with the following format (see docker/docker#8093
   414  for details):
   415  
   416      {
   417         "name": <name>,
   418         "tag": <tag>,
   419         "fsLayers": [
   420            {
   421               "blobSum": <digest>
   422            },
   423            ...
   424          ]
   425         ],
   426         "history": <v1 images>,
   427         "signature": <JWS>
   428      }
   429  
   430  The client should verify the returned manifest signature for authenticity
   431  before fetching layers.
   432  
   433  ##### Existing Manifests
   434  
   435  The image manifest can be checked for existence with the following url:
   436  
   437  ```
   438  HEAD /v2/<name>/manifests/<reference>
   439  ```
   440  
   441  The `name` and `reference` parameter identify the image and are required. The
   442  reference may include a tag or digest.
   443  
   444  A `404 Not Found` response will be returned if the image is unknown to the
   445  registry. If the image exists and the response is successful the response will
   446  be as follows:
   447  
   448  ```
   449  200 OK
   450  Content-Length: <length of manifest>
   451  Docker-Content-Digest: <digest>
   452  ```
   453  
   454  
   455  #### Pulling a Layer
   456  
   457  Layers are stored in the blob portion of the registry, keyed by digest.
   458  Pulling a layer is carried out by a standard http request. The URL is as
   459  follows:
   460  
   461      GET /v2/<name>/blobs/<digest>
   462  
   463  Access to a layer will be gated by the `name` of the repository but is
   464  identified uniquely in the registry by `digest`.
   465  
   466  This endpoint may issue a 307 (302 for <HTTP 1.1) redirect to another service
   467  for downloading the layer and clients should be prepared to handle redirects.
   468  
   469  This endpoint should support aggressive HTTP caching for image layers. Support
   470  for Etags, modification dates and other cache control headers should be
   471  included. To allow for incremental downloads, `Range` requests should be
   472  supported, as well.
   473  
   474  ### Pushing An Image
   475  
   476  Pushing an image works in the opposite order as a pull. After assembling the
   477  image manifest, the client must first push the individual layers. When the
   478  layers are fully pushed into the registry, the client should upload the signed
   479  manifest.
   480  
   481  The details of each step of the process are covered in the following sections.
   482  
   483  #### Pushing a Layer
   484  
   485  All layer uploads use two steps to manage the upload process. The first step
   486  starts the upload in the registry service, returning a url to carry out the
   487  second step. The second step uses the upload url to transfer the actual data.
   488  Uploads are started with a POST request which returns a url that can be used
   489  to push data and check upload status.
   490  
   491  The `Location` header will be used to communicate the upload location after
   492  each request. While it won't change in the this specification, clients should
   493  use the most recent value returned by the API.
   494  
   495  ##### Starting An Upload
   496  
   497  To begin the process, a POST request should be issued in the following format:
   498  
   499  ```
   500  POST /v2/<name>/blobs/uploads/
   501  ```
   502  
   503  The parameters of this request are the image namespace under which the layer
   504  will be linked. Responses to this request are covered below.
   505  
   506  ##### Existing Layers
   507  
   508  The existence of a layer can be checked via a `HEAD` request to the blob store
   509  API. The request should be formatted as follows:
   510  
   511  ```
   512  HEAD /v2/<name>/blobs/<digest>
   513  ```
   514  
   515  If the layer with the digest specified in `digest` is available, a 200 OK
   516  response will be received, with no actual body content (this is according to
   517  http specification). The response will look as follows:
   518  
   519  ```
   520  200 OK
   521  Content-Length: <length of blob>
   522  Docker-Content-Digest: <digest>
   523  ```
   524  
   525  When this response is received, the client can assume that the layer is
   526  already available in the registry under the given name and should take no
   527  further action to upload the layer. Note that the binary digests may differ
   528  for the existing registry layer, but the digests will be guaranteed to match.
   529  
   530  ##### Uploading the Layer
   531  
   532  If the POST request is successful, a `202 Accepted` response will be returned
   533  with the upload URL in the `Location` header:
   534  
   535  ```
   536  202 Accepted
   537  Location: /v2/<name>/blobs/uploads/<uuid>
   538  Range: bytes=0-<offset>
   539  Content-Length: 0
   540  Docker-Upload-UUID: <uuid>
   541  ```
   542  
   543  The rest of the upload process can be carried out with the returned url,
   544  called the "Upload URL" from the `Location` header. All responses to the
   545  upload url, whether sending data or getting status, will be in this format.
   546  Though the URI format (`/v2/<name>/blobs/uploads/<uuid>`) for the `Location`
   547  header is specified, clients should treat it as an opaque url and should never
   548  try to assemble the it. While the `uuid` parameter may be an actual UUID, this
   549  proposal imposes no constraints on the format and clients should never impose
   550  any.
   551  
   552  If clients need to correlate local upload state with remote upload state, the
   553  contents of the `Docker-Upload-UUID` header should be used. Such an id can be
   554  used to key the last used location header when implementing resumable uploads.
   555  
   556  ##### Upload Progress
   557  
   558  The progress and chunk coordination of the upload process will be coordinated
   559  through the `Range` header. While this is a non-standard use of the `Range`
   560  header, there are examples of [similar approaches](https://developers.google.com/youtube/v3/guides/using_resumable_upload_protocol) in APIs with heavy use.
   561  For an upload that just started, for an example with a 1000 byte layer file,
   562  the `Range` header would be as follows:
   563  
   564  ```
   565  Range: bytes=0-0
   566  ```
   567  
   568  To get the status of an upload, issue a GET request to the upload URL:
   569  
   570  ```
   571  GET /v2/<name>/blobs/uploads/<uuid>
   572  Host: <registry host>
   573  ```
   574  
   575  The response will be similar to the above, except will return 204 status:
   576  
   577  ```
   578  204 No Content
   579  Location: /v2/<name>/blobs/uploads/<uuid>
   580  Range: bytes=0-<offset>
   581  Docker-Upload-UUID: <uuid>
   582  ```
   583  
   584  Note that the HTTP `Range` header byte ranges are inclusive and that will be
   585  honored, even in non-standard use cases.
   586  
   587  ##### Monolithic Upload
   588  
   589  A monolithic upload is simply a chunked upload with a single chunk and may be
   590  favored by clients that would like to avoided the complexity of chunking. To
   591  carry out a "monolithic" upload, one can simply put the entire content blob to
   592  the provided URL:
   593  
   594  ```
   595  PUT /v2/<name>/blobs/uploads/<uuid>?digest=<digest>
   596  Content-Length: <size of layer>
   597  Content-Type: application/octet-stream
   598  
   599  <Layer Binary Data>
   600  ```
   601  
   602  The "digest" parameter must be included with the PUT request. Please see the
   603  _Completed Upload_ section for details on the parameters and expected
   604  responses.
   605  
   606  Additionally, the upload can be completed with a single `POST` request to
   607  the uploads endpoint, including the "size" and "digest" parameters:
   608  
   609  ```
   610  POST /v2/<name>/blobs/uploads/?digest=<digest>
   611  Content-Length: <size of layer>
   612  Content-Type: application/octet-stream
   613  
   614  <Layer Binary Data>
   615  ```
   616  
   617  On the registry service, this should allocate a download, accept and verify
   618  the data and return the same  response as the final chunk of an upload. If the
   619  POST request fails collecting the data in any way, the registry should attempt
   620  to return an error response to the client with the `Location` header providing
   621  a place to continue the download.
   622  
   623  The single `POST` method is provided for convenience and most clients should
   624  implement `POST` + `PUT` to support reliable resume of uploads.
   625  
   626  ##### Chunked Upload
   627  
   628  To carry out an upload of a chunk, the client can specify a range header and
   629  only include that part of the layer file:
   630  
   631  ```
   632  PATCH /v2/<name>/blobs/uploads/<uuid>
   633  Content-Length: <size of chunk>
   634  Content-Range: <start of range>-<end of range>
   635  Content-Type: application/octet-stream
   636  
   637  <Layer Chunk Binary Data>
   638  ```
   639  
   640  There is no enforcement on layer chunk splits other than that the server must
   641  receive them in order. The server may enforce a minimum chunk size. If the
   642  server cannot accept the chunk, a `416 Requested Range Not Satisfiable`
   643  response will be returned and will include a `Range` header indicating the
   644  current status:
   645  
   646  ```
   647  416 Requested Range Not Satisfiable
   648  Location: /v2/<name>/blobs/uploads/<uuid>
   649  Range: 0-<last valid range>
   650  Content-Length: 0
   651  Docker-Upload-UUID: <uuid>
   652  ```
   653  
   654  If this response is received, the client should resume from the "last valid
   655  range" and upload the subsequent chunk. A 416 will be returned under the
   656  following conditions:
   657  
   658  - Invalid Content-Range header format
   659  - Out of order chunk: the range of the next chunk must start immediately after
   660    the "last valid range" from the previous response.
   661  
   662  When a chunk is accepted as part of the upload, a `202 Accepted` response will
   663  be returned, including a `Range` header with the current upload status:
   664  
   665  ```
   666  202 Accepted
   667  Location: /v2/<name>/blobs/uploads/<uuid>
   668  Range: bytes=0-<offset>
   669  Content-Length: 0
   670  Docker-Upload-UUID: <uuid>
   671  ```
   672  
   673  ##### Completed Upload
   674  
   675  For an upload to be considered complete, the client must submit a `PUT`
   676  request on the upload endpoint with a digest parameter. If it is not provided,
   677  the upload will not be considered complete. The format for the final chunk
   678  will be as follows:
   679  
   680  ```
   681  PUT /v2/<name>/blob/uploads/<uuid>?digest=<digest>
   682  Content-Length: <size of chunk>
   683  Content-Range: <start of range>-<end of range>
   684  Content-Type: application/octet-stream
   685  
   686  <Last Layer Chunk Binary Data>
   687  ```
   688  
   689  Optionally, if all chunks have already been uploaded, a `PUT` request with a
   690  `digest` parameter and zero-length body may be sent to complete and validated
   691  the upload. Multiple "digest" parameters may be provided with different
   692  digests. The server may verify none or all of them but _must_ notify the
   693  client if the content is rejected.
   694  
   695  When the last chunk is received and the layer has been validated, the client
   696  will receive a `201 Created` response:
   697  
   698  ```
   699  201 Created
   700  Location: /v2/<name>/blobs/<digest>
   701  Content-Length: 0
   702  Docker-Content-Digest: <digest>
   703  ```
   704  
   705  The `Location` header will contain the registry URL to access the accepted
   706  layer file. The `Docker-Content-Digest` header returns the canonical digest of
   707  the uploaded blob which may differ from the provided digest. Most clients may
   708  ignore the value but if it is used, the client should verify the value against
   709  the uploaded blob data.
   710  
   711  ###### Digest Parameter
   712  
   713  The "digest" parameter is designed as an opaque parameter to support
   714  verification of a successful transfer. For example, a HTTP URI parameter
   715  might be as follows:
   716  
   717  ```
   718  sha256:6c3c624b58dbbcd3c0dd82b4c53f04194d1247c6eebdaab7c610cf7d66709b3b
   719  ```
   720  
   721  Given this parameter, the registry will verify that the provided content does
   722  match this digest.
   723  
   724  ##### Canceling an Upload
   725  
   726  An upload can be cancelled by issuing a DELETE request to the upload endpoint.
   727  The format will be as follows:
   728  
   729  ```
   730  DELETE /v2/<name>/blobs/uploads/<uuid>
   731  ```
   732  
   733  After this request is issued, the upload uuid will no longer be valid and the
   734  registry server will dump all intermediate data. While uploads will time out
   735  if not completed, clients should issue this request if they encounter a fatal
   736  error but still have the ability to issue an http request.
   737  
   738  ##### Cross Repository Blob Mount
   739  
   740  A blob may be mounted from another repository that the client has read access
   741  to, removing the need to upload a blob already known to the registry. To issue
   742  a blob mount instead of an upload, a POST request should be issued in the
   743  following format:
   744  
   745  ```
   746  POST /v2/<name>/blobs/uploads/?mount=<digest>&from=<repository name>
   747  Content-Length: 0
   748  ```
   749  
   750  If the blob is successfully mounted, the client will receive a `201 Created`
   751  response:
   752  
   753  ```
   754  201 Created
   755  Location: /v2/<name>/blobs/<digest>
   756  Content-Length: 0
   757  Docker-Content-Digest: <digest>
   758  ```
   759  
   760  The `Location` header will contain the registry URL to access the accepted
   761  layer file. The `Docker-Content-Digest` header returns the canonical digest of
   762  the uploaded blob which may differ from the provided digest. Most clients may
   763  ignore the value but if it is used, the client should verify the value against
   764  the uploaded blob data.
   765  
   766  If a mount fails due to invalid repository or digest arguments, the registry
   767  will fall back to the standard upload behavior and return a `202 Accepted` with
   768  the upload URL in the `Location` header:
   769  
   770  ```
   771  202 Accepted
   772  Location: /v2/<name>/blobs/uploads/<uuid>
   773  Range: bytes=0-<offset>
   774  Content-Length: 0
   775  Docker-Upload-UUID: <uuid>
   776  ```
   777  
   778  This behavior is consistent with older versions of the registry, which do not
   779  recognize the repository mount query parameters.
   780  
   781  Note: a client may issue a HEAD request to check existence of a blob in a source
   782  repository to distinguish between the registry not supporting blob mounts and
   783  the blob not existing in the expected repository.
   784  
   785  ##### Errors
   786  
   787  If an 502, 503 or 504 error is received, the client should assume that the
   788  download can proceed due to a temporary condition, honoring the appropriate
   789  retry mechanism. Other 5xx errors should be treated as terminal.
   790  
   791  If there is a problem with the upload, a 4xx error will be returned indicating
   792  the problem. After receiving a 4xx response (except 416, as called out above),
   793  the upload will be considered failed and the client should take appropriate
   794  action.
   795  
   796  Note that the upload url will not be available forever. If the upload uuid is
   797  unknown to the registry, a `404 Not Found` response will be returned and the
   798  client must restart the upload process.
   799  
   800  ### Deleting a Layer
   801  
   802  A layer may be deleted from the registry via its `name` and `digest`. A
   803  delete may be issued with the following request format:
   804  
   805      DELETE /v2/<name>/blobs/<digest>
   806  
   807  If the blob exists and has been successfully deleted, the following response
   808  will be issued:
   809  
   810      202 Accepted
   811      Content-Length: None
   812  
   813  If the blob had already been deleted or did not exist, a `404 Not Found`
   814  response will be issued instead.
   815  
   816  If a layer is deleted which is referenced by a manifest in the registry,
   817  then the complete images will not be resolvable.
   818  
   819  #### Pushing an Image Manifest
   820  
   821  Once all of the layers for an image are uploaded, the client can upload the
   822  image manifest. An image can be pushed using the following request format:
   823  
   824      PUT /v2/<name>/manifests/<reference>
   825  
   826      {
   827         "name": <name>,
   828         "tag": <tag>,
   829         "fsLayers": [
   830            {
   831               "blobSum": <digest>
   832            },
   833            ...
   834          ]
   835         ],
   836         "history": <v1 images>,
   837         "signature": <JWS>,
   838         ...
   839      }
   840  
   841  The `name` and `reference` fields of the response body must match those specified in
   842  the URL. The `reference` field may be a "tag" or a "digest".
   843  
   844  If there is a problem with pushing the manifest, a relevant 4xx response will
   845  be returned with a JSON error message. Please see the _PUT Manifest section
   846  for details on possible error codes that may be returned.
   847  
   848  If one or more layers are unknown to the registry, `BLOB_UNKNOWN` errors are
   849  returned. The `detail` field of the error response will have a `digest` field
   850  identifying the missing blob. An error is returned for each unknown blob. The
   851  response format is as follows:
   852  
   853      {
   854          "errors:" [{
   855                  "code": "BLOB_UNKNOWN",
   856                  "message": "blob unknown to registry",
   857                  "detail": {
   858                      "digest": <digest>
   859                  }
   860              },
   861              ...
   862          ]
   863      }
   864  
   865  ### Listing Repositories
   866  
   867  Images are stored in collections, known as a _repository_, which is keyed by a
   868  `name`, as seen throughout the API specification. A registry instance may
   869  contain several repositories. The list of available repositories is made
   870  available through the _catalog_.
   871  
   872  The catalog for a given registry can be retrieved with the following request:
   873  
   874  ```
   875  GET /v2/_catalog
   876  ```
   877  
   878  The response will be in the following format:
   879  
   880  ```
   881  200 OK
   882  Content-Type: application/json
   883  
   884  {
   885    "repositories": [
   886      <name>,
   887      ...
   888    ]
   889  }
   890  ```
   891  
   892  Note that the contents of the response are specific to the registry
   893  implementation. Some registries may opt to provide a full catalog output,
   894  limit it based on the user's access level or omit upstream results, if
   895  providing mirroring functionality. Subsequently, the presence of a repository
   896  in the catalog listing only means that the registry *may* provide access to
   897  the repository at the time of the request. Conversely, a missing entry does
   898  *not* mean that the registry does not have the repository. More succinctly,
   899  the presence of a repository only guarantees that it is there but not that it
   900  is _not_ there.
   901  
   902  For registries with a large number of repositories, this response may be quite
   903  large. If such a response is expected, one should use pagination. A registry
   904  may also limit the amount of responses returned even if pagination was not
   905  explicitly requested. In this case the `Link` header will be returned along
   906  with the results, and subsequent results can be obtained by following the link
   907  as if pagination had been initially requested.
   908  
   909  For details of the `Link` header, please see the _Pagination_ section.
   910  
   911  #### Pagination
   912  
   913  Paginated catalog results can be retrieved by adding an `n` parameter to the
   914  request URL, declaring that the response should be limited to `n` results.
   915  Starting a paginated flow begins as follows:
   916  
   917  ```
   918  GET /v2/_catalog?n=<integer>
   919  ```
   920  
   921  The above specifies that a catalog response should be returned, from the start of
   922  the result set, ordered lexically, limiting the number of results to `n`. The
   923  response to such a request would look as follows:
   924  
   925  ```
   926  200 OK
   927  Content-Type: application/json
   928  Link: <<url>?n=<n from the request>&last=<last repository in response>>; rel="next"
   929  
   930  {
   931    "repositories": [
   932      <name>,
   933      ...
   934    ]
   935  }
   936  ```
   937  
   938  The above includes the _first_ `n` entries from the result set. To get the
   939  _next_ `n` entries, one can create a URL where the argument `last` has the
   940  value from `repositories[len(repositories)-1]`. If there are indeed more
   941  results, the URL for the next block is encoded in an
   942  [RFC5988](https://tools.ietf.org/html/rfc5988) `Link` header, as a "next"
   943  relation. The presence of the `Link` header communicates to the client that
   944  the entire result set has not been returned and another request must be
   945  issued. If the header is not present, the client can assume that all results
   946  have been recieved.
   947  
   948  > __NOTE:__ In the request template above, note that the brackets
   949  > are required. For example, if the url is
   950  > `http://example.com/v2/_catalog?n=20&last=b`, the value of the header would
   951  > be `<http://example.com/v2/_catalog?n=20&last=b>; rel="next"`. Please see
   952  > [RFC5988](https://tools.ietf.org/html/rfc5988) for details.
   953  
   954  Compliant client implementations should always use the `Link` header
   955  value when proceeding through results linearly. The client may construct URLs
   956  to skip forward in the catalog.
   957  
   958  To get the next result set, a client would issue the request as follows, using
   959  the URL encoded in the described `Link` header:
   960  
   961  ```
   962  GET /v2/_catalog?n=<n from the request>&last=<last repository value from previous response>
   963  ```
   964  
   965  The above process should then be repeated until the `Link` header is no longer
   966  set.
   967  
   968  The catalog result set is represented abstractly as a lexically sorted list,
   969  where the position in that list can be specified by the query term `last`. The
   970  entries in the response start _after_ the term specified by `last`, up to `n`
   971  entries.
   972  
   973  The behavior of `last` is quite simple when demonstrated with an example. Let
   974  us say the registry has the following repositories:
   975  
   976  ```
   977  a
   978  b
   979  c
   980  d
   981  ```
   982  
   983  If the value of `n` is 2, _a_ and _b_ will be returned on the first response.
   984  The `Link` header returned on the response will have `n` set to 2 and last set
   985  to _b_:
   986  
   987  ```
   988  Link: <<url>?n=2&last=b>; rel="next"
   989  ```
   990  
   991  The client can then issue the request with above value from the `Link` header,
   992  receiving the values _c_ and _d_. Note that n may change on second to last
   993  response or be omitted fully, if the server may so choose.
   994  
   995  ### Listing Image Tags
   996  
   997  It may be necessary to list all of the tags under a given repository. The tags
   998  for an image repository can be retrieved with the following request:
   999  
  1000      GET /v2/<name>/tags/list
  1001  
  1002  The response will be in the following format:
  1003  
  1004      200 OK
  1005      Content-Type: application/json
  1006  
  1007      {
  1008          "name": <name>,
  1009          "tags": [
  1010              <tag>,
  1011              ...
  1012          ]
  1013      }
  1014  
  1015  For repositories with a large number of tags, this response may be quite
  1016  large. If such a response is expected, one should use the pagination.
  1017  
  1018  #### Pagination
  1019  
  1020  Paginated tag results can be retrieved by adding the appropriate parameters to
  1021  the request URL described above. The behavior of tag pagination is identical
  1022  to that specified for catalog pagination. We cover a simple flow to highlight
  1023  any differences.
  1024  
  1025  Starting a paginated flow may begin as follows:
  1026  
  1027  ```
  1028  GET /v2/<name>/tags/list?n=<integer>
  1029  ```
  1030  
  1031  The above specifies that a tags response should be returned, from the start of
  1032  the result set, ordered lexically, limiting the number of results to `n`. The
  1033  response to such a request would look as follows:
  1034  
  1035  ```
  1036  200 OK
  1037  Content-Type: application/json
  1038  Link: <<url>?n=<n from the request>&last=<last tag value from previous response>>; rel="next"
  1039  
  1040  {
  1041    "name": <name>,
  1042    "tags": [
  1043      <tag>,
  1044      ...
  1045    ]
  1046  }
  1047  ```
  1048  
  1049  To get the next result set, a client would issue the request as follows, using
  1050  the value encoded in the [RFC5988](https://tools.ietf.org/html/rfc5988) `Link`
  1051  header:
  1052  
  1053  ```
  1054  GET /v2/<name>/tags/list?n=<n from the request>&last=<last tag value from previous response>
  1055  ```
  1056  
  1057  The above process should then be repeated until the `Link` header is no longer
  1058  set in the response. The behavior of the `last` parameter, the provided
  1059  response result, lexical ordering and encoding of the `Link` header are
  1060  identical to that of catalog pagination.
  1061  
  1062  ### Deleting an Image
  1063  
  1064  An image may be deleted from the registry via its `name` and `reference`. A
  1065  delete may be issued with the following request format:
  1066  
  1067      DELETE /v2/<name>/manifests/<reference>
  1068  
  1069  For deletes, `reference` *must* be a digest or the delete will fail. If the
  1070  image exists and has been successfully deleted, the following response will be
  1071  issued:
  1072  
  1073      202 Accepted
  1074      Content-Length: None
  1075  
  1076  If the image had already been deleted or did not exist, a `404 Not Found`
  1077  response will be issued instead.
  1078  
  1079  ## Detail
  1080  
  1081  > **Note**: This section is still under construction. For the purposes of
  1082  > implementation, if any details below differ from the described request flows
  1083  > above, the section below should be corrected. When they match, this note
  1084  > should be removed.
  1085  
  1086  The behavior of the endpoints are covered in detail in this section, organized
  1087  by route and entity. All aspects of the request and responses are covered,
  1088  including headers, parameters and body formats. Examples of requests and their
  1089  corresponding responses, with success and failure, are enumerated.
  1090  
  1091  > **Note**: The sections on endpoint detail are arranged with an example
  1092  > request, a description of the request, followed by information about that
  1093  > request.
  1094  
  1095  A list of methods and URIs are covered in the table below:
  1096  
  1097  |Method|Path|Entity|Description|
  1098  |------|----|------|-----------|
  1099  | GET | `/v2/` | Base | Check that the endpoint implements Docker Registry API V2. |
  1100  | GET | `/v2/<name>/tags/list` | Tags | Fetch the tags under the repository identified by `name`. |
  1101  | GET | `/v2/<name>/manifests/<reference>` | Manifest | Fetch the manifest identified by `name` and `reference` where `reference` can be a tag or digest. A `HEAD` request can also be issued to this endpoint to obtain resource information without receiving all data. |
  1102  | PUT | `/v2/<name>/manifests/<reference>` | Manifest | Put the manifest identified by `name` and `reference` where `reference` can be a tag or digest. |
  1103  | DELETE | `/v2/<name>/manifests/<reference>` | Manifest | Delete the manifest identified by `name` and `reference`. Note that a manifest can _only_ be deleted by `digest`. |
  1104  | GET | `/v2/<name>/blobs/<digest>` | Blob | Retrieve the blob from the registry identified by `digest`. A `HEAD` request can also be issued to this endpoint to obtain resource information without receiving all data. |
  1105  | DELETE | `/v2/<name>/blobs/<digest>` | Blob | Delete the blob identified by `name` and `digest` |
  1106  | POST | `/v2/<name>/blobs/uploads/` | Initiate Blob Upload | Initiate a resumable blob upload. If successful, an upload location will be provided to complete the upload. Optionally, if the `digest` parameter is present, the request body will be used to complete the upload in a single request. |
  1107  | GET | `/v2/<name>/blobs/uploads/<uuid>` | Blob Upload | Retrieve status of upload identified by `uuid`. The primary purpose of this endpoint is to resolve the current status of a resumable upload. |
  1108  | PATCH | `/v2/<name>/blobs/uploads/<uuid>` | Blob Upload | Upload a chunk of data for the specified upload. |
  1109  | PUT | `/v2/<name>/blobs/uploads/<uuid>` | Blob Upload | Complete the upload specified by `uuid`, optionally appending the body as the final chunk. |
  1110  | DELETE | `/v2/<name>/blobs/uploads/<uuid>` | Blob Upload | Cancel outstanding upload processes, releasing associated resources. If this is not called, the unfinished uploads will eventually timeout. |
  1111  | GET | `/v2/_catalog` | Catalog | Retrieve a sorted, json list of repositories available in the registry. |
  1112  
  1113  
  1114  The detail for each endpoint is covered in the following sections.
  1115  
  1116  ### Errors
  1117  
  1118  The error codes encountered via the API are enumerated in the following table:
  1119  
  1120  |Code|Message|Description|
  1121  |----|-------|-----------|
  1122   `BLOB_UNKNOWN` | blob unknown to registry | This error may be returned when a blob is unknown to the registry in a specified repository. This can be returned with a standard get or if a manifest references an unknown layer during upload.
  1123   `BLOB_UPLOAD_INVALID` | blob upload invalid | The blob upload encountered an error and can no longer proceed.
  1124   `BLOB_UPLOAD_UNKNOWN` | blob upload unknown to registry | If a blob upload has been cancelled or was never started, this error code may be returned.
  1125   `DIGEST_INVALID` | provided digest did not match uploaded content | When a blob is uploaded, the registry will check that the content matches the digest provided by the client. The error may include a detail structure with the key "digest", including the invalid digest string. This error may also be returned when a manifest includes an invalid layer digest.
  1126   `MANIFEST_BLOB_UNKNOWN` | blob unknown to registry | This error may be returned when a manifest blob is  unknown to the registry.
  1127   `MANIFEST_INVALID` | manifest invalid | During upload, manifests undergo several checks ensuring validity. If those checks fail, this error may be returned, unless a more specific error is included. The detail will contain information the failed validation.
  1128   `MANIFEST_UNKNOWN` | manifest unknown | This error is returned when the manifest, identified by name and tag is unknown to the repository.
  1129   `MANIFEST_UNVERIFIED` | manifest failed signature verification | During manifest upload, if the manifest fails signature verification, this error will be returned.
  1130   `NAME_INVALID` | invalid repository name | Invalid repository name encountered either during manifest validation or any API operation.
  1131   `NAME_UNKNOWN` | repository name not known to registry | This is returned if the name used during an operation is unknown to the registry.
  1132   `SIZE_INVALID` | provided length did not match content length | When a layer is uploaded, the provided size will be checked against the uploaded content. If they do not match, this error will be returned.
  1133   `TAG_INVALID` | manifest tag did not match URI | During a manifest upload, if the tag in the manifest does not match the uri tag, this error will be returned.
  1134   `UNAUTHORIZED` | authentication required | The access controller was unable to authenticate the client. Often this will be accompanied by a Www-Authenticate HTTP response header indicating how to authenticate.
  1135   `DENIED` | requested access to the resource is denied | The access controller denied access for the operation on a resource.
  1136   `UNSUPPORTED` | The operation is unsupported. | The operation was unsupported due to a missing implementation or invalid set of parameters.
  1137  
  1138  
  1139  
  1140  ### Base
  1141  
  1142  Base V2 API route. Typically, this can be used for lightweight version checks and to validate registry authentication.
  1143  
  1144  
  1145  
  1146  #### GET Base
  1147  
  1148  Check that the endpoint implements Docker Registry API V2.
  1149  
  1150  
  1151  
  1152  ```
  1153  GET /v2/
  1154  Host: <registry host>
  1155  Authorization: <scheme> <token>
  1156  ```
  1157  
  1158  
  1159  
  1160  
  1161  The following parameters should be specified on the request:
  1162  
  1163  |Name|Kind|Description|
  1164  |----|----|-----------|
  1165  |`Host`|header|Standard HTTP Host Header. Should be set to the registry host.|
  1166  |`Authorization`|header|An RFC7235 compliant authorization header.|
  1167  
  1168  
  1169  
  1170  
  1171  ###### On Success: OK
  1172  
  1173  ```
  1174  200 OK
  1175  ```
  1176  
  1177  The API implements V2 protocol and is accessible.
  1178  
  1179  
  1180  
  1181  
  1182  ###### On Failure: Not Found
  1183  
  1184  ```
  1185  404 Not Found
  1186  ```
  1187  
  1188  The registry does not implement the V2 API.
  1189  
  1190  
  1191  
  1192  ###### On Failure: Authentication Required
  1193  
  1194  ```
  1195  401 Unauthorized
  1196  WWW-Authenticate: <scheme> realm="<realm>", ..."
  1197  Content-Length: <length>
  1198  Content-Type: application/json; charset=utf-8
  1199  
  1200  {
  1201  	"errors:" [
  1202  	    {
  1203              "code": <error code>,
  1204              "message": "<error message>",
  1205              "detail": ...
  1206          },
  1207          ...
  1208      ]
  1209  }
  1210  ```
  1211  
  1212  The client is not authenticated.
  1213  
  1214  The following headers will be returned on the response:
  1215  
  1216  |Name|Description|
  1217  |----|-----------|
  1218  |`WWW-Authenticate`|An RFC7235 compliant authentication challenge header.|
  1219  |`Content-Length`|Length of the JSON response body.|
  1220  
  1221  
  1222  
  1223  The error codes that may be included in the response body are enumerated below:
  1224  
  1225  |Code|Message|Description|
  1226  |----|-------|-----------|
  1227  | `UNAUTHORIZED` | authentication required | The access controller was unable to authenticate the client. Often this will be accompanied by a Www-Authenticate HTTP response header indicating how to authenticate. |
  1228  
  1229  
  1230  
  1231  
  1232  
  1233  ### Tags
  1234  
  1235  Retrieve information about tags.
  1236  
  1237  
  1238  
  1239  #### GET Tags
  1240  
  1241  Fetch the tags under the repository identified by `name`.
  1242  
  1243  
  1244  ##### Tags
  1245  
  1246  ```
  1247  GET /v2/<name>/tags/list
  1248  Host: <registry host>
  1249  Authorization: <scheme> <token>
  1250  ```
  1251  
  1252  Return all tags for the repository
  1253  
  1254  
  1255  The following parameters should be specified on the request:
  1256  
  1257  |Name|Kind|Description|
  1258  |----|----|-----------|
  1259  |`Host`|header|Standard HTTP Host Header. Should be set to the registry host.|
  1260  |`Authorization`|header|An RFC7235 compliant authorization header.|
  1261  |`name`|path|Name of the target repository.|
  1262  
  1263  
  1264  
  1265  
  1266  ###### On Success: OK
  1267  
  1268  ```
  1269  200 OK
  1270  Content-Length: <length>
  1271  Content-Type: application/json; charset=utf-8
  1272  
  1273  {
  1274      "name": <name>,
  1275      "tags": [
  1276          <tag>,
  1277          ...
  1278      ]
  1279  }
  1280  ```
  1281  
  1282  A list of tags for the named repository.
  1283  
  1284  The following headers will be returned with the response:
  1285  
  1286  |Name|Description|
  1287  |----|-----------|
  1288  |`Content-Length`|Length of the JSON response body.|
  1289  
  1290  
  1291  
  1292  
  1293  ###### On Failure: Authentication Required
  1294  
  1295  ```
  1296  401 Unauthorized
  1297  WWW-Authenticate: <scheme> realm="<realm>", ..."
  1298  Content-Length: <length>
  1299  Content-Type: application/json; charset=utf-8
  1300  
  1301  {
  1302  	"errors:" [
  1303  	    {
  1304              "code": <error code>,
  1305              "message": "<error message>",
  1306              "detail": ...
  1307          },
  1308          ...
  1309      ]
  1310  }
  1311  ```
  1312  
  1313  The client is not authenticated.
  1314  
  1315  The following headers will be returned on the response:
  1316  
  1317  |Name|Description|
  1318  |----|-----------|
  1319  |`WWW-Authenticate`|An RFC7235 compliant authentication challenge header.|
  1320  |`Content-Length`|Length of the JSON response body.|
  1321  
  1322  
  1323  
  1324  The error codes that may be included in the response body are enumerated below:
  1325  
  1326  |Code|Message|Description|
  1327  |----|-------|-----------|
  1328  | `UNAUTHORIZED` | authentication required | The access controller was unable to authenticate the client. Often this will be accompanied by a Www-Authenticate HTTP response header indicating how to authenticate. |
  1329  
  1330  
  1331  
  1332  ###### On Failure: No Such Repository Error
  1333  
  1334  ```
  1335  404 Not Found
  1336  Content-Length: <length>
  1337  Content-Type: application/json; charset=utf-8
  1338  
  1339  {
  1340  	"errors:" [
  1341  	    {
  1342              "code": <error code>,
  1343              "message": "<error message>",
  1344              "detail": ...
  1345          },
  1346          ...
  1347      ]
  1348  }
  1349  ```
  1350  
  1351  The repository is not known to the registry.
  1352  
  1353  The following headers will be returned on the response:
  1354  
  1355  |Name|Description|
  1356  |----|-----------|
  1357  |`Content-Length`|Length of the JSON response body.|
  1358  
  1359  
  1360  
  1361  The error codes that may be included in the response body are enumerated below:
  1362  
  1363  |Code|Message|Description|
  1364  |----|-------|-----------|
  1365  | `NAME_UNKNOWN` | repository name not known to registry | This is returned if the name used during an operation is unknown to the registry. |
  1366  
  1367  
  1368  
  1369  ###### On Failure: Access Denied
  1370  
  1371  ```
  1372  403 Forbidden
  1373  Content-Length: <length>
  1374  Content-Type: application/json; charset=utf-8
  1375  
  1376  {
  1377  	"errors:" [
  1378  	    {
  1379              "code": <error code>,
  1380              "message": "<error message>",
  1381              "detail": ...
  1382          },
  1383          ...
  1384      ]
  1385  }
  1386  ```
  1387  
  1388  The client does not have required access to the repository.
  1389  
  1390  The following headers will be returned on the response:
  1391  
  1392  |Name|Description|
  1393  |----|-----------|
  1394  |`Content-Length`|Length of the JSON response body.|
  1395  
  1396  
  1397  
  1398  The error codes that may be included in the response body are enumerated below:
  1399  
  1400  |Code|Message|Description|
  1401  |----|-------|-----------|
  1402  | `DENIED` | requested access to the resource is denied | The access controller denied access for the operation on a resource. |
  1403  
  1404  
  1405  
  1406  ##### Tags Paginated
  1407  
  1408  ```
  1409  GET /v2/<name>/tags/list?n=<integer>&last=<integer>
  1410  ```
  1411  
  1412  Return a portion of the tags for the specified repository.
  1413  
  1414  
  1415  The following parameters should be specified on the request:
  1416  
  1417  |Name|Kind|Description|
  1418  |----|----|-----------|
  1419  |`name`|path|Name of the target repository.|
  1420  |`n`|query|Limit the number of entries in each response. It not present, all entries will be returned.|
  1421  |`last`|query|Result set will include values lexically after last.|
  1422  
  1423  
  1424  
  1425  
  1426  ###### On Success: OK
  1427  
  1428  ```
  1429  200 OK
  1430  Content-Length: <length>
  1431  Link: <<url>?n=<last n value>&last=<last entry from response>>; rel="next"
  1432  Content-Type: application/json; charset=utf-8
  1433  
  1434  {
  1435      "name": <name>,
  1436      "tags": [
  1437          <tag>,
  1438          ...
  1439      ],
  1440  }
  1441  ```
  1442  
  1443  A list of tags for the named repository.
  1444  
  1445  The following headers will be returned with the response:
  1446  
  1447  |Name|Description|
  1448  |----|-----------|
  1449  |`Content-Length`|Length of the JSON response body.|
  1450  |`Link`|RFC5988 compliant rel='next' with URL to next result set, if available|
  1451  
  1452  
  1453  
  1454  
  1455  ###### On Failure: Authentication Required
  1456  
  1457  ```
  1458  401 Unauthorized
  1459  WWW-Authenticate: <scheme> realm="<realm>", ..."
  1460  Content-Length: <length>
  1461  Content-Type: application/json; charset=utf-8
  1462  
  1463  {
  1464  	"errors:" [
  1465  	    {
  1466              "code": <error code>,
  1467              "message": "<error message>",
  1468              "detail": ...
  1469          },
  1470          ...
  1471      ]
  1472  }
  1473  ```
  1474  
  1475  The client is not authenticated.
  1476  
  1477  The following headers will be returned on the response:
  1478  
  1479  |Name|Description|
  1480  |----|-----------|
  1481  |`WWW-Authenticate`|An RFC7235 compliant authentication challenge header.|
  1482  |`Content-Length`|Length of the JSON response body.|
  1483  
  1484  
  1485  
  1486  The error codes that may be included in the response body are enumerated below:
  1487  
  1488  |Code|Message|Description|
  1489  |----|-------|-----------|
  1490  | `UNAUTHORIZED` | authentication required | The access controller was unable to authenticate the client. Often this will be accompanied by a Www-Authenticate HTTP response header indicating how to authenticate. |
  1491  
  1492  
  1493  
  1494  ###### On Failure: No Such Repository Error
  1495  
  1496  ```
  1497  404 Not Found
  1498  Content-Length: <length>
  1499  Content-Type: application/json; charset=utf-8
  1500  
  1501  {
  1502  	"errors:" [
  1503  	    {
  1504              "code": <error code>,
  1505              "message": "<error message>",
  1506              "detail": ...
  1507          },
  1508          ...
  1509      ]
  1510  }
  1511  ```
  1512  
  1513  The repository is not known to the registry.
  1514  
  1515  The following headers will be returned on the response:
  1516  
  1517  |Name|Description|
  1518  |----|-----------|
  1519  |`Content-Length`|Length of the JSON response body.|
  1520  
  1521  
  1522  
  1523  The error codes that may be included in the response body are enumerated below:
  1524  
  1525  |Code|Message|Description|
  1526  |----|-------|-----------|
  1527  | `NAME_UNKNOWN` | repository name not known to registry | This is returned if the name used during an operation is unknown to the registry. |
  1528  
  1529  
  1530  
  1531  ###### On Failure: Access Denied
  1532  
  1533  ```
  1534  403 Forbidden
  1535  Content-Length: <length>
  1536  Content-Type: application/json; charset=utf-8
  1537  
  1538  {
  1539  	"errors:" [
  1540  	    {
  1541              "code": <error code>,
  1542              "message": "<error message>",
  1543              "detail": ...
  1544          },
  1545          ...
  1546      ]
  1547  }
  1548  ```
  1549  
  1550  The client does not have required access to the repository.
  1551  
  1552  The following headers will be returned on the response:
  1553  
  1554  |Name|Description|
  1555  |----|-----------|
  1556  |`Content-Length`|Length of the JSON response body.|
  1557  
  1558  
  1559  
  1560  The error codes that may be included in the response body are enumerated below:
  1561  
  1562  |Code|Message|Description|
  1563  |----|-------|-----------|
  1564  | `DENIED` | requested access to the resource is denied | The access controller denied access for the operation on a resource. |
  1565  
  1566  
  1567  
  1568  
  1569  
  1570  ### Manifest
  1571  
  1572  Create, update, delete and retrieve manifests.
  1573  
  1574  
  1575  
  1576  #### GET Manifest
  1577  
  1578  Fetch the manifest identified by `name` and `reference` where `reference` can be a tag or digest. A `HEAD` request can also be issued to this endpoint to obtain resource information without receiving all data.
  1579  
  1580  
  1581  
  1582  ```
  1583  GET /v2/<name>/manifests/<reference>
  1584  Host: <registry host>
  1585  Authorization: <scheme> <token>
  1586  ```
  1587  
  1588  
  1589  
  1590  
  1591  The following parameters should be specified on the request:
  1592  
  1593  |Name|Kind|Description|
  1594  |----|----|-----------|
  1595  |`Host`|header|Standard HTTP Host Header. Should be set to the registry host.|
  1596  |`Authorization`|header|An RFC7235 compliant authorization header.|
  1597  |`name`|path|Name of the target repository.|
  1598  |`reference`|path|Tag or digest of the target manifest.|
  1599  
  1600  
  1601  
  1602  
  1603  ###### On Success: OK
  1604  
  1605  ```
  1606  200 OK
  1607  Docker-Content-Digest: <digest>
  1608  Content-Type: application/json; charset=utf-8
  1609  
  1610  {
  1611     "name": <name>,
  1612     "tag": <tag>,
  1613     "fsLayers": [
  1614        {
  1615           "blobSum": "<digest>"
  1616        },
  1617        ...
  1618      ]
  1619     ],
  1620     "history": <v1 images>,
  1621     "signature": <JWS>
  1622  }
  1623  ```
  1624  
  1625  The manifest identified by `name` and `reference`. The contents can be used to identify and resolve resources required to run the specified image.
  1626  
  1627  The following headers will be returned with the response:
  1628  
  1629  |Name|Description|
  1630  |----|-----------|
  1631  |`Docker-Content-Digest`|Digest of the targeted content for the request.|
  1632  
  1633  
  1634  
  1635  
  1636  ###### On Failure: Bad Request
  1637  
  1638  ```
  1639  400 Bad Request
  1640  Content-Type: application/json; charset=utf-8
  1641  
  1642  {
  1643  	"errors:" [
  1644  	    {
  1645              "code": <error code>,
  1646              "message": "<error message>",
  1647              "detail": ...
  1648          },
  1649          ...
  1650      ]
  1651  }
  1652  ```
  1653  
  1654  The name or reference was invalid.
  1655  
  1656  
  1657  
  1658  The error codes that may be included in the response body are enumerated below:
  1659  
  1660  |Code|Message|Description|
  1661  |----|-------|-----------|
  1662  | `NAME_INVALID` | invalid repository name | Invalid repository name encountered either during manifest validation or any API operation. |
  1663  | `TAG_INVALID` | manifest tag did not match URI | During a manifest upload, if the tag in the manifest does not match the uri tag, this error will be returned. |
  1664  
  1665  
  1666  
  1667  ###### On Failure: Authentication Required
  1668  
  1669  ```
  1670  401 Unauthorized
  1671  WWW-Authenticate: <scheme> realm="<realm>", ..."
  1672  Content-Length: <length>
  1673  Content-Type: application/json; charset=utf-8
  1674  
  1675  {
  1676  	"errors:" [
  1677  	    {
  1678              "code": <error code>,
  1679              "message": "<error message>",
  1680              "detail": ...
  1681          },
  1682          ...
  1683      ]
  1684  }
  1685  ```
  1686  
  1687  The client is not authenticated.
  1688  
  1689  The following headers will be returned on the response:
  1690  
  1691  |Name|Description|
  1692  |----|-----------|
  1693  |`WWW-Authenticate`|An RFC7235 compliant authentication challenge header.|
  1694  |`Content-Length`|Length of the JSON response body.|
  1695  
  1696  
  1697  
  1698  The error codes that may be included in the response body are enumerated below:
  1699  
  1700  |Code|Message|Description|
  1701  |----|-------|-----------|
  1702  | `UNAUTHORIZED` | authentication required | The access controller was unable to authenticate the client. Often this will be accompanied by a Www-Authenticate HTTP response header indicating how to authenticate. |
  1703  
  1704  
  1705  
  1706  ###### On Failure: No Such Repository Error
  1707  
  1708  ```
  1709  404 Not Found
  1710  Content-Length: <length>
  1711  Content-Type: application/json; charset=utf-8
  1712  
  1713  {
  1714  	"errors:" [
  1715  	    {
  1716              "code": <error code>,
  1717              "message": "<error message>",
  1718              "detail": ...
  1719          },
  1720          ...
  1721      ]
  1722  }
  1723  ```
  1724  
  1725  The repository is not known to the registry.
  1726  
  1727  The following headers will be returned on the response:
  1728  
  1729  |Name|Description|
  1730  |----|-----------|
  1731  |`Content-Length`|Length of the JSON response body.|
  1732  
  1733  
  1734  
  1735  The error codes that may be included in the response body are enumerated below:
  1736  
  1737  |Code|Message|Description|
  1738  |----|-------|-----------|
  1739  | `NAME_UNKNOWN` | repository name not known to registry | This is returned if the name used during an operation is unknown to the registry. |
  1740  
  1741  
  1742  
  1743  ###### On Failure: Access Denied
  1744  
  1745  ```
  1746  403 Forbidden
  1747  Content-Length: <length>
  1748  Content-Type: application/json; charset=utf-8
  1749  
  1750  {
  1751  	"errors:" [
  1752  	    {
  1753              "code": <error code>,
  1754              "message": "<error message>",
  1755              "detail": ...
  1756          },
  1757          ...
  1758      ]
  1759  }
  1760  ```
  1761  
  1762  The client does not have required access to the repository.
  1763  
  1764  The following headers will be returned on the response:
  1765  
  1766  |Name|Description|
  1767  |----|-----------|
  1768  |`Content-Length`|Length of the JSON response body.|
  1769  
  1770  
  1771  
  1772  The error codes that may be included in the response body are enumerated below:
  1773  
  1774  |Code|Message|Description|
  1775  |----|-------|-----------|
  1776  | `DENIED` | requested access to the resource is denied | The access controller denied access for the operation on a resource. |
  1777  
  1778  
  1779  
  1780  
  1781  #### PUT Manifest
  1782  
  1783  Put the manifest identified by `name` and `reference` where `reference` can be a tag or digest.
  1784  
  1785  
  1786  
  1787  ```
  1788  PUT /v2/<name>/manifests/<reference>
  1789  Host: <registry host>
  1790  Authorization: <scheme> <token>
  1791  Content-Type: application/json; charset=utf-8
  1792  
  1793  {
  1794     "name": <name>,
  1795     "tag": <tag>,
  1796     "fsLayers": [
  1797        {
  1798           "blobSum": "<digest>"
  1799        },
  1800        ...
  1801      ]
  1802     ],
  1803     "history": <v1 images>,
  1804     "signature": <JWS>
  1805  }
  1806  ```
  1807  
  1808  
  1809  
  1810  
  1811  The following parameters should be specified on the request:
  1812  
  1813  |Name|Kind|Description|
  1814  |----|----|-----------|
  1815  |`Host`|header|Standard HTTP Host Header. Should be set to the registry host.|
  1816  |`Authorization`|header|An RFC7235 compliant authorization header.|
  1817  |`name`|path|Name of the target repository.|
  1818  |`reference`|path|Tag or digest of the target manifest.|
  1819  
  1820  
  1821  
  1822  
  1823  ###### On Success: Created
  1824  
  1825  ```
  1826  201 Created
  1827  Location: <url>
  1828  Content-Length: 0
  1829  Docker-Content-Digest: <digest>
  1830  ```
  1831  
  1832  The manifest has been accepted by the registry and is stored under the specified `name` and `tag`.
  1833  
  1834  The following headers will be returned with the response:
  1835  
  1836  |Name|Description|
  1837  |----|-----------|
  1838  |`Location`|The canonical location url of the uploaded manifest.|
  1839  |`Content-Length`|The `Content-Length` header must be zero and the body must be empty.|
  1840  |`Docker-Content-Digest`|Digest of the targeted content for the request.|
  1841  
  1842  
  1843  
  1844  
  1845  ###### On Failure: Invalid Manifest
  1846  
  1847  ```
  1848  400 Bad Request
  1849  Content-Type: application/json; charset=utf-8
  1850  
  1851  {
  1852  	"errors:" [
  1853  	    {
  1854              "code": <error code>,
  1855              "message": "<error message>",
  1856              "detail": ...
  1857          },
  1858          ...
  1859      ]
  1860  }
  1861  ```
  1862  
  1863  The received manifest was invalid in some way, as described by the error codes. The client should resolve the issue and retry the request.
  1864  
  1865  
  1866  
  1867  The error codes that may be included in the response body are enumerated below:
  1868  
  1869  |Code|Message|Description|
  1870  |----|-------|-----------|
  1871  | `NAME_INVALID` | invalid repository name | Invalid repository name encountered either during manifest validation or any API operation. |
  1872  | `TAG_INVALID` | manifest tag did not match URI | During a manifest upload, if the tag in the manifest does not match the uri tag, this error will be returned. |
  1873  | `MANIFEST_INVALID` | manifest invalid | During upload, manifests undergo several checks ensuring validity. If those checks fail, this error may be returned, unless a more specific error is included. The detail will contain information the failed validation. |
  1874  | `MANIFEST_UNVERIFIED` | manifest failed signature verification | During manifest upload, if the manifest fails signature verification, this error will be returned. |
  1875  | `BLOB_UNKNOWN` | blob unknown to registry | This error may be returned when a blob is unknown to the registry in a specified repository. This can be returned with a standard get or if a manifest references an unknown layer during upload. |
  1876  
  1877  
  1878  
  1879  ###### On Failure: Authentication Required
  1880  
  1881  ```
  1882  401 Unauthorized
  1883  WWW-Authenticate: <scheme> realm="<realm>", ..."
  1884  Content-Length: <length>
  1885  Content-Type: application/json; charset=utf-8
  1886  
  1887  {
  1888  	"errors:" [
  1889  	    {
  1890              "code": <error code>,
  1891              "message": "<error message>",
  1892              "detail": ...
  1893          },
  1894          ...
  1895      ]
  1896  }
  1897  ```
  1898  
  1899  The client is not authenticated.
  1900  
  1901  The following headers will be returned on the response:
  1902  
  1903  |Name|Description|
  1904  |----|-----------|
  1905  |`WWW-Authenticate`|An RFC7235 compliant authentication challenge header.|
  1906  |`Content-Length`|Length of the JSON response body.|
  1907  
  1908  
  1909  
  1910  The error codes that may be included in the response body are enumerated below:
  1911  
  1912  |Code|Message|Description|
  1913  |----|-------|-----------|
  1914  | `UNAUTHORIZED` | authentication required | The access controller was unable to authenticate the client. Often this will be accompanied by a Www-Authenticate HTTP response header indicating how to authenticate. |
  1915  
  1916  
  1917  
  1918  ###### On Failure: No Such Repository Error
  1919  
  1920  ```
  1921  404 Not Found
  1922  Content-Length: <length>
  1923  Content-Type: application/json; charset=utf-8
  1924  
  1925  {
  1926  	"errors:" [
  1927  	    {
  1928              "code": <error code>,
  1929              "message": "<error message>",
  1930              "detail": ...
  1931          },
  1932          ...
  1933      ]
  1934  }
  1935  ```
  1936  
  1937  The repository is not known to the registry.
  1938  
  1939  The following headers will be returned on the response:
  1940  
  1941  |Name|Description|
  1942  |----|-----------|
  1943  |`Content-Length`|Length of the JSON response body.|
  1944  
  1945  
  1946  
  1947  The error codes that may be included in the response body are enumerated below:
  1948  
  1949  |Code|Message|Description|
  1950  |----|-------|-----------|
  1951  | `NAME_UNKNOWN` | repository name not known to registry | This is returned if the name used during an operation is unknown to the registry. |
  1952  
  1953  
  1954  
  1955  ###### On Failure: Access Denied
  1956  
  1957  ```
  1958  403 Forbidden
  1959  Content-Length: <length>
  1960  Content-Type: application/json; charset=utf-8
  1961  
  1962  {
  1963  	"errors:" [
  1964  	    {
  1965              "code": <error code>,
  1966              "message": "<error message>",
  1967              "detail": ...
  1968          },
  1969          ...
  1970      ]
  1971  }
  1972  ```
  1973  
  1974  The client does not have required access to the repository.
  1975  
  1976  The following headers will be returned on the response:
  1977  
  1978  |Name|Description|
  1979  |----|-----------|
  1980  |`Content-Length`|Length of the JSON response body.|
  1981  
  1982  
  1983  
  1984  The error codes that may be included in the response body are enumerated below:
  1985  
  1986  |Code|Message|Description|
  1987  |----|-------|-----------|
  1988  | `DENIED` | requested access to the resource is denied | The access controller denied access for the operation on a resource. |
  1989  
  1990  
  1991  
  1992  ###### On Failure: Missing Layer(s)
  1993  
  1994  ```
  1995  400 Bad Request
  1996  Content-Type: application/json; charset=utf-8
  1997  
  1998  {
  1999      "errors:" [{
  2000              "code": "BLOB_UNKNOWN",
  2001              "message": "blob unknown to registry",
  2002              "detail": {
  2003                  "digest": "<digest>"
  2004              }
  2005          },
  2006          ...
  2007      ]
  2008  }
  2009  ```
  2010  
  2011  One or more layers may be missing during a manifest upload. If so, the missing layers will be enumerated in the error response.
  2012  
  2013  
  2014  
  2015  The error codes that may be included in the response body are enumerated below:
  2016  
  2017  |Code|Message|Description|
  2018  |----|-------|-----------|
  2019  | `BLOB_UNKNOWN` | blob unknown to registry | This error may be returned when a blob is unknown to the registry in a specified repository. This can be returned with a standard get or if a manifest references an unknown layer during upload. |
  2020  
  2021  
  2022  
  2023  ###### On Failure: Not allowed
  2024  
  2025  ```
  2026  405 Method Not Allowed
  2027  ```
  2028  
  2029  Manifest put is not allowed because the registry is configured as a pull-through cache or for some other reason
  2030  
  2031  
  2032  
  2033  The error codes that may be included in the response body are enumerated below:
  2034  
  2035  |Code|Message|Description|
  2036  |----|-------|-----------|
  2037  | `UNSUPPORTED` | The operation is unsupported. | The operation was unsupported due to a missing implementation or invalid set of parameters. |
  2038  
  2039  
  2040  
  2041  
  2042  #### DELETE Manifest
  2043  
  2044  Delete the manifest identified by `name` and `reference`. Note that a manifest can _only_ be deleted by `digest`.
  2045  
  2046  
  2047  
  2048  ```
  2049  DELETE /v2/<name>/manifests/<reference>
  2050  Host: <registry host>
  2051  Authorization: <scheme> <token>
  2052  ```
  2053  
  2054  
  2055  
  2056  
  2057  The following parameters should be specified on the request:
  2058  
  2059  |Name|Kind|Description|
  2060  |----|----|-----------|
  2061  |`Host`|header|Standard HTTP Host Header. Should be set to the registry host.|
  2062  |`Authorization`|header|An RFC7235 compliant authorization header.|
  2063  |`name`|path|Name of the target repository.|
  2064  |`reference`|path|Tag or digest of the target manifest.|
  2065  
  2066  
  2067  
  2068  
  2069  ###### On Success: Accepted
  2070  
  2071  ```
  2072  202 Accepted
  2073  ```
  2074  
  2075  
  2076  
  2077  
  2078  
  2079  
  2080  ###### On Failure: Invalid Name or Reference
  2081  
  2082  ```
  2083  400 Bad Request
  2084  Content-Type: application/json; charset=utf-8
  2085  
  2086  {
  2087  	"errors:" [
  2088  	    {
  2089              "code": <error code>,
  2090              "message": "<error message>",
  2091              "detail": ...
  2092          },
  2093          ...
  2094      ]
  2095  }
  2096  ```
  2097  
  2098  The specified `name` or `reference` were invalid and the delete was unable to proceed.
  2099  
  2100  
  2101  
  2102  The error codes that may be included in the response body are enumerated below:
  2103  
  2104  |Code|Message|Description|
  2105  |----|-------|-----------|
  2106  | `NAME_INVALID` | invalid repository name | Invalid repository name encountered either during manifest validation or any API operation. |
  2107  | `TAG_INVALID` | manifest tag did not match URI | During a manifest upload, if the tag in the manifest does not match the uri tag, this error will be returned. |
  2108  
  2109  
  2110  
  2111  ###### On Failure: Authentication Required
  2112  
  2113  ```
  2114  401 Unauthorized
  2115  WWW-Authenticate: <scheme> realm="<realm>", ..."
  2116  Content-Length: <length>
  2117  Content-Type: application/json; charset=utf-8
  2118  
  2119  {
  2120  	"errors:" [
  2121  	    {
  2122              "code": <error code>,
  2123              "message": "<error message>",
  2124              "detail": ...
  2125          },
  2126          ...
  2127      ]
  2128  }
  2129  ```
  2130  
  2131  The client is not authenticated.
  2132  
  2133  The following headers will be returned on the response:
  2134  
  2135  |Name|Description|
  2136  |----|-----------|
  2137  |`WWW-Authenticate`|An RFC7235 compliant authentication challenge header.|
  2138  |`Content-Length`|Length of the JSON response body.|
  2139  
  2140  
  2141  
  2142  The error codes that may be included in the response body are enumerated below:
  2143  
  2144  |Code|Message|Description|
  2145  |----|-------|-----------|
  2146  | `UNAUTHORIZED` | authentication required | The access controller was unable to authenticate the client. Often this will be accompanied by a Www-Authenticate HTTP response header indicating how to authenticate. |
  2147  
  2148  
  2149  
  2150  ###### On Failure: No Such Repository Error
  2151  
  2152  ```
  2153  404 Not Found
  2154  Content-Length: <length>
  2155  Content-Type: application/json; charset=utf-8
  2156  
  2157  {
  2158  	"errors:" [
  2159  	    {
  2160              "code": <error code>,
  2161              "message": "<error message>",
  2162              "detail": ...
  2163          },
  2164          ...
  2165      ]
  2166  }
  2167  ```
  2168  
  2169  The repository is not known to the registry.
  2170  
  2171  The following headers will be returned on the response:
  2172  
  2173  |Name|Description|
  2174  |----|-----------|
  2175  |`Content-Length`|Length of the JSON response body.|
  2176  
  2177  
  2178  
  2179  The error codes that may be included in the response body are enumerated below:
  2180  
  2181  |Code|Message|Description|
  2182  |----|-------|-----------|
  2183  | `NAME_UNKNOWN` | repository name not known to registry | This is returned if the name used during an operation is unknown to the registry. |
  2184  
  2185  
  2186  
  2187  ###### On Failure: Access Denied
  2188  
  2189  ```
  2190  403 Forbidden
  2191  Content-Length: <length>
  2192  Content-Type: application/json; charset=utf-8
  2193  
  2194  {
  2195  	"errors:" [
  2196  	    {
  2197              "code": <error code>,
  2198              "message": "<error message>",
  2199              "detail": ...
  2200          },
  2201          ...
  2202      ]
  2203  }
  2204  ```
  2205  
  2206  The client does not have required access to the repository.
  2207  
  2208  The following headers will be returned on the response:
  2209  
  2210  |Name|Description|
  2211  |----|-----------|
  2212  |`Content-Length`|Length of the JSON response body.|
  2213  
  2214  
  2215  
  2216  The error codes that may be included in the response body are enumerated below:
  2217  
  2218  |Code|Message|Description|
  2219  |----|-------|-----------|
  2220  | `DENIED` | requested access to the resource is denied | The access controller denied access for the operation on a resource. |
  2221  
  2222  
  2223  
  2224  ###### On Failure: Unknown Manifest
  2225  
  2226  ```
  2227  404 Not Found
  2228  Content-Type: application/json; charset=utf-8
  2229  
  2230  {
  2231  	"errors:" [
  2232  	    {
  2233              "code": <error code>,
  2234              "message": "<error message>",
  2235              "detail": ...
  2236          },
  2237          ...
  2238      ]
  2239  }
  2240  ```
  2241  
  2242  The specified `name` or `reference` are unknown to the registry and the delete was unable to proceed. Clients can assume the manifest was already deleted if this response is returned.
  2243  
  2244  
  2245  
  2246  The error codes that may be included in the response body are enumerated below:
  2247  
  2248  |Code|Message|Description|
  2249  |----|-------|-----------|
  2250  | `NAME_UNKNOWN` | repository name not known to registry | This is returned if the name used during an operation is unknown to the registry. |
  2251  | `MANIFEST_UNKNOWN` | manifest unknown | This error is returned when the manifest, identified by name and tag is unknown to the repository. |
  2252  
  2253  
  2254  
  2255  ###### On Failure: Not allowed
  2256  
  2257  ```
  2258  405 Method Not Allowed
  2259  ```
  2260  
  2261  Manifest delete is not allowed because the registry is configured as a pull-through cache or `delete` has been disabled.
  2262  
  2263  
  2264  
  2265  The error codes that may be included in the response body are enumerated below:
  2266  
  2267  |Code|Message|Description|
  2268  |----|-------|-----------|
  2269  | `UNSUPPORTED` | The operation is unsupported. | The operation was unsupported due to a missing implementation or invalid set of parameters. |
  2270  
  2271  
  2272  
  2273  
  2274  
  2275  ### Blob
  2276  
  2277  Operations on blobs identified by `name` and `digest`. Used to fetch or delete layers by digest.
  2278  
  2279  
  2280  
  2281  #### GET Blob
  2282  
  2283  Retrieve the blob from the registry identified by `digest`. A `HEAD` request can also be issued to this endpoint to obtain resource information without receiving all data.
  2284  
  2285  
  2286  ##### Fetch Blob
  2287  
  2288  ```
  2289  GET /v2/<name>/blobs/<digest>
  2290  Host: <registry host>
  2291  Authorization: <scheme> <token>
  2292  ```
  2293  
  2294  
  2295  
  2296  
  2297  The following parameters should be specified on the request:
  2298  
  2299  |Name|Kind|Description|
  2300  |----|----|-----------|
  2301  |`Host`|header|Standard HTTP Host Header. Should be set to the registry host.|
  2302  |`Authorization`|header|An RFC7235 compliant authorization header.|
  2303  |`name`|path|Name of the target repository.|
  2304  |`digest`|path|Digest of desired blob.|
  2305  
  2306  
  2307  
  2308  
  2309  ###### On Success: OK
  2310  
  2311  ```
  2312  200 OK
  2313  Content-Length: <length>
  2314  Docker-Content-Digest: <digest>
  2315  Content-Type: application/octet-stream
  2316  
  2317  <blob binary data>
  2318  ```
  2319  
  2320  The blob identified by `digest` is available. The blob content will be present in the body of the request.
  2321  
  2322  The following headers will be returned with the response:
  2323  
  2324  |Name|Description|
  2325  |----|-----------|
  2326  |`Content-Length`|The length of the requested blob content.|
  2327  |`Docker-Content-Digest`|Digest of the targeted content for the request.|
  2328  
  2329  ###### On Success: Temporary Redirect
  2330  
  2331  ```
  2332  307 Temporary Redirect
  2333  Location: <blob location>
  2334  Docker-Content-Digest: <digest>
  2335  ```
  2336  
  2337  The blob identified by `digest` is available at the provided location.
  2338  
  2339  The following headers will be returned with the response:
  2340  
  2341  |Name|Description|
  2342  |----|-----------|
  2343  |`Location`|The location where the layer should be accessible.|
  2344  |`Docker-Content-Digest`|Digest of the targeted content for the request.|
  2345  
  2346  
  2347  
  2348  
  2349  ###### On Failure: Bad Request
  2350  
  2351  ```
  2352  400 Bad Request
  2353  Content-Type: application/json; charset=utf-8
  2354  
  2355  {
  2356  	"errors:" [
  2357  	    {
  2358              "code": <error code>,
  2359              "message": "<error message>",
  2360              "detail": ...
  2361          },
  2362          ...
  2363      ]
  2364  }
  2365  ```
  2366  
  2367  There was a problem with the request that needs to be addressed by the client, such as an invalid `name` or `tag`.
  2368  
  2369  
  2370  
  2371  The error codes that may be included in the response body are enumerated below:
  2372  
  2373  |Code|Message|Description|
  2374  |----|-------|-----------|
  2375  | `NAME_INVALID` | invalid repository name | Invalid repository name encountered either during manifest validation or any API operation. |
  2376  | `DIGEST_INVALID` | provided digest did not match uploaded content | When a blob is uploaded, the registry will check that the content matches the digest provided by the client. The error may include a detail structure with the key "digest", including the invalid digest string. This error may also be returned when a manifest includes an invalid layer digest. |
  2377  
  2378  
  2379  
  2380  ###### On Failure: Not Found
  2381  
  2382  ```
  2383  404 Not Found
  2384  Content-Type: application/json; charset=utf-8
  2385  
  2386  {
  2387  	"errors:" [
  2388  	    {
  2389              "code": <error code>,
  2390              "message": "<error message>",
  2391              "detail": ...
  2392          },
  2393          ...
  2394      ]
  2395  }
  2396  ```
  2397  
  2398  The blob, identified by `name` and `digest`, is unknown to the registry.
  2399  
  2400  
  2401  
  2402  The error codes that may be included in the response body are enumerated below:
  2403  
  2404  |Code|Message|Description|
  2405  |----|-------|-----------|
  2406  | `NAME_UNKNOWN` | repository name not known to registry | This is returned if the name used during an operation is unknown to the registry. |
  2407  | `BLOB_UNKNOWN` | blob unknown to registry | This error may be returned when a blob is unknown to the registry in a specified repository. This can be returned with a standard get or if a manifest references an unknown layer during upload. |
  2408  
  2409  
  2410  
  2411  ###### On Failure: Authentication Required
  2412  
  2413  ```
  2414  401 Unauthorized
  2415  WWW-Authenticate: <scheme> realm="<realm>", ..."
  2416  Content-Length: <length>
  2417  Content-Type: application/json; charset=utf-8
  2418  
  2419  {
  2420  	"errors:" [
  2421  	    {
  2422              "code": <error code>,
  2423              "message": "<error message>",
  2424              "detail": ...
  2425          },
  2426          ...
  2427      ]
  2428  }
  2429  ```
  2430  
  2431  The client is not authenticated.
  2432  
  2433  The following headers will be returned on the response:
  2434  
  2435  |Name|Description|
  2436  |----|-----------|
  2437  |`WWW-Authenticate`|An RFC7235 compliant authentication challenge header.|
  2438  |`Content-Length`|Length of the JSON response body.|
  2439  
  2440  
  2441  
  2442  The error codes that may be included in the response body are enumerated below:
  2443  
  2444  |Code|Message|Description|
  2445  |----|-------|-----------|
  2446  | `UNAUTHORIZED` | authentication required | The access controller was unable to authenticate the client. Often this will be accompanied by a Www-Authenticate HTTP response header indicating how to authenticate. |
  2447  
  2448  
  2449  
  2450  ###### On Failure: No Such Repository Error
  2451  
  2452  ```
  2453  404 Not Found
  2454  Content-Length: <length>
  2455  Content-Type: application/json; charset=utf-8
  2456  
  2457  {
  2458  	"errors:" [
  2459  	    {
  2460              "code": <error code>,
  2461              "message": "<error message>",
  2462              "detail": ...
  2463          },
  2464          ...
  2465      ]
  2466  }
  2467  ```
  2468  
  2469  The repository is not known to the registry.
  2470  
  2471  The following headers will be returned on the response:
  2472  
  2473  |Name|Description|
  2474  |----|-----------|
  2475  |`Content-Length`|Length of the JSON response body.|
  2476  
  2477  
  2478  
  2479  The error codes that may be included in the response body are enumerated below:
  2480  
  2481  |Code|Message|Description|
  2482  |----|-------|-----------|
  2483  | `NAME_UNKNOWN` | repository name not known to registry | This is returned if the name used during an operation is unknown to the registry. |
  2484  
  2485  
  2486  
  2487  ###### On Failure: Access Denied
  2488  
  2489  ```
  2490  403 Forbidden
  2491  Content-Length: <length>
  2492  Content-Type: application/json; charset=utf-8
  2493  
  2494  {
  2495  	"errors:" [
  2496  	    {
  2497              "code": <error code>,
  2498              "message": "<error message>",
  2499              "detail": ...
  2500          },
  2501          ...
  2502      ]
  2503  }
  2504  ```
  2505  
  2506  The client does not have required access to the repository.
  2507  
  2508  The following headers will be returned on the response:
  2509  
  2510  |Name|Description|
  2511  |----|-----------|
  2512  |`Content-Length`|Length of the JSON response body.|
  2513  
  2514  
  2515  
  2516  The error codes that may be included in the response body are enumerated below:
  2517  
  2518  |Code|Message|Description|
  2519  |----|-------|-----------|
  2520  | `DENIED` | requested access to the resource is denied | The access controller denied access for the operation on a resource. |
  2521  
  2522  
  2523  
  2524  ##### Fetch Blob Part
  2525  
  2526  ```
  2527  GET /v2/<name>/blobs/<digest>
  2528  Host: <registry host>
  2529  Authorization: <scheme> <token>
  2530  Range: bytes=<start>-<end>
  2531  ```
  2532  
  2533  This endpoint may also support RFC7233 compliant range requests. Support can be detected by issuing a HEAD request. If the header `Accept-Range: bytes` is returned, range requests can be used to fetch partial content.
  2534  
  2535  
  2536  The following parameters should be specified on the request:
  2537  
  2538  |Name|Kind|Description|
  2539  |----|----|-----------|
  2540  |`Host`|header|Standard HTTP Host Header. Should be set to the registry host.|
  2541  |`Authorization`|header|An RFC7235 compliant authorization header.|
  2542  |`Range`|header|HTTP Range header specifying blob chunk.|
  2543  |`name`|path|Name of the target repository.|
  2544  |`digest`|path|Digest of desired blob.|
  2545  
  2546  
  2547  
  2548  
  2549  ###### On Success: Partial Content
  2550  
  2551  ```
  2552  206 Partial Content
  2553  Content-Length: <length>
  2554  Content-Range: bytes <start>-<end>/<size>
  2555  Content-Type: application/octet-stream
  2556  
  2557  <blob binary data>
  2558  ```
  2559  
  2560  The blob identified by `digest` is available. The specified chunk of blob content will be present in the body of the request.
  2561  
  2562  The following headers will be returned with the response:
  2563  
  2564  |Name|Description|
  2565  |----|-----------|
  2566  |`Content-Length`|The length of the requested blob chunk.|
  2567  |`Content-Range`|Content range of blob chunk.|
  2568  
  2569  
  2570  
  2571  
  2572  ###### On Failure: Bad Request
  2573  
  2574  ```
  2575  400 Bad Request
  2576  Content-Type: application/json; charset=utf-8
  2577  
  2578  {
  2579  	"errors:" [
  2580  	    {
  2581              "code": <error code>,
  2582              "message": "<error message>",
  2583              "detail": ...
  2584          },
  2585          ...
  2586      ]
  2587  }
  2588  ```
  2589  
  2590  There was a problem with the request that needs to be addressed by the client, such as an invalid `name` or `tag`.
  2591  
  2592  
  2593  
  2594  The error codes that may be included in the response body are enumerated below:
  2595  
  2596  |Code|Message|Description|
  2597  |----|-------|-----------|
  2598  | `NAME_INVALID` | invalid repository name | Invalid repository name encountered either during manifest validation or any API operation. |
  2599  | `DIGEST_INVALID` | provided digest did not match uploaded content | When a blob is uploaded, the registry will check that the content matches the digest provided by the client. The error may include a detail structure with the key "digest", including the invalid digest string. This error may also be returned when a manifest includes an invalid layer digest. |
  2600  
  2601  
  2602  
  2603  ###### On Failure: Not Found
  2604  
  2605  ```
  2606  404 Not Found
  2607  Content-Type: application/json; charset=utf-8
  2608  
  2609  {
  2610  	"errors:" [
  2611  	    {
  2612              "code": <error code>,
  2613              "message": "<error message>",
  2614              "detail": ...
  2615          },
  2616          ...
  2617      ]
  2618  }
  2619  ```
  2620  
  2621  
  2622  
  2623  
  2624  
  2625  The error codes that may be included in the response body are enumerated below:
  2626  
  2627  |Code|Message|Description|
  2628  |----|-------|-----------|
  2629  | `NAME_UNKNOWN` | repository name not known to registry | This is returned if the name used during an operation is unknown to the registry. |
  2630  | `BLOB_UNKNOWN` | blob unknown to registry | This error may be returned when a blob is unknown to the registry in a specified repository. This can be returned with a standard get or if a manifest references an unknown layer during upload. |
  2631  
  2632  
  2633  
  2634  ###### On Failure: Requested Range Not Satisfiable
  2635  
  2636  ```
  2637  416 Requested Range Not Satisfiable
  2638  ```
  2639  
  2640  The range specification cannot be satisfied for the requested content. This can happen when the range is not formatted correctly or if the range is outside of the valid size of the content.
  2641  
  2642  
  2643  
  2644  ###### On Failure: Authentication Required
  2645  
  2646  ```
  2647  401 Unauthorized
  2648  WWW-Authenticate: <scheme> realm="<realm>", ..."
  2649  Content-Length: <length>
  2650  Content-Type: application/json; charset=utf-8
  2651  
  2652  {
  2653  	"errors:" [
  2654  	    {
  2655              "code": <error code>,
  2656              "message": "<error message>",
  2657              "detail": ...
  2658          },
  2659          ...
  2660      ]
  2661  }
  2662  ```
  2663  
  2664  The client is not authenticated.
  2665  
  2666  The following headers will be returned on the response:
  2667  
  2668  |Name|Description|
  2669  |----|-----------|
  2670  |`WWW-Authenticate`|An RFC7235 compliant authentication challenge header.|
  2671  |`Content-Length`|Length of the JSON response body.|
  2672  
  2673  
  2674  
  2675  The error codes that may be included in the response body are enumerated below:
  2676  
  2677  |Code|Message|Description|
  2678  |----|-------|-----------|
  2679  | `UNAUTHORIZED` | authentication required | The access controller was unable to authenticate the client. Often this will be accompanied by a Www-Authenticate HTTP response header indicating how to authenticate. |
  2680  
  2681  
  2682  
  2683  ###### On Failure: No Such Repository Error
  2684  
  2685  ```
  2686  404 Not Found
  2687  Content-Length: <length>
  2688  Content-Type: application/json; charset=utf-8
  2689  
  2690  {
  2691  	"errors:" [
  2692  	    {
  2693              "code": <error code>,
  2694              "message": "<error message>",
  2695              "detail": ...
  2696          },
  2697          ...
  2698      ]
  2699  }
  2700  ```
  2701  
  2702  The repository is not known to the registry.
  2703  
  2704  The following headers will be returned on the response:
  2705  
  2706  |Name|Description|
  2707  |----|-----------|
  2708  |`Content-Length`|Length of the JSON response body.|
  2709  
  2710  
  2711  
  2712  The error codes that may be included in the response body are enumerated below:
  2713  
  2714  |Code|Message|Description|
  2715  |----|-------|-----------|
  2716  | `NAME_UNKNOWN` | repository name not known to registry | This is returned if the name used during an operation is unknown to the registry. |
  2717  
  2718  
  2719  
  2720  ###### On Failure: Access Denied
  2721  
  2722  ```
  2723  403 Forbidden
  2724  Content-Length: <length>
  2725  Content-Type: application/json; charset=utf-8
  2726  
  2727  {
  2728  	"errors:" [
  2729  	    {
  2730              "code": <error code>,
  2731              "message": "<error message>",
  2732              "detail": ...
  2733          },
  2734          ...
  2735      ]
  2736  }
  2737  ```
  2738  
  2739  The client does not have required access to the repository.
  2740  
  2741  The following headers will be returned on the response:
  2742  
  2743  |Name|Description|
  2744  |----|-----------|
  2745  |`Content-Length`|Length of the JSON response body.|
  2746  
  2747  
  2748  
  2749  The error codes that may be included in the response body are enumerated below:
  2750  
  2751  |Code|Message|Description|
  2752  |----|-------|-----------|
  2753  | `DENIED` | requested access to the resource is denied | The access controller denied access for the operation on a resource. |
  2754  
  2755  
  2756  
  2757  
  2758  #### DELETE Blob
  2759  
  2760  Delete the blob identified by `name` and `digest`
  2761  
  2762  
  2763  
  2764  ```
  2765  DELETE /v2/<name>/blobs/<digest>
  2766  Host: <registry host>
  2767  Authorization: <scheme> <token>
  2768  ```
  2769  
  2770  
  2771  
  2772  
  2773  The following parameters should be specified on the request:
  2774  
  2775  |Name|Kind|Description|
  2776  |----|----|-----------|
  2777  |`Host`|header|Standard HTTP Host Header. Should be set to the registry host.|
  2778  |`Authorization`|header|An RFC7235 compliant authorization header.|
  2779  |`name`|path|Name of the target repository.|
  2780  |`digest`|path|Digest of desired blob.|
  2781  
  2782  
  2783  
  2784  
  2785  ###### On Success: Accepted
  2786  
  2787  ```
  2788  202 Accepted
  2789  Content-Length: 0
  2790  Docker-Content-Digest: <digest>
  2791  ```
  2792  
  2793  
  2794  
  2795  The following headers will be returned with the response:
  2796  
  2797  |Name|Description|
  2798  |----|-----------|
  2799  |`Content-Length`|0|
  2800  |`Docker-Content-Digest`|Digest of the targeted content for the request.|
  2801  
  2802  
  2803  
  2804  
  2805  ###### On Failure: Invalid Name or Digest
  2806  
  2807  ```
  2808  400 Bad Request
  2809  ```
  2810  
  2811  
  2812  
  2813  
  2814  
  2815  The error codes that may be included in the response body are enumerated below:
  2816  
  2817  |Code|Message|Description|
  2818  |----|-------|-----------|
  2819  | `DIGEST_INVALID` | provided digest did not match uploaded content | When a blob is uploaded, the registry will check that the content matches the digest provided by the client. The error may include a detail structure with the key "digest", including the invalid digest string. This error may also be returned when a manifest includes an invalid layer digest. |
  2820  | `NAME_INVALID` | invalid repository name | Invalid repository name encountered either during manifest validation or any API operation. |
  2821  
  2822  
  2823  
  2824  ###### On Failure: Not Found
  2825  
  2826  ```
  2827  404 Not Found
  2828  Content-Type: application/json; charset=utf-8
  2829  
  2830  {
  2831  	"errors:" [
  2832  	    {
  2833              "code": <error code>,
  2834              "message": "<error message>",
  2835              "detail": ...
  2836          },
  2837          ...
  2838      ]
  2839  }
  2840  ```
  2841  
  2842  The blob, identified by `name` and `digest`, is unknown to the registry.
  2843  
  2844  
  2845  
  2846  The error codes that may be included in the response body are enumerated below:
  2847  
  2848  |Code|Message|Description|
  2849  |----|-------|-----------|
  2850  | `NAME_UNKNOWN` | repository name not known to registry | This is returned if the name used during an operation is unknown to the registry. |
  2851  | `BLOB_UNKNOWN` | blob unknown to registry | This error may be returned when a blob is unknown to the registry in a specified repository. This can be returned with a standard get or if a manifest references an unknown layer during upload. |
  2852  
  2853  
  2854  
  2855  ###### On Failure: Method Not Allowed
  2856  
  2857  ```
  2858  405 Method Not Allowed
  2859  Content-Type: application/json; charset=utf-8
  2860  
  2861  {
  2862  	"errors:" [
  2863  	    {
  2864              "code": <error code>,
  2865              "message": "<error message>",
  2866              "detail": ...
  2867          },
  2868          ...
  2869      ]
  2870  }
  2871  ```
  2872  
  2873  Blob delete is not allowed because the registry is configured as a pull-through cache or `delete` has been disabled
  2874  
  2875  
  2876  
  2877  The error codes that may be included in the response body are enumerated below:
  2878  
  2879  |Code|Message|Description|
  2880  |----|-------|-----------|
  2881  | `UNSUPPORTED` | The operation is unsupported. | The operation was unsupported due to a missing implementation or invalid set of parameters. |
  2882  
  2883  
  2884  
  2885  ###### On Failure: Authentication Required
  2886  
  2887  ```
  2888  401 Unauthorized
  2889  WWW-Authenticate: <scheme> realm="<realm>", ..."
  2890  Content-Length: <length>
  2891  Content-Type: application/json; charset=utf-8
  2892  
  2893  {
  2894  	"errors:" [
  2895  	    {
  2896              "code": <error code>,
  2897              "message": "<error message>",
  2898              "detail": ...
  2899          },
  2900          ...
  2901      ]
  2902  }
  2903  ```
  2904  
  2905  The client is not authenticated.
  2906  
  2907  The following headers will be returned on the response:
  2908  
  2909  |Name|Description|
  2910  |----|-----------|
  2911  |`WWW-Authenticate`|An RFC7235 compliant authentication challenge header.|
  2912  |`Content-Length`|Length of the JSON response body.|
  2913  
  2914  
  2915  
  2916  The error codes that may be included in the response body are enumerated below:
  2917  
  2918  |Code|Message|Description|
  2919  |----|-------|-----------|
  2920  | `UNAUTHORIZED` | authentication required | The access controller was unable to authenticate the client. Often this will be accompanied by a Www-Authenticate HTTP response header indicating how to authenticate. |
  2921  
  2922  
  2923  
  2924  ###### On Failure: No Such Repository Error
  2925  
  2926  ```
  2927  404 Not Found
  2928  Content-Length: <length>
  2929  Content-Type: application/json; charset=utf-8
  2930  
  2931  {
  2932  	"errors:" [
  2933  	    {
  2934              "code": <error code>,
  2935              "message": "<error message>",
  2936              "detail": ...
  2937          },
  2938          ...
  2939      ]
  2940  }
  2941  ```
  2942  
  2943  The repository is not known to the registry.
  2944  
  2945  The following headers will be returned on the response:
  2946  
  2947  |Name|Description|
  2948  |----|-----------|
  2949  |`Content-Length`|Length of the JSON response body.|
  2950  
  2951  
  2952  
  2953  The error codes that may be included in the response body are enumerated below:
  2954  
  2955  |Code|Message|Description|
  2956  |----|-------|-----------|
  2957  | `NAME_UNKNOWN` | repository name not known to registry | This is returned if the name used during an operation is unknown to the registry. |
  2958  
  2959  
  2960  
  2961  ###### On Failure: Access Denied
  2962  
  2963  ```
  2964  403 Forbidden
  2965  Content-Length: <length>
  2966  Content-Type: application/json; charset=utf-8
  2967  
  2968  {
  2969  	"errors:" [
  2970  	    {
  2971              "code": <error code>,
  2972              "message": "<error message>",
  2973              "detail": ...
  2974          },
  2975          ...
  2976      ]
  2977  }
  2978  ```
  2979  
  2980  The client does not have required access to the repository.
  2981  
  2982  The following headers will be returned on the response:
  2983  
  2984  |Name|Description|
  2985  |----|-----------|
  2986  |`Content-Length`|Length of the JSON response body.|
  2987  
  2988  
  2989  
  2990  The error codes that may be included in the response body are enumerated below:
  2991  
  2992  |Code|Message|Description|
  2993  |----|-------|-----------|
  2994  | `DENIED` | requested access to the resource is denied | The access controller denied access for the operation on a resource. |
  2995  
  2996  
  2997  
  2998  
  2999  
  3000  ### Initiate Blob Upload
  3001  
  3002  Initiate a blob upload. This endpoint can be used to create resumable uploads or monolithic uploads.
  3003  
  3004  
  3005  
  3006  #### POST Initiate Blob Upload
  3007  
  3008  Initiate a resumable blob upload. If successful, an upload location will be provided to complete the upload. Optionally, if the `digest` parameter is present, the request body will be used to complete the upload in a single request.
  3009  
  3010  
  3011  ##### Initiate Monolithic Blob Upload
  3012  
  3013  ```
  3014  POST /v2/<name>/blobs/uploads/?digest=<digest>
  3015  Host: <registry host>
  3016  Authorization: <scheme> <token>
  3017  Content-Length: <length of blob>
  3018  Content-Type: application/octect-stream
  3019  
  3020  <binary data>
  3021  ```
  3022  
  3023  Upload a blob identified by the `digest` parameter in single request. This upload will not be resumable unless a recoverable error is returned.
  3024  
  3025  
  3026  The following parameters should be specified on the request:
  3027  
  3028  |Name|Kind|Description|
  3029  |----|----|-----------|
  3030  |`Host`|header|Standard HTTP Host Header. Should be set to the registry host.|
  3031  |`Authorization`|header|An RFC7235 compliant authorization header.|
  3032  |`Content-Length`|header||
  3033  |`name`|path|Name of the target repository.|
  3034  |`digest`|query|Digest of uploaded blob. If present, the upload will be completed, in a single request, with contents of the request body as the resulting blob.|
  3035  
  3036  
  3037  
  3038  
  3039  ###### On Success: Created
  3040  
  3041  ```
  3042  201 Created
  3043  Location: <blob location>
  3044  Content-Length: 0
  3045  Docker-Upload-UUID: <uuid>
  3046  ```
  3047  
  3048  The blob has been created in the registry and is available at the provided location.
  3049  
  3050  The following headers will be returned with the response:
  3051  
  3052  |Name|Description|
  3053  |----|-----------|
  3054  |`Location`||
  3055  |`Content-Length`|The `Content-Length` header must be zero and the body must be empty.|
  3056  |`Docker-Upload-UUID`|Identifies the docker upload uuid for the current request.|
  3057  
  3058  
  3059  
  3060  
  3061  ###### On Failure: Invalid Name or Digest
  3062  
  3063  ```
  3064  400 Bad Request
  3065  ```
  3066  
  3067  
  3068  
  3069  
  3070  
  3071  The error codes that may be included in the response body are enumerated below:
  3072  
  3073  |Code|Message|Description|
  3074  |----|-------|-----------|
  3075  | `DIGEST_INVALID` | provided digest did not match uploaded content | When a blob is uploaded, the registry will check that the content matches the digest provided by the client. The error may include a detail structure with the key "digest", including the invalid digest string. This error may also be returned when a manifest includes an invalid layer digest. |
  3076  | `NAME_INVALID` | invalid repository name | Invalid repository name encountered either during manifest validation or any API operation. |
  3077  
  3078  
  3079  
  3080  ###### On Failure: Not allowed
  3081  
  3082  ```
  3083  405 Method Not Allowed
  3084  ```
  3085  
  3086  Blob upload is not allowed because the registry is configured as a pull-through cache or for some other reason
  3087  
  3088  
  3089  
  3090  The error codes that may be included in the response body are enumerated below:
  3091  
  3092  |Code|Message|Description|
  3093  |----|-------|-----------|
  3094  | `UNSUPPORTED` | The operation is unsupported. | The operation was unsupported due to a missing implementation or invalid set of parameters. |
  3095  
  3096  
  3097  
  3098  ###### On Failure: Authentication Required
  3099  
  3100  ```
  3101  401 Unauthorized
  3102  WWW-Authenticate: <scheme> realm="<realm>", ..."
  3103  Content-Length: <length>
  3104  Content-Type: application/json; charset=utf-8
  3105  
  3106  {
  3107  	"errors:" [
  3108  	    {
  3109              "code": <error code>,
  3110              "message": "<error message>",
  3111              "detail": ...
  3112          },
  3113          ...
  3114      ]
  3115  }
  3116  ```
  3117  
  3118  The client is not authenticated.
  3119  
  3120  The following headers will be returned on the response:
  3121  
  3122  |Name|Description|
  3123  |----|-----------|
  3124  |`WWW-Authenticate`|An RFC7235 compliant authentication challenge header.|
  3125  |`Content-Length`|Length of the JSON response body.|
  3126  
  3127  
  3128  
  3129  The error codes that may be included in the response body are enumerated below:
  3130  
  3131  |Code|Message|Description|
  3132  |----|-------|-----------|
  3133  | `UNAUTHORIZED` | authentication required | The access controller was unable to authenticate the client. Often this will be accompanied by a Www-Authenticate HTTP response header indicating how to authenticate. |
  3134  
  3135  
  3136  
  3137  ###### On Failure: No Such Repository Error
  3138  
  3139  ```
  3140  404 Not Found
  3141  Content-Length: <length>
  3142  Content-Type: application/json; charset=utf-8
  3143  
  3144  {
  3145  	"errors:" [
  3146  	    {
  3147              "code": <error code>,
  3148              "message": "<error message>",
  3149              "detail": ...
  3150          },
  3151          ...
  3152      ]
  3153  }
  3154  ```
  3155  
  3156  The repository is not known to the registry.
  3157  
  3158  The following headers will be returned on the response:
  3159  
  3160  |Name|Description|
  3161  |----|-----------|
  3162  |`Content-Length`|Length of the JSON response body.|
  3163  
  3164  
  3165  
  3166  The error codes that may be included in the response body are enumerated below:
  3167  
  3168  |Code|Message|Description|
  3169  |----|-------|-----------|
  3170  | `NAME_UNKNOWN` | repository name not known to registry | This is returned if the name used during an operation is unknown to the registry. |
  3171  
  3172  
  3173  
  3174  ###### On Failure: Access Denied
  3175  
  3176  ```
  3177  403 Forbidden
  3178  Content-Length: <length>
  3179  Content-Type: application/json; charset=utf-8
  3180  
  3181  {
  3182  	"errors:" [
  3183  	    {
  3184              "code": <error code>,
  3185              "message": "<error message>",
  3186              "detail": ...
  3187          },
  3188          ...
  3189      ]
  3190  }
  3191  ```
  3192  
  3193  The client does not have required access to the repository.
  3194  
  3195  The following headers will be returned on the response:
  3196  
  3197  |Name|Description|
  3198  |----|-----------|
  3199  |`Content-Length`|Length of the JSON response body.|
  3200  
  3201  
  3202  
  3203  The error codes that may be included in the response body are enumerated below:
  3204  
  3205  |Code|Message|Description|
  3206  |----|-------|-----------|
  3207  | `DENIED` | requested access to the resource is denied | The access controller denied access for the operation on a resource. |
  3208  
  3209  
  3210  
  3211  ##### Initiate Resumable Blob Upload
  3212  
  3213  ```
  3214  POST /v2/<name>/blobs/uploads/
  3215  Host: <registry host>
  3216  Authorization: <scheme> <token>
  3217  Content-Length: 0
  3218  ```
  3219  
  3220  Initiate a resumable blob upload with an empty request body.
  3221  
  3222  
  3223  The following parameters should be specified on the request:
  3224  
  3225  |Name|Kind|Description|
  3226  |----|----|-----------|
  3227  |`Host`|header|Standard HTTP Host Header. Should be set to the registry host.|
  3228  |`Authorization`|header|An RFC7235 compliant authorization header.|
  3229  |`Content-Length`|header|The `Content-Length` header must be zero and the body must be empty.|
  3230  |`name`|path|Name of the target repository.|
  3231  
  3232  
  3233  
  3234  
  3235  ###### On Success: Accepted
  3236  
  3237  ```
  3238  202 Accepted
  3239  Content-Length: 0
  3240  Location: /v2/<name>/blobs/uploads/<uuid>
  3241  Range: 0-0
  3242  Docker-Upload-UUID: <uuid>
  3243  ```
  3244  
  3245  The upload has been created. The `Location` header must be used to complete the upload. The response should be identical to a `GET` request on the contents of the returned `Location` header.
  3246  
  3247  The following headers will be returned with the response:
  3248  
  3249  |Name|Description|
  3250  |----|-----------|
  3251  |`Content-Length`|The `Content-Length` header must be zero and the body must be empty.|
  3252  |`Location`|The location of the created upload. Clients should use the contents verbatim to complete the upload, adding parameters where required.|
  3253  |`Range`|Range header indicating the progress of the upload. When starting an upload, it will return an empty range, since no content has been received.|
  3254  |`Docker-Upload-UUID`|Identifies the docker upload uuid for the current request.|
  3255  
  3256  
  3257  
  3258  
  3259  ###### On Failure: Invalid Name or Digest
  3260  
  3261  ```
  3262  400 Bad Request
  3263  ```
  3264  
  3265  
  3266  
  3267  
  3268  
  3269  The error codes that may be included in the response body are enumerated below:
  3270  
  3271  |Code|Message|Description|
  3272  |----|-------|-----------|
  3273  | `DIGEST_INVALID` | provided digest did not match uploaded content | When a blob is uploaded, the registry will check that the content matches the digest provided by the client. The error may include a detail structure with the key "digest", including the invalid digest string. This error may also be returned when a manifest includes an invalid layer digest. |
  3274  | `NAME_INVALID` | invalid repository name | Invalid repository name encountered either during manifest validation or any API operation. |
  3275  
  3276  
  3277  
  3278  ###### On Failure: Authentication Required
  3279  
  3280  ```
  3281  401 Unauthorized
  3282  WWW-Authenticate: <scheme> realm="<realm>", ..."
  3283  Content-Length: <length>
  3284  Content-Type: application/json; charset=utf-8
  3285  
  3286  {
  3287  	"errors:" [
  3288  	    {
  3289              "code": <error code>,
  3290              "message": "<error message>",
  3291              "detail": ...
  3292          },
  3293          ...
  3294      ]
  3295  }
  3296  ```
  3297  
  3298  The client is not authenticated.
  3299  
  3300  The following headers will be returned on the response:
  3301  
  3302  |Name|Description|
  3303  |----|-----------|
  3304  |`WWW-Authenticate`|An RFC7235 compliant authentication challenge header.|
  3305  |`Content-Length`|Length of the JSON response body.|
  3306  
  3307  
  3308  
  3309  The error codes that may be included in the response body are enumerated below:
  3310  
  3311  |Code|Message|Description|
  3312  |----|-------|-----------|
  3313  | `UNAUTHORIZED` | authentication required | The access controller was unable to authenticate the client. Often this will be accompanied by a Www-Authenticate HTTP response header indicating how to authenticate. |
  3314  
  3315  
  3316  
  3317  ###### On Failure: No Such Repository Error
  3318  
  3319  ```
  3320  404 Not Found
  3321  Content-Length: <length>
  3322  Content-Type: application/json; charset=utf-8
  3323  
  3324  {
  3325  	"errors:" [
  3326  	    {
  3327              "code": <error code>,
  3328              "message": "<error message>",
  3329              "detail": ...
  3330          },
  3331          ...
  3332      ]
  3333  }
  3334  ```
  3335  
  3336  The repository is not known to the registry.
  3337  
  3338  The following headers will be returned on the response:
  3339  
  3340  |Name|Description|
  3341  |----|-----------|
  3342  |`Content-Length`|Length of the JSON response body.|
  3343  
  3344  
  3345  
  3346  The error codes that may be included in the response body are enumerated below:
  3347  
  3348  |Code|Message|Description|
  3349  |----|-------|-----------|
  3350  | `NAME_UNKNOWN` | repository name not known to registry | This is returned if the name used during an operation is unknown to the registry. |
  3351  
  3352  
  3353  
  3354  ###### On Failure: Access Denied
  3355  
  3356  ```
  3357  403 Forbidden
  3358  Content-Length: <length>
  3359  Content-Type: application/json; charset=utf-8
  3360  
  3361  {
  3362  	"errors:" [
  3363  	    {
  3364              "code": <error code>,
  3365              "message": "<error message>",
  3366              "detail": ...
  3367          },
  3368          ...
  3369      ]
  3370  }
  3371  ```
  3372  
  3373  The client does not have required access to the repository.
  3374  
  3375  The following headers will be returned on the response:
  3376  
  3377  |Name|Description|
  3378  |----|-----------|
  3379  |`Content-Length`|Length of the JSON response body.|
  3380  
  3381  
  3382  
  3383  The error codes that may be included in the response body are enumerated below:
  3384  
  3385  |Code|Message|Description|
  3386  |----|-------|-----------|
  3387  | `DENIED` | requested access to the resource is denied | The access controller denied access for the operation on a resource. |
  3388  
  3389  
  3390  
  3391  ##### Mount Blob
  3392  
  3393  ```
  3394  POST /v2/<name>/blobs/uploads/?mount=<digest>&from=<repository name>
  3395  Host: <registry host>
  3396  Authorization: <scheme> <token>
  3397  Content-Length: 0
  3398  ```
  3399  
  3400  Mount a blob identified by the `mount` parameter from another repository.
  3401  
  3402  
  3403  The following parameters should be specified on the request:
  3404  
  3405  |Name|Kind|Description|
  3406  |----|----|-----------|
  3407  |`Host`|header|Standard HTTP Host Header. Should be set to the registry host.|
  3408  |`Authorization`|header|An RFC7235 compliant authorization header.|
  3409  |`Content-Length`|header|The `Content-Length` header must be zero and the body must be empty.|
  3410  |`name`|path|Name of the target repository.|
  3411  |`mount`|query|Digest of blob to mount from the source repository.|
  3412  |`from`|query|Name of the source repository.|
  3413  
  3414  
  3415  
  3416  
  3417  ###### On Success: Created
  3418  
  3419  ```
  3420  201 Created
  3421  Location: <blob location>
  3422  Content-Length: 0
  3423  Docker-Upload-UUID: <uuid>
  3424  ```
  3425  
  3426  The blob has been mounted in the repository and is available at the provided location.
  3427  
  3428  The following headers will be returned with the response:
  3429  
  3430  |Name|Description|
  3431  |----|-----------|
  3432  |`Location`||
  3433  |`Content-Length`|The `Content-Length` header must be zero and the body must be empty.|
  3434  |`Docker-Upload-UUID`|Identifies the docker upload uuid for the current request.|
  3435  
  3436  
  3437  
  3438  
  3439  ###### On Failure: Invalid Name or Digest
  3440  
  3441  ```
  3442  400 Bad Request
  3443  ```
  3444  
  3445  
  3446  
  3447  
  3448  
  3449  The error codes that may be included in the response body are enumerated below:
  3450  
  3451  |Code|Message|Description|
  3452  |----|-------|-----------|
  3453  | `DIGEST_INVALID` | provided digest did not match uploaded content | When a blob is uploaded, the registry will check that the content matches the digest provided by the client. The error may include a detail structure with the key "digest", including the invalid digest string. This error may also be returned when a manifest includes an invalid layer digest. |
  3454  | `NAME_INVALID` | invalid repository name | Invalid repository name encountered either during manifest validation or any API operation. |
  3455  
  3456  
  3457  
  3458  ###### On Failure: Not allowed
  3459  
  3460  ```
  3461  405 Method Not Allowed
  3462  ```
  3463  
  3464  Blob mount is not allowed because the registry is configured as a pull-through cache or for some other reason
  3465  
  3466  
  3467  
  3468  The error codes that may be included in the response body are enumerated below:
  3469  
  3470  |Code|Message|Description|
  3471  |----|-------|-----------|
  3472  | `UNSUPPORTED` | The operation is unsupported. | The operation was unsupported due to a missing implementation or invalid set of parameters. |
  3473  
  3474  
  3475  
  3476  ###### On Failure: Authentication Required
  3477  
  3478  ```
  3479  401 Unauthorized
  3480  WWW-Authenticate: <scheme> realm="<realm>", ..."
  3481  Content-Length: <length>
  3482  Content-Type: application/json; charset=utf-8
  3483  
  3484  {
  3485  	"errors:" [
  3486  	    {
  3487              "code": <error code>,
  3488              "message": "<error message>",
  3489              "detail": ...
  3490          },
  3491          ...
  3492      ]
  3493  }
  3494  ```
  3495  
  3496  The client is not authenticated.
  3497  
  3498  The following headers will be returned on the response:
  3499  
  3500  |Name|Description|
  3501  |----|-----------|
  3502  |`WWW-Authenticate`|An RFC7235 compliant authentication challenge header.|
  3503  |`Content-Length`|Length of the JSON response body.|
  3504  
  3505  
  3506  
  3507  The error codes that may be included in the response body are enumerated below:
  3508  
  3509  |Code|Message|Description|
  3510  |----|-------|-----------|
  3511  | `UNAUTHORIZED` | authentication required | The access controller was unable to authenticate the client. Often this will be accompanied by a Www-Authenticate HTTP response header indicating how to authenticate. |
  3512  
  3513  
  3514  
  3515  ###### On Failure: No Such Repository Error
  3516  
  3517  ```
  3518  404 Not Found
  3519  Content-Length: <length>
  3520  Content-Type: application/json; charset=utf-8
  3521  
  3522  {
  3523  	"errors:" [
  3524  	    {
  3525              "code": <error code>,
  3526              "message": "<error message>",
  3527              "detail": ...
  3528          },
  3529          ...
  3530      ]
  3531  }
  3532  ```
  3533  
  3534  The repository is not known to the registry.
  3535  
  3536  The following headers will be returned on the response:
  3537  
  3538  |Name|Description|
  3539  |----|-----------|
  3540  |`Content-Length`|Length of the JSON response body.|
  3541  
  3542  
  3543  
  3544  The error codes that may be included in the response body are enumerated below:
  3545  
  3546  |Code|Message|Description|
  3547  |----|-------|-----------|
  3548  | `NAME_UNKNOWN` | repository name not known to registry | This is returned if the name used during an operation is unknown to the registry. |
  3549  
  3550  
  3551  
  3552  ###### On Failure: Access Denied
  3553  
  3554  ```
  3555  403 Forbidden
  3556  Content-Length: <length>
  3557  Content-Type: application/json; charset=utf-8
  3558  
  3559  {
  3560  	"errors:" [
  3561  	    {
  3562              "code": <error code>,
  3563              "message": "<error message>",
  3564              "detail": ...
  3565          },
  3566          ...
  3567      ]
  3568  }
  3569  ```
  3570  
  3571  The client does not have required access to the repository.
  3572  
  3573  The following headers will be returned on the response:
  3574  
  3575  |Name|Description|
  3576  |----|-----------|
  3577  |`Content-Length`|Length of the JSON response body.|
  3578  
  3579  
  3580  
  3581  The error codes that may be included in the response body are enumerated below:
  3582  
  3583  |Code|Message|Description|
  3584  |----|-------|-----------|
  3585  | `DENIED` | requested access to the resource is denied | The access controller denied access for the operation on a resource. |
  3586  
  3587  
  3588  
  3589  
  3590  
  3591  ### Blob Upload
  3592  
  3593  Interact with blob uploads. Clients should never assemble URLs for this endpoint and should only take it through the `Location` header on related API requests. The `Location` header and its parameters should be preserved by clients, using the latest value returned via upload related API calls.
  3594  
  3595  
  3596  
  3597  #### GET Blob Upload
  3598  
  3599  Retrieve status of upload identified by `uuid`. The primary purpose of this endpoint is to resolve the current status of a resumable upload.
  3600  
  3601  
  3602  
  3603  ```
  3604  GET /v2/<name>/blobs/uploads/<uuid>
  3605  Host: <registry host>
  3606  Authorization: <scheme> <token>
  3607  ```
  3608  
  3609  Retrieve the progress of the current upload, as reported by the `Range` header.
  3610  
  3611  
  3612  The following parameters should be specified on the request:
  3613  
  3614  |Name|Kind|Description|
  3615  |----|----|-----------|
  3616  |`Host`|header|Standard HTTP Host Header. Should be set to the registry host.|
  3617  |`Authorization`|header|An RFC7235 compliant authorization header.|
  3618  |`name`|path|Name of the target repository.|
  3619  |`uuid`|path|A uuid identifying the upload. This field can accept characters that match `[a-zA-Z0-9-_.=]+`.|
  3620  
  3621  
  3622  
  3623  
  3624  ###### On Success: Upload Progress
  3625  
  3626  ```
  3627  204 No Content
  3628  Range: 0-<offset>
  3629  Content-Length: 0
  3630  Docker-Upload-UUID: <uuid>
  3631  ```
  3632  
  3633  The upload is known and in progress. The last received offset is available in the `Range` header.
  3634  
  3635  The following headers will be returned with the response:
  3636  
  3637  |Name|Description|
  3638  |----|-----------|
  3639  |`Range`|Range indicating the current progress of the upload.|
  3640  |`Content-Length`|The `Content-Length` header must be zero and the body must be empty.|
  3641  |`Docker-Upload-UUID`|Identifies the docker upload uuid for the current request.|
  3642  
  3643  
  3644  
  3645  
  3646  ###### On Failure: Bad Request
  3647  
  3648  ```
  3649  400 Bad Request
  3650  Content-Type: application/json; charset=utf-8
  3651  
  3652  {
  3653  	"errors:" [
  3654  	    {
  3655              "code": <error code>,
  3656              "message": "<error message>",
  3657              "detail": ...
  3658          },
  3659          ...
  3660      ]
  3661  }
  3662  ```
  3663  
  3664  There was an error processing the upload and it must be restarted.
  3665  
  3666  
  3667  
  3668  The error codes that may be included in the response body are enumerated below:
  3669  
  3670  |Code|Message|Description|
  3671  |----|-------|-----------|
  3672  | `DIGEST_INVALID` | provided digest did not match uploaded content | When a blob is uploaded, the registry will check that the content matches the digest provided by the client. The error may include a detail structure with the key "digest", including the invalid digest string. This error may also be returned when a manifest includes an invalid layer digest. |
  3673  | `NAME_INVALID` | invalid repository name | Invalid repository name encountered either during manifest validation or any API operation. |
  3674  | `BLOB_UPLOAD_INVALID` | blob upload invalid | The blob upload encountered an error and can no longer proceed. |
  3675  
  3676  
  3677  
  3678  ###### On Failure: Not Found
  3679  
  3680  ```
  3681  404 Not Found
  3682  Content-Type: application/json; charset=utf-8
  3683  
  3684  {
  3685  	"errors:" [
  3686  	    {
  3687              "code": <error code>,
  3688              "message": "<error message>",
  3689              "detail": ...
  3690          },
  3691          ...
  3692      ]
  3693  }
  3694  ```
  3695  
  3696  The upload is unknown to the registry. The upload must be restarted.
  3697  
  3698  
  3699  
  3700  The error codes that may be included in the response body are enumerated below:
  3701  
  3702  |Code|Message|Description|
  3703  |----|-------|-----------|
  3704  | `BLOB_UPLOAD_UNKNOWN` | blob upload unknown to registry | If a blob upload has been cancelled or was never started, this error code may be returned. |
  3705  
  3706  
  3707  
  3708  ###### On Failure: Authentication Required
  3709  
  3710  ```
  3711  401 Unauthorized
  3712  WWW-Authenticate: <scheme> realm="<realm>", ..."
  3713  Content-Length: <length>
  3714  Content-Type: application/json; charset=utf-8
  3715  
  3716  {
  3717  	"errors:" [
  3718  	    {
  3719              "code": <error code>,
  3720              "message": "<error message>",
  3721              "detail": ...
  3722          },
  3723          ...
  3724      ]
  3725  }
  3726  ```
  3727  
  3728  The client is not authenticated.
  3729  
  3730  The following headers will be returned on the response:
  3731  
  3732  |Name|Description|
  3733  |----|-----------|
  3734  |`WWW-Authenticate`|An RFC7235 compliant authentication challenge header.|
  3735  |`Content-Length`|Length of the JSON response body.|
  3736  
  3737  
  3738  
  3739  The error codes that may be included in the response body are enumerated below:
  3740  
  3741  |Code|Message|Description|
  3742  |----|-------|-----------|
  3743  | `UNAUTHORIZED` | authentication required | The access controller was unable to authenticate the client. Often this will be accompanied by a Www-Authenticate HTTP response header indicating how to authenticate. |
  3744  
  3745  
  3746  
  3747  ###### On Failure: No Such Repository Error
  3748  
  3749  ```
  3750  404 Not Found
  3751  Content-Length: <length>
  3752  Content-Type: application/json; charset=utf-8
  3753  
  3754  {
  3755  	"errors:" [
  3756  	    {
  3757              "code": <error code>,
  3758              "message": "<error message>",
  3759              "detail": ...
  3760          },
  3761          ...
  3762      ]
  3763  }
  3764  ```
  3765  
  3766  The repository is not known to the registry.
  3767  
  3768  The following headers will be returned on the response:
  3769  
  3770  |Name|Description|
  3771  |----|-----------|
  3772  |`Content-Length`|Length of the JSON response body.|
  3773  
  3774  
  3775  
  3776  The error codes that may be included in the response body are enumerated below:
  3777  
  3778  |Code|Message|Description|
  3779  |----|-------|-----------|
  3780  | `NAME_UNKNOWN` | repository name not known to registry | This is returned if the name used during an operation is unknown to the registry. |
  3781  
  3782  
  3783  
  3784  ###### On Failure: Access Denied
  3785  
  3786  ```
  3787  403 Forbidden
  3788  Content-Length: <length>
  3789  Content-Type: application/json; charset=utf-8
  3790  
  3791  {
  3792  	"errors:" [
  3793  	    {
  3794              "code": <error code>,
  3795              "message": "<error message>",
  3796              "detail": ...
  3797          },
  3798          ...
  3799      ]
  3800  }
  3801  ```
  3802  
  3803  The client does not have required access to the repository.
  3804  
  3805  The following headers will be returned on the response:
  3806  
  3807  |Name|Description|
  3808  |----|-----------|
  3809  |`Content-Length`|Length of the JSON response body.|
  3810  
  3811  
  3812  
  3813  The error codes that may be included in the response body are enumerated below:
  3814  
  3815  |Code|Message|Description|
  3816  |----|-------|-----------|
  3817  | `DENIED` | requested access to the resource is denied | The access controller denied access for the operation on a resource. |
  3818  
  3819  
  3820  
  3821  
  3822  #### PATCH Blob Upload
  3823  
  3824  Upload a chunk of data for the specified upload.
  3825  
  3826  
  3827  ##### Stream upload
  3828  
  3829  ```
  3830  PATCH /v2/<name>/blobs/uploads/<uuid>
  3831  Host: <registry host>
  3832  Authorization: <scheme> <token>
  3833  Content-Type: application/octet-stream
  3834  
  3835  <binary data>
  3836  ```
  3837  
  3838  Upload a stream of data to upload without completing the upload.
  3839  
  3840  
  3841  The following parameters should be specified on the request:
  3842  
  3843  |Name|Kind|Description|
  3844  |----|----|-----------|
  3845  |`Host`|header|Standard HTTP Host Header. Should be set to the registry host.|
  3846  |`Authorization`|header|An RFC7235 compliant authorization header.|
  3847  |`name`|path|Name of the target repository.|
  3848  |`uuid`|path|A uuid identifying the upload. This field can accept characters that match `[a-zA-Z0-9-_.=]+`.|
  3849  
  3850  
  3851  
  3852  
  3853  ###### On Success: Data Accepted
  3854  
  3855  ```
  3856  204 No Content
  3857  Location: /v2/<name>/blobs/uploads/<uuid>
  3858  Range: 0-<offset>
  3859  Content-Length: 0
  3860  Docker-Upload-UUID: <uuid>
  3861  ```
  3862  
  3863  The stream of data has been accepted and the current progress is available in the range header. The updated upload location is available in the `Location` header.
  3864  
  3865  The following headers will be returned with the response:
  3866  
  3867  |Name|Description|
  3868  |----|-----------|
  3869  |`Location`|The location of the upload. Clients should assume this changes after each request. Clients should use the contents verbatim to complete the upload, adding parameters where required.|
  3870  |`Range`|Range indicating the current progress of the upload.|
  3871  |`Content-Length`|The `Content-Length` header must be zero and the body must be empty.|
  3872  |`Docker-Upload-UUID`|Identifies the docker upload uuid for the current request.|
  3873  
  3874  
  3875  
  3876  
  3877  ###### On Failure: Bad Request
  3878  
  3879  ```
  3880  400 Bad Request
  3881  Content-Type: application/json; charset=utf-8
  3882  
  3883  {
  3884  	"errors:" [
  3885  	    {
  3886              "code": <error code>,
  3887              "message": "<error message>",
  3888              "detail": ...
  3889          },
  3890          ...
  3891      ]
  3892  }
  3893  ```
  3894  
  3895  There was an error processing the upload and it must be restarted.
  3896  
  3897  
  3898  
  3899  The error codes that may be included in the response body are enumerated below:
  3900  
  3901  |Code|Message|Description|
  3902  |----|-------|-----------|
  3903  | `DIGEST_INVALID` | provided digest did not match uploaded content | When a blob is uploaded, the registry will check that the content matches the digest provided by the client. The error may include a detail structure with the key "digest", including the invalid digest string. This error may also be returned when a manifest includes an invalid layer digest. |
  3904  | `NAME_INVALID` | invalid repository name | Invalid repository name encountered either during manifest validation or any API operation. |
  3905  | `BLOB_UPLOAD_INVALID` | blob upload invalid | The blob upload encountered an error and can no longer proceed. |
  3906  
  3907  
  3908  
  3909  ###### On Failure: Not Found
  3910  
  3911  ```
  3912  404 Not Found
  3913  Content-Type: application/json; charset=utf-8
  3914  
  3915  {
  3916  	"errors:" [
  3917  	    {
  3918              "code": <error code>,
  3919              "message": "<error message>",
  3920              "detail": ...
  3921          },
  3922          ...
  3923      ]
  3924  }
  3925  ```
  3926  
  3927  The upload is unknown to the registry. The upload must be restarted.
  3928  
  3929  
  3930  
  3931  The error codes that may be included in the response body are enumerated below:
  3932  
  3933  |Code|Message|Description|
  3934  |----|-------|-----------|
  3935  | `BLOB_UPLOAD_UNKNOWN` | blob upload unknown to registry | If a blob upload has been cancelled or was never started, this error code may be returned. |
  3936  
  3937  
  3938  
  3939  ###### On Failure: Authentication Required
  3940  
  3941  ```
  3942  401 Unauthorized
  3943  WWW-Authenticate: <scheme> realm="<realm>", ..."
  3944  Content-Length: <length>
  3945  Content-Type: application/json; charset=utf-8
  3946  
  3947  {
  3948  	"errors:" [
  3949  	    {
  3950              "code": <error code>,
  3951              "message": "<error message>",
  3952              "detail": ...
  3953          },
  3954          ...
  3955      ]
  3956  }
  3957  ```
  3958  
  3959  The client is not authenticated.
  3960  
  3961  The following headers will be returned on the response:
  3962  
  3963  |Name|Description|
  3964  |----|-----------|
  3965  |`WWW-Authenticate`|An RFC7235 compliant authentication challenge header.|
  3966  |`Content-Length`|Length of the JSON response body.|
  3967  
  3968  
  3969  
  3970  The error codes that may be included in the response body are enumerated below:
  3971  
  3972  |Code|Message|Description|
  3973  |----|-------|-----------|
  3974  | `UNAUTHORIZED` | authentication required | The access controller was unable to authenticate the client. Often this will be accompanied by a Www-Authenticate HTTP response header indicating how to authenticate. |
  3975  
  3976  
  3977  
  3978  ###### On Failure: No Such Repository Error
  3979  
  3980  ```
  3981  404 Not Found
  3982  Content-Length: <length>
  3983  Content-Type: application/json; charset=utf-8
  3984  
  3985  {
  3986  	"errors:" [
  3987  	    {
  3988              "code": <error code>,
  3989              "message": "<error message>",
  3990              "detail": ...
  3991          },
  3992          ...
  3993      ]
  3994  }
  3995  ```
  3996  
  3997  The repository is not known to the registry.
  3998  
  3999  The following headers will be returned on the response:
  4000  
  4001  |Name|Description|
  4002  |----|-----------|
  4003  |`Content-Length`|Length of the JSON response body.|
  4004  
  4005  
  4006  
  4007  The error codes that may be included in the response body are enumerated below:
  4008  
  4009  |Code|Message|Description|
  4010  |----|-------|-----------|
  4011  | `NAME_UNKNOWN` | repository name not known to registry | This is returned if the name used during an operation is unknown to the registry. |
  4012  
  4013  
  4014  
  4015  ###### On Failure: Access Denied
  4016  
  4017  ```
  4018  403 Forbidden
  4019  Content-Length: <length>
  4020  Content-Type: application/json; charset=utf-8
  4021  
  4022  {
  4023  	"errors:" [
  4024  	    {
  4025              "code": <error code>,
  4026              "message": "<error message>",
  4027              "detail": ...
  4028          },
  4029          ...
  4030      ]
  4031  }
  4032  ```
  4033  
  4034  The client does not have required access to the repository.
  4035  
  4036  The following headers will be returned on the response:
  4037  
  4038  |Name|Description|
  4039  |----|-----------|
  4040  |`Content-Length`|Length of the JSON response body.|
  4041  
  4042  
  4043  
  4044  The error codes that may be included in the response body are enumerated below:
  4045  
  4046  |Code|Message|Description|
  4047  |----|-------|-----------|
  4048  | `DENIED` | requested access to the resource is denied | The access controller denied access for the operation on a resource. |
  4049  
  4050  
  4051  
  4052  ##### Chunked upload
  4053  
  4054  ```
  4055  PATCH /v2/<name>/blobs/uploads/<uuid>
  4056  Host: <registry host>
  4057  Authorization: <scheme> <token>
  4058  Content-Range: <start of range>-<end of range, inclusive>
  4059  Content-Length: <length of chunk>
  4060  Content-Type: application/octet-stream
  4061  
  4062  <binary chunk>
  4063  ```
  4064  
  4065  Upload a chunk of data to specified upload without completing the upload. The data will be uploaded to the specified Content Range.
  4066  
  4067  
  4068  The following parameters should be specified on the request:
  4069  
  4070  |Name|Kind|Description|
  4071  |----|----|-----------|
  4072  |`Host`|header|Standard HTTP Host Header. Should be set to the registry host.|
  4073  |`Authorization`|header|An RFC7235 compliant authorization header.|
  4074  |`Content-Range`|header|Range of bytes identifying the desired block of content represented by the body. Start must the end offset retrieved via status check plus one. Note that this is a non-standard use of the `Content-Range` header.|
  4075  |`Content-Length`|header|Length of the chunk being uploaded, corresponding the length of the request body.|
  4076  |`name`|path|Name of the target repository.|
  4077  |`uuid`|path|A uuid identifying the upload. This field can accept characters that match `[a-zA-Z0-9-_.=]+`.|
  4078  
  4079  
  4080  
  4081  
  4082  ###### On Success: Chunk Accepted
  4083  
  4084  ```
  4085  204 No Content
  4086  Location: /v2/<name>/blobs/uploads/<uuid>
  4087  Range: 0-<offset>
  4088  Content-Length: 0
  4089  Docker-Upload-UUID: <uuid>
  4090  ```
  4091  
  4092  The chunk of data has been accepted and the current progress is available in the range header. The updated upload location is available in the `Location` header.
  4093  
  4094  The following headers will be returned with the response:
  4095  
  4096  |Name|Description|
  4097  |----|-----------|
  4098  |`Location`|The location of the upload. Clients should assume this changes after each request. Clients should use the contents verbatim to complete the upload, adding parameters where required.|
  4099  |`Range`|Range indicating the current progress of the upload.|
  4100  |`Content-Length`|The `Content-Length` header must be zero and the body must be empty.|
  4101  |`Docker-Upload-UUID`|Identifies the docker upload uuid for the current request.|
  4102  
  4103  
  4104  
  4105  
  4106  ###### On Failure: Bad Request
  4107  
  4108  ```
  4109  400 Bad Request
  4110  Content-Type: application/json; charset=utf-8
  4111  
  4112  {
  4113  	"errors:" [
  4114  	    {
  4115              "code": <error code>,
  4116              "message": "<error message>",
  4117              "detail": ...
  4118          },
  4119          ...
  4120      ]
  4121  }
  4122  ```
  4123  
  4124  There was an error processing the upload and it must be restarted.
  4125  
  4126  
  4127  
  4128  The error codes that may be included in the response body are enumerated below:
  4129  
  4130  |Code|Message|Description|
  4131  |----|-------|-----------|
  4132  | `DIGEST_INVALID` | provided digest did not match uploaded content | When a blob is uploaded, the registry will check that the content matches the digest provided by the client. The error may include a detail structure with the key "digest", including the invalid digest string. This error may also be returned when a manifest includes an invalid layer digest. |
  4133  | `NAME_INVALID` | invalid repository name | Invalid repository name encountered either during manifest validation or any API operation. |
  4134  | `BLOB_UPLOAD_INVALID` | blob upload invalid | The blob upload encountered an error and can no longer proceed. |
  4135  
  4136  
  4137  
  4138  ###### On Failure: Not Found
  4139  
  4140  ```
  4141  404 Not Found
  4142  Content-Type: application/json; charset=utf-8
  4143  
  4144  {
  4145  	"errors:" [
  4146  	    {
  4147              "code": <error code>,
  4148              "message": "<error message>",
  4149              "detail": ...
  4150          },
  4151          ...
  4152      ]
  4153  }
  4154  ```
  4155  
  4156  The upload is unknown to the registry. The upload must be restarted.
  4157  
  4158  
  4159  
  4160  The error codes that may be included in the response body are enumerated below:
  4161  
  4162  |Code|Message|Description|
  4163  |----|-------|-----------|
  4164  | `BLOB_UPLOAD_UNKNOWN` | blob upload unknown to registry | If a blob upload has been cancelled or was never started, this error code may be returned. |
  4165  
  4166  
  4167  
  4168  ###### On Failure: Requested Range Not Satisfiable
  4169  
  4170  ```
  4171  416 Requested Range Not Satisfiable
  4172  ```
  4173  
  4174  The `Content-Range` specification cannot be accepted, either because it does not overlap with the current progress or it is invalid.
  4175  
  4176  
  4177  
  4178  ###### On Failure: Authentication Required
  4179  
  4180  ```
  4181  401 Unauthorized
  4182  WWW-Authenticate: <scheme> realm="<realm>", ..."
  4183  Content-Length: <length>
  4184  Content-Type: application/json; charset=utf-8
  4185  
  4186  {
  4187  	"errors:" [
  4188  	    {
  4189              "code": <error code>,
  4190              "message": "<error message>",
  4191              "detail": ...
  4192          },
  4193          ...
  4194      ]
  4195  }
  4196  ```
  4197  
  4198  The client is not authenticated.
  4199  
  4200  The following headers will be returned on the response:
  4201  
  4202  |Name|Description|
  4203  |----|-----------|
  4204  |`WWW-Authenticate`|An RFC7235 compliant authentication challenge header.|
  4205  |`Content-Length`|Length of the JSON response body.|
  4206  
  4207  
  4208  
  4209  The error codes that may be included in the response body are enumerated below:
  4210  
  4211  |Code|Message|Description|
  4212  |----|-------|-----------|
  4213  | `UNAUTHORIZED` | authentication required | The access controller was unable to authenticate the client. Often this will be accompanied by a Www-Authenticate HTTP response header indicating how to authenticate. |
  4214  
  4215  
  4216  
  4217  ###### On Failure: No Such Repository Error
  4218  
  4219  ```
  4220  404 Not Found
  4221  Content-Length: <length>
  4222  Content-Type: application/json; charset=utf-8
  4223  
  4224  {
  4225  	"errors:" [
  4226  	    {
  4227              "code": <error code>,
  4228              "message": "<error message>",
  4229              "detail": ...
  4230          },
  4231          ...
  4232      ]
  4233  }
  4234  ```
  4235  
  4236  The repository is not known to the registry.
  4237  
  4238  The following headers will be returned on the response:
  4239  
  4240  |Name|Description|
  4241  |----|-----------|
  4242  |`Content-Length`|Length of the JSON response body.|
  4243  
  4244  
  4245  
  4246  The error codes that may be included in the response body are enumerated below:
  4247  
  4248  |Code|Message|Description|
  4249  |----|-------|-----------|
  4250  | `NAME_UNKNOWN` | repository name not known to registry | This is returned if the name used during an operation is unknown to the registry. |
  4251  
  4252  
  4253  
  4254  ###### On Failure: Access Denied
  4255  
  4256  ```
  4257  403 Forbidden
  4258  Content-Length: <length>
  4259  Content-Type: application/json; charset=utf-8
  4260  
  4261  {
  4262  	"errors:" [
  4263  	    {
  4264              "code": <error code>,
  4265              "message": "<error message>",
  4266              "detail": ...
  4267          },
  4268          ...
  4269      ]
  4270  }
  4271  ```
  4272  
  4273  The client does not have required access to the repository.
  4274  
  4275  The following headers will be returned on the response:
  4276  
  4277  |Name|Description|
  4278  |----|-----------|
  4279  |`Content-Length`|Length of the JSON response body.|
  4280  
  4281  
  4282  
  4283  The error codes that may be included in the response body are enumerated below:
  4284  
  4285  |Code|Message|Description|
  4286  |----|-------|-----------|
  4287  | `DENIED` | requested access to the resource is denied | The access controller denied access for the operation on a resource. |
  4288  
  4289  
  4290  
  4291  
  4292  #### PUT Blob Upload
  4293  
  4294  Complete the upload specified by `uuid`, optionally appending the body as the final chunk.
  4295  
  4296  
  4297  
  4298  ```
  4299  PUT /v2/<name>/blobs/uploads/<uuid>?digest=<digest>
  4300  Host: <registry host>
  4301  Authorization: <scheme> <token>
  4302  Content-Length: <length of data>
  4303  Content-Type: application/octet-stream
  4304  
  4305  <binary data>
  4306  ```
  4307  
  4308  Complete the upload, providing all the data in the body, if necessary. A request without a body will just complete the upload with previously uploaded content.
  4309  
  4310  
  4311  The following parameters should be specified on the request:
  4312  
  4313  |Name|Kind|Description|
  4314  |----|----|-----------|
  4315  |`Host`|header|Standard HTTP Host Header. Should be set to the registry host.|
  4316  |`Authorization`|header|An RFC7235 compliant authorization header.|
  4317  |`Content-Length`|header|Length of the data being uploaded, corresponding to the length of the request body. May be zero if no data is provided.|
  4318  |`name`|path|Name of the target repository.|
  4319  |`uuid`|path|A uuid identifying the upload. This field can accept characters that match `[a-zA-Z0-9-_.=]+`.|
  4320  |`digest`|query|Digest of uploaded blob.|
  4321  
  4322  
  4323  
  4324  
  4325  ###### On Success: Upload Complete
  4326  
  4327  ```
  4328  204 No Content
  4329  Location: <blob location>
  4330  Content-Range: <start of range>-<end of range, inclusive>
  4331  Content-Length: 0
  4332  Docker-Content-Digest: <digest>
  4333  ```
  4334  
  4335  The upload has been completed and accepted by the registry. The canonical location will be available in the `Location` header.
  4336  
  4337  The following headers will be returned with the response:
  4338  
  4339  |Name|Description|
  4340  |----|-----------|
  4341  |`Location`|The canonical location of the blob for retrieval|
  4342  |`Content-Range`|Range of bytes identifying the desired block of content represented by the body. Start must match the end of offset retrieved via status check. Note that this is a non-standard use of the `Content-Range` header.|
  4343  |`Content-Length`|The `Content-Length` header must be zero and the body must be empty.|
  4344  |`Docker-Content-Digest`|Digest of the targeted content for the request.|
  4345  
  4346  
  4347  
  4348  
  4349  ###### On Failure: Bad Request
  4350  
  4351  ```
  4352  400 Bad Request
  4353  Content-Type: application/json; charset=utf-8
  4354  
  4355  {
  4356  	"errors:" [
  4357  	    {
  4358              "code": <error code>,
  4359              "message": "<error message>",
  4360              "detail": ...
  4361          },
  4362          ...
  4363      ]
  4364  }
  4365  ```
  4366  
  4367  There was an error processing the upload and it must be restarted.
  4368  
  4369  
  4370  
  4371  The error codes that may be included in the response body are enumerated below:
  4372  
  4373  |Code|Message|Description|
  4374  |----|-------|-----------|
  4375  | `DIGEST_INVALID` | provided digest did not match uploaded content | When a blob is uploaded, the registry will check that the content matches the digest provided by the client. The error may include a detail structure with the key "digest", including the invalid digest string. This error may also be returned when a manifest includes an invalid layer digest. |
  4376  | `NAME_INVALID` | invalid repository name | Invalid repository name encountered either during manifest validation or any API operation. |
  4377  | `BLOB_UPLOAD_INVALID` | blob upload invalid | The blob upload encountered an error and can no longer proceed. |
  4378  | `UNSUPPORTED` | The operation is unsupported. | The operation was unsupported due to a missing implementation or invalid set of parameters. |
  4379  
  4380  
  4381  
  4382  ###### On Failure: Not Found
  4383  
  4384  ```
  4385  404 Not Found
  4386  Content-Type: application/json; charset=utf-8
  4387  
  4388  {
  4389  	"errors:" [
  4390  	    {
  4391              "code": <error code>,
  4392              "message": "<error message>",
  4393              "detail": ...
  4394          },
  4395          ...
  4396      ]
  4397  }
  4398  ```
  4399  
  4400  The upload is unknown to the registry. The upload must be restarted.
  4401  
  4402  
  4403  
  4404  The error codes that may be included in the response body are enumerated below:
  4405  
  4406  |Code|Message|Description|
  4407  |----|-------|-----------|
  4408  | `BLOB_UPLOAD_UNKNOWN` | blob upload unknown to registry | If a blob upload has been cancelled or was never started, this error code may be returned. |
  4409  
  4410  
  4411  
  4412  ###### On Failure: Authentication Required
  4413  
  4414  ```
  4415  401 Unauthorized
  4416  WWW-Authenticate: <scheme> realm="<realm>", ..."
  4417  Content-Length: <length>
  4418  Content-Type: application/json; charset=utf-8
  4419  
  4420  {
  4421  	"errors:" [
  4422  	    {
  4423              "code": <error code>,
  4424              "message": "<error message>",
  4425              "detail": ...
  4426          },
  4427          ...
  4428      ]
  4429  }
  4430  ```
  4431  
  4432  The client is not authenticated.
  4433  
  4434  The following headers will be returned on the response:
  4435  
  4436  |Name|Description|
  4437  |----|-----------|
  4438  |`WWW-Authenticate`|An RFC7235 compliant authentication challenge header.|
  4439  |`Content-Length`|Length of the JSON response body.|
  4440  
  4441  
  4442  
  4443  The error codes that may be included in the response body are enumerated below:
  4444  
  4445  |Code|Message|Description|
  4446  |----|-------|-----------|
  4447  | `UNAUTHORIZED` | authentication required | The access controller was unable to authenticate the client. Often this will be accompanied by a Www-Authenticate HTTP response header indicating how to authenticate. |
  4448  
  4449  
  4450  
  4451  ###### On Failure: No Such Repository Error
  4452  
  4453  ```
  4454  404 Not Found
  4455  Content-Length: <length>
  4456  Content-Type: application/json; charset=utf-8
  4457  
  4458  {
  4459  	"errors:" [
  4460  	    {
  4461              "code": <error code>,
  4462              "message": "<error message>",
  4463              "detail": ...
  4464          },
  4465          ...
  4466      ]
  4467  }
  4468  ```
  4469  
  4470  The repository is not known to the registry.
  4471  
  4472  The following headers will be returned on the response:
  4473  
  4474  |Name|Description|
  4475  |----|-----------|
  4476  |`Content-Length`|Length of the JSON response body.|
  4477  
  4478  
  4479  
  4480  The error codes that may be included in the response body are enumerated below:
  4481  
  4482  |Code|Message|Description|
  4483  |----|-------|-----------|
  4484  | `NAME_UNKNOWN` | repository name not known to registry | This is returned if the name used during an operation is unknown to the registry. |
  4485  
  4486  
  4487  
  4488  ###### On Failure: Access Denied
  4489  
  4490  ```
  4491  403 Forbidden
  4492  Content-Length: <length>
  4493  Content-Type: application/json; charset=utf-8
  4494  
  4495  {
  4496  	"errors:" [
  4497  	    {
  4498              "code": <error code>,
  4499              "message": "<error message>",
  4500              "detail": ...
  4501          },
  4502          ...
  4503      ]
  4504  }
  4505  ```
  4506  
  4507  The client does not have required access to the repository.
  4508  
  4509  The following headers will be returned on the response:
  4510  
  4511  |Name|Description|
  4512  |----|-----------|
  4513  |`Content-Length`|Length of the JSON response body.|
  4514  
  4515  
  4516  
  4517  The error codes that may be included in the response body are enumerated below:
  4518  
  4519  |Code|Message|Description|
  4520  |----|-------|-----------|
  4521  | `DENIED` | requested access to the resource is denied | The access controller denied access for the operation on a resource. |
  4522  
  4523  
  4524  
  4525  
  4526  #### DELETE Blob Upload
  4527  
  4528  Cancel outstanding upload processes, releasing associated resources. If this is not called, the unfinished uploads will eventually timeout.
  4529  
  4530  
  4531  
  4532  ```
  4533  DELETE /v2/<name>/blobs/uploads/<uuid>
  4534  Host: <registry host>
  4535  Authorization: <scheme> <token>
  4536  Content-Length: 0
  4537  ```
  4538  
  4539  Cancel the upload specified by `uuid`.
  4540  
  4541  
  4542  The following parameters should be specified on the request:
  4543  
  4544  |Name|Kind|Description|
  4545  |----|----|-----------|
  4546  |`Host`|header|Standard HTTP Host Header. Should be set to the registry host.|
  4547  |`Authorization`|header|An RFC7235 compliant authorization header.|
  4548  |`Content-Length`|header|The `Content-Length` header must be zero and the body must be empty.|
  4549  |`name`|path|Name of the target repository.|
  4550  |`uuid`|path|A uuid identifying the upload. This field can accept characters that match `[a-zA-Z0-9-_.=]+`.|
  4551  
  4552  
  4553  
  4554  
  4555  ###### On Success: Upload Deleted
  4556  
  4557  ```
  4558  204 No Content
  4559  Content-Length: 0
  4560  ```
  4561  
  4562  The upload has been successfully deleted.
  4563  
  4564  The following headers will be returned with the response:
  4565  
  4566  |Name|Description|
  4567  |----|-----------|
  4568  |`Content-Length`|The `Content-Length` header must be zero and the body must be empty.|
  4569  
  4570  
  4571  
  4572  
  4573  ###### On Failure: Bad Request
  4574  
  4575  ```
  4576  400 Bad Request
  4577  Content-Type: application/json; charset=utf-8
  4578  
  4579  {
  4580  	"errors:" [
  4581  	    {
  4582              "code": <error code>,
  4583              "message": "<error message>",
  4584              "detail": ...
  4585          },
  4586          ...
  4587      ]
  4588  }
  4589  ```
  4590  
  4591  An error was encountered processing the delete. The client may ignore this error.
  4592  
  4593  
  4594  
  4595  The error codes that may be included in the response body are enumerated below:
  4596  
  4597  |Code|Message|Description|
  4598  |----|-------|-----------|
  4599  | `NAME_INVALID` | invalid repository name | Invalid repository name encountered either during manifest validation or any API operation. |
  4600  | `BLOB_UPLOAD_INVALID` | blob upload invalid | The blob upload encountered an error and can no longer proceed. |
  4601  
  4602  
  4603  
  4604  ###### On Failure: Not Found
  4605  
  4606  ```
  4607  404 Not Found
  4608  Content-Type: application/json; charset=utf-8
  4609  
  4610  {
  4611  	"errors:" [
  4612  	    {
  4613              "code": <error code>,
  4614              "message": "<error message>",
  4615              "detail": ...
  4616          },
  4617          ...
  4618      ]
  4619  }
  4620  ```
  4621  
  4622  The upload is unknown to the registry. The client may ignore this error and assume the upload has been deleted.
  4623  
  4624  
  4625  
  4626  The error codes that may be included in the response body are enumerated below:
  4627  
  4628  |Code|Message|Description|
  4629  |----|-------|-----------|
  4630  | `BLOB_UPLOAD_UNKNOWN` | blob upload unknown to registry | If a blob upload has been cancelled or was never started, this error code may be returned. |
  4631  
  4632  
  4633  
  4634  ###### On Failure: Authentication Required
  4635  
  4636  ```
  4637  401 Unauthorized
  4638  WWW-Authenticate: <scheme> realm="<realm>", ..."
  4639  Content-Length: <length>
  4640  Content-Type: application/json; charset=utf-8
  4641  
  4642  {
  4643  	"errors:" [
  4644  	    {
  4645              "code": <error code>,
  4646              "message": "<error message>",
  4647              "detail": ...
  4648          },
  4649          ...
  4650      ]
  4651  }
  4652  ```
  4653  
  4654  The client is not authenticated.
  4655  
  4656  The following headers will be returned on the response:
  4657  
  4658  |Name|Description|
  4659  |----|-----------|
  4660  |`WWW-Authenticate`|An RFC7235 compliant authentication challenge header.|
  4661  |`Content-Length`|Length of the JSON response body.|
  4662  
  4663  
  4664  
  4665  The error codes that may be included in the response body are enumerated below:
  4666  
  4667  |Code|Message|Description|
  4668  |----|-------|-----------|
  4669  | `UNAUTHORIZED` | authentication required | The access controller was unable to authenticate the client. Often this will be accompanied by a Www-Authenticate HTTP response header indicating how to authenticate. |
  4670  
  4671  
  4672  
  4673  ###### On Failure: No Such Repository Error
  4674  
  4675  ```
  4676  404 Not Found
  4677  Content-Length: <length>
  4678  Content-Type: application/json; charset=utf-8
  4679  
  4680  {
  4681  	"errors:" [
  4682  	    {
  4683              "code": <error code>,
  4684              "message": "<error message>",
  4685              "detail": ...
  4686          },
  4687          ...
  4688      ]
  4689  }
  4690  ```
  4691  
  4692  The repository is not known to the registry.
  4693  
  4694  The following headers will be returned on the response:
  4695  
  4696  |Name|Description|
  4697  |----|-----------|
  4698  |`Content-Length`|Length of the JSON response body.|
  4699  
  4700  
  4701  
  4702  The error codes that may be included in the response body are enumerated below:
  4703  
  4704  |Code|Message|Description|
  4705  |----|-------|-----------|
  4706  | `NAME_UNKNOWN` | repository name not known to registry | This is returned if the name used during an operation is unknown to the registry. |
  4707  
  4708  
  4709  
  4710  ###### On Failure: Access Denied
  4711  
  4712  ```
  4713  403 Forbidden
  4714  Content-Length: <length>
  4715  Content-Type: application/json; charset=utf-8
  4716  
  4717  {
  4718  	"errors:" [
  4719  	    {
  4720              "code": <error code>,
  4721              "message": "<error message>",
  4722              "detail": ...
  4723          },
  4724          ...
  4725      ]
  4726  }
  4727  ```
  4728  
  4729  The client does not have required access to the repository.
  4730  
  4731  The following headers will be returned on the response:
  4732  
  4733  |Name|Description|
  4734  |----|-----------|
  4735  |`Content-Length`|Length of the JSON response body.|
  4736  
  4737  
  4738  
  4739  The error codes that may be included in the response body are enumerated below:
  4740  
  4741  |Code|Message|Description|
  4742  |----|-------|-----------|
  4743  | `DENIED` | requested access to the resource is denied | The access controller denied access for the operation on a resource. |
  4744  
  4745  
  4746  
  4747  
  4748  
  4749  ### Catalog
  4750  
  4751  List a set of available repositories in the local registry cluster. Does not provide any indication of what may be available upstream. Applications can only determine if a repository is available but not if it is not available.
  4752  
  4753  
  4754  
  4755  #### GET Catalog
  4756  
  4757  Retrieve a sorted, json list of repositories available in the registry.
  4758  
  4759  
  4760  ##### Catalog Fetch Complete
  4761  
  4762  ```
  4763  GET /v2/_catalog
  4764  ```
  4765  
  4766  Request an unabridged list of repositories available.
  4767  
  4768  
  4769  
  4770  
  4771  
  4772  ###### On Success: OK
  4773  
  4774  ```
  4775  200 OK
  4776  Content-Length: <length>
  4777  Content-Type: application/json; charset=utf-8
  4778  
  4779  {
  4780  	"repositories": [
  4781  		<name>,
  4782  		...
  4783  	]
  4784  }
  4785  ```
  4786  
  4787  Returns the unabridged list of repositories as a json response.
  4788  
  4789  The following headers will be returned with the response:
  4790  
  4791  |Name|Description|
  4792  |----|-----------|
  4793  |`Content-Length`|Length of the JSON response body.|
  4794  
  4795  
  4796  
  4797  ##### Catalog Fetch Paginated
  4798  
  4799  ```
  4800  GET /v2/_catalog?n=<integer>&last=<integer>
  4801  ```
  4802  
  4803  Return the specified portion of repositories.
  4804  
  4805  
  4806  The following parameters should be specified on the request:
  4807  
  4808  |Name|Kind|Description|
  4809  |----|----|-----------|
  4810  |`n`|query|Limit the number of entries in each response. It not present, all entries will be returned.|
  4811  |`last`|query|Result set will include values lexically after last.|
  4812  
  4813  
  4814  
  4815  
  4816  ###### On Success: OK
  4817  
  4818  ```
  4819  200 OK
  4820  Content-Length: <length>
  4821  Link: <<url>?n=<last n value>&last=<last entry from response>>; rel="next"
  4822  Content-Type: application/json; charset=utf-8
  4823  
  4824  {
  4825  	"repositories": [
  4826  		<name>,
  4827  		...
  4828  	]
  4829  	"next": "<url>?last=<name>&n=<last value of n>"
  4830  }
  4831  ```
  4832  
  4833  
  4834  
  4835  The following headers will be returned with the response:
  4836  
  4837  |Name|Description|
  4838  |----|-----------|
  4839  |`Content-Length`|Length of the JSON response body.|
  4840  |`Link`|RFC5988 compliant rel='next' with URL to next result set, if available|
  4841  
  4842  
  4843  
  4844  
  4845