View Categories

Object Ops

Put Object

Adds an object to a bucket. You must have write permissions on the bucket to perform this operation.

Syntax

PUT /{bucket}/{object} HTTP/1.1

Request Headers

NameDescriptionValid ValuesRequired
content-md5A base64 encoded MD-5 hash of the message.A string. No defaults or constraints.No
content-typeA standard MIME type.Any MIME type. Default: binary/octet-streamNo
x-amz-meta-<…>User metadata. Stored with the object.A string up to 8kb. No defaults.No
x-amz-aclA canned ACL.private, public-read, public-read-write, authenticated-readNo

Copy Object

To copy an object, use PUT and specify a destination bucket and the object name.

Syntax

PUT /{dest-bucket}/{dest-object} HTTP/1.1

x-amz-copy-source: {source-bucket}/{source-object}

Request Headers

NameDescriptionValid ValuesRequired
x-amz-copy-sourceThe source bucket name + object name.{bucket}/{obj}Yes
x-amz-aclA canned ACL.private, public-read, public-read-write, authenticated-readNo
x-amz-copy-if-modified-sinceCopies only if modified since the timestamp.TimestampNo
x-amz-copy-if-unmodified-sinceCopies only if unmodified since the timestamp.TimestampNo
x-amz-copy-if-matchCopies only if object ETag matches ETag.Entity TagNo
x-amz-copy-if-none-matchCopies only if object ETag doesn’t match.Entity TagNo

Response Entities

NameTypeDescription
CopyObjectResultContainerA container for the response elements.
LastModifiedDateThe last modified date of the source object.
EtagStringThe ETag of the new object.

Remove Object

Removes an object. Requires WRITE permission set on the containing bucket.

Syntax

DELETE /{bucket}/{object} HTTP/1.1

Get Object

Retrieves an object from a bucket.

Syntax

GET /{bucket}/{object} HTTP/1.1

Request Headers

NameDescriptionValid ValuesRequired
rangeThe range of the object to retrieve.Range: bytes=beginbyte-endbyteNo
if-modified-sinceGets only if modified since the timestamp.TimestampNo
if-unmodified-sinceGets only if not modified since the timestamp.TimestampNo
if-matchGets only if object ETag matches ETag.Entity TagNo
if-none-matchGets only if object ETag doesn’t match.Entity TagNo

Response Headers

NameDescription
Content-RangeData range, will only be returned if the range header field was specified in the request

Get Object Info

Returns information about object. This request will return the same header information as with the Get Object request, but will include the metadata only, not the object data payload.

Syntax

HEAD /{bucket}/{object} HTTP/1.1

Request Headers

NameDescriptionValid ValuesRequired
rangeThe range of the object to retrieve.Range: bytes=beginbyte-endbyteNo
if-modified-sinceGets only if modified since the timestamp.TimestampNo
if-unmodified-sinceGets only if not modified since the timestamp.TimestampNo
if-matchGets only if object ETag matches ETag.Entity TagNo
if-none-matchGets only if object ETag doesn’t matchEntity TagNo

Get Object ACL

Syntax

GET /{bucket}/{object}?acl HTTP/1.1

Response Entities

NameTypeDescription
AccessControlPolicyContainerA container for the response.
AccessControlListContainerA container for the ACL information.
OwnerContainerA container for the object owner’s ID and DisplayName.
IDStringThe object owner’s ID.
DisplayNameStringThe object owner’s display name.
GrantContainerA container for Grantee and Permission.
GranteeContainerA container for the DisplayName and ID of the user receiving a grant of permission.
PermissionStringThe permission given to the Grantee object.

Set Object ACL

Syntax

PUT /{bucket}/{object}?acl

Request Entities

NameTypeDescription
AccessControlPolicyContainerA container for the response.
AccessControlListContainerA container for the ACL information.
OwnerContainerA container for the object owner’s ID and DisplayName.
IDStringThe object owner’s ID.
DisplayNameStringThe object owner’s display name.
GrantContainerA container for Grantee and Permission.
GranteeContainerA container for the DisplayName and ID of the user receiving a grant of permission.
PermissionStringThe permission given to the Grantee object.

Initiate Multi-part Upload

Initiate a multi-part upload process.

Syntax

POST /{bucket}/{object}?uploads

Request Headers

NameDescriptionValid ValuesRequired
content-md5A base64 encoded MD-5 hash of the message.A string. No defaults or constraints.No
content-typeA standard MIME type.Any MIME type. Default: binary/octet-streamNo
x-amz-meta-<…>User metadata. Stored with the object.A string up to 8kb. No defaults.No
x-amz-aclA canned ACL.private, public-read, public-read-write, authenticated-readNo

Response Entities

NameTypeDescription
InitiatedMultipartUploadsResultContainerA container for the results.
BucketStringThe bucket that will receive the object contents.
KeyStringThe key specified by the key request parameter (if any).
UploadIdStringThe ID specified by the upload-id request parameter identifying the multipart upload (if any).

Multipart Upload Part

Syntax

PUT /{bucket}/{object}?partNumber=&uploadId= HTTP/1.1

HTTP Response

The following HTTP response may be returned:

HTTP StatusStatus CodeDescription
404NoSuchUploadSpecified upload-id does not match any initiated upload on this object

List Multipart Upload Parts

Syntax

GET /{bucket}/{object}?uploadId=123 HTTP/1.1

Response Entities

NameTypeDescription
ListPartsResultContainerA container for the results.
BucketStringThe bucket that will receive the object contents.
KeyStringThe key specified by the key request parameter (if any).
UploadIdStringThe ID specified by the upload-id request parameter identifying the multipart upload (if any).
InitiatorContainerContains the ID and DisplayName of the user who initiated the upload.
IDStringThe initiator’s ID.
DisplayNameStringThe initiator’s display name.
OwnerContainerA container for the ID and DisplayName of the user who owns the uploaded object.
StorageClassStringThe method used to store the resulting object. STANDARD or REDUCED_REDUNDANCY
PartNumberMarkerStringThe part marker to use in a subsequent request if IsTruncated is true. Precedes the list.
NextPartNumberMarkerStringThe next part marker to use in a subsequent request if IsTruncated is true. The end of the list.
MaxPartsIntegerThe max parts allowed in the response as specified by the max-parts request parameter.
IsTruncatedBooleanIf true, only a subset of the object’s upload contents were returned.
PartContainerA container for LastModified, PartNumber, ETag and Size elements.
LastModifiedDateDate and time at which the part was uploaded.
PartNumberIntegerThe identification number of the part.
ETagStringThe part’s entity tag.
SizeIntegerThe size of the uploaded part.

Complete Multipart Upload

Assembles uploaded parts and creates a new object, thereby completing a multipart upload.

Syntax

POST /{bucket}/{object}?uploadId= HTTP/1.1

Request Entities

NameTypeDescriptionRequired
CompleteMultipartUploadContainerA container consisting of one or more parts.Yes
PartContainerA container for the PartNumber and ETag.Yes
PartNumberIntegerThe identifier of the part.Yes
ETagStringThe part’s entity tag.Yes

Response Entities

NameTypeDescription
CompleteMultipartUploadResultContainerA container for the response.
LocationURIThe resource identifier (path) of the new object.
BucketStringThe name of the bucket that contains the new object.
KeyStringThe object’s key.
ETagStringThe entity tag of the new object.

Abort Multipart Upload

Syntax

DELETE /{bucket}/{object}?uploadId= HTTP/1.1

Append Object

Append data to an object. You must have write permissions on the bucket to perform this operation. It is used to upload files in appending mode. The type of the objects created by the Append Object operation is Appendable Object, and the type of the objects uploaded with the Put Object operation is Normal Object. Append Object can’t be used if bucket versioning is enabled or suspended. Synced object will become normal in multisite, but you can still append to the original object. Compression and encryption features are disabled for Appendable objects.

Syntax

PUT /{bucket}/{object}?append&position= HTTP/1.1

Request Headers

NameDescriptionValid ValuesRequired
content-md5A base64 encoded MD-5 hash of the message.A string. No defaults or constraints.No
content-typeA standard MIME type.Any MIME type. Default: binary/octet-streamNo
x-amz-meta-<…>User metadata. Stored with the object.A string up to 8kb. No defaults.No
x-amz-aclA canned ACL.private, public-read, public-read-write, authenticated-readNo

Response Headers

NameDescription
x-rgw-next-append-positionNext position to append object

HTTP Response

The following HTTP response may be returned:

HTTP StatusStatus CodeDescription
409PositionNotEqualToLengthSpecified position does not match object length
409ObjectNotAppendableSpecified object can not be appended
409InvalidBucketstateBucket versioning is enabled or suspended

Put Object Retention

Places an Object Retention configuration on an object.

Syntax

PUT /{bucket}/{object}?retention&versionId= HTTP/1.1

Request Entities

NameTypeDescription
RetentionContainerA container for the request.
ModeStringRetention mode for the specified object. Valid Values: GOVERNANCE/COMPLIANCE | Yes
RetainUntilDateTimestampRetention date. Format: 2020-01-05T00:00:00.000Z | Yes

Get Object Retention

Gets an Object Retention configuration on an object.

Syntax

GET /{bucket}/{object}?retention&versionId= HTTP/1.1

Response Entities

NameTypeDescriptionRequired
RetentionContainerA container for the request.Yes
ModeStringRetention mode for the specified object. Valid Values: GOVERNANCE/COMPLIANCE | Yes
RetainUntilDateTimestampRetention date. Format: 2020-01-05T00:00:00.000Z | Yes

Put Object Legal Hold

Applies a Legal Hold configuration to the specified object.

Syntax

PUT /{bucket}/{object}?legal-hold&versionId= HTTP/1.1

Request Entities

NameTypeDescriptionRequired
LegalHoldContainerA container for the request.Yes
StatusStringIndicates whether the specified object has a Legal Hold in place. Valid Values: ON/OFFYes

Get Object Legal Hold

Gets an object’s current Legal Hold status.

Syntax

GET /{bucket}/{object}?legal-hold&versionId= HTTP/1.1

Response Entities

NameTypeDescriptionRequired
LegalHoldContainerA container for the request.Yes
StatusStringIndicates whether the specified object has a Legal Hold in place. Valid Values: ON/OFFYes