Getting Started with QStorage API
QStorage provides an S3-compatible API that allows you to store and retrieve any amount of data, at any time, from anywhere on the Quilibrium Network. This API reference documentation provides details about the operations and parameters available in the QStorage API.
API Endpoint
The QStorage API endpoint is:
https://qstorage.quilibrium.com
Authentication
QStorage uses the same authentication mechanism as Amazon S3. You need to provide your QConsole credentials (access key and secret key) to authenticate your requests.
- Using Q's CLI Tooling
- Using a Third-party S3-compatible CLI
Quilibrium's native CLI tooling will automatically use the correct endpoint and authentication for QStorage operations.
# Configure your credentials
qcli configure
# Use QStorage commands
qcli s3 ls
You can use any S3-compatible client or SDK by configuring it to use the QStorage endpoint and your QConsole credentials.
# Configure AWS CLI with your QConsole credentials
aws configure
# AWS Access Key ID: ABC123 (alpha-numeric format)
# AWS Secret Access Key: Adadf4dad/adsf+da4 (string format)
# Default region name: (leave empty)
# Default output format: json (or your preference)
# Use S3 commands with the QStorage endpoint
aws s3 ls --endpoint-url https://qstorage.quilibrium.com
Available Operations
QStorage supports the following basic API operations (see API Reference sections for extensive list):
Object Operations
- PutObject - Adds an object to a bucket
- GetObject - Retrieves an object from a bucket
- CopyObject - Creates a copy of an object
- DeleteObject - Removes an object from a bucket
Bucket Operations
- CreateBucket - Creates a new bucket
- DeleteBucket - Deletes a bucket
S3 Compatibility
QStorage is designed to be compatible with the Amazon S3 API, which means you can use existing S3 clients and SDKs to interact with QStorage. However, there may be some differences or limitations compared to Amazon S3.
For more information about the Amazon S3 API, you can refer to the Amazon S3 API Reference.
Error Responses
QStorage returns standard HTTP status codes to indicate the success or failure of an API request. In addition, error responses include an XML error document that provides details about the error.
Example error response:
<?xml version="1.0" encoding="UTF-8"?>
<Error>
<Code>NoSuchBucket</Code>
<Message>The specified bucket does not exist</Message>
<BucketName>non-existent-bucket</BucketName>
<RequestId>4442587FB7D0A2F9</RequestId>
</Error>
Next Steps
To get started with QStorage, you can:
- Create a bucket using the CreateBucket operation
- Upload an object using the PutObject operation
- Download an object using the GetObject operation
- Copy an object using the CopyObject operation
- Delete an object using the DeleteObject operation
- Delete a bucket using the DeleteBucket operation