We Want to Hear From You! What Do You Want to See on the Community? Tell us here!
Forum Discussion
cvc_dolphin
8 years agoExplorer | Level 4
Dropbox REST API to update file's metadata
I want to rename a file with dropbox rest api.
Well, it's possible with /move_v2 but we need to provide from_path and to_path values.
In my understanding, renaming a file is just updating its metadata. As dropbox provides an api to get metadata, is there any way to update it. I mean provided the id of file, can I change it's metadata?
I have posted my concern regading this on stackoverflow here.
Can anyone help me resolve this?
6 Replies
- Greg-DB8 years ago
Dropbox Community Moderator
Using /2/files/move_v2 is the correct way to rename a file, even if you don't need to move its folder location.
For example, to rename a file inside a "Documents" folder, you would supply values like:from_path:"/Documents/old_name", to_path:"/Documents/new_name"
Or, using the ID, you would still use move_v2, with values like:from_path:"id:abcfileid", to_path:"/Documents/new_name"
Or, you can even use values relative to the parent folder ID, like:from_path:"id:xyzfolderid/old_name", to_path:"id:xyzfolderid/new_name"
- cvc_dolphin8 years agoExplorer | Level 4
Fab...!
Yes, we can rename a file in multiple ways but we either need to have a complete or relative path to file. What if I want to rename a file provided its id only?
I mean other provders like google drive, one drive, box provide a way to deal with file metadata. Whereas, dropbox is providing only a way to access only file metadata but not to update it.
So I was wondering if there is any way to deal with such operation when I am having only the id of a file.
Thanking you in anticipation
- Greg-DB8 years ago
Dropbox Community Moderator
Thanks for following up. The Dropbox API doesn't offer a way to rename the file using just its id and new name without specifying the new path, but I'll pass this along as a feature request. - cvc_dolphin8 years agoExplorer | Level 4
Thank you Greg for confirming this. It'd be great if you update me with a request number when you raise request for this feature.
Cheers..!
- Greg-DB8 years ago
Dropbox Community Moderator
We don't have a public feature request tracker, but I'll follow up here if/when I have any news on this. - cvc_dolphin8 years agoExplorer | Level 4Thanks a lot Greg:).
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.6,036 PostsLatest Activity: 3 hours ago
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
If 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!