S3 API


Overview

This document provides information on accessing IONOS S3 Object Storage via a REST API.

Additional information about IONOS S3 Object Storage is available in the Online Help.

Endpoint

The S3 Object Storage API endpoints are:

  • http://s3-de-central.profitbricks.com:80
  • https://s3-de-central.profitbricks.com:443

We recommend utilizing SSL/TLS to securely access the API whenever possible.

Authorization

The process for generating the correct Authorization header is rather involved. We recommend utilizing a tool such as Postman.

To provide your credentials, choose the Authorization type "AWS Signature", then fill in the values for AccessKey and SecretKey.

Under Advanced, you can set the "AWS Region to s3-de-central and the "Service Name to s3.

S3 Postman Credentials

S3 Postman Credentials

It is possible to utilize curl along with openssl to access the S3 Object Storage API, but it is rather cumbersome. It involves multiple steps to generate and sign the curl request even for simple requests.

Operations

There are three groups of operations available when working with the S3 Object Storage API.

  • Operations on the S3 Service
  • Operations on Buckets
  • Operations on Objects

Common Request Headers

These headers are supported when making requests to the S3 Object Storage API.

Request Headers
Authorization
Content-Length
Content-Type
Content-MD5
Date
Expect
Host
x-amz-date

Common Response Headers

These are the common response headers that you may encounter when performing operations against the S3 Object Storage API.

Response Headers
Content-Length
Content-Type
Connection
Date
ETag
Server
x-amz-delete-marker
x-amz-request-id
x-amz-version-id

Operations on the S3 Service

There is a single operation available for the S3 Service itself.

List All Buckets

This GET operation will return a list of all buckets that are owned by the authenticated requestor. It cannot be called anonymously.

There are no parameters, special headers, or elements to this request. You submit a GET request to the S3 Object Storage endpoint with a valid authorization string in the Authorization header.

GET / HTTP/1.1
Host: s3-de-central.profitbricks.com
Date: *date*
Authorization: *authorization string*

Example Request

GET / HTTP/1.1
User-Agent: curl/7.29.0
Host: s3-de-central.profitbricks.com
Accept: */*
Authorization: AWS4-HMAC-SHA256 Credential=ACCESS-KEY/20171117/s3-de-central/s3/aws4_request,SignedHeaders=host;x-amz-content-sha256;x-amz-date,Signature=250488e819717ba9eb375978d438483febc14ff60bd55c8a2bcf7aaede11f51b
x-amz-content-sha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
x-amz-date: 20171117T222435Z

The XML response will contain information about the storage buckets available.

Example Response

HTTP/1.1 200 OK
Date: Sat, 18 Nov 2017 00:13:46 GMT
x-amz-request-id: 346b91b8-4188-1382-be09-0cc47af2c4a0
Content-Type: application/xml;charset=UTF-8
Content-Length: 327
Server: CloudianS3

* Connection #0 to host s3-de-central.profitbricks.com left intact

<?xml version="1.0" encoding="UTF-8"?>
<ListAllMyBucketsResult xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
  <Owner>
    <ID>cfb56e5c17b4c1388a963adeb1b00711</ID>
    <DisplayName/>
  </Owner>
  <Buckets>
    <Bucket>
      <Name>examplebucket</Name>
      <CreationDate>2017-11-14T02:40:20.892Z</CreationDate>
    </Bucket>
  </Buckets>
</ListAllMyBucketsResult>

Bucket Operations

The available CRUD (Create, Read, Update, Delete) operations for buckets are described here.

DELETE Bucket

This DELETE operation will remove the bucket that is specified in the URI. The bucket must be empty in order to be successfully deleted.

DELETE / HTTP/1.1
Host: examplebucket.s3-de-central.profitbricks.com
Date: date
Authorization: authorization string

DELETE Bucket lifecycle

Deletes the lifecycle configuration from the specified bucket.

DELETE /?lifecycle HTTP/1.1
Host: examplebucket.s3-de-central.profitbricks.com
Date: date
Authorization: authorization string

DELETE Bucket policy

Deletes the policy on a specified bucket. You must have the DeletePolicy permission on the specified bucket and be the bucket owner.

DELETE /?policy HTTP/1.1
Host: examplebucket.s3-de-central.profitbricks.com
Date: date
Authorization: authorization string

DELETE Bucket tagging

Deletes a tag set from the specified bucket.

DELETE /?tagging HTTP/1.1
Host: examplebucket.s3-de-central.profitbricks.com
Date: date
Authorization: authorization string

DELETE Bucket website

Deletes the website configuration for a specific bucket.

DELETE /?website HTTP/1.1
Host: examplebucket.s3-de-central.profitbricks.com
Date: date
Authorization: authorization string

GET Bucket

This GET operation returns a list of up to 1,000 objects from a specified bucket.

Request Parameter Notes
delimiter The S3 Object Storage system does not support %c2%85(U+0085) as a delimiter value.
encoding-type
marker
max-keys
prefix
GET /?list-type=2 HTTP/1.1
Host: examplebucket.s3-de-central.profitbricks.com
Date: date
Authorization: authorization string

If the bucket is empty, you will get a XML response similar to this:

<?xml version="1.0" encoding="UTF-8"?>
<ListBucketResult xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
    <Name>examplebucket</Name>
    <Prefix/>
    <MaxKeys>1000</MaxKeys>
    <IsTruncated>false</IsTruncated>
    <KeyCount>0</KeyCount>
</ListBucketResult>

If the bucket has some contents, in this case four jpeg encoded images, then the XML response will resemble:

<?xml version="1.0" encoding="UTF-8"?>
<ListBucketResult xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
    <Name>bucketname</Name>
    <Prefix/>
    <MaxKeys>1000</MaxKeys>
    <IsTruncated>false</IsTruncated>
    <KeyCount>4</KeyCount>
    <Contents>
        <Key>20171114_190254.jpg</Key>
        <LastModified>2017-11-17T00:51:06.848Z</LastModified>
        <StorageClass>STANDARD</StorageClass>
        <Size>4028169</Size>
        <ETag>&quot;af2f4ca27249ee7433027649163d0b99&quot;</ETag>
    </Contents>
    <Contents>
        <Key>20171114_190306.jpg</Key>
        <LastModified>2017-11-17T00:51:11.203Z</LastModified>
        <StorageClass>STANDARD</StorageClass>
        <Size>3981384</Size>
        <ETag>&quot;298dc5c09d17a271c1d26f998eb4a61a&quot;</ETag>
    </Contents>
    <Contents>
        <Key>20171114_190337.jpg</Key>
        <LastModified>2017-11-17T00:50:50.960Z</LastModified>
        <StorageClass>STANDARD</StorageClass>
        <Size>2921508</Size>
        <ETag>&quot;d4eac3f7c9a7bead4314d7cff8462ce4&quot;</ETag>
    </Contents>
    <Contents>
        <Key>20171114_190344.jpg</Key>
        <LastModified>2017-11-17T00:50:50.964Z</LastModified>
        <StorageClass>STANDARD</StorageClass>
        <Size>3794047</Size>
        <ETag>&quot;14b5b967c2600e18cb86a0767f1a5fef&quot;</ETag>
    </Contents>
</ListBucketResult>

GET Bucket acl

This GET operation is used to return the access control list (ACL) of a bucket.

GET /?acl HTTP/1.1
Host: examplebucket.s3-de-central.profitbricks.com
Date: date
Authorization: authorization string
Response Elements
AccessControlList
AccessControlPolicy
DisplayName
Grant
Grantee
ID
Owner
Permission

Example Response

<?xml version="1.0" encoding="UTF-8"?>
<AccessControlPolicy xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
    <Owner>
        <ID>cfb56e5c17b4c1388a963adeb1b00711</ID>
        <DisplayName>user@domain.tld</DisplayName>
    </Owner>
    <AccessControlList>
        <Grant>
            <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="CanonicalUser">
                <ID>cfb56e5c17b4c1388a963adeb1b00711</ID>
                <DisplayName>user@domain.tld</DisplayName>
            </Grantee>
            <Permission>FULL_CONTROL</Permission>
        </Grant>
    </AccessControlList>
</AccessControlPolicy>

GET Bucket lifecycle

Returns lifecycle information about a specific bucket.

In addition to the common response headers, there are two S3 Object Storage specific response headers.

Response Headers
x-gmt-tieringinfo
x-gmt-compare
Response Elements
AbortIncompleteMultipartUpload
Date
Days
DaysAfterInitiation
Expiration
ExpiredObjectDeleteMarker
Filter
ID
LifecycleConfiguration
NoncurrentDays
NoncurrentVersionExpiration
NoncurrentVersionTransition
Prefix
Rule
Status
StorageClass
Transition

If you attempt to retrieve lifecycle information on a bucket that does not have it configured, you will get this Special Error: NoSuchLifecycleConfiguration

GET /?lifecycle HTTP/1.1
Host: examplebucket.s3-de-central.profitbricks.com
Date: date
Authorization: authorization string
<?xml version="1.0" encoding="UTF-8"?>
<Error>
    <Code>NoSuchLifecycleConfiguration</Code>
    <Message>The lifecycle configuration does not exist</Message>
    <RequestId>6aaf3164-6a25-1883-8412-0cc47ad3f142</RequestId>
    <HostId>5h9j0JnA1gPXD2gHP_cU75z_Nzn0jfangQI_kHXkflE</HostId>
</Error>

When the bucket has lifecycle rules in place, they are returned as XML:

<?xml version="1.0" encoding="UTF-8"?>
<LifecycleConfiguration>
    <Rule>
        <ID>id1</ID>
        <Filter>
            <Prefix></Prefix>
        </Filter>
        <Status>Enabled</Status>
        <Expiration>
            <Days>365</Days>
        </Expiration>
    </Rule>
</LifecycleConfiguration>

GET Bucket policy

The response contains the policy of a specified bucket.

GET /?policy HTTP/1.1
Host: examplebucket.s3-de-central.profitbricks.com
Date: date
Authorization: authorization string

If there is no policy in place, an XML error is returned:

<?xml version="1.0" encoding="UTF-8"?>
<Error>
    <Code>NoSuchBucketPolicy</Code>
    <Message>The bucket policy does not exist</Message>
    <RequestId>eb257782-7fef-1ec9-b29d-0cc47af2c498</RequestId>
    <HostId>FVqRz72LCRTiUvVKH-VpiEXa5EX3643IbdE6Tyu0-FE</HostId>
</Error>

Otherwise you should receive a JSON payload containing the policy definition:

"Version": "2018-01-25",
"Statement": [
    {
        "Sid": "AllowAll",
        "Effect": "Allow",
        "Principal": {
            "CanonicalUser": "xxxxx3034a1xxxxx97181875axxxxx"
        },
        "Action": [
            "s3:*"
        ],
        "Resource": "arn:aws:s3:::examplebucket"
    }
]
}

GET Bucket location

Returns the region / location of the specified bucket if it was set during bucket creation.

Response Elements
LocationConstraint
GET /?location HTTP/1.1
Host: examplebucket.s3-de-central.profitbricks.com
Date: date
Authorization: authorization string
<?xml version="1.0" encoding="UTF-8"?>
<LocationConstraint xmlns="http://s3.amazonaws.com/doc/2006-03-01/"/>

GET Bucket logging

Returns the logging status of a bucket.

Response Elements
BucketLoggingStatus
Grant
Grantee
LoggingEnabled
Permission
TargetBucket
TargetGrants
TargetPrefix
GET /?logging HTTP/1.1
Host: examplebucket.s3-de-central.profitbricks.com
Date: date
Authorization: authorization string
<?xml version="1.0" encoding="UTF-8"?>
<BucketLoggingStatus xmlns="http://s3.amazonaws.com/doc/2006-03-01/"></BucketLoggingStatus>

GET Bucket tagging

Returns the tag set associated with a specific bucket.

Response Elements
Tagging
TagSet
Tag
Key
Value

Example Request

GET /?tagging HTTP/1.1
Host: examplebucket.s3-de-central.profitbricks.com
Date: date
Authorization: authorization string

Example Response

<?xml version="1.0" encoding="UTF-8"?>
<Tagging>
    <TagSet>
        <Tag>
            <Key>Department</Key>
            <Value>webdev</Value>
        </Tag>
        <Tag>
            <Key>Coordinator</Key>
            <Value>auser</Value>
        </Tag>
    </TagSet>
</Tagging>

An example response if no tags are present:

<?xml version="1.0" encoding="UTF-8"?>
<Error>
    <Code>NoSuchTagSet</Code>
    <Message>The TagSet does not exist</Message>
    <RequestId>a69c5227-d1b9-1383-be09-0cc47af2c4a0</RequestId>
    <HostId>H54TdLEE4c6zTaoGfpB5cqa_tE_UoLG7SKUhhMOJD8s</HostId>
</Error>

GET Bucket Object versions

Returns metadata about the versions of objects in a bucket.

Request Elements
delimiter
encoding-type
key-marker
max-keys
prefix
version-id-marker

Note: S3 Object Storage supports an optional request parameter meta=true. This extension works exactly as described for GET Bucket (List Objects), except that for "GET Bucket Object Versions", in the response body the metadata element will be nested in the Version element and DeleteMarker element of the ListVersionsResult object.

Response Elements
DeleteMarker
DisplayName
Encoding-Type
ETag
ID
IsLatest
IsTruncated
Key
KeyMarker
LastModified
ListVersionsResult
MaxKeys
Name
NextKeyMarker
NextVersionIdMarker
Owner
Prefix
Size
StorageClass
Version
VersionId
VersionIdMarker

Note: S3 Object Storage supports an additional metadata response element, which presents user-defined metadata. This extension works exactly as described for GET Bucket (List Objects), except that for "GET Bucket Object Versions", in the response body the metadata element will be nested in the Version element and DeleteMarker element of the ListVersionsResult object.

GET /?versions HTTP/1.1
Host: examplebucket.s3-de-central.profitbricks.com
Date: date
Authorization: authorization string
<?xml version="1.0" encoding="UTF-8"?>
<ListVersionsResult xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
    <Name>examplebucket</Name>
    <Prefix/>
    <KeyMarker/>
    <VersionIdMarker/>
    <MaxKeys>1000</MaxKeys>
    <IsTruncated>false</IsTruncated>
</ListVersionsResult>

This example shows a response from bucket that has two versions of an index.html file:


<?xml version="1.0" encoding="UTF-8"?>
<ListVersionsResult xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
    <Name>examplewebbucket</Name>
    <Prefix/>
    <KeyMarker/>
    <VersionIdMarker/>
    <MaxKeys>1000</MaxKeys>
    <IsTruncated>false</IsTruncated>
    <Version>
        <Key>index.html</Key>
        <VersionId>fe1805c1-8c32-b3ff-be09-0cc47af2c4a0</VersionId>
        <IsLatest>true</IsLatest>
        <LastModified>2018-01-15T21:52:59.584Z</LastModified>
        <StorageClass>STANDARD</StorageClass>
        <Size>125</Size>
        <ETag>&quot;d2faa91b3029611a744e9f522b7d7b3d&quot;</ETag>
        <Owner>
            <ID>cfb56e5c17b4c1388a963adeb1b00711</ID>
            <DisplayName>user@domain.tld</DisplayName>
        </Owner>
    </Version>
    <Version>
        <Key>index.html</Key>
        <VersionId>null</VersionId>
        <IsLatest>false</IsLatest>
        <LastModified>2018-01-15T21:42:33.151Z</LastModified>
        <StorageClass>STANDARD</StorageClass>
        <Size>83</Size>
        <ETag>&quot;b3d4de4e6e01e34763d8e8f154bdbcdd&quot;</ETag>
        <Owner>
            <ID>cfb56e5c17b4c1388a963adeb1b00711</ID>
            <DisplayName>user@domain.tld</DisplayName>
        </Owner>
    </Version>
</ListVersionsResult>

GET Bucket versioning

Returns the versioning state of a specific bucket.

Response Elements
Status
VersioningConfiguration
GET /?versioning HTTP/1.1
Host: examplebucket.s3-de-central.profitbricks.com
Date: date
Authorization: authorization string
<?xml version="1.0" encoding="UTF-8"?>
<VersioningConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
    <Status>Enabled</Status>
</VersioningConfiguration>

GET Bucket website

Returns the website configuration for a specific bucket.

The response XML includes the same elements that were uploaded when the bucket was configured as a website.

GET /?website HTTP/1.1
Host: examplebucket.s3-de-central.profitbricks.com
Date: date
Authorization: authorization string
<?xml version="1.0" encoding="UTF-8"?>
<Error>
    <Code>NoSuchWebsiteConfiguration</Code>
    <Message>The specified bucket does not have a website configuration</Message>
    <RequestId>4149f237-e71a-12fa-b83f-0cc47ad3f0d6</RequestId>
    <HostId>Q81ynEQSEaGDuvcnKauEKARvETkQ4bOFU4F2KWvElEI</HostId>
</Error>

If a bucket has website configuration, it is returned as XML:

<?xml version="1.0" encoding="UTF-8"?>
<WebsiteConfiguration>
    <IndexDocument>
        <Suffix>index.html</Suffix>
    </IndexDocument>
    <ErrorDocument>
        <Key>error.html</Key>
    </ErrorDocument>
</WebsiteConfiguration>

HEAD Bucket

This operation can be used to confirm the existence of a specific bucket and your permissions to access it. If the bucket exists you have permission to access, you should receive a 200 OK, otherwise expect a 404 Not Found or 403 Forbidden.

Response Headers
x-amz-bucket-region

ProfitBricks S3 Object Storage supports an additional x-gmt-policyid response header, which specifies the unique ID of the storage policy assigned to the bucket.

HEAD / HTTP/1.1
Host: examplebucket.s3-de-central.profitbricks.com
Date: date
Authorization: authorization string

List Multipart Uploads

Returns a list of multipart uploads that are "in-progress".

Request Parameters
delimiter
encoding-type
max-uploads
key-marker
prefix
upload-id-marker
Response Elements
ListMultipartUploadsResult
Bucket
KeyMarker
UploadIdMarker
NextKeyMarker
NextUploadIdMarker
Encoding-Type
MaxUploads
IsTruncated
Upload
Key
UploadId
Initiator
ID
DisplayName
Owner
StorageClass
Initiated
ListMultipartUploadsResult.Prefix
Delimiter
CommonPrefixes
CommonPrefixes.Prefix
GET /?uploads HTTP/1.1
Host: examplebucket.s3-de-central.profitbricks.com
Date: Date
Authorization: authorization string

When no multipart uploads are in progress, a response will resemble this:

<?xml version="1.0" encoding="UTF-8"?>
<ListMultipartUploadsResult xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
    <Bucket>examplebucket</Bucket>
    <KeyMarker/>
    <UploadIdMarker/>
    <NextKeyMarker/>
    <NextUploadIdMarker/>
    <MaxUploads>1000</MaxUploads>
    <IsTruncated>false</IsTruncated>
</ListMultipartUploadsResult>

If you have one in progress, the response looks like:

<?xml version="1.0" encoding="UTF-8"?>
<ListMultipartUploadsResult xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
    <Bucket>examplebucket</Bucket>
    <KeyMarker/>
    <UploadIdMarker/>
    <NextKeyMarker/>
    <NextUploadIdMarker/>
    <MaxUploads>1000</MaxUploads>
    <IsTruncated>false</IsTruncated>
    <Upload>
        <Key>FileName.zip</Key>
        <UploadId>MDA3YjIxMTExNTE2OTI0NDA2MTA1</UploadId>
        <Initiator>
            <ID>cfb56e5c17b4c1388a963adeb1b00711</ID>
            <DisplayName>user@domain.tld</DisplayName>
        </Initiator>
        <Owner>
            <ID>cfb56e5c17b4c1388a963adeb1b00711</ID>
            <DisplayName>user@domin.tld</DisplayName>
        </Owner>
        <StorageClass>STANDARD</StorageClass>
        <Initiated>2018-01-25T23:53:26.105Z</Initiated>
    </Upload>
</ListMultipartUploadsResult>

PUT Bucket

This PUT request will create a new bucket. This requires valid credentials as you cannot create a new bucket anonymously. The creator of a bucket becomes the bucket's owner.

The supported request headers are:

Header Description
x-amz-acl A canned ACL: private, public-read, public-read-write, authenticated-read

or use these headers to set permissions explicitly:

Header Description
x-amz-grant-read
x-amz-grant-write
x-amz-grant-read-acp
x-amz-grant-write-acp
x-amz-grant-full-control

S3 Object Storage supports an additional x-gmt-policyid request header:

Header Description
x-gmt-policyid The unique ID of the storage policy to be assigned to the bucket.

The request elements are:

Element Description
CreateBucketConfiguration A container for bucket information.
LocationConstraint Omit, or use "de" as the location.

Please Note: The name you choose for a bucket is very important and there are a number of restrictions on the names you may choose.

  • The name MUST be globally unique, so you may find that your first choice for a bucket name is already taken and therefore unavailable.
  • Bucket names should be DNS friendly which includes being 3 to 63 characters in length, containing only letters (preferably lowercase) and numbers. While you can technically use some special characters such as -, _, and . it is not recommended as it could lead to difficulties in using the bucket.

To create a new bucket named "examplebucket2", send this PUT request:

PUT / HTTP/1.1
Host: examplebucket2.s3-de-central.profitbricks.com
Content-Length: length
Date: date
Authorization: authorization string

A valid request will receive a "200 OK" response with headers and no body content.

Content-Length →0
Date →Thu, 07 Dec 2017 22:37:32 GMT
Location →http://examplebucket2.s3-de-central.profitbricks.com
Server →CloudianS3
x-amz-id-2 →H54TdLEE4c6zTaoGfpB5cqa_tE_UoLG7SKUhhMOJD8s
x-amz-request-id →5c5df0f2-9c4d-1385-be09-0cc47af2c4a0

You may also pass in XML:

PUT / HTTP/1.1
Host: examplewebbucket.s3-de-central.profitbricks.com
Content-Length: length
Date: date
Authorization: authorization string

<CreateBucketConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
  <LocationConstraint>de</LocationConstraint>
</CreateBucketConfiguration>

Which should generate response headers similar to:

Content-Length →0
Date →Mon, 15 Jan 2018 20:40:56 GMT
Location →http://examplewebbucket.s3-de-central.profitbricks.com
Server →CloudianS3
x-amz-id-2 →H54TdLEE4c6zTaoGfpB5cqa_tE_UoLG7SKUhhMOJD8s
x-amz-request-id →226315a4-d6bd-1ff2-be09-0cc47af2c4a0

PUT Bucket acl

Sets permissions on an existing bucket using access control lists (ACL).

The supported request headers are:

Header Description
x-amz-acl A canned ACL: private, public-read, public-read-write, authenticated read

or use these headers to set permissions explicitly:

Header Description
x-amz-grant-read
x-amz-grant-write
x-amz-grant-read-acp
x-amz-grant-write-acp
x-amz-grant-full-control

The supported request elements are:

Element Description
AccessControlList
AccessControlPolicy
DisplayName
Grant
Grantee
ID
Owner
Permission

You can set permissions using either the request headers or the request body, but not both at the same time.

To set a "public-read" canned ACL on the bucket named "examplebucket2", send this PUT request:

PUT /?acl HTTP/1.1
Host: examplebucket2.s3-de-central.profitbricks.com
Content-Length: length
Date: date
Authorization: authorization string
x-amz-acl: public-read

A valid request will receive a "200 OK" response with headers and no body content.

Content-Length →0
Date →Thu, 07 Dec 2017 22:46:11 GMT
Server →CloudianS3
x-amz-request-id →5c5df6b2-9c4d-1385-be09-0cc47af2c4a0

PUT Bucket lifecycle

Set lifecycle information on a bucket using XML.

PUT /?lifecycle HTTP/1.1
Host: examplebucket.s3-de-central.profitbricks.com
Content-Length: length
Content-Type: text/xml
Date: date
Authorization: authorization string

<LifecycleConfiguration>
  <Rule>
    <ID>id1</ID>
    <Filter>
       <Prefix>/</Prefix>
    </Filter>
    <Status>Enabled</Status>
    <Expiration>
      <Days>365</Days>
    </Expiration>
  </Rule>
</LifecycleConfiguration>
Content-Length →0
Date →Thu, 11 Jan 2018 00:27:59 GMT
Server →CloudianS3
x-amz-request-id →9d4adb07-86a6-18bd-a1be-0cc47af2c4a6

PUT Bucket policy

Bucket policy controlling access and usage permissions can be set using JSON.

Please Note: Note Regardless of any bucket policies, a bucket owner always has full access to her bucket and the objects in it; and an object owner always has full access to her object.

The request body is a JSON-formatted bucket policy containing one or more policy statements. Within a policy's Statement block(s), S3 Object Storage support for policy statement elements and their values is as follows:

Element Notes
Sid Custom string identifying the statement, for example "Statement1" or "Only allow access from partner source IPs"
Effect "Allow" or "Deny"
Principal Must be one of the following: "" -- Statement applies to all users. {"CanonicalUser": ""} -- Statement applies to the specified user. {"CanonicalUser": ["", ""]} -- Statement applies to the specified users. Note: You can obtain a user's canonical ID via the DCD. | | Action | See details below. | | Resource | Must be one of: "arn:aws:s3:::" -- For bucket actions (such as "s3:ListBucket") and bucket subresource actions (such as "s3:GetBucketAcl"). "arn:aws:s3:::/" or "arn:aws:s3:::/" -- For object actions (such as "s3:PutObject").
Condition See details below.

Supported "Action" Values

Within bucket policy statements, S3 Object Storage supports only the following Action values (also known as permission keywords).

Object Actions
s3:AbortMultipartUpload
s3:DeleteObject
s3:DeleteObjectVersion
s3:GetObject
s3:GetObject
s3:GetObjectAcl
s3:GetObjectVersion
s3:GetObjectVersionAcl
s3:ListMultipartUploadParts
s3:PutObject
s3:PutObjectAcl
s3:PutObjectVersionAcl
s3:RestoreObject
Bucket Actions
s3:CreateBucket
s3:DeleteBucket
s3:ListBucket
s3:ListBucketMultipartUploads
s3:ListBucketVersions
Bucket Subresource Actions
s3:DeleteBucketPolicy
s3:DeleteBucketWebsite
s3:GetBucketAcl
s3:GetBucketCORS
s3:GetBucketLocation
s3:GetBucketLogging
s3:GetBucketNotification
s3:GetBucketPolicy
s3:GetBucketRequestPayment
s3:GetBucketTagging
s3:GetBucketVersioning
s3:GetBucketWebsite
s3:GetLifecycleConfiguration
s3:GetReplicationConfiguration
s3:PutBucketAcl
s3:PutBucketCORS
s3:PutBucketLogging
s3:PutBucketNotification
s3:PutBucketPolicy
s3:PutBucketRequestPayment
s3:PutBucketTagging
s3:PutBucketVersioning
s3:PutBucketWebsite
s3:PutLifecycleConfiguration
s3:PutReplicationConfiguration

Note: The S3 Object Storage system supports the use of a wildcard in your Action configuration ("Action":["s3:*"]). When an Action wildcard is used together with an object-level Resource element ("arn:aws:s3:::/*" or "arn:aws:s3:::/"), the wildcard denotes all the supported Object actions. When an Action wildcard is used together with bucket-level Resource element ("arn:aws:s3:::"), the wildcard denotes all the supported Bucket actions and Bucket Subresource actions.

Supported "Condition" Values

Within bucket policy statements, S3 Object Storage supports only the following Condition operators and keys.

Condition Operators
IpAddress
NotIpAddress
NumericEquals
NumericNotEquals
NumericLessThan
NumericLessThanEquals
NumericGreaterThan
NumericGreaterThanEquals
StringEquals
StringNotEquals
StringEqualsIgnoreCase
StringNotEqualsIgnoreCase
StringLike
StringNotLike
Condition Keys
aws:Referer
aws:SourceIp
s3:delimiter
s3:LocationConstraint
s3:max-keys
s3:prefix
s3:VersionId
s3:x-amz-acl
s3:x-amz-copy-source
s3:x-amz-grant-full-control
s3:x-amz-grant-read
s3:x-amz-grant-read-acp
s3:x-amz-grant-write
s3:x-amz-grant-write-acp
s3:x-amz-metadata-directive
s3:x-amz-server-side-encryption

An example policy that allows all access to a bucket name examplebucket for a specific user.

PUT /?policy HTTP/1.1
Host: examplebucket.s3-de-central.profitbricks.com
Content-Length: length
Content-Type: text/xml
Date: date
Authorization: authorization string

{
  "Version": "2018-01-01",
  "Statement": [
    {
      "Sid": "AllowAll User",
      "Effect": "Allow",
      "Principal": {
        "CanonicalUser": "xxxxx73034a1xxxxx697181875axxxxx"
      },
      "Action": [
        "s3:*"
      ],
      "Resource": "arn:aws:s3:::examplebucket"
    }
  ]
}

There is no response body when the request is accepted, just a "204 No Content" and these headers:

Date →Thu, 25 Jan 2018 22:36:13 GMT
Server →CloudianS3
x-amz-request-id →19c33b8c-c100-1ff4-be09-0cc47af2c4a0

PUT Bucket logging

This PUT operation can be used to enable or disable logging settings and manage permissions related to accessing the bucket activity logs.

PUT /?logging HTTP/1.1
Host: examplebucket.s3-de-central.profitbricks.com
Date: date
Authorization: authorization string
Request Elements
BucketLoggingStatus
EmailAddress
Grant
Grantee
LoggingEnabled
Permission
TargetBucket
TargetGrants
TargetPrefix

PUT Bucket tagging

This operation can be used to apply tags to buckets in order to organize and track them.

Request Headers
Content-MD5
Request Elements
Tagging
TagSet
Tag
Key
Value

Special Errors

  • InvalidTagError
  • MalformedXMLError
  • OperationAbortedError
  • InternalError
PUT /?tagging HTTP/1.1
Host: examplebucket2.s3-de-central.profitbricks.com
Date: date
Authorization: authorization string
Content-MD5:

<Tagging>
  <TagSet>
     <Tag>
       <Key>Department</Key>
       <Value>webdev</Value>
     </Tag>
     <Tag>
       <Key>Coordinator</Key>
       <Value>auser</Value>
     </Tag>
  </TagSet>
</Tagging>

If you don't include the Content-MD5 header, you'll get "400 - Bad Request" and this XML body:

<?xml version="1.0" encoding="UTF-8"?>
<Error>
    <Code>InvalidRequest</Code>
    <Message>Missing required header for this request: Content-MD5</Message>
    <RequestId>29950cd8-8501-1ecb-b29d-0cc47af2c498</RequestId>
    <HostId>FVqRz72LCRTiUvVKH-VpiEXa5EX3643IbdE6Tyu0-FE</HostId>
</Error>

If the MD5 hash you supplied is incorrect, you'll get "400 - Bad Request" and this XML body:

<?xml version="1.0" encoding="UTF-8"?>
<Error>
    <Code>BadDigest</Code>
    <Message>The Content-MD5 you specified did not match what we received.</Message>
    <RequestId>29951b7c-8501-1ecb-b29d-0cc47af2c498</RequestId>
    <HostId>FVqRz72LCRTiUvVKH-VpiEXa5EX3643IbdE6Tyu0-FE</HostId>
    <ExpectedDigest>06c7d94059a28d3f1471f2062e50b012</ExpectedDigest>
    <CalculatedDigest>3W7LLUM3YadP0eeV4DUSuw==</CalculatedDigest>
</Error>

A valid request will receive a "200 OK" response with headers and no body content.

Content-Length →0
Date →Thu, 07 Dec 2017 23:18:13 GMT
Location →http://examplebucket2.s3-de-central.profitbricks.com
Server →CloudianS3
x-amz-id-2 →FVqRz72LCRTiUvVKH-VpiEXa5EX3643IbdE6Tyu0-FE
x-amz-request-id →29950b4c-8501-1ecb-b29d-0cc47af2c498

PUT Bucket versioning

Used to enable or suspend versioning on a bucket.

Request Elements Description
Status Either Enabled or Suspended.
VersioningConfiguration A container to hold the Status setting.
PUT /?versioning HTTP/1.1
Host: examplebucket.s3-de-central.profitbricks.com
Date: date
Authorization: authorization string

<VersioningConfiguration>
  <Status>Enabled</Status>
</VersioningConfiguration>

The request will respond with "200 OK" if it is accepted.

To suspend versioning, use a PUT request and set the <Status> to Suspended.

PUT /?versioning HTTP/1.1
Host: examplebucket.s3-de-central.profitbricks.com
Date: date
Authorization: authorization string

<VersioningConfiguration>
  <Status>Suspended</Status>
</VersioningConfiguration>

You can verify the versioning status of a bucket using a GET /?versioning request or remove versioning with a DELETE /?versioning request.

PUT Bucket website

Use this operation to configure a S3 bucket to serve static web content.

Request Elements
WebsiteConfiguration
RedirectAllRequestsTo
HostName
Protocol
WebsiteConfiguration
IndexDocument
ErrorDocument
PUT /?website HTTP/1.1
Host: examplewebbucket.s3-de-central.profitbricks.com
Date: date
Authorization: authorization string

<WebsiteConfiguration>
    <IndexDocument>
        <Suffix>index.html</Suffix>
    </IndexDocument>
    <ErrorDocument>
        <Key>error.html</Key>
    </ErrorDocument>
</WebsiteConfiguration>

You should receive a "200 OK" response with just headers:

Content-Length →0
Date →Fri, 26 Jan 2018 07:45:27 GMT
Server →CloudianS3
x-amz-request-id →689ab8f6-12c5-1eef-8b5d-0cc47ad3f148

You will also need to grant GetObject access to everyone. One way to do this is using a policy:

PUT /?policy HTTP/1.1
Host: examplewebbucket.s3-de-central.profitbricks.com
Date: date
Authorization: authorization string

{
  "Version": "2018-01-25",
  "Statement": [
    {
      "Sid": "AllowAll Website",
      "Effect": "Allow",
      "Principal": "*",
      "Action": ["s3:GetObject"],
      "Resource": ["arn:aws:s3:::examplewebbucket/*"]
    }
  ]
}

Once that is in place, you should be able to access your website by navigating to:

http://examplewebbucket.s3-website-de-central.profitbricks.com

Object Operations

The available CRUD (Create, Read, Update, Delete) operations for objects are handled with these operations.

DELETE Object

Deletes a single object using a DELETE request, replacing it with a delete marker.

Response Headers
x-amz-delete-marker
x-amz-version-id
DELETE /test-0 HTTP/1.1
Host: examplebucket.s3-de-central.profitbricks.com
Date: date
Content-Length: length
Authorization: authorization string

A successful request returns "204 No Content" and some headers:

Date →Mon, 29 Jan 2018 19:35:46 GMT
Server →CloudianS3
x-amz-request-id →647ab354-98fd-1b45-b83f-0cc47ad3f0d6

If you want to delete a specific version of an object, then append the versionId like this:

DELETE /index.html?versionId=fe1805c1-8c32-b3ff-be09-0cc47af2c4a0 HTTP/1.1
Host: examplebucket.s3-de-central.profitbricks.com
Date: date
Content-Length: length
Authorization: authorization string

If successful, you'll receive the same "204 No Content" status and an additional x-amz-version-id header confirming the version of the object that was deleted.

Date →Mon, 29 Jan 2018 19:42:27 GMT
Server →CloudianS3
x-amz-request-id →647ab514-98fd-1b45-b83f-0cc47ad3f0d6
x-amz-version-id →fe1805c1-8c32-b3ff-be09-0cc47af2c4a0

Delete Multiple Objects

Multiple objects can be deleted in a single POST request by providing an XML body specifying up to 1000 object keys to delete.

Request Headers
Content-MD5
Content-Length

The Content-MD5 request header is required, else this error is returned.

<?xml version="1.0" encoding="UTF-8"?>
<Error>
    <Code>InvalidRequest</Code>
    <Message>Missing required header for this request: Content-MD5</Message>
    <RequestId>72825738-d9d9-1ddf-bf4d-0cc47af2c48c</RequestId>
    <HostId>vJmLxD3p5GJofYzuXwsMWaksJb4AGwEhs6boRk87OV0</HostId>
</Error>

To pass this in using Postman, you can utilize the "Pre-request Script" tab. Enter the following code snippet:

// MD5 digest of the content
var md5digest = CryptoJS.MD5(request.data);
var base64md5 = CryptoJS.enc.Base64.stringify(md5digest);
pm.environment.set("contentmd5", base64md5);

Then add a header with the Key set to "Content-MD5" and a value of ""

Request Elements
Delete
Quiet
Object
Key
VersionId

Construct the XML body containing the keys for each object that you want to delete:

<Delete>
    <Quiet>false</Quiet>
    <Object>
         <Key>test-1</Key>
    </Object>
    <Object>
         <Key>test-2</Key>
    </Object>
    <Object>
         <Key>test-3</Key>
    </Object>
</Delete>

You should get back a "200 OK" result with headers and content similar to this:

Connection →close
Content-Type →application/xml;charset=UTF-8
Date →Mon, 29 Jan 2018 20:52:13 GMT
Server →CloudianS3
x-amz-request-id →72826086-d9d9-1ddf-bf4d-0cc47af2c48c

<?xml version="1.0" encoding="UTF-8"?>
<DeleteResult xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
    <Deleted>
        <Key>test-1</Key>
    </Deleted>
    <Deleted>
        <Key>test-2</Key>
    </Deleted>
    <Deleted>
        <Key>test-3</Key>
    </Deleted>
</DeleteResult>

If your request had "" set to true then the returned body is much smaller:

Connection →close
Content-Type →application/xml;charset=UTF-8
Date →Mon, 29 Jan 2018 20:56:46 GMT
Server →CloudianS3
x-amz-request-id →7282619c-d9d9-1ddf-bf4d-0cc47af2c48c

<?xml version="1.0" encoding="UTF-8"?>
<DeleteResult xmlns="http://s3.amazonaws.com/doc/2006-03-01/"></DeleteResult>
Response Elements
DeleteResult
Deleted
Key
VersionId
DeleteMarker
DeleteMarkerVersionId
Error
Key
VersionId
Code
Message

GET Object

Retrieves a specific object using a GET request.

Request Parameters
response-content-type
response-content-language
response-expires
response-cache-control
response-content-disposition
response-content-encoding
Request Headers
Range
If-Modified-Since
If-Unmodified-Since
If-Match
If-None-Match
x-amz-server-side-encryption-customer-algorithm
x-amz-server-side-encryption-customer-key
x-amz-server-side-encryption-customer-key-MD5
Response Headers
x-amz-delete-marker
x-amz-expiration
x-amz-meta-*
x-amz-server-side-encryption
x-amz-restore
x-amz-version-id
x-amz-website-redirect-location
x-amz-server-side-encryption-customer-algorithm
x-amz-server-side-encryption-customer-key-MD5

Example

This basic example would retrieve an object named my-picture.png from the bucket named examplebucket.

GET /my-picture.png HTTP/1.1
Host: examplebucket.s3-de-central.profitbricks.com
Date: date
Authorization: authorization string

GET Object acl

Use this GET request to retrieve access control list information for a specific object.

GET /test-0?acl HTTP/1.1
Host: examplebucket.s3-de-central.profitbricks.com
Date: date
Authorization: authorization string

XML encoded information will be returned:

<?xml version="1.0" encoding="UTF-8"?>
<AccessControlPolicy xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
    <Owner>
        <ID>xxxxxx5c17b4c1388a963adeb1xxxxxx</ID>
        <DisplayName>user@domain.tld</DisplayName>
    </Owner>
    <AccessControlList>
        <Grant>
            <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="CanonicalUser">
                <ID>xxxxxx5c17b4c1388a963adeb1xxxxxx</ID>
                <DisplayName>user@domain.tld</DisplayName>
            </Grantee>
            <Permission>FULL_CONTROL</Permission>
        </Grant>
    </AccessControlList>
</AccessControlPolicy>
Response Elements
AccessControlList
AccessControlPolicy
DisplayName
Grant
Grantee
ID
Owner
Permission

HEAD Object

This HEAD request retrieves information about an object but does not return the object itself.

Request Headers
Range
If-Modified-Since
If-Unmodified-Since
If-Match
If-None-Match
x-amz-server-side-encryption-customer-algorithm
x-amz-server-side-encryption-customer-key
x-amz-server-side-encryption-customer-key-MD5
Response Headers
x-amz-expiration
x-amz-meta-*
x-amz-restore
x-amz-server-side-encryption
x-amz-server-side-encryption-customer-algorithm
x-amz-server-side-encryption-customer-key-MD5
x-amz-version-id
HEAD /my-picture.png HTTP/1.1
Host: examplebucket.s3-de-central.profitbricks.com
Date: date
Authorization: authorization string
Accept-Ranges →bytes
Content-Length →4028169
Content-Type →image/jpeg
Date →Tue, 19 Dec 2017 10:38:23 GMT
ETag →"af2f4ca27249ee7433027649163d0b99"
Last-Modified →Fri, 17 Nov 2017 00:51:06 GMT
Server →CloudianS3
x-amz-meta-cb-modifiedtime →Wed, 15 Nov 2017 19:07:00 GMT
x-amz-request-id →05b1a806-aa47-1886-8412-0cc47ad3f142

POST Object

The POST object operation allows you to add an object to a bucket using an HTML form.

POST / HTTP/1.1
Host: examplebucket.s3-de-central.profitbricks.com
...
Form Fields
AWSAccessKeyId
acl
Cache-Control, Content-Type, Content-Disposition, Content-Encoding, Expires
file
key
policy
success_action_redirect, redirect
success_action_status
x-amz-storage-class
x-amz-meta-*
x-amz-website-redirect-location
x-amz-server-side-encryption
x-amz-server-side-encryption-customer-algorithm
x-amz-server-side-encryption-customer-key
x-amz-server-side-encryption-customer-key-MD5

Please Note: The x-amz-meta* metadata values must be UTF-8 and must not contain control characters less than 0x20 except for , , and . Also, normal XML escaping is required where appropriate.

Response Headers
x-amz-expiration
success_action_redirect, redirect
x-amz-server-side-encryption
x-amz-server-side-encryption-customer-algorithm
x-amz-server-side-encryption-customer-key-MD5
x-amz-version-id
Response Elements
Bucket
ETag
Key
Location

PUT Object

This PUT operation is used to add an object to a bucket.

PUT /exampleobject.ext HTTP/1.1
Host: examplebucket.s3-de-central.profitbricks.com
Date: date
Authorization: authorization string
Request Headers
Cache-Control
Content-Disposition
Content-Encoding
Content-Length
Content-MD5
Content-Type
Expect
Expires
x-amz-meta-*
x-amz-storage-class
x-amz-website-redirect-location
x-amz-acl
x-amz-grant-read
x-amz-grant-write
x-amz-grant-read-acp
x-amz-grant-write-acp
x-amz-grant-full-control
x-amz-server-side-encryption
x-amz-server-side-encryption-customer-algorithm
x-amz-server-side-encryption-customer-key
x-amz-server-side-encryption-customer-key-MD5

Restrictions on Object Names

The following control characters cannot be used anywhere in an object name and will result in a 400 Bad Request response: 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A (""), 0x0B, 0x0C, 0x0D (""), 0x0E, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F

Also unsupported are:

  • 0x09 ("") at the beginning of an object name
  • 0xBF (inverted question mark) at the end of an object name

Also, an object name may result in 400 Bad Request or be stored as a different name if the supplied object name:

  • Consists only of "."
  • Consists only of ".."
  • Contains a combination of "." and "/", or ".." and "/"

Examples of object names that will result in 400 Bad Request:

  • .
  • ..
  • ./
  • ../
  • ./.
  • ./..
  • ../.
  • ../..
  • ../a
  • ../a/
  • a/../../b

Examples of object names that will be stored as a different name:

Supplied Object Name Stored As
./a a
./a/ a/
a//b a/b
a/./b a/b
a/../b b
a/.././b b
Response Headers
x-amz-expiration
x-amz-server-side-encryption
x-amz-server-side-encryption-customer-algorithm
x-amz-server-side-encryption-customer-key-MD5
x-amz-version-id

PUT Object acl

This PUT operation modifies permissions on an existing object via a request body or using request headers.

PUT /ExampleObject?acl HTTP/1.1
Host: examplebucket.s3-de-central.profitbricks.com
Date: date
Authorization: authorization string
Request Headers
x-amz-acl
x-amz-grant-read
x-amz-grant-write
x-amz-grant-read-acp
x-amz-grant-write-acp
x-amz-grant-full-control
Request Elements
AccessControlList
AccessControlPolicy
DisplayName
Grant
Grantee
ID
Owner
Permission
Response Headers
x-amz-version-id

PUT Object Copy

Use this PUT operation to copy an object from one bucket to another and optionally set new permissions (acl) on the copy.

PUT /NewDestinationObject HTTP/1.1
Host: newexamplebucket.s3-de-central.profitbricks.com
x-amz-copy-source: /examplesourcebucket/examplesourceobject
Aauthorization: authorization string
Date: date
Request Headers
x-amz-copy-source
x-amz-metadata-directive
x-amz-copy-source-if-match
x-amz-copy-source-if-none-match
x-amz-copy-source-if-unmodified-since
x-amz-copy-source-if-modified-since
x-amz-storage-class
x-amz-website-redirect-location
x-amz-server-side-encryption
x-amz-server-side-encryption-customer-algorithm
x-amz-server-side-encryption-customer-key
x-amz-server-side-encryption-customer-key-MD5
x-amz-copy-source-server-side-encryption-customer-algorithm
x-amz-copy-source-server-side-encryption-customer-key
x-amz-copy-source-server-side-encryption-customer-key-MD5
x-amz-acl
x-amz-grant-read
x-amz-grant-write
x-amz-grant-read-acp
x-amz-grant-write-acp
x-amz-grant-full-control
Response Headers
x-amz-expiration
x-amz-copy-source-version-id
x-amz-server-side-encryption
x-amz-version-id
Response Elements
CopyObjectResult
ETag
LastModified

Initiate Multipart Upload

This operation is used to start a multipart upload and will return the upload ID needed for other multipart upload operations.

Please Note: S3 Object Storage has been tested for multipart uploads of objects up to 50GB in total size (number of parts X size-per-part = up to 50GB).

POST /exampleobject?uploads HTTP/1.1
Host: examplebucket.s3-de-central.profitbricks.com
Date: date
Authorization: authorization string
Request Headers
Cache-Control
Content-Disposition
Content-Encoding
Content-Type
Expires
x-amz-meta-
x-amz-storage-class
x-amz-website-redirect-location
x-amz-acl
x-amz-grant-read
x-amz-grant-write
x-amz-grant-read-acp
x-amz-grant-write-acp
x-amz-grant-full-control
x-amz-server-side-encryption
x-amz-server-side-encryption-customer-algorithm
x-amz-server-side-encryption-customer-key
x-amz-server-side-encryption-customer-key-MD5
Response Headers
x-amz-abort-date
x-amz-abort-rule-id
x-amz-server-side-encryption
x-amz-server-side-encryption-customer-algorithm
x-amz-server-side-encryption-customer-key-MD5
Response Elements
InitiateMultipartUploadResult
Bucket
Key
UploadId

Upload Part

Use this PUT operation to upload a specified part of an multipart upload you have already initiated.

PUT /exampleobjectname?partNumber=1&uploadId=UploadId HTTP/1.1
Host: examplebucket.s3-de-central.profitbricks.com
Date: date
Content-Length: size
Content-MD5: MD5value
Authorization: authorization string
Request Headers
Content-Length
Content-MD5
Expect
x-amz-server-side-encryption
x-amz-server-side-encryption-customer-algorithm
x-amz-server-side-encryption-customer-key
x-amz-server-side-encryption-customer-key-MD5
Response Headers
x-amz-server-side-encryption
x-amz-server-side-encryption-customer-algorithm
x-amz-server-side-encryption-customer-key-MD5

Special Errors

  • NoSuchUpload

Upload Part Copy

This PUT operation is similar to the previous one, however the source for the "part" is located elsewhere on the S3 Object Storage system.

PUT /examplenewobject?partNumber=2&uploadId=UploadId HTTP/1.1
Host: examplebucket.s3-de-central.profitbricks.com
Date:  date
x-amz-copy-source: /examplesourcebucket/examplesourceobject
x-amz-copy-source-range:bytes=1000-8291456
Authorization: authorization string
Request Headers
x-amz-copy-source
x-amz-copy-source-range
x-amz-copy-source-if-match
x-amz-copy-source-if-none-match
x-amz-copy-source-if-unmodified-since
x-amz-copy-source-if-modified-since
Response Headers
x-amz-copy-source-version-id
x-amz-server-side-encryption
Response Elements
CopyPartResult
ETag
LastModified

Special Errors

  • NoSuchUpload
  • InvalidRequest

Complete Multipart Upload

This POST operation is used to indicate all parts of a multipart upload are present and the upload should be completed.

POST /exampleobject?uploadId=UploadId HTTP/1.1
Host: examplebucket.s3-de-central.profitbricks.com
Date:  date
Content-Length: size
Authorization: authorization string

<CompleteMultipartUpload>
  <Part>
    <PartNumber>1</PartNumber>
    <ETag>"012345abcdefghijklmnopqrstuvwxyz"</ETag>
  </Part>
  <Part>
    <PartNumber>2</PartNumber>
    <ETag>"abcdefghijklmnopqrstuvwxyz012345"</ETag>
  </Part>
</CompleteMultipartUpload>
Request Elements
CompleteMultipartUpload
Part
PartNumber
ETag
Response Headers
x-amz-expiration
x-amz-server-side-encryption
x-amz-version-id
Response Elements
CompleteMultipartUploadResult
Location
Bucket
Key
ETag

Special Errors

  • InvalidPart
  • InvalidPartOrder
  • NoSuchUpload

Abort Multipart Upload

Use this to abort a multipart upload.

DELETE /ObjectName?uploadId=UploadId HTTP/1.1
Host: examplebucket.s3-de-central.profitbricks.com
Date: Date
Authorization: authorization string

Special Errors

  • NoSuchUpload

List Parts

This operation returns information about the parts of a multipart upload.

Request Parameters
encoding-type
uploadId
max-parts
part-number-marker
GET ?uploadId=MDA0ZjIxMDgxNTE4NTM3NTA2Njc4
Host: examplebucket.s3-de-central.profitbricks.com
Date: Date
Authorization: authorization string
Response Elements
x-amz-abort-date
x-amz-abort-rule-id
ListPartsResult
Bucket
Encoding-Type
Key
UploadId
Initiator
ID
DisplayName
Owner
StorageClass
PartNumberMarker
NextPartNumberMarker
MaxParts
IsTruncated
Part
PartNumber
LastModified
ETag
Size
<?xml version="1.0" encoding="UTF-8"?>
<ListBucketResult xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
    <Name>spctest1</Name>
    <Prefix/>
    <Marker/>
    <MaxKeys>1000</MaxKeys>
    <IsTruncated>false</IsTruncated>
    <Contents>
        <Key>filename.ext</Key>
        <LastModified>2018-01-27T06:03:22.135Z</LastModified>
        <StorageClass>STANDARD</StorageClass>
        <Size>245481472</Size>
        <ETag>&quot;89da8840f6557e76177c6c61a2c46832-24&quot;</ETag>
        <Owner>
            <ID>cfb56e5c17b4c1388a963adeb1b00711</ID>
            <DisplayName>user@domain.tld</DisplayName>
        </Owner>
    </Contents>
    <Contents>
        <Key>filename</Key>
        <LastModified>2018-01-26T23:18:23.180Z</LastModified>
        <StorageClass>STANDARD</StorageClass>
        <Size>1048576</Size>
        <ETag>&quot;fe15dfa1c9bc2baf672e2bf043de0053&quot;</ETag>
        <Owner>
            <ID>cfb56e5c17b4c1388a963adeb1b00711</ID>
            <DisplayName>user@domain.tld</DisplayName>
        </Owner>
    </Contents>
</ListBucketResult>

Summary

If you run into a specific issue with this API, please open a discussion here on DevOps Central, or reach out to your IONOS support team.