s3.php¶
S3 storage management module: creating and deleting accounts, managing buckets and files, obtaining usage statistics, managing pricing plans and billing.
API Methods¶
| Method | Action | Description |
|---|---|---|
create_account | create S3 account/order | Creates a new S3 storage account based on a selected plan, validates bucket name, and processes billing. |
create_bucket | create bucket | Creates a new S3 bucket with specified configuration. |
create_order | create order | Creates a new S3 storage order, provisions an S3 user account, and creates a bucket. |
delete_account | delete account | Deletes an S3 account associated with a specific bucket name and region. |
delete_bucket | delete bucket | Deletes a specified S3 bucket from the storage system. |
delete_file | delete file | Deletes a specific file from S3 storage. Requires valid authentication token and appropriate permissions. |
delete_payment_account | delete payment account | Deletes a specific S3 payment account associated with a bucket. |
get_buckets | get buckets | Retrieves a list of S3 buckets for the authenticated user, including usage statistics and snapshot information. |
get_buckets_rmq | get buckets rmq | Retrieves detailed information about S3 buckets, including usage statistics, metering history, billing info, and access credentials for a specific S3 user. |
get_files | get files | Retrieves a list of files from S3 storage based on provided parameters. |
get_users | get users | Retrieves a list of users associated with S3 storage configurations. |
history | get history | Retrieves the history of S3 operations or access logs based on provided filters. |
list_plans | get list of S3 plans | Returns a list of available S3 storage plans, including pricing and location information. |
show_key | get s3 key | Retrieves S3 access credentials or configuration for a specific bucket/account. |
s3/cancel_payment_account_deletion¶
Cancels the scheduled deletion of an S3 storage account associated with a specific client.
HTTP Method: POST
Parameters:
| Parameter | Required | Type | Description |
|---|---|---|---|
| token | ✅ | string | Authentication token for the request |
| ip | ❌ | string | Client IP address |
| params[client_id] | ✅ | integer | The ID of the client whose account deletion is to be cancelled |
Example Request
Example of a successful response
s3/create_account¶
Creates a new S3 storage account based on a selected plan, validates bucket name, and processes billing.
HTTP Method: POST
Parameters:
| Parameter | Required | Type | Description |
|---|---|---|---|
| action | ✅ | string | The action to perform (must be create_order for account creation) |
| token | ✅ | string | Authentication token |
| params[bucket_name] | ✅ | string | The desired bucket name |
| params[plan_id] | ✅ | integer | ID of the S3 plan to subscribe to |
| params[location] | ❌ | string | Storage location code (e.g., NL) |
Example Request
Failure response
s3/create_bucket¶
Creates a new S3 bucket with specified configuration.
HTTP Method: POST
Parameters:
| Parameter | Required | Type | Description |
|---|---|---|---|
| token | ✅ | string | Authentication token for the API request. |
| params[bucket_name] | ✅ | string | The unique name of the S3 bucket to be created. |
Example Request
Example of a successful response
s3/create_order¶
Creates a new S3 storage order, provisions an S3 user account, and creates a bucket.
HTTP Method: POST
Parameters:
| Parameter | Required | Type | Description |
|---|---|---|---|
| token | ✅ | string | Authentication token for the request. |
| params[plan_id] | ✅ | int | The ID of the S3 plan to subscribe to. |
| params[bucket_name] | ✅ | string | The name of the bucket to be created. |
| params[location] | ✅ | string | The location code where the storage will be provisioned. Must match one of the plan's allowed locations. |
Example Request
Example of a successful response
Failure response
s3/delete_account¶
Deletes an S3 account associated with a specific bucket name and region.
HTTP Method: POST
Parameters:
| Parameter | Required | Type | Description |
|---|---|---|---|
| token | ✅ | string | Authentication token for the request |
| params[bucket_name] | ✅ | string | The name of the S3 bucket to delete |
| params[region] | ✅ | string | The region associated with the bucket |
Example Request
Example of a successful response
s3/delete_bucket¶
Deletes a specified S3 bucket from the storage system.
HTTP Method: POST
Parameters:
| Parameter | Required | Type | Description |
|---|---|---|---|
| token | ✅ | string | Authentication token for API access. |
| params[bucket_name] | ✅ | string | The name of the S3 bucket to be deleted. |
Example Request
s3/delete_file¶
Deletes a specific file from S3 storage. Requires valid authentication token and appropriate permissions.
HTTP Method: POST
Parameters:
| Parameter | Required | Type | Description |
|---|---|---|---|
| action | ✅ | string | Method identifier: delete_file |
| token | ✅ | string | Authentication token for the request. |
| params[file_path] | ✅ | string | The full path of the file to be deleted in the S3 bucket. |
Example Request
Example of a successful response
s3/delete_payment_account¶
Deletes a specific S3 payment account associated with a bucket.
HTTP Method: POST
Parameters:
| Parameter | Required | Type | Description |
|---|---|---|---|
| token | ✅ | string | Authentication token for the request |
| ip | ❌ | string | Client IP address |
| params[bucket_name] | ✅ | string | The name of the S3 bucket to process |
Example Request
Example of a successful response
s3/get_buckets¶
Retrieves a list of S3 buckets for the authenticated user, including usage statistics and snapshot information.
HTTP Method: POST|GET
Parameters:
| Parameter | Required | Type | Description |
|---|---|---|---|
| action | ✅ | string | The action to perform (get_buckets) |
| token | ✅ | string | Authentication token |
| s3uid | ✅ | string | The S3 user ID of the account to list buckets for |
Example Request
Example of a successful response
s3/get_buckets_rmq¶
Retrieves detailed information about S3 buckets, including usage statistics, metering history, billing info, and access credentials for a specific S3 user.
HTTP Method: POST
Parameters:
| Parameter | Required | Type | Description |
|---|---|---|---|
| action | ✅ | string | Method identifier: get_buckets_rmq |
| token | ✅ | string | Authentication token |
| ip | ❌ | string | Client IP address |
| s3uid | ✅ | integer | The unique identifier of the S3 user/account |
Example Request
Example of a successful response
{
"result": "OK",
"action": "get_buckets_rmq",
"message": [
{
"name": "bucket-name-1",
"usage": 1024
},
{
"name": "bucket-name-2",
"usage": 2048
}
],
"usage_storage": 3072,
"quota": 5120,
"metering": [
{
"date": "2024-05-01",
"traffic_gb": 1.5,
"storage_gb": 10.2
}
],
"billing": {
"service_id": 123,
"currency": "EUR",
"period": {
"start": "2024-05-01T00:00:00Z",
"end": "2024-06-01T00:00:00Z"
},
"limits": {
"traffic_gb": 100.0,
"storage_gb": 500
},
"current_period": {
"traffic_used_gb": 5.5,
"storage_used_gb": 45.2,
"billed_traffic_gb": 5.5,
"billed_storage_gb": 45.2,
"billed_traffic_amount": 10.5,
"billed_storage_amount": 45.2
},
"overage": null,
"records": [],
"error": "billing_unavailable"
},
"access_key": "AKIAEXAMPLE123",
"secret_key": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY",
"endpoint": "s3.region-code.amazonaws.com"
}
s3/get_files¶
Retrieves a list of files from S3 storage based on provided parameters.
HTTP Method: POST
Parameters:
| Parameter | Required | Type | Description |
|---|---|---|---|
| action | ✅ | string | Method identifier: get_files |
| token | ✅ | string | Authentication token for API access. |
| ip | ❌ | string | Client IP address used for authentication validation. |
Example Request
Example of a successful response
s3/get_users¶
Retrieves a list of users associated with S3 storage configurations.
HTTP Method: POST
Parameters:
| Parameter | Required | Type | Description |
|---|---|---|---|
| action | ✅ | string | Method identifier: get_users |
| token | ✅ | string | Authentication token for API access. |
| customer_id | ❌ | integer | ID of the customer to filter by. |
| plan_id | ❌ | integer | ID of the plan to filter by. |
| s3uid | ❌ | string | S3 UID to search for (partial match). |
| ❌ | string | Email address to filter by (partial match). | |
| billing | ❌ | string | Billing location code. |
| get_all | ❌ | boolean | If true, skips filtering and returns all users. |
| limit | ❌ | integer | Maximum number of records to return. |
| storage_type | ❌ | string | Storage type (e.g., Standard). |
| include_deleted | ❌ | boolean | Whether to include deleted users. |
| region | ❌ | string | Region code for filtering. |
Example Request
Example of a successful response
{
"result": "OK",
"action": "get_users",
"data": [
{
"id": 1024,
"name": "[email protected]",
"status": "active",
"billing_location": "NL",
"contractnum": "C12345"
}
]
}
s3/history¶
Retrieves the history of S3 operations or access logs based on provided filters.
HTTP Method: POST
Parameters:
| Parameter | Required | Type | Description |
|---|---|---|---|
| token | ✅ | string | Authentication token for API access |
| ip | ❌ | string | Client IP address for validation |
Example of a successful response
{
"result": "OK",
"action": "history",
"data": [
{
"id": 1024,
"event": "bucket_created",
"bucket_name": "my-storage-bucket",
"region": "us-east-1",
"user_id": 55,
"timestamp": "2024-03-20T14:30:00Z",
"ip": "192.168.1.1"
},
{
"id": 1025,
"event": "policy_changed",
"bucket_name": "my-storage-bucket",
"region": "us-east-1",
"user_id": 55,
"timestamp": "2024-03-21T09:15:00Z",
"ip": "192.168.1.1"
}
]
}
s3/list_plans¶
Returns a list of available S3 storage plans, including pricing and location information.
HTTP Method: POST
Parameters:
| Parameter | Required | Type | Description |
|---|---|---|---|
| action | ✅ | string | Method identifier: list_plans |
| token | ✅ | string | Authentication token for the API request. |
Example Request
Example of a successful response
s3/show_key¶
Retrieves S3 access credentials or configuration for a specific bucket/account.
HTTP Method: POST
Parameters:
| Parameter | Required | Type | Description |
|---|---|---|---|
| token | ✅ | string | Authentication token for the request. |
| params[bucket_name] | ✅ | string | The name of the S3 bucket to retrieve keys for. |
Example Request
Example of a successful response
s3/tariff_upgrade¶
Upgrades the S3 storage tariff for a specific service or account.
HTTP Method: POST
Parameters:
| Parameter | Required | Type | Description |
|---|---|---|---|
| token | ✅ | string | Authentication token for API access. |
| params[service_id] | ✅ | int | The unique identifier of the service to upgrade. |
| params[new_tariff_id] | ✅ | int | The ID of the new tariff plan to apply. |
Example Request
Example of a successful response
s3/update_traffic_info¶
Updates traffic usage information or configuration for a specific S3 bucket/account.
HTTP Method: POST
Parameters:
| Parameter | Required | Type | Description |
|---|---|---|---|
| token | ✅ | string | Authentication token for the request. |
| params[bucket_name] | ✅ | string | The name of the S3 bucket to update. |
| params[region] | ❌ | string | The AWS region for the bucket (e.g., us-east-1). |
| params[storage_type] | ❌ | string | The type of storage being used. |
Example Request