Core API Operation Examples

Prev Next

The following…

Buckets

A bucket is a container for storing objects (files). Each bucket must have a globally unique name.

Create a Bucket

Method: PUT

Endpoint:

https://s3.<region>.wasabisys.com/<bucket-name>

Request (using cURL):

curl -X PUT \
  -H "Host: your-bucket-name.s3.wasabisys.com" \
  -H "Date: <date>" \
  -H "Authorization: AWS <AccessKey>:<Signature>" \
  https://s3.wasabisys.com/your-bucket-name

Objects

An object is any file (image, video, document, etc.) stored in a bucket.

Upload an Object

Method: PUT

Endpoint:

https://s3.<region>.wasabisys.com/<bucket-name>/<object-key>

Request (using cURL):

curl -X PUT \
  -T "localfile.jpg" \
  -H "Host: your-bucket-name.s3.wasabisys.com" \
  -H "Date: <date>" \
  -H "Authorization: AWS <AccessKey>:<Signature>" \
  https://your-bucket-name.s3.wasabisys.com/file.jpg

Download an Object

curl \
  -H "Authorization: AWS <AccessKey>:<Signature>" \
  https://your-bucket-name.s3.wasabisys.com/file.jpg -o downloaded.jpg