Skip to content

Use the S3-compatible API

View as Markdown

E2E Object Storage supports any S3-compatible SDK; E2E recommends a MinIO SDK for the smoothest experience. The examples use Python. You need a bucket and an access key first; see Generate an access key.

pip install minio
from minio import Minio
client = Minio(
"objectstore.e2enetworks.net", # Delhi; use "in-south1-objectstore.e2enetworks.net" for a Chennai bucket
access_key="<access-key>",
secret_key="<secret-key>",
secure=True,
)
# List objects in a bucket
for obj in client.list_objects("<bucket-name>", recursive=True):
print(obj.object_name, obj.size)
# Upload a file
client.fput_object("<bucket-name>", "<object-name>", "<local-file-path>")
# Download a file
client.fget_object("<bucket-name>", "<object-name>", "<local-file-path>")
# Download only a byte range of a file, instead of the whole object
client.get_object("<bucket-name>", "<object-name>", offset=<start-byte>, length=<byte-count>)

Run the list loop first to check the connection. It prints each object’s name and its size in bytes, one per line:

report.pdf 1258291
logs/app-2026-09-22.gz 48213

Nothing printed means the bucket is empty; an access error means the key has no role on it.

client.remove_object("<bucket-name>", "<object-name>")

Remove every object under a prefix in one call instead of one at a time:

names = (obj.object_name for obj in client.list_objects("<bucket-name>", prefix="<prefix>", recursive=True))
for error in client.remove_objects("<bucket-name>", names):
print("Deletion error:", error)
from datetime import timedelta
url = client.presigned_get_object("<bucket-name>", "<object-name>", expires=timedelta(days=<days>))

The SDK has an equivalent call for an upload link instead of a download one; see Share an object with a presigned URL for the same thing from the dashboard, and the expiry limit that applies either way.

E2E Object Storage supports these object-level operations, the everyday work an S3-compatible SDK does. For bucket-level work, see Creating and listing buckets.

Operation What it does
list_objects List the objects in a bucket
get_object Download an object
remove_object Delete an object
put_object Upload an object
copy_object Copy an object within a bucket
remove_objects Delete several objects at once
fput_object Upload a file as an object
fget_object Download an object to a file
get_partial_object Download a byte range of an object
select_object_content Query an object’s contents with an SQL-like statement
remove_incomplete_upload Remove a multipart upload that never finished
presigned_get_object Make a presigned download URL
presigned_put_object Make a presigned upload URL

The MinIO SDKs expose each of these as a method; the code in List, upload, and download objects uses a few of them.

An SDK with an access key works on the objects in the buckets that key is attached to. To create a bucket or list every bucket on your account, use the dashboard, or the MyAccount API with your account API key, which is separate from an access key. See S3 compatibility for the complete list of what carries over from S3 and what does not.

If a call fails with an access error, check the key’s role on that bucket in Generate an access key, or see Troubleshooting E2E Object Storage.