Retrieve blob
/v2/{name}/blobs/{digest} Download the blob identified by digest from the registry.
Blobs include image layers and configuration objects. Clients must use the digest from the manifest to retrieve a blob.
This endpoint may return a 307 Temporary Redirect to a CDN or storage location. Clients must follow the redirect to obtain the actual blob content.
The blob content is typically a gzipped tarball (for layers) or JSON (for configs). The MIME type is usually application/octet-stream.
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"
}digest
path
Required
Type:
string
All schema constraints and annotations
{
"type": "string"
}Request and responses
Response
200
application/octet-stream
Headers
Content-LengthSize of the blob in bytes
{
"description": "Size of the blob in bytes",
"example": 32768,
"schema": {
"type": "integer"
}
}Content-TypeMIME type of the blob
{
"description": "MIME type of the blob",
"example": "application/octet-stream",
"schema": {
"type": "string"
}
}Docker-Content-DigestDigest of the returned blob
{
"description": "Digest of the returned blob",
"example": "sha256:abc123def456...",
"schema": {
"type": "string"
}
}Type:
string
All schema constraints and annotations
{
"format": "binary",
"type": "string"
}small-layer
<binary data not shown>Response
307
No response content is declared.
Headers
LocationRedirect URL for blob download (e.g., S3 or CDN)
{
"description": "Redirect URL for blob download (e.g., S3 or CDN)",
"example": "https://cdn.docker.io/blobs/library/ubuntu/abc123...",
"schema": {
"type": "string"
}
}Response
401
No response content is declared.
Response
403
No response content is declared.
Response
404
No response content is declared.
Response
429
No response content is declared.
Referenced schemas
Complete operation contract
{
"description": "Download the blob identified by digest from the registry.\n\nBlobs include image layers and configuration objects. Clients must use the digest from the manifest to retrieve a blob.\n\nThis endpoint may return a `307 Temporary Redirect` to a CDN or storage location. Clients must follow the redirect to obtain the actual blob content.\n\nThe blob content is typically a gzipped tarball (for layers) or JSON (for configs). The MIME type is usually `application/octet-stream`.\n",
"operationId": "GetBlob",
"parameters": [
{
"description": "Repository Name",
"example": "library/ubuntu",
"in": "path",
"name": "name",
"required": true,
"schema": {
"type": "string"
}
},
{
"description": "Digest of the Blob",
"example": "sha256:abc123def456...",
"in": "path",
"name": "digest",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"content": {
"application/octet-stream": {
"examples": {
"small-layer": {
"summary": "Example binary blob (gzipped tar layer)",
"value": "\u003cbinary data not shown\u003e"
}
},
"schema": {
"format": "binary",
"type": "string"
}
}
},
"description": "Blob content returned directly",
"headers": {
"Content-Length": {
"description": "Size of the blob in bytes",
"example": 32768,
"schema": {
"type": "integer"
}
},
"Content-Type": {
"description": "MIME type of the blob",
"example": "application/octet-stream",
"schema": {
"type": "string"
}
},
"Docker-Content-Digest": {
"description": "Digest of the returned blob",
"example": "sha256:abc123def456...",
"schema": {
"type": "string"
}
}
}
},
"307": {
"description": "Temporary redirect to blob location",
"headers": {
"Location": {
"description": "Redirect URL for blob download (e.g., S3 or CDN)",
"example": "https://cdn.docker.io/blobs/library/ubuntu/abc123...",
"schema": {
"type": "string"
}
}
}
},
"401": {
"description": "Authentication required"
},
"403": {
"description": "Access denied"
},
"404": {
"description": "Blob not found"
},
"429": {
"description": "Too many requests"
}
},
"summary": "Retrieve blob",
"tags": [
"Blobs"
],
"x-codeSamples": [
{
"label": "cURL",
"lang": "Bash",
"source": "# GET (download) a blob\ncurl -L \\\n -H \"Authorization: Bearer $TOKEN\" \\\n https://registry-1.docker.io/v2/library/ubuntu/blobs/sha256:abc123... \\\n -o layer.tar.gz\n"
}
]
}