You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.
Forum Discussion
josuegomes
3 years agoHelpful | Level 6
File revisions are not moved
File has several revisions: $ curl "https://api.dropboxapi.com/2/files/list_revisions" --header "Authorization: Bearer <>" --header "Content-Type: application/json" --data '{"limit":10,"mode":"pat...
- 3 years ago
Yes, that's expected. You're using the "id" mode, so it shows the history of the file with the supplied ID across moves, including the revision of the file at each location where it is/was.
Greg-DB
3 years agoDropbox Staff
The file revision history doesn't follow a file when it is moved to another path. You can get the file revision history for a file across moves though by setting "mode" to "id" instead of "path" though. Refer to the /2/files/list_revisions documentation for more information.
- josuegomes3 years agoHelpful | Level 6
Using the file id the behavior is even more bizarre. A revision is added after each move. Is this expected?
$ curl "https://api.dropboxapi.com/2/files/list_revisions" --header "Authorization: Bearer " --header "Content-Type: application/json" --data '{"limit":10,"mode":"id","path":"id:teAlu1WEq40AAAAAAAKg9Q"}'
{"is_deleted": false, "entries": [{"name": "ada.jpg", "path_lower": "/work/ver/ada.jpg", "path_display": "/Work/ver/ada.jpg", "id": "id:teAlu1WEq40AAAAAAAKg9Q", "client_modified": "2019-07-30T21:11:19Z", "server_modified": "2022-08-29T20:40:07Z", "rev": "5e76744f356ba003edfac", "size": 99003, "is_downloadable": true, "content_hash": "a1feb184b8b5723de4f3d16e8530c71759c4a569bc368b0ee88a3acdde9310df"}]}
$ curl "https://api.dropboxapi.com/2/files/move_v2" --header "Authorization: Bearer " --header "Content-Type: application/json" --data '{"allow_ownership_transfer":false,"allow_shared_folder":false,"autorename":false,"from_path":"id:teAlu1WEq40AAAAAAAKg9Q","to_path":"/Work/ver/copy/ada.jpg"}'
{"metadata": {".tag": "file", "name": "ada.jpg", "path_lower": "/work/ver/copy/ada.jpg", "path_display": "/Work/ver/copy/ada.jpg", "id": "id:teAlu1WEq40AAAAAAAKg9Q", "client_modified": "2019-07-30T21:11:19Z", "server_modified": "2022-08-29T20:41:50Z", "rev": "5e7674b15c34c003edfac", "size": 99003, "is_downloadable": true, "content_hash": "a1feb184b8b5723de4f3d16e8530c71759c4a569bc368b0ee88a3acdde9310df"}}
$ curl "https://api.dropboxapi.com/2/files/list_revisions" --header "Authorization: Bearer " --header "Content-Type: application/json" --data '{"limit":10,"mode":"id","path":"id:teAlu1WEq40AAAAAAAKg9Q"}'
{"is_deleted": false, "entries": [{"name": "ada.jpg", "path_lower": "/work/ver/copy/ada.jpg", "path_display": "/Work/ver/copy/ada.jpg", "id": "id:teAlu1WEq40AAAAAAAKg9Q", "client_modified": "2019-07-30T21:11:19Z", "server_modified": "2022-08-29T20:41:50Z", "rev": "5e7674b15c34c003edfac", "size": 99003, "is_downloadable": true, "content_hash": "a1feb184b8b5723de4f3d16e8530c71759c4a569bc368b0ee88a3acdde9310df"}, {"name": "ada.jpg", "path_lower": "/work/ver/ada.jpg", "path_display": "/Work/ver/ada.jpg", "id": "id:teAlu1WEq40AAAAAAAKg9Q", "client_modified": "2019-07-30T21:11:19Z", "server_modified": "2022-08-29T20:40:07Z", "rev": "5e76744f356ba003edfac", "size": 99003, "is_downloadable": true, "content_hash": "a1feb184b8b5723de4f3d16e8530c71759c4a569bc368b0ee88a3acdde9310df"}]}
- Greg-DB3 years agoDropbox Staff
Yes, that's expected. You're using the "id" mode, so it shows the history of the file with the supplied ID across moves, including the revision of the file at each location where it is/was.
About Discuss Dropbox Developer & API
Make connections with other developers
797 PostsLatest Activity: 2 days agoIf you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X or Facebook.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!