Initiate blob upload or attempt cross-repository blob mount Run in API Explorer
Initiate an upload session for a blob (layer or config) in a repository.
This is the first step in uploading a blob. It returns a Location
URL where the blob can be uploaded using PATCH
(chunked) or PUT
(monolithic).
Instead of uploading a blob, a client may attempt to mount a blob from another repository (if it has read access) by including the mount
and from
query parameters.
If successful, the registry responds with 201 Created
and the blob is reused without re-upload.
If the mount fails, the upload proceeds as usual and returns a 202 Accepted
.
You must authenticate with push
access to the target repository.
POST
/v2/{name}/blobs/uploads/
cURL (Initiate Standard Upload)
# Initiate a standard blob upload session
curl -i -X POST \
-H "Authorization: Bearer $TOKEN" \
https://registry-1.docker.io/v2/library/ubuntu/blobs/uploads/
# Attempt a cross-repository blob mount
curl -i -X POST \
-H "Authorization: Bearer $TOKEN" \
"https://registry-1.docker.io/v2/library/ubuntu/blobs/uploads/?mount=sha256:abc123def456...&from=library/busybox"
curl \
--request POST 'https://registry-1.docker.io/v2/library/ubuntu/blobs/uploads/' \
--header "Authorization: string"