Check existence of blob Run in API Explorer
Check whether a blob (layer or config) exists in the registry.
This is useful before uploading a blob to avoid duplicates.
If the blob is present, the registry returns a 200 OK
response with headers like Content-Length
and Docker-Content-Digest
.
If the blob does not exist, the response will be 404 Not Found
.
HEAD
/v2/{name}/blobs/{digest}
cURL
# HEAD to check if a blob exists
curl -I \
-H "Authorization: Bearer $TOKEN" \
https://registry-1.docker.io/v2/library/ubuntu/blobs/sha256:abc123...
curl \
--request HEAD 'https://registry-1.docker.io/v2/library/ubuntu/blobs/sha256:abc123def4567890...' \
--header "Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6..."
Response examples (200)
Sample request
{
"url": "/v2/library/ubuntu/blobs/sha256:abc123def4567890...",
"method": "HEAD",
"headers": {
"Accept": "*/*",
"Authorization": "Bearer <token>"
}
}
{
"status": "200 OK",
"headers": {
"Content-Type": "application/octet-stream",
"Content-Length": 32654,
"Docker-Content-Digest": "sha256:abc123def4567890..."
}
}