Restore Deleted File
curl --request POST \
--url https://api.zerodrive.dev/v1/trash/restore \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"trash_id": "<string>",
"version_id": "<string>",
"path": "<string>",
"destination_path": "<string>",
"drive_id": "primary"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
trash_id: '<string>',
version_id: '<string>',
path: '<string>',
destination_path: '<string>',
drive_id: 'primary'
})
};
fetch('https://api.zerodrive.dev/v1/trash/restore', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.zerodrive.dev/v1/trash/restore"
payload = {
"trash_id": "<string>",
"version_id": "<string>",
"path": "<string>",
"destination_path": "<string>",
"drive_id": "primary"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){}Restore Deleted File
Restore a deleted item from 30-day Trash (trs_...) or deleted snapshot (ver_...).
POST
https://api.zerodrive.dev
/
v1
/
trash
/
restore
Restore Deleted File
curl --request POST \
--url https://api.zerodrive.dev/v1/trash/restore \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"trash_id": "<string>",
"version_id": "<string>",
"path": "<string>",
"destination_path": "<string>",
"drive_id": "primary"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
trash_id: '<string>',
version_id: '<string>',
path: '<string>',
destination_path: '<string>',
drive_id: 'primary'
})
};
fetch('https://api.zerodrive.dev/v1/trash/restore', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.zerodrive.dev/v1/trash/restore"
payload = {
"trash_id": "<string>",
"version_id": "<string>",
"path": "<string>",
"destination_path": "<string>",
"drive_id": "primary"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){}Authorizations
Body
application/json
Response
Restored file path and metadata
The response is of type object.

