Skip to main content

S3 Users

S3 users represent the identities that can access S3 buckets. An S3 user is required to create and access S3 buckets in your project.

S3 User Schema

  • id String - A unique identifier for the S3 user.
  • name String - The human-readable name of the user.
  • suspended Boolean - Indicates whether the user's access is suspended.
  • max_buckets Integer - The maximum number of buckets this user can create.
  • keys Array of Objects - Access keys for the user:
    • access_key String - The S3 access key ID.
    • secret_key String - The S3 secret access key.
  • op_mask String - The operations allowed for this user (e.g., read, write, delete).
  • quota Object - The storage quota limits:
    • max_size_kb Integer - Maximum storage size in KB.
    • max_objects Integer - Maximum number of objects.
    • enabled Boolean - Whether the quota is enforced.
  • created_at String - The timestamp when the user was created.

Create an S3 User

Creates a new S3 user.

POST /storage/v1/s3/users (HTTP 201 - Created)

Body parameters

  • name String Required - The name for the S3 user.

Response Example

{
"s3_user": {
"id": "b77e0c79-159e-46e6-bcc8-cec8b18f0d1a",
"name": "my-user",
"suspended": false,
"max_buckets": 10,
"keys": [
{
"access_key": "T37LAN0XF1T8KC199A6H",
"secret_key": "SrZxfBlv9IdACDW1XLC2dwpdXHl1hLzL19owEdzi"
}
],
"op_mask": "read, write, delete",
"quota": {
"max_size_kb": 52428800,
"max_objects": 1000000,
"enabled": true
},
"created_at": "2026-06-16T14:42:19.405932+00:00"
}
}

List S3 Users

Lists all S3 users in your project.

GET /storage/v1/s3/users (HTTP 200 - OK)

Response Example

{
"total_count": 1,
"page": 1,
"per_page": 50,
"s3_users": [
{
"id": "b77e0c79-159e-46e6-bcc8-cec8b18f0d1a",
"name": "my-user",
"suspended": false,
"max_buckets": 10,
"op_mask": "read, write, delete",
"quota": {
"max_size_kb": 52428800,
"max_objects": 1000000,
"enabled": true
},
"created_at": "2026-06-16T14:42:19.405932+00:00"
}
]
}

Get S3 User

Get details of a specific S3 user.

GET /storage/v1/s3/users/<user_id> (HTTP 200 - OK)

Response Example

{
"s3_user": {
"id": "b77e0c79-159e-46e6-bcc8-cec8b18f0d1a",
"name": "my-user",
"suspended": false,
"max_buckets": 10,
"op_mask": "read, write, delete",
"quota": {
"max_size_kb": 52428800,
"max_objects": 1000000,
"enabled": true
},
"created_at": "2026-06-16T14:42:19.405932+00:00"
}
}

Update S3 User

Update details of an S3 user.

PATCH /storage/v1/s3/users/<user_id> (HTTP 200 - OK)

Body parameters

  • name String Optional - The new name for the S3 user.

Delete S3 User

Delete an S3 user.

DELETE /storage/v1/s3/users/<user_id> (HTTP 204 - No Content)

Rotate S3 User Keys

Generate new S3 access and secret keys for the user, invalidating the old ones.

POST /storage/v1/s3/users/<user_id>/rotate-keys (HTTP 200 - OK)

Examples (cURL)

# Create an S3 user
curl -X POST -H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"name": "my-user"}' \
https://public-api.krs-1.epilayer.eu/storage/v1/s3/users

# List S3 users
curl -H "Authorization: Bearer $TOKEN" \
https://public-api.krs-1.epilayer.eu/storage/v1/s3/users

# Get an S3 user
curl -H "Authorization: Bearer $TOKEN" \
https://public-api.krs-1.epilayer.eu/storage/v1/s3/users/b77e0c79-159e-46e6-bcc8-cec8b18f0d1a

# Update an S3 user
curl -X PATCH -H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"name": "updated-user-name"}' \
https://public-api.krs-1.epilayer.eu/storage/v1/s3/users/b77e0c79-159e-46e6-bcc8-cec8b18f0d1a

# Rotate keys
curl -X POST -H "Authorization: Bearer $TOKEN" \
https://public-api.krs-1.epilayer.eu/storage/v1/s3/users/b77e0c79-159e-46e6-bcc8-cec8b18f0d1a/rotate-keys

# Delete an S3 user
curl -X DELETE -H "Authorization: Bearer $TOKEN" \
https://public-api.krs-1.epilayer.eu/storage/v1/s3/users/b77e0c79-159e-46e6-bcc8-cec8b18f0d1a