Storage API
S3-compatible object storage
Endpoints
| Method | Path | Description |
|---|---|---|
GET | /v1/storage/buckets | List buckets |
POST | /v1/storage/buckets | Create bucket |
GET | /v1/storage/buckets/{bucket_name} | Get bucket |
DELETE | /v1/storage/buckets/{bucket_name} | Delete bucket |
GET | /v1/storage/credentials | Get S3 credentials |
GET | /storage/s3 | S3 protocol guide |
GET /v1/storage/buckets
List buckets
Get all storage buckets with name, creation date, and usage statistics.
Response:
| Field | Type | Description |
|---|---|---|
buckets | array | |
total | integer |
Example:
curl https://api.wayscloud.services/v1/storage/buckets \
-H "X-API-Key: YOUR_API_KEY"POST /v1/storage/buckets
Create bucket
Create a new bucket. Names: 3-63 chars, lowercase/numbers/hyphens, globally unique, cannot be reused after deletion.
Storage Tiers:
standard(default): Reliable storage for general useenterprise: High-performance storage with dedicated infrastructure and enhanced durability
Request Body:
| Field | Type | Description |
|---|---|---|
bucket_name | string | Required. Unique bucket name (lowercase, numbers, hyphens) |
tier | string | Storage tier: standard (general use) or enterprise (dedicated infrastructure, enhanced performance) Values: standard, enterprise |
region | string | Storage region (currently only no-oslo-1 available) |
Response:
| Field | Type | Description |
|---|---|---|
success | boolean | |
bucket_name | string | |
message | string | |
endpoint | string | |
region | string |
Example:
curl -X POST https://api.wayscloud.services/v1/storage/buckets \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{...}'GET /v1/storage/buckets/
Get bucket
Get bucket details: name, creation date, object count, and storage used.
Response:
| Field | Type | Description |
|---|---|---|
name | string | |
region | string | |
created_at | string | |
size_bytes | integer | |
object_count | integer | |
is_public | boolean |
Example:
curl https://api.wayscloud.services/v1/storage/buckets/{bucket_name} \
-H "X-API-Key: YOUR_API_KEY"DELETE /v1/storage/buckets/
Delete bucket
Delete a bucket permanently. Must be empty first. Deleted names cannot be reused.
Response:
| Field | Type | Description |
|---|---|---|
success | boolean | |
message | string |
Example:
curl -X DELETE https://api.wayscloud.services/v1/storage/buckets/{bucket_name} \
-H "X-API-Key: YOUR_API_KEY"GET /v1/storage/credentials
Get S3 credentials
Get Access Key and Secret Key for S3-compatible access. Endpoint: storage.wayscloud.services, Region: eu-north-1.
Response:
| Field | Type | Description |
|---|---|---|
access_key_id | string | |
secret_access_key | string | |
endpoint_url | string | |
region | string |
Example:
curl https://api.wayscloud.services/v1/storage/credentials \
-H "X-API-Key: YOUR_API_KEY"GET /storage/s3
S3 protocol guide
WAYSCloud Storage is fully AWS S3 compatible. Use any AWS SDK or S3 client.
Endpoint: https://storage.wayscloud.services | Region: eu-north-1
AWS CLI
# Configure
aws configure set default.s3.endpoint_url https://storage.wayscloud.services
# List buckets
aws s3 ls
# Upload file
aws s3 cp local.txt s3://your-bucket/remote.txt
# Download file
aws s3 cp s3://your-bucket/remote.txt local.txtPython (boto3)
import boto3
s3 = boto3.client('s3',
endpoint_url='https://storage.wayscloud.services',
aws_access_key_id='YOUR_ACCESS_KEY',
aws_secret_access_key='YOUR_SECRET_KEY',
region_name='eu-north-1'
)
# List objects
response = s3.list_objects_v2(Bucket='your-bucket')
for obj in response.get('Contents', []):
print(obj['Key'])
# Upload file
s3.upload_file('local.txt', 'your-bucket', 'remote.txt')
# Download file
s3.download_file('your-bucket', 'remote.txt', 'local.txt')JavaScript (AWS SDK v3)
import { S3Client, ListObjectsV2Command } from "@aws-sdk/client-s3";
const s3 = new S3Client({
endpoint: "https://storage.wayscloud.services",
region: "eu-north-1",
credentials: {
accessKeyId: "YOUR_ACCESS_KEY",
secretAccessKey: "YOUR_SECRET_KEY"
}
});
const response = await s3.send(new ListObjectsV2Command({
Bucket: "your-bucket"
}));Get your Access Key and Secret Key from /v1/storage/credentials or your dashboard.
Example:
curl https://api.wayscloud.services/storage/s3 \
-H "X-API-Key: YOUR_API_KEY"