- Print
- DarkLight
S3 Get Object
- Print
- DarkLight
GEThttps://s3.<your-region>.backblazeb2.com/<your-bucket-name>/<your-key>
This operation retrieves an object from Backblaze B2 Cloud Storage.
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 data from a current Live Read multipart upload when calling Get Object by including the x-backblaze-live-read-enabled
HTTP header with its value set to true.
When you make 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).
versionId
in Live Read Get Object calls in the event that a new Live Read upload for the same file name is initiated. If no verisonId
is included, 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 you include a file name or versionId
and a partNumber
or supported byte range header 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:
- The same Live Read Get Object request may return different results over time if the upload process replaces certain part numbers with new versions.
- A Live Read Get Object request for a byte range may not return the same results as the same Get Object byte range request on the completed object if the upload process does not follow the documented upload part expectations.
- Live Read-enabled requests that specify a file name but do not specify a
versionId
may switch from one object to another object 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 finalETag
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.
- The
HEADERS
x-backblaze-live-read-enabled | To retrieve data from an ongoing multipart upload with Live Read enabled, the value must be Any value other than |
PARAMS
partNumber | Part number to read, between 1 and 10,000. |
response-cache-control | Specifies Cache-Control header for the response. |
response-content-encoding | Specifies Content-Encoding header for the response. |
response-content-language | Specifies Content-Language header for the response. |
response-content-type | Specifies Content-Type header for the response. |
response-expires | Specifies Expires header for the response. |
versionId | VersionId to read. |
PATH VARIABLES
bucket | Required. The name of the bucket |
key | Required. Key of the object to be written. |
Example Request
curl --location 'https://s3.<your-region>.backblazeb2.com/my-bucket-name/object-1'
Example Response
200 OK
Body
object data |
Headers
Accept-Ranges | bytes |
Last-Modified | Fri, 28 Jan 2022 23:12:33 GMT |
ETag | "85f30635602dc09bd85957a6e82a2c21" |
Cache-Control | no-cache |
x-amz-request-id | 22f4a1772746da99 |
x-amz-id-2 | aMWA1NmaNOcQz7zWKY2lmZzT6ZHdjpGJT |
x-amz-version-id | 4_z6145af89f355ac2f74ed0c1b_f416a807037a7ee2a_d20220 |
x-backblaze-live-read-enabled | True |
x-backblaze-live-read-part-size | 5000 |
Content-Type | text/plain |
Content-Length | 11 |
Date | Fri, 28 Jan 2022 23:14:25 GMT |
Keep-Alive | timeout=5 |
Connection | keep-alive |
Live Read Error Codes
Error code | Message | HTTP status code |
InvalidRequest | When Live Read is enabled, a Range header must specify explicit start and end values. | 400 Bad Request |
InvalidRequest | When Live Read is enabled, requests must specify a Range header or partNumber parameter. | 400 Bad Request |
InvalidRange | Requested Live Read data is not available. | 416 Requested Range Not Satisfiable |