cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
What’s new: end-to-end encryption, Replay and Dash updates. Find out more about these updates, new features and more here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Dropbox, webhooks, continue, 20,000+ folders

Dropbox, webhooks, continue, 20,000+ folders

pcooperuk
Explorer | Level 3
Go to solution

So I have setup dropbox, have everything working well, have also setup webhooks to notify that a unknown change has happened.

Here is my problem, the dropbox instance has 22,000+ folders inside it.

 

There is absolutely no way I can efficiently process this volume of /folder/continues just for example if one file / folder has changed.  It makes Zero sense.

 

What is the solution, or is it impossible to truly detect a single file / folder change and efficiently process that change?

 

There is no way to identify the change, all I can do is call listfolder/continue on every single folder which makes the dropbox API pretty much useless in instances where there are a very large number of folders.

1 Accepted Solution

Accepted Solutions

Здравко
Legendary | Level 20
Go to solution

@pcooperuk wrote:

..., have also setup webhooks to notify that a unknown change has happened.

... no way I can efficiently process this volume of /folder/continues just for example if one file / folder has changed.  ...

...

There is no way to identify the change, all I can do is call listfolder/continue on every single folder ...


Hi @pcooperuk,

Seems you haven't read very careful the Dropbox API documentation! 🙂 Are you aware what list cursor is?! 🧐 The same cursor your are using with "listfolder/continue" calls. Seems you are not aware, so I will make a brief review. The cursor iterates over the records in sequence described by the last action happened on every listed entry (latest changed entries are last in the list). Yes, if you are running listing anew every time, all entries will get enumerated in the order just described (of course). That's truly meaningless! That's why you have to keep your last iterator and on next event use the stored iterator to continue from, not anew. 😉 In such a way only changed entries gonna be listed. Even more, to avoid enumerate every one folder in your account explicitly, you can initiate recursive listing on the account root and use the returned cursor in your webhook handler. 😜

Hope this clarifies matter.

View solution in original post

1 Reply 1

Здравко
Legendary | Level 20
Go to solution

@pcooperuk wrote:

..., have also setup webhooks to notify that a unknown change has happened.

... no way I can efficiently process this volume of /folder/continues just for example if one file / folder has changed.  ...

...

There is no way to identify the change, all I can do is call listfolder/continue on every single folder ...


Hi @pcooperuk,

Seems you haven't read very careful the Dropbox API documentation! 🙂 Are you aware what list cursor is?! 🧐 The same cursor your are using with "listfolder/continue" calls. Seems you are not aware, so I will make a brief review. The cursor iterates over the records in sequence described by the last action happened on every listed entry (latest changed entries are last in the list). Yes, if you are running listing anew every time, all entries will get enumerated in the order just described (of course). That's truly meaningless! That's why you have to keep your last iterator and on next event use the stored iterator to continue from, not anew. 😉 In such a way only changed entries gonna be listed. Even more, to avoid enumerate every one folder in your account explicitly, you can initiate recursive listing on the account root and use the returned cursor in your webhook handler. 😜

Hope this clarifies matter.

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Здравко Legendary | Level 20
What do Dropbox user levels mean?