Complete blob upload
/v2/{name}/blobs/uploads/{uuid} Complete the upload of a blob by finalizing an upload session.
This request must include the digest query parameter and optionally the last chunk of data. When the registry receives this request, it verifies the digest and stores the blob.
This endpoint supports:
- Monolithic uploads (upload entire blob in this request)
- Finalizing chunked uploads (last chunk plus
digest)
Connection and access
API connection and authentication guidance
https://registry-1.docker.io
—
Docker Hub registry API
Use one of these alternatives. Requirements within an alternative apply together.
registryToken
Parameters
name
path
Required
Type:
string
All schema constraints and annotations
{
"type": "string"
}uuid
path
Required
Type:
string
All schema constraints and annotations
{
"type": "string"
}digest
query
Required
Type:
string
All schema constraints and annotations
{
"type": "string"
}Request and responses
Request
application/octet-stream
Type:
string
All schema constraints and annotations
{
"format": "binary",
"type": "string"
}layer-upload
<binary data not shown>Response
201
No response content is declared.
Headers
Content-LengthAlways zero for completed uploads
{
"description": "Always zero for completed uploads",
"example": 0,
"schema": {
"type": "integer"
}
}Docker-Content-DigestCanonical digest of the stored blob
{
"description": "Canonical digest of the stored blob",
"example": "sha256:abcd1234...",
"schema": {
"type": "string"
}
}LocationURL where the blob is now accessible
{
"description": "URL where the blob is now accessible",
"example": "/v2/library/ubuntu/blobs/sha256:abcd1234...",
"schema": {
"type": "string"
}
}Response
400
No response content is declared.
Response
401
No response content is declared.
Response
403
No response content is declared.
Response
404
No response content is declared.
Response
416
No response content is declared.
Response
429
No response content is declared.
Referenced schemas
Complete operation contract
{
"description": "Complete the upload of a blob by finalizing an upload session.\n\nThis request must include the `digest` query parameter and optionally the last chunk of data. When the registry receives this request, it verifies the digest and stores the blob.\n\nThis endpoint supports:\n- Monolithic uploads (upload entire blob in this request)\n- Finalizing chunked uploads (last chunk plus `digest`)\n",
"operationId": "CompleteBlobUpload",
"parameters": [
{
"description": "Repository name",
"example": "library/ubuntu",
"in": "path",
"name": "name",
"required": true,
"schema": {
"type": "string"
}
},
{
"description": "Upload session UUID returned from the POST request",
"example": "abc123",
"in": "path",
"name": "uuid",
"required": true,
"schema": {
"type": "string"
}
},
{
"description": "Digest of the uploaded blob",
"example": "sha256:abcd1234...",
"in": "query",
"name": "digest",
"required": true,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/octet-stream": {
"examples": {
"layer-upload": {
"summary": "Layer tarball blob",
"value": "\u003cbinary data not shown\u003e"
}
},
"schema": {
"format": "binary",
"type": "string"
}
}
},
"required": false
},
"responses": {
"201": {
"description": "Upload completed successfully",
"headers": {
"Content-Length": {
"description": "Always zero for completed uploads",
"example": 0,
"schema": {
"type": "integer"
}
},
"Docker-Content-Digest": {
"description": "Canonical digest of the stored blob",
"example": "sha256:abcd1234...",
"schema": {
"type": "string"
}
},
"Location": {
"description": "URL where the blob is now accessible",
"example": "/v2/library/ubuntu/blobs/sha256:abcd1234...",
"schema": {
"type": "string"
}
}
}
},
"400": {
"description": "Invalid digest or missing parameters"
},
"401": {
"description": "Authentication required"
},
"403": {
"description": "Access denied"
},
"404": {
"description": "Upload session not found"
},
"416": {
"description": "Requested range not satisfiable (if used in chunked mode)"
},
"429": {
"description": "Too many requests"
}
},
"summary": "Complete blob upload",
"tags": [
"Blobs"
],
"x-codeSamples": [
{
"label": "cURL",
"lang": "Bash",
"source": "# PUT – complete upload (monolithic or final chunk)\ncurl -X PUT \\\n -H \"Authorization: Bearer $TOKEN\" \\\n -H \"Content-Type: application/octet-stream\" \\\n --data-binary @layer.tar.gz \\\n \"https://registry-1.docker.io/v2/library/ubuntu/blobs/uploads/abc123?digest=sha256:abcd1234...\"\n"
}
]
}