If the operation is successful, no output will be returned.
Understanding Object Storage object operations
DeleteObject
This operation allows you to remove the null version (if available) of an object and inserts a delete marker, which becomes the latest version of the object.
If there is no null version, no object is removed.
Sample request
DELETE /file.txt HTTP/1.1Host: bucket.s3.nl-ams.scw.cloudx-amz-content-sha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855x-amz-date: 20190411T080553ZAuthorization: authorization string
CLI command
aws s3api delete-object --bucket BucketName --key ObjectName
If bucket versioning is enabled, the output will contain the version ID of the delete marker.
DeleteObjects
This operation allows you to delete multiple objects in a single request (up to 1,000).
Sample request
POST /?delete HTTP/1.1Host: bucket.s3.fr-par.scw.cloudContent-md5: IDCi4XsSBVpFGHtK7bEVag==x-amz-date: 20220406T122013ZAuthorization: authorization string<Delete xmlns="http://s3.amazonaws.com/doc/2006-03-01/"><Object><Key>object1.jpg</Key><VersionId>1554970190808057</VersionId></Object><Object><Key>object2.jpg</Key></Object></Delete>
Sample response
HTTP/1.1 200 OKx-amz-id-2: tx4b4bd55643874b48b1e87-00624d857dx-amz-request-id: tx4b4bd55643874b48b1e87-00624d857ddate: Wed, 06 Apr 2022 12:20:13 GMT
DeleteObjectTagging
This operation allows you to delete a tag set from a specified object.
If the operation is successful, no output will be returned.
Sample request
DELETE /Sampleobject?tagging HTTP/1.1Host: bucket.s3.nl-ams.scw.cloudDate: Wed, 13 Mar 2019 12:00:00 GMTAuthorization: authorization string
GetObject
This operation allows you to retrieve objects from Scaleway Object Storage.
Sample request
GET /Sample.txt HTTP/1.1Host: bucket.s3.nl-ams.scw.cloudx-amz-content-sha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855x-amz-date: 20190411T081116ZAuthorization: authorization string
Sample response
HTTP/1.1 200 OKDate: Thu, 11 Apr 2019 08:11:16 GMTx-amz-request-id: tx00000000000000279f46e-005963d003-1268c-ams1Content-Type: text/plainContent-Length: 14Accept-Ranges: bytesVersionId: 1554970190808057Last-Modified: Thu, 11 Apr 2019 08:09:50 GMTEtag: d41d8cd98f00b204e9800998ecf8427eConnection: close
CLI command
aws s3api get-object --bucket BucketName --key dir/ObjectNameLocation ObjectName
The name of the output file must be the last parameter in the command.
GetObjectAcl
This operation allows you to return the access control list (ACL) of an object.
Sample request
GET /test.html?acl HTTP/1.1Host: bucket.s3.nl-ams.scw.cloud.comx-amz-content-sha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855x-amz-date: 20190411T081550ZAuthorization: authorization string
Sample response
HTTP/1.1 200 OKDate: Thu, 11 Apr 2019 08:15:51 GMTx-amz-request-id: tx0e22d038acce4d35b0b07-005caef7b6Content-Type: text/html; charset=UTF-8Content-Length: 698Connection: close<?xml version='1.0' encoding='UTF-8'?><AccessControlPolicy xmlns="http://s3.amazonaws.com/doc/2006-03-01/"><Owner><ID>04dcf44f-a6ca-4e69-a74c-f0c557d87d79:a6a05c73-fa53-46a4-9ea1-e53b4f62552<ID><DisplayName>04dcf44f-a6ca-4e69-a74c-f0c557d87d79:04dcf44f-a6ca-4e69-a74c-f0c557d87d79</DisplayName></Owner><AccessControlList><Grant><Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="CanonicalUser"><ID>04dcf44f-a6ca-4e69-a74c-f0c557d87d79:04dcf44f-a6ca-4e69-a74c-f0c557d87d79< ID><DisplayName>04dcf44f-a6ca-4e69-a74c-f0c557d87d79:04dcf44f-a6ca-4e69-a74c-f0c557d87d79</DisplayName></Grantee><Permission>FULL_CONTROL</Permission></Grant></AccessControlList></AccessControlPolicy>
CLI command
aws s3api get-object-acl --bucket BucketName --key ObjectName
GetObjectLockConfiguration
This operation returns the lock configuration.
Sample request
GET /lockedbucket?object-lock HTTP/1.1
Sample response
<ObjectLockConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/"><ObjectLockEnabled>Enabled</ObjectLockEnabled><Rule><DefaultRetention><Mode>COMPLIANCE</Mode><Days>1000</Days></DefaultRetention></Rule></ObjectLockConfiguration>
GetObjectTagging
This operation returns the tag set of the specified object.
Sample request
GET /Sample-object?tagging HTTP/1.1Host: bucket.s3.nl-ams.scw.cloudDate: Wed, 13 Mar 2019 12:00:00 GMTAuthorization: authorization string
Sample response
<?xml version="1.0" encoding="UTF-8"?><Tagging xmlns="http://s3.amazonaws.com/doc/2006-03-01/"><TagSet><Tag><Key>Object Description</Key><Value>Company Presentation</Value></Tag><Tag><Key>Client</Key><Value>Scaleway</Value></Tag></TagSet></Tagging>
HeadObject
The HEAD operation retrieves metadata from an object without returning the object itself. This operation is useful if you’re only interested in an object’s metadata. To use HEAD, you must have READ access to the object.
Sample request
HEAD /myfile.txt HTTP/1.1Host: bucket.s3.nl-ams.scw.cloudx-amz-content-sha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855Date: Thu, 11 Apr 2019 08:25:56 GMTAuthorization: authorization string
Sample response
HTTP/1.1 200 OKx-amz-id-2: tx8cd3dff03f0f4be7aee3c-005caefb1ex-amz-request-id: tx8cd3dff03f0f4be7aee3c-005caefb1eDate: Thu, 11 Apr 2019 08:25:56 GMTLast-Modified: Thu, 11 Apr 2019 08:15:33 GMTETag: d41d8cd98f00b204e9800998ecf8427eContent-Length: 689Content-Type: text/plainConnection: close
CLI command
aws s3api head-object --bucket BucketName --key ObjectName
CreateMultipartUpload
Multipart uploads allow you to upload a single object as a set of parts. Each part is a contiguous portion of the object’s data. You can upload these object parts independently and in any order. If transmission of any part fails, you can retransmit that part without affecting other parts. After all parts of your object are uploaded, Scaleway Object Storage assembles these parts and creates the object.
Check out our multipart uploads documentation page for more information.
Sample request
This operation initiates a multipart upload for the Sample-object
object.
POST /Sample-object?uploads HTTP/1.1Host: bucketname.s3.scw.cloudx-amz-content-sha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855Date: Mon, 1 Nov 2018 12:34:56 GMTAuthorization: authorization string
Sample response
HTTP/1.1 200 OKx-amz-id-2: tx4464d513d86f498c8b7ad-005caefda8x-amz-request-id: tx4464d513d86f498c8b7ad-005caefda8Date: Mon, 1 Nov 2018 12:34:56 GMTContent-Length: 197Connection: keep-alive<?xml version="1.0" encoding="UTF-8"?><InitiateMultipartUploadResult xmlns="http://s3.amazonaws.com/doc/2006-03-01/"><Bucket>Sample-bucket</Bucket><Key>Sample-object</Key><UploadId>NjJmNmJhYTEtNjk1Ny00ZjJlLWJhYWUtMDg5YWMzNzFjYjQ3</UploadId></InitiateMultipartUploadResult>
CLI command
aws s3api create-multipart-upload --bucket my-bucket --key 'multipart/01'
OPTIONS object
The OPTIONS operation allows a browser to send a preflight request to Object Storage to determine if the actual request is supported with the specific origin, HTTP method and headers.
When a browser sends this request, Object Storage evaluates the rules that are defined in the CORS configuration.
Sample request
OPTIONS /Sampleobject HTTP/1.1Host: bucketname.s3.nl-ams.scw.cloudOrigin: http://www.Sample.comAccess-Control-Request-Method: PUT
Sample response
HTTP/1.1 200 OKDate: Mon, 19 Mar 2019 11:38:17 GMTAccess-Control-Allow-Origin: http://www.Sample.comAccess-Control-Allow-Methods: PUTAccess-Control-Expose-Headers: x-amz-request-id
POST object
This operation allows you to add 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.
If you want to learn more about this request, check out the POST Object documentation page.
Sample request
POST /file.txt HTTP/1.1Content-Length: 4Host: bucket.s3.nl-ams.scw.cloudx-amz-content-sha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855Date: Thu, 11 Apr 2019 08:28:57 GMTAuthorization: authorization stringContent-Type: text/plainExpect: the 100-continue HTTP status codeObjectContent
Sample response
HTTP/1.1 100 ContinueHTTP/1.1 200 OKx-amz-id-2: txd16e07b7d52a46f08eb62-005caef22fx-amz-request-id: txd16e07b7d52a46f08eb62-005caef22fx-amz-version-id: defaultDate: Thu, 11 Apr 2019 08:28:58 GMTETag: d41d8cd98f00b204e9800998ecf8427eContent-Length: 0Connection: close
PutObject
This operation allows you to add an object to a bucket.
Sample request
PUT /Sample.txt HTTP/1.1Content-Length: 14Content-Type: text/plainHost: bucket.s3.nl-ams.scw.cloudx-amz-content-sha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855x-amz-date: 20190411T075215ZAuthorization: authorization string
Sample response
HTTP/1.1 200 OKDate: Thu, 11 Apr 2019 07:52:15 GMTx-amz-request-id: txd16e07b7d52a46f08eb62-005caef22fContent-Length: 0Accept-Ranges: bytesLast-Modified: Thu, 11 Apr 2019 07:52:15 GMTEtag: d41d8cd98f00b204e9800998ecf8427eConnection: close
CLI command
aws s3api put-object --bucket BucketName --key dir-1/ObjectName --body ObjectName
To define the storage class of the object directly upon creation, use the --storage-class <class>
option with awscli
or add the x-amz-storage-class: <class>
header when using the S3 API. You can specify one of the following classes: STANDARD
, ONEZONE_IA
, GLACIER
. Example: x-amz-storage-class: ONEZONE_IA
.
If no class is specified, the object is created as STANDARD by default.
PutObjectAcl
This operation allows you to use the ACL subresource to set the access control list (ACL) permissions for an object that already exists in a bucket. The --acl
subcommand possible values are:
- private
- public-read
- public-read-write
- authenticated-read
- bucket-owner-read
- bucket-owner-full-control
Sample request
PUT /demo.jpg?acl HTTP/1.1acl=host:bucket.s3.nl-ams.scw.cloudx-amz-acl:public-readx-amz-content-sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855x-amz-date:20190411T085423Z
Sample response
HTTP/1.1 200 OKDate: Thu, 11 Apr 2019 08:54:23 GMTx-amz-request-id: txf2d890e745114dc5ace62-005caf03f1Content-Type: application/xmlContent-Length: 0Connection: close
CLI command
aws s3api put-object-acl --bucket BucketName --key file.txt --acl private
PutObjectCopy
This operation allows you to create a new object from an existing one.
Sample request
This Sample copies my-image.jpg
into the bucket newbucket
, with the key name my-second-image.jpg
.
PUT /my-second-image.jpg HTTP/1.1Host: oldbucket.s3.nl-ams.scw.cloudx-amz-content-sha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855Date: Thu, 11 Apr 2019 08:41:12 GMTx-amz-copy-source: /bucket/my-image.jpgAuthorization: authorization string
Sample response
HTTP/1.1 200 OKx-amz-id-2: tx4464d513d86f498c8b7ad-005caefda8x-amz-request-id: tx4464d513d86f498c8b7ad-005caefda8Date: Thu, 11 Apr 2019 08:41:12 GMTConnection: close<CopyObjectResult><LastModified>2019-04-11Z08:33:10</LastModified><ETag>f3c8f2ac362e890999d282db06a34469</ETag></CopyObjectResult>
CLI command
aws s3api copy-object --copy-source bucket-1/test.txt --key test.txt --bucket bucket-2
PutObjectLockConfiguration
This operation applies the lock configuration on a bucket.
If the operation is successful, no output will be returned.
Sample request
PUT /lockedbucket?object-lock HTTP/1.1<ObjectLockConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/"><ObjectLockEnabled>Enabled</ObjectLockEnabled><Rule><DefaultRetention><Mode>COMPLIANCE</Mode><Days>1000</Days></DefaultRetention></Rule></ObjectLockConfiguration>
PutObjectTagging
This operation allows you to add a tag set to an existing object in a bucket.
Sample request
PutObject-key?tagging HTTP/1.1Host: bucket.s3.nl-ams.scw.cloudContent-Length: lengthContent-MD5: 88jyrDYuiQmZ0oLbBqNEaQ==x-amz-date: 20190313T091956ZAuthorization: authorization string<Tagging><TagSet><Tag><Key>Object Description</Key><Value>Company Presentation</Value></Tag><Tag><Key>Client</Key><Value>Scaleway</Value></Tag></TagSet></Tagging>
Sample response
HTTP/1.1 200 OKx-amz-id-2: tx9b476790a39c409d8b029-005caf01d5x-amz-request-id: tx9b476790a39c409d8b029-005caf01d5Date: Wed, 13 Mar 2019 09:20:19 GMT
RestoreObject
This call moves an object back to the STANDARD
storage class for the specified number of days.
It triggers a background restore job on the Object Storage service. The status of the restore is available in the x-amz-restore
response header of the HeadObject
call.
Sample request
POST /object?restore HTTP/1.1Host: bucket.s3.fr-par.scw.cloudx-amz-date: 20220406T122555ZAuthorization: authorization string<?xml version="1.0" encoding="UTF-8"?><RestoreRequest xmlns="http://s3.amazonaws.com/doc/2006-03-01/"><Days>15</Days></RestoreRequest>
Sample response
HTTP/1.1 202 Acceptedx-amz-id-2: txa1c547b9e2fb41d5b9cc2-00624d86d3x-amz-request-id: txa1c547b9e2fb41d5b9cc2-00624d86d3Date: Wed, 06 Apr 2022 12:26:06 GMT