Skip to content

Download data from distributed storage

GET
/api/v1/storage/download/{userAddr}/{chunkID}
curl --request GET \
--url 'http://localhost:8080/api/v1/storage/download/0x1234567890123456789012345678901234567890/1?signature=0xabc...' \
--header 'X-Signature: <X-Signature>'

Download and decrypt data from the distributed mesh storage network. Data is automatically retrieved from available shards and decrypted.

Authentication: Optional. Provide signature or password for decryption.

userAddr
required
string
/^0x[a-fA-F0-9]{40}$/
Example
0x1234567890123456789012345678901234567890

Ethereum address (0x…)

chunkID
required
integer
Example
1

Chunk identifier

signature
string
Example
0xabc...

Wallet signature for decryption key derivation

password
string

Password for decryption (alternative to signature)

Download successful

Media typeapplication/json
object
success
boolean
userAddr
string
chunkID
integer
data

Base64-encoded decrypted data

string format: byte
sizeBytes

Decrypted data size in bytes

integer
shardsUsed

Number of shards used for retrieval

integer
shardsTotal

Total shards distributed

integer
downloadedAt

Download timestamp

string format: date-time
Example
{
"success": true,
"userAddr": "0x1234567890123456789012345678901234567890",
"chunkID": 1,
"data": "SGVsbG8gV29ybGQh",
"sizeBytes": 1024,
"shardsUsed": 10,
"shardsTotal": 15,
"downloadedAt": "2025-12-10T12:00:00Z"
}

Bad Request - Invalid parameters

Media typeapplication/json
object
error

Error type

string
message

Human-readable error description

string
code

Optional error code

string
Example
{
"error": "Invalid request",
"message": "User address must be a valid Ethereum address (0x...)"
}

Unauthorized - Authentication failed

Media typeapplication/json
object
error

Error type

string
message

Human-readable error description

string
code

Optional error code

string
Example
{
"error": "Authentication failed",
"message": "Invalid signature or expired timestamp"
}

Not Found - Resource doesn’t exist

Media typeapplication/json
object
error

Error type

string
message

Human-readable error description

string
code

Optional error code

string
Example
{
"error": "Data not found",
"message": "No data found for user 0x... chunk 1"
}

Internal Server Error

Media typeapplication/json
object
error

Error type

string
message

Human-readable error description

string
code

Optional error code

string
Example
{
"error": "Internal server error",
"message": "An unexpected error occurred"
}