Start 2025 on time and up to date. Seamlessly integrate your calendars into Dropbox with these simple steps.

Forum Discussion

Patrik H.'s avatar
Patrik H.
Explorer | Level 4
8 years ago

list_folder/continue with an old cursor

What are the rules regarding cursors for use with list_folder/continue?   As a concrete case, say that I do the following sequence of calls:    1. list_folder => obtaining in response batch "...
  • Greg-DB's avatar
    8 years ago
    Hi Patrik, in general, yes, you can always re-use an old cursor, even if you've already received/used a newer cursor. (In some relatively rare cases cursors will no longer be valid, in which case you'll get the 'reset' error and need to start fresh from /list_folder, but that's not related to using newer cursors.)

    If your outlined scenario, the results b and c indeed may not match, and cursors B and C will be different. The /list_folder/continue interface is only guaranteed to return the results needed to get your local state up to date, based on whatever cursor was supplied. This means it won't necessarily return every single event that occurred, but may just return the changes necessary to describe the overall difference in state.

    And yes, the cursor string itself encodes all of the information necessary for Dropbox to identify what it needs to respond with for that app/account/cursor. (It's doesn't use timestamps exactly, but rather identifiers with specific meaning on the Dropbox backend.) This will be specific to the account, which is why the cursor length can vary from account to account.

    Hope this helps!