Skip to content

Delete data chunk

DELETE
/api/v1/storage/delete/{userAddr}/{chunkID}
curl --request DELETE \
--url http://localhost:8080/api/v1/storage/delete/example/1 \
--header 'X-Signature: <X-Signature>'

Delete a data chunk from the distributed storage network.

Authentication: Requires cryptographic signature to prevent unauthorized deletion.

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

Ethereum address (0x…)

chunkID
required
integer

Chunk identifier

Delete successful

Media typeapplication/json
object
success
boolean
message

Success message

string
data

Optional response data

object
Example
{
"success": true,
"message": "Chunk 1 for user 0x... deleted successfully"
}

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"
}