Restore File Version
curl --request POST \
--url https://api.zerodrive.dev/v1/files/versions/restore \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"path": "<string>",
"version": "<string>",
"drive_id": "primary"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({path: '<string>', version: '<string>', drive_id: 'primary'})
};
fetch('https://api.zerodrive.dev/v1/files/versions/restore', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.zerodrive.dev/v1/files/versions/restore"
payload = {
"path": "<string>",
"version": "<string>",
"drive_id": "primary"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){}Restore File Version
Restore a file to a previous revision while auto-snapshotting the live file first.
POST
https://api.zerodrive.dev
/
v1
/
files
/
versions
/
restore
Restore File Version
curl --request POST \
--url https://api.zerodrive.dev/v1/files/versions/restore \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"path": "<string>",
"version": "<string>",
"drive_id": "primary"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({path: '<string>', version: '<string>', drive_id: 'primary'})
};
fetch('https://api.zerodrive.dev/v1/files/versions/restore', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.zerodrive.dev/v1/files/versions/restore"
payload = {
"path": "<string>",
"version": "<string>",
"drive_id": "primary"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){}
