Using the Ramo S3 API
The Ramo Storage App (ramo-cli) is an object storage client designed to work seamlessly with the S3 API. It offers a simple command-line interface for managing buckets and objects, making it easy for you to integrate and manage S3-compatible storage services. Since ramo-cli is compatible with the Amazon S3 API, you can migrate your storage without changing application code.
Once you have created and configured buckets, you can manage objects using ramo-cli
.
Below is a list of currently supported operations. Please note that due to its unique features, Ramo supports some Ramo-specific operations that are not part of the standard set of S3 operations. Conversely, Ramo Storage does not yet support the entire set of S3 operations that you might be familiar with.
Standard S3 Operations
Ramo-cli supports various operations for managing your buckets and objects, including tools for interacting with archived data stored in Ramo Archive or Ramo Coldline.
Operation | Command | Description | Usage |
---|---|---|---|
List Items in a Bucket | ls | Displays all objects and folders within a specified bucket, including those in Ramo Archive or Ramo Coldline. | ramo-cli ls <bucket-name> |
Upload an Object to a Bucket | put | Uploads a file to a bucket and assigns a storage class (e.g., Ramo Coldline or Ramo Archive). | ramo-cli put <local-file-path> s3://<bucket-name>/<object-key> --storage-class <storage-class> |
Restore an Archived Object | restore | Initiates a restore process for an archived object. | ramo-cli restore <bucket-name> <object-key> --restore-request '{"Days":<days>}' |
Download an Object | get | Downloads an object from a bucket to your local system. Ensure archived objects are restored first. | ramo-cli get s3://<bucket-name>/<object-key> <local-file-path> |
Retrieve Object Metadata | head-object | Fetch metadata for an object, such as size, storage class, and restore status. | ramo-cli head-object <bucket-name> <object-key> |
Delete an Object | rm | Deletes an object from a bucket, regardless of its storage class. | ramo-cli rm s3://<bucket-name>/<object-key> |
Move or Rename an Object | mv | Moves or renames an object within the same bucket or to a different bucket. | ramo-cli mv s3://<source-bucket>/<source-key> s3://<target-bucket>/<target-key> |
Synchronize Local Directory | sync | Synchronizes a local directory with a bucket for bulk uploads or downloads. | ramo-cli sync <local-directory> s3://<bucket-name> |
Change an Object’s Storage Class | storage-class | Changes the storage class of an object to Ramo Coldline or Ramo Archive. | ramo-cli storage-class s3://<bucket-name>/<object-key> <new-storage-class> |
Create a New Bucket | mb | Creates a new bucket. | ramo-cli mb s3://<bucket-name> |
Delete a Bucket | rb | Deletes an empty bucket. Ensure all objects are removed first. | ramo-cli rb s3://<bucket-name> |
List All Buckets | list-buckets | Lists all buckets associated with your account. | ramo-cli list-buckets |
Set Bucket Policies | set-policy | Applies a policy to a bucket, such as lifecycle rules. | ramo-cli set-policy s3://<bucket-name> <policy-file> |
Apply Lifecycle Rules | lifecycle | Configures lifecycle rules for a bucket to manage object transitions or expiration. | ramo-cli lifecycle s3://<bucket-name> <lifecycle-config-file> |
Retrieve Object Version History | list-object-versions | Displays the version history of an object if versioning is enabled. | ramo-cli list-object-versions s3://<bucket-name>/<object-key> |
Ramo-specific Operations
In addition to standard S3-compatible operations, Ramo Storage offers unique tools designed to leverage its decentralized and trustless architecture. These operations allow users to interact directly with cryptographic proofs, ensuring data integrity and enabling independent verification. The following operations are exclusive to Ramo Storage and provide transparency by pulling data from the blockchain and generating essential IDs for proof verification.
Operation | Command | Description | Usage |
---|---|---|---|
Verify Proof of Replication | verify-replication | Retrieves Proof of Replication (PoRep) for a specific file from the blockchain. | ramo-cli verify-replication <bucket-name> <object-key> |
Verify Proof of Spacetime | verify-spacetime | Retrieves the latest Proof of Spacetime (PoSt) for a file, confirming ongoing storage. | ramo-cli verify-spacetime <bucket-name> <object-key> |
Generate a Piece ID | generate-piece-id | Generates the Piece ID for a local file, a cryptographic identifier used for on-chain verification. | ramo-cli generate-piece-id <local-file-path> |
Lookup Proofs for a Piece ID | lookup-piece | Queries the blockchain for all proofs (e.g., PoRep and PoSt) associated with a Piece ID. | ramo-cli lookup-piece <piece-id> |
Explore Blockchain Links | explore-proof | Generates a direct URL to a blockchain proof for a file, viewable via a block explorer. | ramo-cli explore-proof <bucket-name> <object-key> |