curl --request POST \
--url https://api.zerodrive.dev/v1/files/undo-move \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"move_id": "<string>",
"path": "<string>",
"resume": true,
"after": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({move_id: '<string>', path: '<string>', resume: true, after: '<string>'})
};
fetch('https://api.zerodrive.dev/v1/files/undo-move', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.zerodrive.dev/v1/files/undo-move"
payload = {
"move_id": "<string>",
"path": "<string>",
"resume": True,
"after": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"ok": true,
"source": "<string>",
"destination": "<string>",
"kind": "file",
"undone": "<string>",
"move_id": "<string>",
"shares_followed": 123,
"replaced_not_restored": true,
"inferred": true,
"done": true,
"moved": 123,
"skipped": 123,
"next": "<string>",
"resume": true
}Undo the Last Move of an Item
Move an item back to where its last move took it from. Name the move with move_id (from the move answer or from the history) or name the item by the path it is at now. The item’s share link follows it back. It never overwrites or merges into what stands at the old path: when the old path is taken the answer is 409 and nothing changes. It does not restore a file that the original move replaced, and it never rewrites a file’s content. A folder moves back as it is now, in steps of up to 200 files a call: while the answer says done false, call again with the same move_id or path, resume true and after set to the answer’s next. An undo is one more move in the history and can itself be undone.
curl --request POST \
--url https://api.zerodrive.dev/v1/files/undo-move \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"move_id": "<string>",
"path": "<string>",
"resume": true,
"after": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({move_id: '<string>', path: '<string>', resume: true, after: '<string>'})
};
fetch('https://api.zerodrive.dev/v1/files/undo-move', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.zerodrive.dev/v1/files/undo-move"
payload = {
"move_id": "<string>",
"path": "<string>",
"resume": True,
"after": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"ok": true,
"source": "<string>",
"destination": "<string>",
"kind": "file",
"undone": "<string>",
"move_id": "<string>",
"shares_followed": 123,
"replaced_not_restored": true,
"inferred": true,
"done": true,
"moved": 123,
"skipped": 123,
"next": "<string>",
"resume": true
}Authorizations
Body
Response
Moved back. ok, source, destination, kind, undone (the move that was undone), move_id (this undo's own id, or null), shares_followed, replaced_not_restored (true when the original move had replaced a file that is not restored), inferred (true when the original move was inferred and not confirmed) and, for a folder, done, moved, skipped and, while done is false, next and resume true.

