Delete data chunk
DELETE
/api/v1/storage/delete/{userAddr}/{chunkID}
const url = 'http://localhost:8080/api/v1/storage/delete/example/1';const options = {method: 'DELETE', headers: {'X-Signature': '<X-Signature>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”userAddr
required
string
Ethereum address (0x…)
chunkID
required
integer
Chunk identifier
Responses
Section titled “Responses”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"}