Object Operations
S4 supports standard S3 object operations.
PUT, CopyObject and browser POST return HTTP 507 with XML code
InsufficientStorage when there is insufficient room for data and metadata while preserving the
configured disk reserve. This also applies to empty objects, overwrites, versioned objects and
content that could be deduplicated. A local admission refusal preserves the previous object and versions;
Object Lock fields are committed together with a successful PUT. In a cluster, the coordinator
returns 507 when disk-space refusals prevent the required write quorum; two acknowledgements
still succeed when the third replica is full. A cluster 507 may follow a partial write on some
replicas, so it does not establish that the object is absent. During rolling upgrades an older
coordinator may report the same shortage as 503.
A full erasure set alone does not cause 507: with multi-set placement enabled,
a write acknowledged by RF=3 quorum returns 200 and remains replicated. Later
encoding requires space and enabled auto-tiering. See
EC capacity and fallback.
DELETE may use the reserve for its metadata changes. If that space is also exhausted it returns
507. DeleteObjects keeps HTTP 200 and reports InsufficientStorage separately for each refused
key. Deleting references does not immediately free volume bytes, so the disk may remain full.
See disk settings.
PutObject
Uploads an object to a bucket.
# AWS CLI
aws --endpoint-url http://localhost:9000 s3 cp file.txt s3://mybucket/file.txt
# curl
curl -X PUT http://localhost:9000/mybucket/hello.txt -d "Hello S4!"
# With content type
curl -X PUT http://localhost:9000/mybucket/data.json \
-H "Content-Type: application/json" \
-d '{"key": "value"}'
Response: 200 OK with ETag header.
If versioning is enabled, the response includes x-amz-version-id.
GetObject
Downloads an object.
# AWS CLI
aws --endpoint-url http://localhost:9000 s3 cp s3://mybucket/file.txt downloaded.txt
# curl
curl http://localhost:9000/mybucket/hello.txt
# Get specific version
aws --endpoint-url http://localhost:9000 s3api get-object \
--bucket mybucket \
--key file.txt \
--version-id "abc123-def456" \
output.txt
Response: Object data with appropriate Content-Type, ETag, Content-Length, and Last-Modified headers.
HeadObject
Retrieves object metadata without downloading the body.
aws --endpoint-url http://localhost:9000 s3api head-object \
--bucket mybucket \
--key file.txt
Response: Headers only — Content-Type, Content-Length, ETag, Last-Modified.
DeleteObject
Deletes an object.
# AWS CLI
aws --endpoint-url http://localhost:9000 s3 rm s3://mybucket/file.txt
# curl
curl -X DELETE http://localhost:9000/mybucket/hello.txt
Response: 204 No Content
With versioning enabled, this creates a delete marker instead of permanently removing the object. To permanently delete a specific version:
aws --endpoint-url http://localhost:9000 s3api delete-object \
--bucket mybucket \
--key file.txt \
--version-id "abc123-def456"
CopyObject
Copies an object within S4.
aws --endpoint-url http://localhost:9000 s3 cp \
s3://mybucket/source.txt s3://mybucket/destination.txt
Batch Operations
# Sync a directory
aws --endpoint-url http://localhost:9000 s3 sync ./local-dir s3://mybucket/
# Move an object
aws --endpoint-url http://localhost:9000 s3 mv s3://mybucket/old.txt s3://mybucket/new.txt
# Delete all objects in a bucket
aws --endpoint-url http://localhost:9000 s3 rm s3://mybucket --recursive