Check existence of blob Run in API Explorer

HEAD /v2/{name}/blobs/{digest}

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.

Headers

  • Authorization string Required

    Bearer token with pull or push scope

Path parameters

  • name string Required

    Name of the Repository

  • digest string Required

    Digest of the blob

Responses

  • 200 application/json

    Blob exists

    Hide headers attributes Show headers attributes
    • Content-Length integer

      Size of the blob in bytes

    • Docker-Content-Digest string

      Digest of the blob

    • Content-Type string

      MIME type of the blob content

  • 404

    Blob not found

  • 401

    Authentication required

  • 403

    Access denied

  • 429

    Too many requests

HEAD /v2/{name}/blobs/{digest}
# 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)
{
  "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..."
  }
}