SAVE AS PDF
Lyve Cloud Object Storage API User Guide 
Lyve Cloud Object Storage API User Guide 

Was this content helpful?

OPEN MENU CLOSE MENU

Lyve S3

The Lyve S3 endpoint (https://s3.example.lyve.seagate.com) lets you perform operations on files and buckets. Requests to this endpoint must be signed with AWS Signature V4 or V2, specifying S3 as the service.

 Only path-style requests are supported.

Bucket: Add

Creates the specified bucket.

Example:

PUT /my-bucket
 Anonymous requests are not allowed to create buckets.

Parameters

The replication-policy parameter can be used to specify the list of regions where to replicate the bucket. If not specified, buckets are replicated in every region. Specify a comma separated list of regions identifiers, for example:

PUT /my-bucket?replication-policy=DCA02,DEN02,SJC03

Response

Example:

  
 HTTP/1.1 200 OK
 Date: Mon, 22 Jul 2019 09:48:09 GMT
 Content-Length: 0
  

Bucket: Delete

Deletes the specified bucket.

Example:

DELETE /my-bucket
 Anonymous requests are not allowed to delete buckets.

Response

Returns can be one of the following:

  • 200: Success
  • 404: Bucket does not exist
  • 409: Conflict error if the bucket is not empty

Example:

  
 HTTP/1.1 200 OK
 Date: Mon, 22 Jul 2019 09:48:09 GMT
 Content-Length: 0
  

Bucket: Retrieve

Retrieves metadata and configuration details about the specified bucket.

Examples:

GET /my-bucket
GET /my-bucket?list-type=2
GET /abc-bucket/?list-type=2&delimiter=/&max-keys=300&prefix=test-a/

Parameters

The following parameters can be specified:

ParameterDescription
list-typeWhen set to "2", specifies that the ListObjectsV2 format should be used.
max-keysSpecifies a maximum number of keys to be returned. Defaults to the maximum value of 1000.
prefixFilters the returned keys by prefix. Can be used to specify a directory.
continuation-tokenPagination token, which can be set to the NextContinuationToken element of the previous result page. (If list-type is not set, "marker" should be used instead.)
fetch-ownerReturns owner field with each key in the result.
start-afterSpace will start listing after this specified key. Can be any key in the bucket.
 Note that, if specified, “/” is the only supported delimiter.

Response

On success, an XML document is returned, containing the first max-keys items of the requested listing. When the listing contains more than max-keys items, the response contains the elements <IsTruncated>true</IsTruncated>, and a pagination token that can be used to retrieve the next page (<NextContinuationToken> if list-type=2, or NextMarker).

  • If the prefix parameter is specified and ends with a forward slash, the contents of the listing are the files and folder in that directory.
  • If the prefix parameter does not contain a slash, it is used to filter the contents of the parent folder.
  • The listing is sorted in lexicographical order.

Example (in ListObjectsV2 format):

  
    <?xml version="1.0" encoding="UTF-8"?>
    <ListBucketResult xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
      <Name>my-bucket</Name>
      <Prefix></Prefix>
      <ContinuationToken></ContinuationToken>
      <MaxKeys>300</MaxKeys>
      <KeyCount>4</KeyCount>
      <Delimiter>/</Delimiter>
      <IsTruncated>false</IsTruncated>
      <Contents>
        <Key>files.zip</Key>
        <LastModified>2019-02-23T12:41:11.000Z</LastModified>
        <Size>25617859</Size>
        <Owner>
          <ID>0</ID>
        </Owner>
        <StorageClass>STANDARD</StorageClass>
      </Contents>
      <CommonPrefixes>
        <Prefix>example-directory/</Prefix>
      </CommonPrefixes>
      <CommonPrefixes>
        <Prefix>other-directory/</Prefix>
      </CommonPrefixes>
    </ListBucketResult>
  

Bucket: Retrieve (Versioned)

This request is similar to Bucket: Retrieve on a non-versioned bucket, but returns all the versions for a specified prefix including all elements marked as DeleteMarker. A delete marker is a marker that points to a specific object in the bucket and indicates that this object is deleted. Every deleted object has a specific VersionId.

Example:

GET /abc-bucket/?prefix=myprefix&versions=

Example with AWS client:

aws s3api list-object-versions --bucket examplebucket --prefix myprefix

Response

On success, an XML document is returned, containing the first max-keys items of the requested listing. When the listing contains more than max-keys items, then the response contains the elements <IsTruncated>true</IsTruncated>. Every version for the specified prefix is returned. The latest version is marked using the element <IsLatest>true</IsLatest>.

Example:

  
    {
      "DeleteMarkers": [
        {
          "Owner": {
            "ID": "100000000001"
          },
          "IsLatest": true,
          "VersionId": "itdou5ddl1j558z4",
          "Key": "doc2.jpg",
          "LastModified": "2019-07-18T09:58:58.1718141Z"
        }
      ],
      "Versions": [
        {
          "LastModified": "2019-07-18T09:58:42.7619115Z",
          "VersionId": "s343opv4r1hv2vx3",
          "ETag": "\"324f6cbcfdf2420dd63890234a9f2f14\"",
          "StorageClass": "STANDARD",
          "Key": "doc2.jpg",
          "Owner": {
            "ID": "100000000001"
          },
          "IsLatest": true,
          "Size": 149951
        },
        {
          "LastModified": "2019-07-18T09:58:28.3141363Z",
          "VersionId": "scmsdt1jl0395uby",
          "ETag": "\"324f6cbcfdf2420dd63890234a9f2f14\"",
          "StorageClass": "STANDARD",
          "Key": "doc1.jpg",
          "Owner": {
            "ID": "100000000001"
          },
          "IsLatest": true,
          "Size": 149951
        },
        {
          "LastModified": "2019-07-18T09:58:12.0506257Z",
          "VersionId": "536znyl9hzlgczh3",
          "ETag": "\"f3658d735ac33d68a23909b1d2583421\"",
          "StorageClass": "STANDARD",
          "Key": "doc3.jpg",
          "Owner": {
            "ID": "100000000001"
          },
          "IsLatest": true,
          "Size": 578504
        }
      ]
    }
  

Bucket: Retrieve Bucket List

Returns a list of all the buckets the current user can access.

GET /

Response

Example:

  
    <?xml version="1.0" encoding="UTF-8"?>
    <ListAllMyBucketsResult xmlns="http://s3.amazonaws.com/doc/2006-03-01">
     <Buckets>
      <Bucket>
       <Name>private-bucket</Name>
       <CreationDate>2019-04-24T17:20:01.997Z</CreationDate>
      </Bucket>
      <Bucket>
       <Name>public-bucket</Name>
       <CreationDate>2019-04-24T17:18:59.552Z</CreationDate>
      </Bucket>
     </Buckets>
     <Owner>
      <ID>100000000013</ID>
      <DisplayName>example</DisplayName>
     </Owner>
    </ListAllMyBucketsResult>
  

Bucket CORS: Retrieve

Returns the CORS configuration information set for the bucket.

Example:

  
    GET /?cors HTTP/1.1
    Host: Bucket.s3.lyve.seagate.com
  
 To use this operation, you must have permission to perform the s3:GetBucketCORS action. By default, the bucket owner has this permission and can grant it to others.

Response

Example:

  
    HTTP/1.1 200
    Content-Type: application/xml

    <?xml version="1.0" encoding="UTF-8"?>
    <CORSConfiguration>
       <CORSRule>
          <AllowedHeader>string</AllowedHeader>
          ...
          <AllowedMethod>string</AllowedMethod>
          ...
          <AllowedOrigin>string</AllowedOrigin>
          ...
          <ExposeHeader>string</ExposeHeader>
          ...
          <MaxAgeSeconds>integer</MaxAgeSeconds>
       </CORSRule>
       ...
    </CORSConfiguration>
  

Bucket CORS: Set

Sets the CORS configuration for your bucket. If a configuration already exists, the new CORS replaces it.

To use this operation, you must be allowed to perform the s3:PutBucketCORS action. By default, the bucket owner has this permission and can grant it to others.

You set this configuration on a bucket so that the bucket can service cross-origin requests. For example, you might want to enable a request whose origin is http://www.example.com to access your Lyve bucket at my.example.bucket.com by using the browser's XMLHttpRequest capability.

To enable cross-origin resource sharing (CORS) on a bucket, you add the cors subresource to the bucket. The cors subresource is an XML document in which you configure rules that identify the origins and the HTTP methods that can be executed on your bucket. The document is limited to 64 KB.

When Lyve Cloud receives a cross-origin request (or a pre-flight OPTIONS request) against a bucket, it evaluates the cors configuration on the bucket and uses the first CORSRule that matches the incoming browser request to enable a cross-origin request. For a rule to match, the following conditions must be met:

  • The request's Origin header must match AllowedOrigin elements.
  • The request method (for example, GET, PUT, HEAD, and so on) or the Access-Control-Request-Method header in case of a pre-flight OPTIONS request must be one of the AllowedMethod elements.
  • Every header specified in the Access-Control-Request-Headers request header of a pre-flight request must match an AllowedHeader element.

In CORS request example 1, the first CORSRule allows cross-origin PUT, POST, and DELETE requests whose origin is http://www.example.com origins. The rule also allows all headers in a pre-flight OPTIONS request through the Access-Control-Request-Headers header. Therefore, in response to any pre-flight OPTIONS request, Lyve S3 will return any requested headers. The second rule allows cross-origin GET requests from all the origins. The '*' wildcard character refers to all origins.

In CORS configuration example 1, the single CORSRule includes the following additional optional parameters:

  • MaxAgeSeconds - Specifies the time in seconds that the browser will cache a Lyve Cloud response to a pre-flight OPTIONS request for the specified resource. In this example, the parameter is 3000 seconds. Caching enables the browser to avoid sending repeated pre-flight OPTIONS requests.
  • ExposeHeader - Identifies the response header (in this case x-lyve-example) that you want customers to access from their applications (for example, from a JavaScript XMLHttpRequest object).

CORS request example 1

  
    PUT / ?cors HTTP/1.1
    Host: Bucket.s3.amazonaws.com
    Content-MD5: ContentMD5

    <?xml version="1.0" encoding="UTF-8"?>
    <CORSConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
       <CORSRule>
          <AllowedHeader>string</AllowedHeader>
          ...
          <AllowedMethod>string</AllowedMethod>
          ...
          <AllowedOrigin>string</AllowedOrigin>
          ...
          <ExposeHeader>string</ExposeHeader>
          ...
          <MaxAgeSeconds>integer</MaxAgeSeconds>
       </CORSRule>
       ...
    </CORSConfiguration>
  

CORS configuration example 1

  
    <CORSConfiguration>
     <CORSRule>
       <AllowedOrigin>http://www.example.com</AllowedOrigin>
       <AllowedMethod>PUT</AllowedMethod>
       <AllowedMethod>POST</AllowedMethod>
       <AllowedMethod>DELETE</AllowedMethod>
       <AllowedHeader>*</AllowedHeader>
     </CORSRule>
     <CORSRule>
       <AllowedOrigin>*</AllowedOrigin>
       <AllowedMethod>GET</AllowedMethod>
     </CORSRule>
    </CORSConfiguration>
  

Bucket CORS: Delete

Deletes the CORS configuration information set for the bucket.

 To use this operation, you must have permission to perform the s3:PutBucketCORS action. By default, the bucket owner has this permission and can grant it to others.

Example:

  
    DELETE /?cors HTTP/1.1
    Host: Bucket.s3.lyve.seagate.com
  

Response

Example:

If the action is successful, the service sends back an HTTP 204 response with an empty HTTP body.

HTTP/1.1 204

Bucket Encryption: Retrieve

Returns the default encryption configuration for a bucket. 

 The s3:GetEncryptionConfiguration permission is required. Only root users or users with explicit permission can call this API.
 By default, all buckets have an encryption configuration that uses server-side encryption with Lyve-managed keys (SSE-S3).

The request does not have a request body.

Example:

  GET /<bucket>/?encryption

Example with AWS CLI:

  aws s3api get-bucket-encryption --bucket <bucket-name>

Response

Example:

  
    HTTP/1.1 200
    <?xml version="1.0" encoding="UTF-8"?>
    <ServerSideEncryptionConfiguration>
       <Rule>
          <ApplyServerSideEncryptionByDefault>
             <SSEAlgorithm>string</SSEAlgorithm>
          </ApplyServerSideEncryptionByDefault> 
       </Rule>
    </ServerSideEncryptionConfiguration>
  

Example from AWS CLI

  
    {
        "ServerSideEncryptionConfiguration": {
            "Rules": [
                {
                    "ApplyServerSideEncryptionByDefault": {
                        "SSEAlgorithm": "AES256"
                    }
                }
            ]
        }
    }
  

Note

The following operations are not currently supported:

  • PutBucketEncryption
  • DeleteBucketEncryption

Bucket Lifecycle: Retrieve

Return the current lifecycle configuration for a bucket (if present).

GET /<bucket>/?lifecycle

Example using the shell:

  
    aws s3api get-bucket-lifecycle-configuration --bucket examplebucket
  

Example request using HTTP:

  
    GET /examplebucket/?lifecycle HTTP/1.1
    Host: s3.lyve.seagate.com
    x-amz-date: Thu, 15 Nov 2012 00:17:21 GMT
    Authorization: signatureValue
  

Response

 The lifecycle configuration returned may differ from the response to a PUT operation, as it may contain more information.

Example:

  
    HTTP/1.1 200 OK
    x-amz-id-2: ITnGT1y4RyTmXa3rPi4hklTXouTf0hccUjo0iCPjz6FnfIutBj3M7fPGlWO2SEWp
    x-amz-request-id: 51991C342C575321
    Date: Thu, 15 Nov 2012 00:17:23 GMT
    Server: AmazonS3
    Content-Length: 358

    <?xml version="1.0" encoding="UTF-8"?>
    <LifecycleConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
      <Rule>
        <ID>Archive and then delete rule</ID>
        <Filter>
          <Prefix>projectdocs/</Prefix>
        </Filter>
        <Status>Enabled</Status>
        <Expiration>
          <Days>3650</Days>
        </Expiration>
      </Rule>
    </LifecycleConfiguration>
  

Bucket Lifecycle: Set

Stores a Lifecycle configuration for a given bucket. A lifecycle configuration is a set of rules that describes how lifecycle management for a specific object is perfomed. The following kind of rules are supported:

  • Expiration
  • NoncurrentVersionExpiration (applies only to buckets with versioning enabled or suspended)
  • ExpiredObjectDeleteMarker (applies only to buckets with versioning enabled)
  • AbortIncompleteMultipartUpload

Example:

PUT /<bucket>/?lifecycle

Example with AWS client:

  
aws s3api put-bucket-lifecycle-configuration --bucket examplebucket --lifecycle-configuration file://lifecycle.json
  

Note:

  • Transitions action is not supported
  • Tag is not supported in filter conditions
  • And is not supported in filter conditions
  • Date must be in "YYYY-MM-DDT00:00:00Z" format

Object Expiration

Note that RSTOR Space does not currently return the object expiration date in the x-amz-expiration header. To compute the object expiration date for an object:

  • Fetch all bucket lifecycle policies with GET /<bucket>/?lifecycle
  • Find the Expiration policy with the lowest Days field among the ones whose Filter applies to the current object
  • Sum the creation date of the object taken from the Last-Modified header with the Days indicated in the Expiration policy
  • If Expiration policies with Date field are being used, find the lowest between all Date fields whose Filter applies to the current object

Payload examples

  
    {
      "Rules": [
        {
          "ID": "Delete logs",
          "Status": "Enabled",
          "Filter": {
            "Prefix": "myapp_"
          },
          "Expiration": {
            "Days": 10
          }
        },
        {
          "Status": "Enabled",
          "Filter": {},
          "Expiration": {
            "ExpiredObjectDeleteMarker": true
          }
        },
        {
          "ID": "Delete aborted multipart",
          "Status": "Enabled",
          "Filter": {},
          "AbortIncompleteMultipartUpload": {
            "DaysAfterInitiation": 7
          }
        },
        {
          "Status": "Disabled",
          "Filter": {
            "Prefix": "logs/"
          },
          "NoncurrentVersionExpiration": {
            "NoncurrentDays": 2
          },
          "ID": "Delete old versions"
        }
      ]
    }
  

Response

Example:

HTTP/1.1 200 OK
x-amz-id-2: aXQ+KbIrmMmoO//3bMdDTw/CnjArwje+J49Hf+j44yRb/VmbIkgIO5A+PT98Cp/6k07hf+LD2mY=
x-amz-request-id: 02D7EC4C10381EB1
Date: Wed, 14 May 2014 02:21:50 GMT
Content-Length: 0
Server: AmazonS3

Bucket Lifecycle: Delete

Delete a lifecycle configuration for a bucket (if present).

DELETE /<bucket>/?lifecycle

Example request using HTTP:

  
    DELETE /examplebucket/?lifecycle HTTP/1.1
    Host: s3.lyve.seagate.com
    Date: date
    Authorization: authorization string
  

Example request using the shell:

  
    aws s3api delete-bucket-lifecycle-configuration --bucket examplebucket
  

Response

Example:

  
    HTTP/1.1 204 No Content
    x-amz-id-2: Uuag1LuByRx9e6j5OnimrSAMPLEtRPfTaOAa==
    x-amz-request-id: 656c76696e672SAMPLE5657374
    Date: Wed, 14 Dec 2011 05:37:16 GMT
    Connection: keep-alive
  

Bucket Logging: Retrieve

Retrieves a bucket logging configuration.

Example:

  
    GET /mybucketlog?logging HTTP/1.1
    Host: 127.0.0.1:32005
    Accept-Encoding: identity
    User-Agent: aws-cli/1.16.287 Python/3.7.3 Linux/4.19.0-8-amd64 botocore/1.13.23
    Content-MD5: NKhuLiQuQT2Icj+AzLFcTQ==
    X-Amz-Date: 20200212T203404Z
    X-Amz-Content-SHA256: 265e84e2b334e5566fcacffc9277caf252adc4cd4ff835bbc02df1266e116085
    Content-Length: 0
  

Response

Example:

  
    <?xml version="1.0" encoding="UTF-8"?>
    <BucketLoggingStatus>
    <LoggingEnabled>
        <TargetBucket>targetlog</TargetBucket>
        <TargetPrefix>logs/</TargetPrefix>
        <TargetGrants>
            <Grant>
            <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="AccessKey">
                <ID>STX_KEY_123</ID>
            </Grantee>
            </Grant>
        </TargetGrants>
    </LoggingEnabled>
    </BucketLoggingStatus>
  

Bucket Logging: Set

Sets the logging configuration for a bucket. All logs are saved to the specified target bucket using the provided access key.

 To set the logging status of a bucket, you must be the bucket owner.
  • To delete a Bucket Logging configuration, use a PUT operation passing an empty LoggingEnabled element
  • TargetBucket is the destination bucket (where the logs will be uploaded)
  • TargetPrefix is the prefix of the file contains the log that will be uploaded in the TargetBucket
  • TargetGrants must contains the Grantee element with xsi:type="AccessKey" and, as a child ID element, contains the AccessKey used to perform the upload.

Example:

  
    PUT /mybucketlog?logging HTTP/1.1
    Host: 127.0.0.1:32005
    Accept-Encoding: identity
    User-Agent: aws-cli/1.16.287 Python/3.7.3 Linux/4.19.0-8-amd64 botocore/1.13.23
    Content-MD5: NKhuLiQuQT2Icj+AzLFcTQ==
    X-Amz-Date: 20200212T203404Z
    X-Amz-Content-SHA256: 265e84e2b334e5566fcacffc9277caf252adc4cd4ff835bbc02df1266e116085
    Content-Length: 399

    <BucketLoggingStatus xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
      <LoggingEnabled>
        <TargetBucket>targetlog</TargetBucket>
        <TargetPrefix>logs/</TargetPrefix>
        <TargetGrants>
          <Grant>
            <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="AccessKey">
              <ID>AWS4XZUHH4DVBPMSZB7ODUFVVHGUXMXLY4VRJRJ4BFHJ7CGJACI4LPLA</ID>
            </Grantee>
          </Grant>
        </TargetGrants>
      </LoggingEnabled>
    </BucketLoggingStatus>
  

Log format

FieldDescription
BucketOwnerThe owner id of the monitored bucket
BucketThe monitored bucket
TsThe timestamp of the action [06/Feb/2019:00:00:38 +0000]
RemoteIpThe apparent IP of the requester. Intermediate proxies and firewalls might obscure the actual address of the machine making the request
RequesterThe AccessKey used to perform the action
RequestIdThe Request ID
OperationThe kind of operation (for example, s3.PuObject, s3.GetObject)
KeyThe object Key (if present)
RequestUriThe Request-URI part of the HTTP request message
HttpStatusThe numeric HTTP status code of the response
ErrorCodeThe S3 Error Code, or "-" if no error occurred
BytesSentThe transferred bytes
ObjectSizeThe size of the object transferred
TotalTimeThe number of milliseconds the request was in flight from the server's perspective
TurnAroundTimeThe number of milliseconds spent processing the request
RefererThe value of the HTTP Referer header, if present
UserAgentThe value of the HTTP User-Agent header
VersionIdThe version ID in the request (if present)
HostIdNot used (is always "-")
SignatureVersionThe signature version, "SigV2" or "SigV4", that was used to authenticate the request or a "-" in the other case
CipherSuiteThe value is SSL if the session was encrypted
AuthThe type of request authentication used, "AuthHeader" for authentication headers, "QueryString" or "-" for the other cases
HostHeaderNot used (is always "-")
TlsVerThe TLS version used

Response

Example:

  
    HTTP/1.1 200 OK
    Date: [...]
    Content-Length: 0
  

Logs generated

Examples:

100000000001 testlog [12/Feb/2020:20:28:02 +0100] "[::1]:34178" "AWS4XZUHH4DVBPMSZB7ODUFVVHGUXMXLY4VRJRJ4BFHJ7CGJACI4LPLA" "qfqun6v6dido" s3:PutObject "Everest" "/testlog/Everest" "200" "-" 125829120 "0" 279 274 "" "aws-sdk-go/1.28.13 (go1.13.7; linux; amd64)" 01E0XDYR0H0DA24AYE1DV1PK5S - SigV4 SSL AuthHeader - "-" 100000000001 testlog [12/Feb/2020:20:28:02 +0100] "[::1]:34178" "AWS4XZUHH4DVBPMSZB7ODUFVVHGUXMXLY4VRJRJ4BFHJ7CGJACI4LPLA" "50gzg1qj4ftt" s3:HeadObject "Everest" "/testlog/Everest" "200" "-" 125829120 125829120 1 0 "" "aws-sdk-go/1.28.13 (go1.13.7; linux; amd64)" 01E0XDYR0H0DA24AYE1DV1PK5S - SigV4 SSL AuthHeader - "-" 100000000001 testlog [12/Feb/2020:20:28:02 +0100] "[::1]:34178" "AWS4XZUHH4DVBPMSZB7ODUFVVHGUXMXLY4VRJRJ4BFHJ7CGJACI4LPLA" "eybjzx8hvf5s" s3:DeleteObject "Everest" "/testlog/Everest" "200" "-" "0" "0" 2 0 "" "aws-sdk-go/1.28.13 (go1.13.7; linux; amd64)" "-" - SigV4 SSL AuthHeader - "-" 100000000001 testlog [12/Feb/2020:20:28:02 +0100] "[::1]:34178" "AWS4XZUHH4DVBPMSZB7ODUFVVHGUXMXLY4VRJRJ4BFHJ7CGJACI4LPLA" "69srbt1hije2" s3:PutObject "foo" "/testlog/foo" "200" "-" 20 "0" 3 1 "" "aws-sdk-go/1.28.13 (go1.13.7; linux; amd64)" 01E0XDYR0TABEJXCHQ300Z8BHE - SigV4 SSL AuthHeader - "-"

Bucket Metadata: Retrieve

Returns 200 if the bucket exists, 404 otherwise. If available, the X-Rstor-Size header is returned, reporting the current size of the bucket in bytes.

Example:

HEAD /<bucket>

Response

Example:

HTTP/2.0 200 OK
Connection: close
Date: Tue, 30 Apr 2019 09:24:41 GMT
X-Lyve-Size: 35342254

Bucket Object Lock: Retrieve

Retrieves the Object Lock configuration for a bucket. The rule specified in the configuration will be applied by default to every new object placed in the specified bucket.

 The related IAM permission is not s3:GetObjectLockConfiguration but rather s3:GetBucketObjectLockConfiguration.

Example:

  
GET /?object-lock HTTP/1.1
Host: bucketName.s3.lyve.seagate.com
  

Response

Example:

  
    HTTP/1.1 200 OK

    <?xml version="1.0" encoding="UTF-8"?>
    <ObjectLockConfiguration>
      <ObjectLockEnabled>Enabled</ObjectLockEnabled>
      <Rule>
        <DefaultRetention>
          <Days>15</Days>
        </DefaultRetention>
      </Rule>
    </ObjectLockConfiguration>
  

Bucket Object Lock: Set

Places an Object Lock configuration on the specified bucket. The rules specified in the Object Lock configuration will be applied by default to every new object placed in the specified bucket.

 An object lock cannot be configured on a bucket that did not include "S3-Locking activated" when it was created. See CreateBucket for more information. Further, object lock configuration cannot be activated on existing buckets.

The ObjectLockEnabled field is optional and indicates whether the bucket has an object lock configuration enabled (valid values: Enabled).

 DefaultRetention requires either Days or Years. Both cannot be specified at the same time.

Example:

  
    PUT /?object-lock HTTP/1.1
    Host: bucketName.s3.lyve.seagate.com

    <?xml version="1.0" encoding="UTF-8"?>
    <ObjectLockConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
       <ObjectLockEnabled>string</ObjectLockEnabled>
       <Rule>
          <DefaultRetention>
             <Days>integer</Days>
             <Mode>string</Mode>
             <Years>integer</Years>
          </DefaultRetention>
       </Rule>
    </ObjectLockConfiguration>
  

Response

Example:

  
HTTP/1.1 200 OK
  

Bucket Policy: Retrieve

Returns the current bucket policy.

Example:

GET /<bucket>?policy

Response

If no bucket policy is set, a 404 error is returned.

Bucket Policy: Retrieve Status

 GetBucketPolicyStatus is currently unsupported.

Bucket Policy: Set

Sets the access policy for a given bucket.

 Currently, only policies making a bucket publicly accessible are supported.

Example:

PUT /<bucket>?policy

In the example, a policy allowing anonymous GetObject requests is assigned to the bucket abc-bucket.

Example request body:

  
    {
      "Version": "2012-10-17",
      "Statement": [
        {
          "Action": ["s3:GetBucketLocation"],
          "Effect": "Allow",
          "Principal": { "AWS": ["*"] },
          "Resource": ["arn:aws:s3:::abc-bucket"],
          "Sid": ""
        },
        {
          "Action": ["s3:GetObject"],
          "Effect": "Allow",
          "Principal": { "AWS": ["*"] },
          "Resource": ["arn:aws:s3:::abc-bucket/*"],
          "Sid": ""
        }
      ]
    }
  

Response

Returns a status code indicating whether the operation was successful.

Bucket Policy: Delete

Removes the access policy set for a given bucket.

DELETE /<bucket>?policy

Response

Returns a status code indicating whether the operation was successful.

Bucket RS Info: Retrieve

Returns RS information related to the bucket.

Example:

  
 GET /examplebucket?rs-info= HTTP/1.1
 Host: 127.0.0.1:44355
 User-Agent: Go-http-client/1.1
 Authorization: AWS4-HMAC-SHA256 Credential=STX1ARO9Y8B0272GA5LAERGU/20190722/any/s3/aws4_request, SignedHeaders=host;x-amz-content-sha256;x-amz-date, Signature=000e8c03d6afe31c96bb616a8f67e29b7cf1308ab196adb2fa757d27750b66aa
 X-Amz-Content-Sha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
 X-Amz-Date: 20190722T110035Z
 Accept-Encoding: gzip
  

Response

  
    HTTP/1.1 200 OK
    Content-Type: application/json
    Date: Mon, 22 Jul 2019 11:00:35 GMT
    Content-Length: 73

    {
      "bucketSize": 57300,
      "replicationPolicy": [
        "DEN02",
        "SJC03"
      ],
      "isPublic": false
    }
  

Bucket RS Stats: Retrieve

Returns storage metrics related to the bucket.

Example:

  
    GET /?rs-bucket-stats= HTTP/1.1
    Host: s3.example.lyve.seagate.com
    Authorization: [...]
  

Response

Example:

  
    {
      "abc-images": {
        "size": 6304387203,
        "objects": 74854,
        "replicationPolicy": [
          "DCA02",
          "DEN02",
          "SJC03"
        ]
      },
      "abc-backups": {
        "size": 729808896,
        "objects": 229,
        "replicationPolicy": [
          "DCA02",
          "DEN02",
          "SJC03"
        ]
      }
    }
  

Bucket Tags: Retrieve

Returns tags on a bucket (if present).

Example:

  
 GET /bucket?tagging HTTP/1.1
 Host: […]
 Authorization: […]
 X-Amz-Content-SHA256: […]
 X-Amz-Date: […]
  

Response

Example:

  
    HTTP/1.1 200 OK
    Content-Type: application/xml
    Date: […]
    Content-Length: 184

    <?xml version="1.0" encoding="UTF-8"?>
    <Tagging xmlns="">
      <TagSet>
        <Tag>
          <Key>KEYTEXT</Key>
          <Value>VALUETEXT</Value>
        </Tag>
        <Tag>
          <Key>Type</Key>
          <Value>Script</Value>
        </Tag>
      </TagSet>
    </Tagging>
  

Bucket Tags: Add or Replace

Adds tags to a bucket.

Existing tags will be overwritten. To update tags, retrieve the current tags, modify them locally and then upload them as new ones.

Note the following:

  • Tags are in the form of key-value pairs: Format=Image
  • Up to 10 tags can be specified for a bucket
  • A tag key can be up to to 128 unicode characters in length
  • A tag value can be up to to 256 unicode characters in length

Example:

  
    PUT /bucket?tagging HTTP/1.1
    Host: […]
    Authorization: […]
    X-Amz-Content-SHA256: […]
    X-Amz-Date: […]

    <Tagging xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
      <TagSet>
        <Tag>
          <Key>KEYTEXT</Key>
          <Value>VALUETEXT</Value>
        </Tag>
        <Tag>
          <Key>Type</Key>
          <Value>Script</Value>
        </Tag>
      </TagSet>
    </Tagging>
  

Response

Example:

  
    HTTP/1.1 200 OK
    Date: […]
    Content-Length: 0
  

Bucket Tags: Delete

Deletes tags on a bucket (if present).

Example:

  
 DELETE /bucket?tagging HTTP/1.1
 Host: […]
 Authorization: […]
 X-Amz-Content-SHA256: […]
 X-Amz-Date: […]
 Content-Length: 0
  

Response

Example:

  
 HTTP/1.1 204 No Content
 x-amz-version-id: […]
 Date: […]
  

Bucket Versioning: Retrieve

Returns the versioning status of the specified bucket.

Example:

GET /<bucket>/?versioning

Example with AWS client:

  
aws s3api get-bucket-versioning --bucket test
  

Response

The possible values for status are: Enabled, Suspended.

Example:

  
 {
  	"Status": "Enabled"
 }
  

Bucket Versioning: Set

Sets versioning for the bucket.

Example with AWS client (setting to Enable):

  
aws s3api put-bucket-versioning --bucket test --versioning-configuration "Status=Enabled"
  

Example with AWS client (setting to Suspend):

  
aws s3api put-bucket-versioning --bucket test --versioning-configuration "Status=Suspended"
  

Example with XML:

  
<VersioningConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
	<Status>[Enabled | Suspended]</Status>
</VersioningConfiguration>
  

Object: Add or Replace

Sets the contents of an object to the contents of the request's body. This creates the object if it does not already exist.

Example:

PUT /<bucket>/<object>

If the x-amz-copy-source header is specified, the object is copied from the one specified in the header, and the body of the PUT request is ignored.

Object keys must be valid UTF8 strings and must not end with a forward slash. However, a request with an empty body can specify a key with a forward slash; in this case an empty directory is created.

Parameters

The PutObject API supports the following optional headers:

HeaderDescription
Content-Md5The MD5 hash of the content. If present, it is checked as an additional guarantee that the object was correctly received
x-amz-copy-sourceThe object specified in the header is copied to the target key
x-amz-taggingThe tag-set to assign to the uploaded object, formatted as a query string (for example, "Key1=Value1")
x-amz-tagging-directiveSpecifies whether the object tag set is copied from the source object or replaced with the tag set provided in the request. Valid Values: COPY or REPLACE
x-amz-server-side-encryptionSSE-S3 Algorithm (supported: AES256)
x-amz-server-side-encryption-customer-algorithmSSE-C algorithm (supported: AES256)
x-amz-server-side-encryption-customer-keySSE-C base64-encoded encryption key
x-amz-server-side-encryption-customer-key-MD5SSE-C base64-encoded encryption key hash (MD5)
x-amz-copy-source-server-side-encryption-customer-algorithmSSE-C algorithm of the source object (supported: AES256)
x-amz-copy-source-server-side-encryption-customer-keySSE-C base64-encoded decryption key of the source object
x-amz-copy-source-server-side-encryption-customer-key-MD5SSE-C base64-encoded decryption key hash (MD5) of the source object
x-amz-checksum-algorithm or x-amz-sdk-checksum-algorithmCustom checksum algorithm (valid values: CRC32CRC32CSHA1SHA256), stored checksum can be retrieved by calling GetObject
x-amz-checksumOptional base64-encoded checksum for custom checksum algorithm
x-amz-trailerOptional compatibility header, may contain value: x-amz-checksum-crc32x-amz-checksum-crc32cx-amz-checksum-sha1, or x-amz-checksum-sha256
x-amz-checksum-crc32CRC32 checksum of the object (base64-encoded)
x-amz-checksum-crc32cCRC32C checksum of the object (base64-encoded)
x-amz-checksum-sha1SHA1 checksum of the object (base64-encoded)
x-amz-checksum-sha256SHA256 checksum of the object (base64-encoded)

If the checksum is calculated on the client side, it should be sent to the server in the x-amz-checksum-crc32x-amz-checksum-crc32cx-amz-checksum-sha1, or x-amz-checksum-sha256 headers or a combination of x-amz-checksum and x-amz-checksum-algorithm or x-amz-sdk-checksum-algorithm. The server will verify the checksum, and will return an error if the checksums do not match.

Example valid base64-encoded checksum values for "Hello world\n123\n" without quotes

  • CRC32: uWvPlg==
  • CRC32C: Cy8XOQ==
  • SHA1: LupGMeUw441P/33BhJlOZVSBpVg=
  • SHA256: uzbBRoYAgN7yiuoYiZFk6kfOPcFad8E8uxFLXfuKVsA=

If specified, the value of the following headers will be stored alongside the object, and then returned on the HeadObject or GetObject APIs:

  • Cache-Control
  • Content-Encoding
  • Content-Disposition
  • Content-Language
  • Content-Md5
  • Content-Type
  • Expires

Custom metadata can be specified by means of headers with the x-amz-meta- prefix, up to a total of 2KB of data (counting both header names and values).

 Copy operations can potentially take several seconds. To prevent the request from timing out, the server sends whitespace during the response. As a consequence, the outcome of the operation can either be specified as an HTTP header or in the returned xml document.

Response

A successful operation returns a status code of 200; otherwise, an error code is returned. If the operation is performed in a bucket that has versioning enabled, the corresponding VersionId is returned. If the bucket has one or more lifecycle expiration rules that apply to newly created objects, the corresponding Expiration is returned. Finally, if the object was uploaded with SSE-S3 or SS3-C encryption, ServerSideEncryption is returned.

Example in a non-versioned bucket:

  
    {
      "ETag": "\"324f6cbcfdf2420dd63890234a9f2f14\""
    }
  

Example in a versioned bucket:

  
    {
      "VersionId": "khd1pmwdgewhlnd2",
      "ETag": "\"324f6cbcfdf2420dd63890234a9f2f14\""
    }
  

Example: Upload and download using AWS-SDK-Go-v2:

  
    package main

    import (
        "context"
        _ "embed"
        "encoding/json"
        "strings"
        "log"

        "github.com/aws/aws-sdk-go-v2/aws"
        "github.com/aws/aws-sdk-go-v2/aws/middleware"
        "github.com/aws/aws-sdk-go-v2/config"
        "github.com/aws/aws-sdk-go-v2/credentials"
        "github.com/aws/aws-sdk-go-v2/service/s3"
        "github.com/aws/aws-sdk-go-v2/service/s3/types"
        "github.com/aws/smithy-go/transport/http"
    )

    // the secret file will be embedded on compile time
    // the file should contain something like this:
    /*
     "url":"https://BUCKET.s3.RESELLER.lyve.seagate.com",
     "accessKey": "STX...",
     "secretKey": "..."
    */
    // REGION: sjc03, dca02, den02, lon01, lon02, toy01, osa01
    // BUCKET: bucket name
    //go:embed secret.json
    var secret []byte

    type Cfg struct {
        Url       string `json:"url"`
        AccessKey string `json:"accessKey"`
        SecretKey string `json:"secretKey"`
    }

    // helper function for exit early CLI and print stack trace
    // do not use for long-running service
    func panicIf(err error, str string) {
        if err != nil {
            log.Println(str)
            panic(err)
        }
    }

    func main() {
        // load secrets from configuration
        var jsonCfg Cfg
        err := json.Unmarshal(secret, &jsonCfg)
        panicIf(err, `secret.json parsing failed`)

        // file name to upload
        key := aws.String(`FILENAME`)
        // example content of the file to be uploaded
        const helloWorld = "Hello world\n123\n"

        // retrieve bucket from config
        dotPos := strings.Index(jsonCfg.Url,".")
        bucketName := jsonCfg.Url[8:dotPos] // "https://" have length of 8
        log.Println(`bucket name:`, bucketName)
        bucket := aws.String(bucketName)

        usingPF := strings.Contains(jsonCfg.Url, `lyve.seagate.com`) ||
            strings.Contains(jsonCfg.Url, `lyve-storage.com`)

        // connection configuration
        ctx := context.Background()
        opts :=  error){}
        opts = append(opts, config.WithRegion(region))
        cred := credentials.NewStaticCredentialsProvider(jsonCfg.AccessKey, jsonCfg.SecretKey, "")
        opts = append(opts, config.WithCredentialsProvider(cred))
        var awsCfg aws.Config
        if usingPF { // override AWS default URL
            resolver := aws.EndpointResolverWithOptionsFunc(func(service, region string, options ...any) (aws.Endpoint, error) {
                return aws.Endpoint{
                    SigningRegion:     region,
                    URL:               jsonCfg.Url,
                    HostnameImmutable: true,
                }, nil
            })
            opts = append(opts, config.WithEndpointResolverWithOptions(resolver))
        }
        awsCfg, err = config.LoadDefaultConfig(ctx, opts...)
        panicIf(err, `failed config.LoadDefaultConfig`)

        // create s3 client
        s3Client := s3.NewFromConfig(awsCfg)

        // create bucket
        _, err := s3Client.CreateBucket(ctx, &s3.CreateBucketInput{
            Bucket: bucket,
        })
        if err != nil {
            log.Printf(`s3Client.CreateBucket failed %s: %s`, *bucket, err)
        } else {
            log.Printf(`bucket %v created`, *bucket)
        }

        {
            log.Println(`PutObject start`)
            out, err := s3Client.PutObject(ctx, &s3.PutObjectInput{
                Bucket:            bucket,
                Key:               key,
                Body:              strings.NewReader(helloWorld),
                // enable one of these to do checksum verification:
                //ChecksumCRC32: aws.String(`uWvPlg==`),
                //ChecksumCRC32C: aws.String(`Cy8XOQ==`),
                //ChecksumSHA1: aws.String(`LupGMeUw441P/33BhJlOZVSBpVg=`),
                //ChecksumSHA256: aws.String(`uzbBRoYAgN7yiuoYiZFk6kfOPcFad8E8uxFLXfuKVsA=`),
            })
            panicIf(err, `failed s3Client.PutObject`)
            log.Println(`PutObject success`)
            log.Println(middleware.GetRawResponse(out.ResultMetadata).(*http.Response).Header)
        }

        {
            log.Println(`GetObject start`)
            out, err := s3Client.GetObject(ctx, &s3.GetObjectInput{
                Bucket:       bucket,
                Key:          key,
                // checksum always returned by default
                //ChecksumMode: types.ChecksumModeEnabled, // X-Amz-Checksum-Mode
            })
            panicIf(err, `failed s3Client.GetObject`)
            log.Println(`GetObject success`)
            log.Println(middleware.GetRawResponse(out.ResultMetadata).(*http.Response).Header)
        }
    }




Object: Copy

Copy a stored object in Lyve Cloud Object Storage to another bucket in the same account.

Example using AWS CLI:

  
aws s3api copy-object --bucket test2 --copy-source test3/bitmovin-input/114.mp4 --key 114.mp4
  

You can copy individual objects between buckets using this command. Both the source object and the destination bucket must be accessible to the user. The user must have List and Get access for the source object and Write access to the destination bucket.

It is strongly recommended that the source and destination buckets are in the same region for best performance. If a bucket is replicated, only a single copy is required (as with the PUT command). The replication inside the bucket will automatically work to ensure that a copy is added to each site where the bucket is configured. This command will create a copy of the object up to 5 GB in size in a single action using the API. To copy an object greater than 5 GB, use the multipart upload process. 

The following items are required for this action:

  • Bucket
  • Key
  • Copy-source

Note that tags (metadata) associated with an object are also copied as part of this process.

Parameters

HeaderDescription
bucketThe name of the destination bucket.
copy-sourceThe source object for the copy operation. The source object can be up to 5 GB. If the source object used a multipart upload, the object's copy will be a single part once the source object is copied to the destination bucket.

Specify the value of the copy source bucket and the key of the source object, separated by a forward slash (/). For example, to copy the object test/copy-object.txt from the general purpose bucket mytestbucket , use mytestbucket/ test/copy-object.txt . The value must be URL-encoded.

If source bucket versioning is enabled, the copy-source header by default identifies the current version of an object to copy. If the current version is a delete marker, Amazon S3 behaves as if the object was deleted. To copy a different version, use the versionId query parameter. Specifically, append ?versionId= to the value (for example, TBD
keyThe key of the destination object.
checksum-algorithmCustom checksum algorithm (possible values: CRC32, CRC32C, SHA1, SHA256). The stored checksum can be retrieved by calling GetObject.
taggingThe tag set to assign to the copied object, formatted as a query string (for example, Key1=Value1).
tagging-directiveSpecifies whether the object tag set is copied from the source object or replaced with tag set provided in the request. Possible values: COPY or REPLACE.
object-lock-legal-hold-statusSpecifies a legal hold to the object copy. Possible values: ON or OFF.
object-lock-modeThe object lock mode that applies to the object copy. Possible values: GOVERNANCE or COMPLIANCE.
object-lock-retain-until-dateThe expiration date and time of the object lock for the object copy.

Response

  • A successful operation returns a status code of 200. Otherwise an error code is returned.
  • If versioning is enabled, the corresponding VersionId is returned.
  • If the x-amz-checksum-algorithm parameter is set, the newly calculated checksum is returned.

Example (success):

  
   {
    "VersionId": "0R7WQ0NEFEGRZ79R9VF01VSAKR",
    "CopyObjectResult": {
        "ETag": "\"28ab9adab5cadd385015b91a6f5b9001\"",
        "LastModified": "2025-05-08T14:17:19.015000+00:00"
     }
  

Object: Delete

Deletes the requested object or empty directory.

DELETE /<bucket>/<object>
  • HTTP Response code 204 is normal and indicates that the object was successfully deleted.
  • Deleting an object that does not exist returns no error.
  • Deleting a non-empty directory returns an error. 

In case of a versioned bucket is possible to:

  • Delete an object without specifying a versionId. In this case a DeleteMarker is created.
  • Delete an object specifying a particular versionId.

If the bucket's versioning is in a Suspend state, the delete operation can remove the object only if the version ID is null. A new DeleteMarker is created with a versionId set to null.

To remove a specific versionId:

DELETE /<bucket>/<object>?versionId=<version_id>

Object: Delete Multiple

Deletes multiple objects in a bucket.

POST /<bucket>?delete

The request body must contain a XML document in the format specified in the example, with a list of keys to delete (up to 1000).

Example request body:

  
    <Delete>
      <Object>
        <Key>example1</Key>
      </Object>
      <Object>
        <Key>example2</Key>
      </Object>
    </Delete>
  

Response

The response is an XML document containing, for each key, either a <Deleted> element or an <Error> element, according to the result of the operation.

Example:

  
    <?xml version="1.0" encoding="UTF-8"?>
    <DeleteResult xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
      <Deleted>
        <Key>example1</Key>
      </Deleted>
      <Error>
        <Key>example2</Key>
        <Code>AccessDenied</Code>
        <Message>Access Denied</Message>
      </Error>
    </DeleteResult>
  

Object: Retrieve

Returns the specified object.

Example

GET /<bucket>/<object> or GET /<bucket>/<object>?versionId=<versionId>

If versioning has been enabled, a versionId can be specified. If the current version of the object is a delete marker, the object is deleted and the flag x-amz-delete-marker: true is in included in the response. The API provides the replication status in the X-Rstor-Replication-Status header as a list of regions.

Parameters

Header

HeaderDescription
RangeSpecifies a byte range to be retrieved, in the format bytes:<start>-<end>
x-amz-server-side-encryption-customer-algorithmSSE-C algorithm (supported: AES256)
x-amz-server-side-encryption-customer-keySSE-C base64-encoded decryption key
x-amz-server-side-encryption-customer-key-MD5SSE-C base64-encoded key hash (MD5)
x-rstor-replication-statusIf specified, the replication status is returned back as a list of regions
x-amz-checksum-modeIf specified, the checksum mode will be returned on headers, valid value: ENABLED

Query

The following query parameters can be used to set or override the corresponding headers in the response the server sends back:

ParameterDescription
response-content-typeSets the "Content-Type" header on the response
response-content-languageSets the "Content-Language" header on the response
response-expiresSets the "Expires" header on the response
response-cache-controlSets the "Cache-Control" header on the response
response-content-dispositionSets the "Cache-Disposition" header on the response
response-content-encodingSets the "Content-Encoding" header on the response

Response

  • A successful operation returns a status code of 200. Otherwise an error code is returned.
  • If versioning is enabled, the corresponding VersionId is returned.
  • If the bucket has one or more lifecycle Expiration rules that apply to the newly created object, the corresponding Expiration is returned.
  • If the object was uploaded with SSE-S3 or SS3-C encryption, ServerSideEncryption is returned.

Example:

  
    HTTP/1.1 200 OK
    content-length: 25617859
    content-type: binary/octet-stream
    date: Mon, 25 Feb 2019 10:49:59 GMT
    etag: "918a4f4a76bfa69c193fd4365bc12622"
    last-modified: Mon, 25 Feb 2019 10:49:59 GMT
    X-Lyve-Replication-Status: DEN02,SJC03

    Object contents
  

Returns an object's current Legal Hold status.

Example:

  
GET /<object-key>?legal-hold&versionId=<version-id> HTTP/1.1
  

Parameters

ParameterDescription
versionIdSpecify the version of the resource returned

Response

The body of the response is in XML, formatted as in the example below, where the field Status can be one of two values: ONOFF

Example:

  
    HTTP/1.1 200

    <?xml version="1.0" encoding="UTF-8"?>
    <LegalHold>
      <Status>ON</Status>
    </LegalHold>
  

Sets a Legal Hold lock on an existing object in a specific bucket, where S3-Locking is enabled.

Example:

  
    PUT /{Key+}?legal-hold&VersionId=VersionId HTTP/1.1
    Host: s3.lyve.seagate.com
    x-amz-date: Thu, 15 Nov 2012 00:17:21 GMT
    Content-MD5: ContentMD5

    <?xml version="1.0" encoding="UTF-8"?>
    <LegalHold xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
      <Status>ON</Status>
    </LegalHold>
  

Parameters

ParameterDescription
VersionIdSpecify the version of the resource on which to apply the lock

The body of the request is an XML, formatted as in the example, where the field Status can be one of two values: ONOFF.

Response

  
    HTTP/1.1 200
  

Object Metadata: Retrieve

Allows retrieving metadata about a given object.

Example:

HEAD /<bucket>/<object>

Parameters

Supports the same parameters and returns the same response as the "GET object" request, but with an empty body (see Object: Retrieve).

  • If the x-rstor-replication-status: true header is specified in the request, the API provides the replication status in the X-Rstor-Replication-Status header as a list of regions.
  • Supports x-amz-checksum-mode: ENABLED to retrieve checksum stored if using a custom checksum algorithm (x-amz-checksum-algorithm or x-amz-checksum-*).

Response

Example:

  
    HTTP/1.1 200 OK
    Accept-Ranges: bytes
    Content-Length: 57301
    Content-Type: text/plain
    ETag: "18e20a76b174f184fad0febced4dbc51"
    Last-Modified: Fri, 19 Jul 2019 17:14:35 GMT
    X-Lyve-Replication-Status: DEN02,SJC03
    Date: Mon, 22 Jul 2019 10:45:57 GMT
  

Object Retention: Retrieve

Returns an object's retention settings.

Example:

  
GET /<object-key>?legal-hold&versionId=<version-id> HTTP/1.1
  

Parameters

ParameterDescription
versionIdSpecify the version of the resource returned.

Response

The body of the response is in XML, formatted as in the example below, where the field Mode can be one of two values: GOVERNANCECOMPLIANCE.

Example:

  
    HTTP/1.1 200

    <?xml version="1.0" encoding="UTF-8"?>
    <Retention>
      <Mode>GOVERNANCE</Mode>
      <RetainUntilDate>2020-10-02T15:00:00.05Z</RetainUntilDate>
    </Retention>
  

Object Retention: Set

Set a retention lock on an existing object in a specific bucket where S3-Locking is enabled.

The body of the request is in XML, formatted as in the example below, where the field Mode is one of two values: GOVERNANCE, COMPLIANCE.

The RetainUntilDate field is the timestamp. It must be set in the future (see RFC3339 as a format reference).

Example:

  
PUT /{Key+}?retention&VersionId=VersionId HTTP/1.1
Host: s3.lyve.seagate.com
x-amz-bypass-governance-retention: BypassGovernanceRetention
Content-MD5: ContentMD5

<?xml version="1.0" encoding="UTF-8"?>
<Retention xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
  <Mode>GOVERNANCE</Mode>
  <RetainUntilDate>2020-10-02T15:00:00.05Z</RetainUntilDate>
</Retention>
  

Parameters

ParameterDescription
VersionIdSpecify the version of the resource on which to apply the lock.

Response

Example:

  
    HTTP/1.1 200
  

Returns a link to the object, pre-signed with the most recently used Access Key.

Example:

  
POST /bucket/path/to/object?rs-presign= HTTP/1.1
Host: [...]
Authorization: [...]
Content-Type: application/x-www-form-urlencoded
X-Amz-Content-Sha256: [...]
X-Amz-Date: [...]

ExpirationDate=2019-10-24T07%3A04%3A47.123Z
  

Parameters

ParameterDescription
ExpirationDateExpiration date for the pre-signed URL. Cannot be more than 30 days (720h) in the future.

Response

Example:

  
    HTTP/1.1 200 OK
    Content-Type: application/json
    Date: [...]
    Content-Length: [...]

    {
      "link": "https://s3.example.com/bucket/...",
      "accessKeyId": "STX1JH..."
    }
  

Object Tags: Retrieve

Returns tags on an object (if present).

Example:

  
GET /bucket/objectkey?tagging&versionId=objectVersion HTTP/1.1
Host: [...]
Authorization: [...]
X-Amz-Content-SHA256: [...]
X-Amz-Date: [...]
  

Response

Example:

  
    HTTP/1.1 200 OK
    Content-Type: application/xml
    Date: [...]
    Content-Length: 184

    <?xml version="1.0" encoding="UTF-8"?>
    <Tagging xmlns="">
    <TagSet>
    <Tag>
      <Key>KEYTEXT</Key>
      <Value>VALUETEXT</Value>
    </Tag>
    <Tag>
      <Key>Type</Key>
      <Value>Script</Value>
    </Tag>
    </TagSet>
    </Tagging>
  

Object Tags: Add or Replace

Add tags to an object version.

Existing tags will be overwritten. To update tags, retrieve the current tags to modify them locally and then upload them as new ones.

  • Tags are in the form of key-value pairs: Format=Image
  • Up to 10 tags can be specified for an object version.
  • A tag key can be up to to 128 unicode characters in length.
  • A tag value can be up to to 256 unicode characters in length.

Example:

  
    PUT /bucket/objectkey?tagging&versionId=objectVersion HTTP/1.1
    Host: [...]
    Authorization: [...]
    X-Amz-Content-SHA256: [...]
    X-Amz-Date: [...]

    <Tagging xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
    <TagSet>
    <Tag>
      <Key>KEYTEXT</Key>
      <Value>VALUETEXT</Value>
    </Tag>
    <Tag>
      <Key>Type</Key>
      <Value>Script</Value>
    </Tag>
    </TagSet>
    </Tagging>
  

Response

Example:

  
    HTTP/1.1 200 OK
    x-amz-version-id: 01DVAXPTT7XFVAMQ7P248ZNWNQ
    Date: Thu, 05 Dec 2019 13:00:58 GMT
    Content-Length: 0
  

Object Tags: Delete

Delete tags on an object (if present).

Example:

  
DELETE /bucket/objectkey?tagging&versionId=objectVersion HTTP/1.1
Host: [...]
Authorization: [...]
X-Amz-Content-SHA256: [...]
X-Amz-Date: [...]
Content-Length: 0
  

Response

Example:

  
    HTTP/1.1 204 No Content
    x-amz-version-id: [...]
    Date: [...]
  

Multipart Upload: Retrieve

Returns the multipart uploads for a given bucket that has been initialized but not yet completed or aborted.

Example:

GET /<bucket>?uploads

Response

Example:

  
    <ListMultipartUploadsResult xmlns="http://s3.amazonaws.com/doc/2006-03-01">
      <Bucket>examplebucket</Bucket>
      <Upload>
        <Key>testMultipartTest.txt</Key>
        <UploadId>sNyryKj9Jzd5T1gdFpotuiRRcAASIz4nBNa24NSOYgHZYdl5aN</UploadId>
        <Initiator>
          <ID>99woic3r@example.com</ID>
          <DisplayName>99woic3r@example.com</DisplayName>
        </Initiator>
        <Owner>
          <ID>100000000001</ID>
          <DisplayName>example</DisplayName>
        </Owner>
        <StorageClass>STANDARD</StorageClass>
        <Initiated>2019-04-29T13:35:48.420Z</Initiated>
      </Upload>
    </ListMultipartUploadsResult>
  

Multipart Upload: Initiate

Initiates a new multipart upload, returning a new upload ID.

Example:

POST /<bucket>/<object>?uploads

Parameters

Request

There are no request parameters.

Header

The following header parameters are supported:

HeaderDescription
x-amz-taggingThe tag-set to assign to the uploaded object, formatted as a query string (for example, "Key1=Value1")
x-amz-server-side-encryptionSSE-S3 Algorithm (supported: AES256)
x-amz-server-side-encryption-customer-algorithmSSE-C algorithm (supported: AES256)
x-amz-server-side-encryption-customer-keySSE-C base64-encoded encryption key
x-amz-server-side-encryption-customer-key-MD5SSE-C base64-encoded encryption key hash (MD5)
x-amz-checksum-algorithm or x-amz-sdk-checksum-algorithmCustom checksum algorithm for the uploaded part, valid values: CRC32CRC32CSHA1SHA256)

Additionally, the following metadata headers are supported, and are stored together with the object once the upload is completed.

  • Cache-Control
  • Content-Encoding
  • Content-Disposition
  • Content-Language
  • Content-Type
  • Expires
  • x-amz-meta- metadata headers (see PutObject)

Response

Example:

  
    <?xml version="1.0" encoding="UTF-8"?>
    <InitiateMultipartUploadResult xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
      <Bucket>bucketA</Bucket>
      <Key>objectKey</Key>
      <UploadId>ifWDmLwLgAR8QDN/tg67DObvjR4=</UploadId>
    </InitiateMultipartUploadResult>
  

Example: Upload multipart using AWS-SDK-Go-v2:

  
    // connection part see PutObject example above

    out, err := s3Client.CreateMultipartUpload(ctx, &s3.CreateMultipartUploadInput{
        Bucket:            bucket,
        Key:               key,
        //ChecksumAlgorithm: types.ChecksumAlgorithmCRC32,
    })
    panicIf(err, `failed s3Client.CreateMultipartUpload`)
  

Multipart Upload: Complete

Completes a multipart upload, assembling the parts in ascending partNumber order.

Example:

POST /<bucket/<object>?uploadId=<uploadId>
 A multipart upload can only be completed from the same data center from which it was initiated.

The request body is an XML document listing the parts to assemble, each with the partNumber and ETag respectively in the "Upload Part" request and response.

  
    <CompleteMultipartUpload xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
    <Part>
        <ETag>"a2f4f30ec726440bcc748981e82f43fc"</ETag>
        <PartNumber>1</PartNumber>
    </Part>
    <Part>
        <ETag>"d12b6b5a7f8f850c39f32a96e36b5f69"</ETag>
        <PartNumber>2</PartNumber>
    </Part>
    <Part>
        <ETag>"e882613760157a24939f87a210043d47"</ETag>
        <PartNumber>3</PartNumber>
    </Part>
    </CompleteMultipartUpload>
  

On each part, there's optional ChecksumCRC32, ChecksumCRC32C, ChecksumSHA1, ChecksumSHA256 fields, for example: <ChecksumCRC32>abcdef==</ChecksumCRC32>, which is used to verify the integrity of the concatenated checksum of the uploaded parts, this should match with the custom checksum-algorithm (x-amz-checksum-algorithm or x-amz-sdk-checksum-algorithm) that started in Initiate Multipart Upload phase. PartNumber must be in sequential order or the server will return an error.

 This operation can potentially take several seconds. To prevent the request from timing out, the server sends whitespace during the response. As a consequence, the outcome of the operation can either be specified as HTTP header or in the returned xml document.

Response

The response is an XML document, which specifies the outcome of the upload, and is either the reassembled file key and ETag or an error. If the bucket has one or more lifecycle Expiration rules that apply to newly created objects, the corresponding Expiration is returned.

Example (success):

<?xml version="1.0" encoding="UTF-8"?>
<CompleteMultipartUploadResult xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
    <Location>http://s3.amazonaws.com/abc-bucket/gparted-live-0.33.0-1-amd64.iso</Location>
    <Bucket>abc-bucket</Bucket>
    <Key>gparted-live-0.33.0-1-amd64.iso</Key>
    <ETag>&quot;7b2ca2b72d990a59a6ac992e5a7f910c-9&quot;</ETag>
</CompleteMultipartUploadResult>

Example (error):

<Error>
  <Code>InternalError</Code>
  <Message>We encountered an internal error. Please try again.</Message>
</Error>

Multipart Upload: Abort

Removes a multipart upload, including all parts that have already been uploaded.

DELETE /<bucket>/<object>?uploadId=<uploadId>
 A multipart upload can only be deleted at the datacenter from which it was initiated.

Response

Returns a status code reflecting the outcome of the operation.

Multipart Upload: List Parts

Lists the uploaded parts for a given multipart upload, with their ETag, part number, upload id, size and last modified time. It does not support pagination-related parameters: max-parts and NextPartNumberMarker.

Example:

GET /<bucket>/<object>?uploadID=<uploadId>

Response

Example:

  
    <ListPartsResult xmlns="http://s3.amazonaws.com/doc/2006-03-01">
      <Bucket>examplebucket</Bucket>
      <IsTruncated>false</IsTruncated>
      <Part>
        <ETag>"3e7bb4a9c59d736603a0b764f1696b7d"</ETag>
        <PartNumber>1</PartNumber>
        <LastModified>2019-04-29T13:35:48.425Z</LastModified>
        <Size>5</Size>
      </Part>
      <Part>
        <ETag>"3e7bb4a9c59d736603a0b764f1696b7d"</ETag>
        <PartNumber>2</PartNumber>
        <LastModified>2019-04-29T13:35:48.430Z</LastModified>
        <Size>5</Size>
      </Part>
      <Key>testMultipartTest.txt</Key>
      <UploadId>sNyryKj9Jzd5T1gdFpotuiRRcAASIz4nBNa24NSOYgHZYdl5aN</UploadId>
      <Initiator>
        <ID>99woic3r@example.com</ID>
        <DisplayName>99woic3r@example.com</DisplayName>
      </Initiator>
      <Owner>
        <ID>100000000001</ID>
        <DisplayName>example</DisplayName>
      </Owner>
      <StorageClass>STANDARD</StorageClass>
      <Initiated>2019-04-29T13:35:48.420Z</Initiated>
    </ListPartsResult>
  

Multipart Upload: Upload Part

This request is analogous to PUT object, but specifies two additional query parameters: partNumber and uploadId.

Example:

PUT /<bucket>/<object>?partNumber=<partNumber>&uploadID=<uploadID>

Parameters

Request

The parameters object and uploadID must be equal respective to the ones provided and returned in the "Initiate Multipart Upload" request. The partNumber will be used to reassemble the uploaded parts.

Header parameters

The UploadPart operation supports the following optional headers:

HeaderDescription
Content-Md5The MD5 hash of the content. If present, it is checked as an additional guarantee that the object was correctly received
x-amz-copy-sourceThe object specified in the header is copied to the target partNumber for the specified uploadId multipart
x-amz-server-side-encryption-customer-algorithmSSE-C algorithm (supported: AES256)
x-amz-server-side-encryption-customer-keySSE-C base64-encoded encryption key
x-amz-server-side-encryption-customer-key-MD5SSE-C base64-encoded encryption key hash (MD5)
x-amz-copy-source-server-side-encryption-customer-algorithmSSE-C algorithm of the source object (supported: AES256)
x-amz-copy-source-server-side-encryption-customer-keySSE-C base64-encoded decryption key of the source object
x-amz-copy-source-server-side-encryption-customer-key-MD5SSE-C base64-encoded decryption key hash (MD5) of the source object
x-amz-checksum-algorithm or x-amz-sdk-checksum-algorithmCustom checksum algorithm for the uploaded part, valid values: CRC32CRC32CSHA1SHA256)
x-amz-checksumOptional base64-encoded checksum for custom checksum-algorithm
x-amz-trailerOptional compatibility header, may contain value: x-amz-checksum-crc32x-amz-checksum-crc32cx-amz-checksum-sha1, or x-amz-checksum-sha256
x-amz-checksum-crc32CRC32 checksum of the object (base64-encoded)
x-amz-checksum-crc32cCRC32C checksum of the object (base64-encoded)
x-amz-checksum-sha1SHA1 checksum of the object (base64-encoded)
x-amz-checksum-sha256SHA256 checksum of the object (base64-encoded)

If checksum-algorithm is supplied, it would behave the same as Put Object. Optionally, if a checksum calculation is done on the client side, x-amz-checksum-crc32 or x-amz-cheecksum-crc32cx-amz-checksum-sha1 or x-amz-checksum-sha256 can be sent, the server will verify the checksum and return an error if it does not match. If x-amz-checksum-* not set, server will calculate the checksum that can be used optionally on Complete Multiple Upload.

Response

The response has an empty body, and specifies:

  • A status code reflecting the outcome of the operation
  • The ETag of the uploaded object as a header
 Important—Make sure to note the returned ETag, as it is required in the Complete Multipart Upload request.

Example:

 
 HTTP/1.0 200 OK
 date: Mon, 25 Feb 2019 12:10:46 GMT
 etag: "a2f4f30ec726440bcc748981e82f43fc"
  

Multipart Upload: Copy Part

Multipart upload allows objects (or parts of objects) to be copied as sets of parts, rather than uploaded directly. This allows objects greater than 5 GB to be copied. Smaller objects should be copied using the single copy operation. The mechanism for a multipart copy is the same as using a normal multipart upload process. However, to make the Upload Part (Copy) API call, and copy data already stored in Lyve Cloud Object Storage, specify the existing source object by adding the x-amz-copy-source request header in the upload part request.

 The user must have List and Get access to the source object and Write access to the destination bucket. It is strongly recommended that the source and destination buckets are in the same region for best performance.

Parameters

HeaderDescription
copy-sourceSpecifies the source object for the copy operation. The source object can be up to 5 GB. If the source object is an object that was uploaded by using a multipart upload, the object copy will be a single part object after the source object is copied to the destination bucket.

Specify the value of the copy source bucket and the key of the source object, separated by a forward slash (/). For example, to copy the object test/copy-object.txt from the general purpose bucket my-test-bucket, use my-test-bucket/ test/copy-object.txt. The value must be URL-encoded.

If the source bucket versioning is enabled, the copy-source header by default identifies the current version of an object to copy. If the current version is a delete marker, Amazon S3 behaves as if the object was deleted. To copy a different version, use the versionId query parameter. Specifically, append ?versionId= to the value (for example, TBD
copy-source-rangeThe range of bytes to copy from the source object. The range value must use the form bytes=first-last, where the first and last are the zero-based byte offsets to copy. For example, bytes=0-9 indicates that you want to copy the first 10 bytes of the source. You can copy a range only if the source object is greater than 5 MB.

RS Speed Test (Download): Retrieve

Performs a download speed test wherein the backend sends random binary data for 10 seconds.

 Available only for resellers.

Example:

  
GET /speedtest/download HTTP/1.1
Host: [...]
Accept-Encoding: [...]
Authorization: [...]
User-Agent: [...]
X-Lyve-Speedtest: 1
  

Response

Example:

  
    HTTP/1.1 200 OK
    Date: [...]
    Content-Type: application/octet-stream

    (random binary data)
  

RS Speed Test (Upload): Retrieve

Performs an upload speed test via a pre-signed link. The backend reads the request body for up to 10 seconds.

 Available only for resellers.

Example:

  
PUT /speedtest/upload HTTP/1.1
Host: [...]
Accept-Encoding: [...]
Authorization: [...]
Content-Length: [...]
Content-Type: application/octet-stream
User-Agent: [...]
X-Lyve-Speedteest: 1

(random binary data)
  

Response

Example:

  
    HTTP/1.1 204 No Content
    Date: [...]
  

Header Parameters

HeadersDescription
x-amz-bucket-object-lock-enabledIf set to true, is created in object lock mode with versioning activated.
x-amz-grant-read 
x-amz-grant-write

Response

Returns one of the following:

  • 200 if successful
  • 400 if the bucket name is not valid
  • 409 if a conflict error when trying to create a bucket which is already present

POST s3v4 Uploads

The POST operation adds an object to a specified bucket using HTML forms. POST is an alternate form of PUT that enables browser-based uploads as a way of putting objects in buckets. Parameters that are passed to PUT via HTTP Headers are instead passed as form fields to POST in the multipart/form-data encoded message body. WRITE access required to an object to it. Since Lyve Cloud never stores partial objects, a successful response offers confidence that the entire object is in the selected bucket.

Lyve Cloud is a distributed system. If simultaneous multiple write requests for the same object occur, Lyve Cloud overwrites all but the last written object.

To ensure that data is not corrupted traversing the network, use the Content-MD5 form field. When using this form field, Lyve Cloud Object Storage checks the object against the provided MD5 value. If they do not match, Lyve Cloud returns an error. Additionally, the MD5 value can be calculated while posting an object to Lyve Cloud and compare the calculated value with the the returned ETag. The ETag only reflects changes to the contents of an object, not its metadata.

Policy

The policy required for making authenticated requests using HTTP POST is a UTF-8 and base64-encoded document written in JavaScript Object Notation (JSON) that specifies conditions that the request must meet. The policy document can be designed to control access per upload, per user, for all uploads, or according to other design parameters.

 While the policy document is optional, it is highly recommended to use one for more precise control of requests. If a bucket is publicly writable, there is no control of which users can write to it.

The POST policy always contains the expiration and conditions elements. The example policy uses two condition matching types (exact matching and starts-with matching). The following sections describe these elements.

The expiration element specifies the expiration date and time of the POST policy in ISO8601 GMT date format. For example, 2013-08-01T12:00:00.000Z specifies that the POST policy is not valid after midnight GMT on August 1, 2013.

Condition matching

The table below shows condition matching types to specify POST policy conditions (described in the next section). It is mandatory to specify one condition for each form field. However, it is also possible to include more complex matching criteria by specifying multiple conditions for a single form field.

Condition Match TypeDescription
Exact MatchesThe form field value must match the value specified. This example indicates that the ACL must be set to public-read:
{"acl": "public-read" }
This example is an alternate way to indicate that the ACL must be set to public-read:
[ "eq", "$acl", "public-read" ]
Starts WithThe value must start with the specified value. This example indicates that the object key must start with user/user1:
["starts-with", "$key", "user/user1/"]
Matching Content-Types in a Comma-Separated ListContent-Types values for a starts-with condition that include commas are interpreted as lists. Each value in the list must meet the condition for the whole condition to pass. For example, given the following condition:
["starts-with", "$Content-Type", "image/"]
The following value would pass the condition:
"image/jpg,image/png,image/gif"
The following value would not pass the condition:
["image/jpg,text/plain"]
Note: data elements other than Content-Type are treated as strings, regardless of the presence of commas.
Matching Any ContentTo configure the POST policy to allow any content within a form field, use starts-with with an empty value (""). This example allows any value for success_action_redirect:
["starts-with", "$success_action_redirect", ""]
Specifying RangesFor form fields that accept a range, separate the upper and lower limit with a comma. This example allows a file size from 1 to 10 MiB:
["content-length-range", 1048576, 10485760]

Conditions

The conditions in a POST policy is an array of objects, each of which is used to validate the request. Use these conditions to restrict what is allowed in the request. For example, the provided example policy conditions require the following:

  • Request must specify the mybucket bucket name.
  • Object key name must have the user/paul prefix.
  • Object ACL must be set to public-read.

Each form field that is specified in a form (except x-amz-signature, file, policy, and field names that have an x-ignore- prefix) must appear in the list of conditions.

  All variables within the form are expanded prior to validating the POST policy, so all condition matching should be against the expanded form fields. For example, to restrict an object key name for a specific prefix (user/user1), set the key form field to use user/user1/${filename}. The POST policy should be [ "starts-with", "$key", "user/user1/" ]; do not enter [ "starts-with", "$key", "user/user1/${filename}" ].

Policy document conditions are described in the following table.

Element NameDescription
aclSpecifies the ACL value that must be used in the form submission.
This condition supports exact matching and starts-with condition match type discussed in the preceding section.
bucketSpecifies the acceptable bucket name.
This condition supports exact matching condition match type.
content-length-rangeThe minimum and maximum allowable size for the uploaded content.
This condition supports content-length-range condition match type.
Cache-Control
Content-Type
Content-Disposition
Content-Encoding
Expires
REST-specific headers. For more information, see POST Object.
This condition supports exact matching and starts-with condition match type.
keyThe acceptable key name or a prefix of the uploaded object.
This condition supports exact matching and starts-with condition match type.
success_action_redirect
redirect
The URL to which the client is redirected upon successful upload.
This condition supports exact matching and starts-with condition match type.
success_action_statusThe status code returned to the client upon successful upload if success_action_redirect is not specified.
This condition supports exact matching.
x-amz-algorithmThe signing algorithm that must be used during signature calculation. For AWS Signature Version 4, the value is AWS4-HMAC-SHA256.
This condition supports exact matching.
x-amz-credentialThe credentials used to calculate the signature. It provides access key ID and scope information identifying region and service for which the signature is valid. This should be the same scope used in calculating the signing key for signature calculation.

The string uses the following form:

<your-access-key-id>/<date>/<optional-lyve-region>/s3/aws4_request

For example:

LyveACCESSKEY92724/20130728/us-east-1/s3/aws4_request

For Lyve Cloud, the service string is always s3. Regions are specified for compatibility reasons, although multi-geographical distribution is automatically enforced. This is required if a POST policy document is included with the request.
This condition supports exact matching.
x-amz-dateThe date value specified in the ISO8601 formatted string. For example, 20130728T000000Z. The date must be same used in creating the signing key for signature calculation.
This is required if a POST policy document is included with the request.
This condition supports exact matching.
x-lyve-meta-*User-specified metadata.
This condition supports exact matching and starts-with condition match type.
x-lyve-*Any other documented Lyve-specific metadata.

This condition supports exact matching.

Character Escaping

Characters that must be escaped within a POST policy document are described in the following table.

Escape SequenceDescription
\Backslash
\$Dollar symbol
\bBackspace
\fForm feed
\nNew line
\rCarriage return
\tHorizontal tab
\vVertical tab
\uxxxxAll Unicode characters

Example form

  
    <form action="http://s3.lyve.seagate.com/bucketname" 
    target="s3target" 
    enctype="multipart/form-data" 
    method="POST">

    <!-- Key is required (key name of uploaded object) -->
    <input id="key" 
    type="hidden" 
    name="key" 
    value="test_browser_myfile.txt" />

    <!-- Policy is required for authenticated requests -->
    <input id="Policy" 
    type="hidden" 
    name="Policy" 
    value="[BASE64_ENCODED_SECURITY_POLICY]" />

    <!-- X-Amz-Algorithm is required for authenticated requests -->
    <input id="X-Amz-Algorithm" 
    type="hidden" 
    name="X-Amz-Algorithm" 
    value="AWS4-HMAC-SHA256" />

    <!-- X-Amz-Credential is required for authenticated requests -->
    <input id="X-Amz-Credential" 
    type="hidden" 
    name="X-Amz-Credential" 
    value="AWS4XZUHH4DVBPMSZB7ODUFVVHGUXMXLY4VRJRJ4BFHJ7CGJACI4LPLA/20200819/eu-east-1/s3/aws4_request" />
  
    <!-- X-Amz-Date is required for authenticated requests -->
    <input id="X-Amz-Date" 
    type="hidden" 
    name="X-Amz-Date" 
    value="20200819T142942Z" />
    
    <!-- X-Amz-Signature is required for authenticated requests -->
    <input id="X-Amz-Signature" 
    type="hidden" 
    name="X-Amz-Signature" 
    value="[HMAC_SHA256_HASH]" />
    
    <!-- optional sample fields -->
    <input id="acl" 
    type="hidden" 
    name="acl" 
    value="public-read" />
    
    <input id="success_action_redirect" 
    type="hidden" 
    name="success_action_redirect" 
    value="http://somewhere.com/redir/redirect" />
    
    <input id="x-lyve-meta-something" 
    type="hidden" 
    name="x-lyve-meta-something" 
    value="c25f87c5-2a43-4da6-901c-b3fac171e572" />
    
    <input id="Content-Type" 
    type="hidden" 
    name="Content-Type" 
    value="text/plain" />
    
    <!-- the file content (mandatory) -->
    <input id="file" 
    type="file" 
    name="file"/>
    
    <button type="submit" 
    class="btn btn-default">Upload</button>
    </form>
  

Example policy

  
    {
    "expiration": "2007-12-01T12:00:00.000Z",
    "conditions": [
      {
        "acl": "public-read"
      },
      {
        "bucket": "mybucket"
      },
      [
        "starts-with", "$key", "user/paul/"
      ]
    ]
    }
  

Example request

  
    POST / HTTP/1.1
    Host: destinationBucket.s3.lyve.seagate.com
    User-Agent: browser_dataAmazon
    Accept: file_types
    Accept-Language: Regions
    Accept-Encoding: encoding
    Accept-Charset: character_set
    Keep-Alive: 300
    Connection: keep-alive
    Content-Type: multipart/form-data; boundary=9431149156168
    Content-Length: length

    --9431149156168
    Content-Disposition: form-data; name="key"

    acl
    --9431149156168
    Content-Disposition: form-data; name="tagging"

    <Tagging><TagSet><Tag><Key>Tag Name</Key><Value>Tag Value</Value></Tag></TagSet></Tagging>
    --9431149156168
    Content-Disposition: form-data; name="success_action_redirect"

    success_redirect
    --9431149156168
    Content-Disposition: form-data; name="Content-Type"

    content_type
    --9431149156168
    Content-Disposition: form-data; name="x-amz-meta-uuid"

    uuid
    --9431149156168
    Content-Disposition: form-data; name="x-amz-meta-tag"

    metadata
    --9431149156168
    Content-Disposition: form-data; name="LyveAccessKeyId"

    access-key-id
    --9431149156168
    Content-Disposition: form-data; name="Policy"

    encoded_policy
    --9431149156168
    Content-Disposition: form-data; name="Signature"

    signature=
    --9431149156168
    Content-Disposition: form-data; name="file"; filename="MyFilename.jpg"
    Content-Type: image/jpeg

    file_content
    --9431149156168
    Content-Disposition: form-data; name="submit"

    Upload to Lyve Cloud
    --9431149156168--