Renter Storage Upload

API Endpoint


Input Parameters

ArgumentInput ValuesTypeDescriptionRequired?
argHash of file uploaded to BTFS node.stringAdd hash of file to upload.Y
leaf-hash"True" or "False"booleanFlag to specify given hash(es) is leaf hash(es). Default: "false".N
pricePrice in μBTTint64Max price Per GB per day of storage in μBTT.N
replication-factorintReplication factor for the file with erasure coding built-in. Default: "3".N
host-select-modescorestringBased on mode to select the host and upload automatically. Default: "score".N
host-selectionstringUse only these selected hosts in order on 'custom' mode. Use ',' as delimiter.N
host-search-localboolEnable host search under all domains (useful for local test).N
storage-lengthNumber of daysintStore file for certain length in days. Default: "30".N


// Storage upload a file with BTFS hash QmdBX8seLx4TGHwr8Tu9L2QSByaJ9bbFUpxFvKAYyxCf7b, price of 750000 μBTT, and contract length 35 days:

curl -X POST "http://localhost:5001/api/v1/storage/upload?arg=QmdBX8seLx4TGHwr8Tu9L2QSByaJ9bbFUpxFvKAYyxCf7b&price=750000&storage-length=35"


// Outputs Session ID