We’re Still Here to Help (Even Over the Holidays!) - find out more here.
Forum Discussion
Ankita W.
10 years agoNew member | Level 1
How to get last modified date for folders in Dropbox V2 API ?
Hi, I am trying migrate from v1 to v2 and get to the user's root folder and view all the list of files and folders with last modified date. I am passing "https://api.dropbox.com/2/files/list_folder"...
Greg-DB
Dropbox Community Moderator
10 years agoThe only workaround would be to use list_folder to list all of the contents of the folder and monitor for changes to them, recording the latest time as the modified time for the folder.
- Saar A.9 years agoExplorer | Level 4
Are there any news regarding this issue?
- Greg-DB9 years ago
Dropbox Community Moderator
No, unfortunately I don't have any news on this request.- haktech9 years agoExplorer | Level 3
Hey Greg K., I'm really getting confused between the ClientModifiedDate and ServerModifiedDate. Can you please help me to figure this out? I have been testing this and each time i updated a file via the API, i noticed both of them were being updated with exactly the same datetime value..
What is the difference between them? In my app, i have filters and one of these is filtering by modified date. Which one is more accurate to refer to, ClientModifiedDate or ServerModifiedDate? The modified date that is showing in the Dropbox portal, is the server one or client one?
Thanks.
- Diegovsky4 years agoNew member | Level 2
Watching for changes isn't feasible if the user turns off their computer or loses connectivity. It seems that dropbox.com is able to show the last modified dates for folders so why isn't that exposed thorugh the V2 API?
Also, maintaining a live connection with dropbox would kinda suck since it would keep constantly polling for changes (which is expensive) and will consume a lot of band/API requests. What does the dev team recommend to solve this issue (that is: noticing server changes)? Is there a better way to know if there were any changes on the server?
My application is a oneshot app, which means it only compares disk changes and server changes once, synchronizes what has changed and then shuts off.
- Здравко4 years agoLegendary | Level 20
Diegovsky wrote:Watching for changes isn't feasible if the user turns off their computer or loses connectivity. ...
Also, maintaining a live connection with dropbox would kinda suck since it would keep constantly polling for changes (which is expensive) and will consume a lot of band/API requests. ... Is there a better way to know if there were any changes on the server?
My application is a oneshot app, which means it only compares disk changes and server changes once, synchronizes what has changed and then shuts off.
Hi Diegovsky,
In your case it's easy. You don't have to "keep constantly polling for changes". Just keep the last list cursor and whenever you want (i.e. you application runs next time) just try listing continuation. If the resulting list is empty,... no any changes. Just save the received cursor for next use and nothing more. If there are entries, they are last modified entries. Sync them, save received cursor for the next try and... it's ready. 😉
Hope this helps.
PS: By the way, there are no any timestamps for directory changes in dropbox.com. Where you have seen them? 🧐
- Diegovsky4 years agoNew member | Level 2
Indeed. I was using the python SDK so I didn't look much into this continuation API. Thanks for pointing me towards the right direction 👍
Regarding timestamps of folders, I just selected this folder and it shows me this info ("Modificado" meaning "modified" in english):
- Greg-DB4 years ago
Dropbox Community Moderator
Diegovsky Thanks for the feedback! For reference, not all of the functionality used in the Dropbox product itself is available via the API, but I'll pass this along to the team. In addition to Здравко's guidance, be sure to check out the File Access Guide and Detecting Changes Guide, if you haven't already.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
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, Facebook or Instagram.
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!