GET a data object

Retrieves a data object from storage.

With the GET storage/{id} method, you can retrieve a data object by data ID from the system.

Table 1. GET storage request details
Method Resource URI Description

GET

storage

/api/v1/b2b/storage/{BucketName}/{id}

Retrieves a data object from the server. For storage buckets with external HTTP.

Table 2. GET storage URI input parameters
Parameter Required or Optional Description Validation Valid values

BucketName

Required

A bucket that you create when you provision storage.

Existence of the bucket.

Any bucket that is provisioned by using the storage provision command.

id

Required

The unique identifier from the response header of the POST.

Identifier exists.

Any identifier that exists

GET storage HTTP header response parameters

Table 3. POST storage HTTP header parameters
Parameter Description

Content-Type

Optional.

The Content-Type header contains the following elements that are separated by a semicolon Content-type;Charset;Content-Type Parameters . An example of these header elements is text/html;charset=UTF-8;micalg=shal
Content-Type
This value takes the format of the body (in the format of type/subtype) and is not verified against the blob contents.
Charset
Only valid if the Content-Type is text.
Content-Type Parameters
Sets the Content-Type parameters of the later built data object. Must match attribute "=" value format. Acceptable characters for attribute and value are any US-ASCII characters except US-ASCII control character (octets 0 - 31) and DEL (127) and separators: ( ) < &gt; @ , ; : \" / [ ] ? = { } SP HT. Maximum permissible size for attribute and value is 255 and the maximum number of parameters that are allowed is 5. The allowed characters are derived from RFC 2616.
Note: If Content-Type is not present, the default value is "application/octet-stream", which is stored in the metadata file.

Body

Optional.

Body content for the data object is required if the blob contains data.

Filename

Optional.

The Filename is stored in metadata and returned in a GET response. The maximum number of characters is 255 and duplicate file names are allowed.
Note: Blobs cannot be retrieved by the file name.

Content-MD5

Optional.

The hash that is calculated from the payload by using the MD5 algorithm, as specified in IETF RFC 1864. For example:

Content-MD5: 5MTASjcWUgmtLbAi8AZ0jQ==

Content-Length

Required.

The size of the blob is stored in metadata and compared to length of blob during retrieval. The size of the blob is not required if the Transfer-Encoding is chunked.

Content-Disposition

Optional.

Contains the Filename and the value is stored in the metadata. For example:

inline;filename="file1".

Transfer-Encoding

Required.

Indicates that Chunked Transfer Encoding (CTE) feature is enabled.

  • Chunked (default)

X-IBM-MEG-Domain

Optional.

The domain that is associated with the blob. For example: X-IBM-MEG-Domain: testDomain

GET storage example

The following example shows a successful request.

HTTP storage request

GET /api/v1/b2b/storage/{BucketName}/{id}

HTTP storage response

HTTP/1.1 200 OK