Listing a Bucket's Contents
Listing a Bucket's content is a fundamental command to see what currently exists utilizing ListObjectsV2.
List Bucket
- Using QConsole
- Using Q's CLI tooling
- Using a Third-party S3-compatible CLI
To create a bucket using QConsole:
- Log in to your QConsole account
- Navigate to the QStorage service section
- Select the relavant bucket
- You should see a list of the bucket's content by Object name.
Your new bucket will appear in the bucket list and is immediately available for use.
Quilibrium's native CLI tooling will default to use the correct endpoint.
qcli s3api list-objects --bucket qstorage-demo-bucket
You can utilize a third-party S3-compatible CLI with a QStorage API key and modifying the endpoint to point to QStorage.
aws s3api list-objects \
--bucket qstorage-demo-bucket \
--endpoint-url https://qstorage.quilibrium.com
You can utilize the other methods to set this as described in their documentation.
Filter Object Return Output
You can additionally use the --query argument to filter the output of list-objects down to the key value and size for each object:
qcli s3api list-objects --bucket qstorage-demo-bucket --query 'Contents[].{Key: Key, Size: Size}'
This should reduce the size of your output (and response size) to only what you need for your subsequent commands.
Filter Objects By MetaData
If you have user-defined data, you have to list your bucket contents for the keys:
qcli s3api list-objects --bucket bucket-name --query 'Contents[].{Key: Key}'
then loop through the Object's keys using the HEAD API request for each Object to get the metadata and then filter by the Tags and their respective Values in your application's language.
## Success
When complete you should see a response of:
```json
{
"Contents": [
{
"Key": "TEST",
"LastModified": "2025-04-05T00:01:33+00:00",
"ETag": "\"98fe4eeb7a37b06cc47b4ad1d4c18b0d\"",
"Size": 61,
"StorageClass": "STANDARD",
"Owner": {
"DisplayName": "test-admin",
"ID": "test-admin"
}
}
],
"RequestCharged": null,
"Prefix": ""
}
Success With Query
[
{
"Key": "TEST",
"Size": 61
}
]
Success with Empty Bucket
null