S3 Head Object
    • Dark
      Light

    S3 Head Object

    • Dark
      Light

    Article summary

    HEADhttps://s3.<your-region>.backblazeb2.com/<your-bucket-name>/<your-key>

    The HEAD operation retrieves metadata from an object without returning the object itself. This operation is useful if you are interested only in an object's metadata.

    AUTHORIZATION AWS Signature

    This request is using AWS Signature from collection Backblaze B2 Cloud Storage S3 Compatible API.

    Live Read

    Backblaze B2 Live Read provides the ability to read data from a multipart object while that object is uploading.

    To initiate an upload with Live Read enabled, include the x-backblaze-live-read-enabled HTTP header when using S3 Create Multipart Upload.

    To learn more about Live Read, click here.

    Using Live Read

    You can retrieve metadata about a current Live Read multipart upload when calling Head Object by including the x-backblaze-live-read-enabled HTTP header with the value set to true.

    When making a request with either a file name or file versionId, specify a partNumber or a byte range header that includes both start and end values (Live Read only supports a byte range with both values).

    Warning
    Backblaze strongly recommends that you always include the file versionId in Live Read Head Object calls in the event that a new Live Read upload for the same file name is initiated. If you do not include a verisonId, Live Read-enabled requests may switch from one object to another object between requests.

    Failure to supply either a partNumber or a supported byte range results in a 400 Bad Request error.

    When a file name or versionId and a partNumber or supported byte range header are included in the request, but no data is available, a 416 Requested Range Not Satisfiable error response is returned.

    See "Live Read Error Codes" below for a complete list of Live Read-related errors.

    Live Read Behaviors

    The following behaviors are present when Live Read is enabled:

    1. The same Live Read Head Object request may return different results over time if the upload process replaces certain part numbers with new versions.
    2. A Live Read Head Object request for a byte range may not return the same results as the same Head Object byte range request on the completed object if the upload process does not follow the documented upload part expectations.
    3. Live Read-enabled requests that specify a file name but do not specify a versionIdmay switch from one object to another between requests if a new Live Read multipart upload for the same file name is started.
      • The ETag response header value that is returned is not the same as the final ETag value. However, it is consistent across multiple identical calls if none of the parts that are used in the data that is returned from the API call are overwritten with new versions.

    HEADERS

    x-backblaze-live-read-enabled

    To retrieve metadata from an ongoing multipart upload with Live Read enabled, the value must be TRUE.

    Any value other than TRUE (case-insensitive) is treated as false.

    PARAMS

    partNumber

    Part number to read, between 1 and 10,000.

    versionId

    Optional. Specifies a specific version of the object.

    PATH VARIABLES

    bucket

    Required. The name of the bucket

    key

    Required. Key of the object to be written.

    Example Request

    curl --location --head 'https://s3.<your-region>.backblazeb2.com/my-bucket-name/object-1'

    Example Response

    200 OK

    Body

    No response body

    This request doesn't return any response body

    Headers

    Accept-Ranges

    bytes

    Last-Modified 

    Fri, 28 Jan 2022 23:12:33 GMT

    ETag

    "85f30635602dc09bd85957a6e82a2c21"

    Cache-Control

    max-age=0, no-cache, no-store

    x-amz-request-id

    56aa38410aaebdd

    x-amz-version-id

    4_z6145af89f355ac2f74ed0c1b_f416a807037a7ee2a_d20220128_m231233_c004_v0402000_t0056

    x-amz-id-2

    aMa41BGZMOZMztjUfY9JmpzRnZLRjZmIQ

    x-backblaze-live-read-enabled

    True

    x-backblaze-live-read-part-size

    5000

    Content-Type

    text/plain

    Content-Length

    0

    Date

    Fri, 28 Jan 2022 23:14:48 GMT

    Keep-Alive

    timeout=5

    Connection

    keep-alive

    Live Read Error Codes

    Error codeMessageHTTP status code
    InvalidRequestWhen Live Read is enabled, a Range header must specify explicit start and end values.400 Bad Request
    InvalidRequestWhen Live Read is enabled, requests must specify a Range header or partNumber parameter.400 Bad Request
    InvalidRangeRequested Live Read data is not available.
    416 Requested Range Not Satisfiable

    Was this article helpful?

    What's Next