Restore Drive Snapshot
curl --request POST \
--url https://api.zerodrive.dev/v1/snapshots/{snapshot_id}/restore \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"paths": [
"<string>"
],
"create_safety_snapshot": true
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({paths: ['<string>'], create_safety_snapshot: true})
};
fetch('https://api.zerodrive.dev/v1/snapshots/{snapshot_id}/restore', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.zerodrive.dev/v1/snapshots/{snapshot_id}/restore"
payload = {
"paths": ["<string>"],
"create_safety_snapshot": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){}Restore Drive Snapshot
Restore all files or selected paths from a snapshot (captures a safety snapshot first by default).
POST
https://api.zerodrive.dev
/
v1
/
snapshots
/
{snapshot_id}
/
restore
Restore Drive Snapshot
curl --request POST \
--url https://api.zerodrive.dev/v1/snapshots/{snapshot_id}/restore \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"paths": [
"<string>"
],
"create_safety_snapshot": true
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({paths: ['<string>'], create_safety_snapshot: true})
};
fetch('https://api.zerodrive.dev/v1/snapshots/{snapshot_id}/restore', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.zerodrive.dev/v1/snapshots/{snapshot_id}/restore"
payload = {
"paths": ["<string>"],
"create_safety_snapshot": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){}Authorizations
Response
Snapshot restore summary
The response is of type object.

