cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements
Do you have an idea for Dropbox Paper? Share it with us here!

Re: How to get last modified date for folders in Dropbox V2 API ?

New member | Level 2

Hi @Greg_K.

This is making it very complex and, I think, requiring lots of unnecessary API calls.

When a new folder is uploaded, I need to make a playlist from the mp3 files and share it.

So I detect when the folder is likely to be "settled" by seeing if the most recent file is older than 5 minutes. At which point I run 

sharingCreateSharedLinkWithSettings for each file to generate a playlist to save an API call each time.
 
But what if an item gets added, removed or changed? There is no way of knowing which item, so I have to run the create link on all the items, each time, with
result.url...
or "catch" the error, and then look for result.error.error.shared_link_already_exists.metadata.url
 

To have content_hash on folders would be amazing and save all those calls!

(To have public-style folders back would be even more amazing!)

Unless I am missing a trick here?

1 Accepted solution

Accepted Solutions

Re: How to get last modified date for folders in Dropbox V2 API ?

Dropboxer

To monitor changes on a folder like this, I recommend using the cursor functionality offered by /2/files/list_folder[/continue]. You can store the latest returned 'cursor' from any /2/files/list_folder[/continue] result, and then later call back to /2/files/list_folder/continue to get information about only what's changed since you last called. That way you don't have to process everything over again.

View solution in original post

Reply
Loading...
1 Reply

Re: How to get last modified date for folders in Dropbox V2 API ?

Dropboxer

To monitor changes on a folder like this, I recommend using the cursor functionality offered by /2/files/list_folder[/continue]. You can store the latest returned 'cursor' from any /2/files/list_folder[/continue] result, and then later call back to /2/files/list_folder/continue to get information about only what's changed since you last called. That way you don't have to process everything over again.

View solution in original post

Reply
Loading...
API Support

Have a question? Our Dropbox Community is here to help you find an answer!
You won’t have to wait too long for a reply, but why not learn more about the Community while you’re here.

Not the right discussion for you? Find out what else our Community has to say about API Support.

Or, search our Help Center for even more.

Who's talking
Top contributors to this post