Skip to main content

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.

OperationCommandDescriptionUsage
List Items in a BucketlsDisplays 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 BucketputUploads 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 ObjectrestoreInitiates a restore process for an archived object.ramo-cli restore <bucket-name> <object-key> --restore-request '{"Days":<days>}'
Download an ObjectgetDownloads 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 Metadatahead-objectFetch metadata for an object, such as size, storage class, and restore status.ramo-cli head-object <bucket-name> <object-key>
Delete an ObjectrmDeletes an object from a bucket, regardless of its storage class.ramo-cli rm s3://<bucket-name>/<object-key>
Move or Rename an ObjectmvMoves 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 DirectorysyncSynchronizes a local directory with a bucket for bulk uploads or downloads.ramo-cli sync <local-directory> s3://<bucket-name>
Change an Object’s Storage Classstorage-classChanges 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 BucketmbCreates a new bucket.ramo-cli mb s3://<bucket-name>
Delete a BucketrbDeletes an empty bucket. Ensure all objects are removed first.ramo-cli rb s3://<bucket-name>
List All Bucketslist-bucketsLists all buckets associated with your account.ramo-cli list-buckets
Set Bucket Policiesset-policyApplies a policy to a bucket, such as lifecycle rules.ramo-cli set-policy s3://<bucket-name> <policy-file>
Apply Lifecycle RuleslifecycleConfigures lifecycle rules for a bucket to manage object transitions or expiration.ramo-cli lifecycle s3://<bucket-name> <lifecycle-config-file>
Retrieve Object Version Historylist-object-versionsDisplays 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.

OperationCommandDescriptionUsage
Verify Proof of Replicationverify-replicationRetrieves Proof of Replication (PoRep) for a specific file from the blockchain.ramo-cli verify-replication <bucket-name> <object-key>
Verify Proof of Spacetimeverify-spacetimeRetrieves the latest Proof of Spacetime (PoSt) for a file, confirming ongoing storage.ramo-cli verify-spacetime <bucket-name> <object-key>
Generate a Piece IDgenerate-piece-idGenerates 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 IDlookup-pieceQueries the blockchain for all proofs (e.g., PoRep and PoSt) associated with a Piece ID.ramo-cli lookup-piece <piece-id>
Explore Blockchain Linksexplore-proofGenerates a direct URL to a blockchain proof for a file, viewable via a block explorer.ramo-cli explore-proof <bucket-name> <object-key>